Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [8.0.0]

## [7.0.0]

[Unreleased]: https://github.com/MetaMask/delegation-toolkit/compare/delegator-sdk-monorepo@7.0.0...HEAD
[Unreleased]: https://github.com/MetaMask/delegation-toolkit/compare/delegator-sdk-monorepo@8.0.0...HEAD
[8.0.0]: https://github.com/MetaMask/delegation-toolkit/compare/delegator-sdk-monorepo@7.0.0...delegator-sdk-monorepo@8.0.0
[7.0.0]: https://github.com/MetaMask/delegation-toolkit/releases/tag/delegator-sdk-monorepo@7.0.0
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "delegator-sdk-monorepo",
"version": "7.0.0",
"version": "8.0.0",
"license": "(MIT-0 OR Apache-2.0)",
"private": true,
"repository": {
Expand Down Expand Up @@ -51,7 +51,7 @@
"prettier": "^3.3.3",
"turbo": "latest",
"typescript": "5.0.4",
"viem": "^2.31.4",
"viem": "2.31.4",
"webauthn-p256": "^0.0.10"
},
"packageManager": "yarn@4.2.2",
Expand Down
9 changes: 5 additions & 4 deletions packages/delegation-abis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.11.0",
"description": "ABIs mapped to versions of the Delegation Framework contracts",
"license": "(MIT-0 OR Apache-2.0)",
"type": "module",
"keywords": [
"MetaMask",
"Ethereum"
Expand All @@ -18,7 +19,7 @@
"author": "MetaMask <hello@metamask.io>",
"sideEffects": false,
"contributors": [],
"main": "./dist/index.js",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
Expand All @@ -28,11 +29,11 @@
"exports": {
".": {
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
},
"import": {
"types": "./dist/index.d.mts",
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
}
},
Expand Down
12 changes: 11 additions & 1 deletion packages/delegation-abis/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
import type { Options } from 'tsup';
import config from '../../shared/config/base.tsup.config';
export default config;

const options: Options = {
...config,
entry: ['src/index.ts'],
dts: {
entry: ['src/index.ts'],
},
};

export default options;
14 changes: 13 additions & 1 deletion packages/delegation-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.2.0-rc.1]

### Added

- Added a Nonce caveat enforcer terms builder `createNonceTerms` ([#44](https://github.com/metamask/delegation-toolkit/pull/44))

### Changed

- The configuration parameter `callData` is now `calldata` in `createExactCalldataTerms` argument type. ([#24](https://github.com/metamask/delegation-toolkit/pull/24))
- The package is explictly marked as ESM via `type: module`; with CJS compatibility maintained with dual export. ([#27](https://github.com/metamask/delegation-toolkit/pull/27))

## [0.1.0]

### Changed

- Add @metamask/delegation-core package, providing utility types, delegation hashing, and terms encoding for a limited set of caveat enforcers.

[Unreleased]: https://github.com/metamask/delegation-toolkit/compare/@metamask/delegation-core@0.1.0...HEAD
[Unreleased]: https://github.com/metamask/delegation-toolkit/compare/@metamask/delegation-core@0.2.0-rc.1...HEAD
[0.2.0-rc.1]: https://github.com/metamask/delegation-toolkit/compare/@metamask/delegation-core@0.1.0...@metamask/delegation-core@0.2.0-rc.1
[0.1.0]: https://github.com/metamask/delegation-toolkit/releases/tag/@metamask/delegation-core@0.1.0
6 changes: 3 additions & 3 deletions packages/delegation-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/delegation-core",
"version": "0.1.0",
"version": "0.2.0-rc.1",
"description": "Low level core functionality for interacting with the Delegation Framework",
"license": "(MIT-0 OR Apache-2.0)",
"type": "module",
Expand All @@ -20,7 +20,7 @@
"sideEffects": false,
"contributors": [],
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist/**",
Expand All @@ -34,7 +34,7 @@
},
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
"default": "./dist/index.mjs"
}
},
"./package.json": "./package.json"
Expand Down
9 changes: 5 additions & 4 deletions packages/delegation-deployments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.12.0",
"description": "A history of deployments of the Delegation Framework",
"license": "(MIT-0 OR Apache-2.0)",
"type": "module",
"keywords": [
"MetaMask",
"Ethereum"
Expand All @@ -15,7 +16,7 @@
"type": "git",
"url": "https://github.com/metamask/delegation-toolkit.git"
},
"main": "./dist/index.js",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
Expand All @@ -25,11 +26,11 @@
"exports": {
".": {
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
},
"import": {
"types": "./dist/index.d.mts",
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
}
},
Expand Down
12 changes: 11 additions & 1 deletion packages/delegation-deployments/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
import type { Options } from 'tsup';
import config from '../../shared/config/base.tsup.config';
export default config;

const options: Options = {
...config,
entry: ['src/index.ts'],
dts: {
entry: ['src/index.ts'],
},
};

export default options;
18 changes: 17 additions & 1 deletion packages/delegation-toolkit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

[Unreleased]: https://github.com/metamask/delegation-toolkit/
## [0.13.0-rc.1]

### Changed

- The `startTime` parameter is now optional when requesting permissions through the experimental `erc7715ProviderActions`.
- The Viem peer dependency is now `viem@^2.31.4`. ([#22](https://github.com/metamask/delegation-toolkit/pull/22))
- Individual constants like `SINGLE_DEFAULT_MODE` are now replaced with the `ExecutionMode` enum. ([#16](https://github.com/metamask/delegation-toolkit/pull/16))
- `allowInsecureUnrestrictedDelegation: true` is now required when creating or signing a delegation with no caveats. ([#24](https://github.com/metamask/delegation-toolkit/pull/24))
- `CaveatBuilder` now accepts a single caveat configuration object instead of positional arguments. ([#24](https://github.com/metamask/delegation-toolkit/pull/24))
- The test runner is now Vitest, with Hardhat removed entirely. ([#27](https://github.com/metamask/delegation-toolkit/pull/27))

### Fixed

- Fixed a bug where `sendTransactionWithDelegation` failed whenever `value` was specified in the parameters. ([#30](https://github.com/metamask/delegation-toolkit/pull/30))

[Unreleased]: https://github.com/metamask/delegation-toolkit/compare/@metamask/delegation-toolkit@0.13.0-rc.1...HEAD
[0.13.0-rc.1]: https://github.com/metamask/delegation-toolkit/releases/tag/@metamask/delegation-toolkit@0.13.0-rc.1
37 changes: 19 additions & 18 deletions packages/delegation-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/delegation-toolkit",
"version": "0.12.0",
"version": "0.13.0-rc.1",
"type": "module",
"description": "The Delegation Toolkit built on top of Viem - a library for interacting with DeleGator Smart Accounts",
"license": "(MIT-0 OR Apache-2.0)",
Expand All @@ -20,57 +20,58 @@
"dist/**",
"dist/"
],
"main": "./dist/index.js",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"require": {
"types": "./dist/index.d.ts",
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
},
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.js"
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
}
},
"./utils": {
"require": {
"types": "./dist/utils/index.d.ts",
"types": "./dist/utils/index.d.cts",
"default": "./dist/utils/index.cjs"
},
"import": {
"types": "./dist/utils/index.d.mts",
"default": "./dist/utils/index.js"
"types": "./dist/utils/index.d.ts",
"default": "./dist/utils/index.mjs"
}
},
"./contracts": {
"require": {
"types": "./dist/contracts/index.d.ts",
"types": "./dist/contracts/index.d.cts",
"default": "./dist/contracts/index.cjs"
},
"import": {
"types": "./dist/contracts/index.d.mts",
"default": "./dist/contracts/index.js"
"types": "./dist/contracts/index.d.ts",
"default": "./dist/contracts/index.mjs"
}
},
"./actions": {
"require": {
"types": "./dist/actions/index.d.ts",
"types": "./dist/actions/index.d.cts",
"default": "./dist/actions/index.cjs"
},
"import": {
"types": "./dist/actions/index.d.mts",
"default": "./dist/actions/index.js"
"types": "./dist/actions/index.d.ts",
"default": "./dist/actions/index.mjs"
}
},
"./experimental": {
"require": {
"types": "./dist/experimental/index.d.ts",
"types": "./dist/experimental/index.d.cts",
"default": "./dist/experimental/index.cjs"
},
"import": {
"types": "./dist/experimental/index.d.mts",
"default": "./dist/experimental/index.js"
"types": "./dist/experimental/index.d.ts",
"default": "./dist/experimental/index.mjs"
}
},
"./package.json": "./package.json"
Expand Down Expand Up @@ -113,7 +114,7 @@
},
"dependencies": {
"@metamask/delegation-abis": "^0.11.0",
"@metamask/delegation-core": "^0.1.0",
"@metamask/delegation-core": "^0.2.0-rc.1",
"@metamask/delegation-deployments": "^0.12.0",
"buffer": "^6.0.3",
"webauthn-p256": "^0.0.10"
Expand Down
5 changes: 5 additions & 0 deletions shared/config/base.tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,9 @@ export default defineConfig({
bundle: true,
skipNodeModulesBundle: true,
outDir: 'dist',
outExtension({ format }) {
return {
js: `.${format === 'cjs' ? 'cjs' : 'mjs'}`,
};
},
});
Loading
Loading