Skip to content

Commit 0a56d8d

Browse files
Release smart accounts kit v1.5.0
* release docs for v1.5.0 * add overview section * improve changelog
1 parent 3212206 commit 0a56d8d

78 files changed

Lines changed: 11716 additions & 4 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docusaurus.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ const config = {
242242
sidebarCollapsed: false,
243243
includeCurrentVersion: true,
244244
// Set to the latest release.
245-
lastVersion: '1.2.0',
245+
lastVersion: '1.5.0',
246246
versions: {
247247
// Defaults to the ./docs folder.
248248
// Using "development" instead of "next" as path.
@@ -251,8 +251,8 @@ const config = {
251251
path: 'development',
252252
},
253253
// The latest release.
254-
'1.2.0': {
255-
label: 'latest (1.2.0)',
254+
'1.5.0': {
255+
label: 'latest (1.5.0)',
256256
},
257257
},
258258
},
87.3 KB
Loading
792 KB
Loading
864 KB
Loading
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
sidebar_label: 0.3.0
3+
description: MetaMask Smart Accounts Kit v0.3.0 changelog
4+
---
5+
6+
# What's new in v0.3.0?
7+
8+
:::warning Breaking changes
9+
10+
The ⚠️ symbol denotes potentially breaking API changes. As per the [semantic versioning specification](https://semver.org/#spec-item-4), from v1.0.0 onward, breaking changes will be released only in major version bumps.
11+
12+
:::
13+
14+
## Enhancements
15+
16+
- From v0.3.0 onward, function call scope by default doesn't allow any native token transfer. You can
17+
set `valueLte` to allow native token transfer up to a specified amount per call. See [how to allow native token transfer](../guides/delegation/use-delegation-scopes/function-call.md#allow-native-token-transfer).
18+
19+
## Fixes
20+
21+
- Fixed an issue where packages using the default `moduleResolution` could not resolve types for subpath imports. A `typesVersions` fallback has been added to resolve types without `tsconfig` changes.
22+
23+
## Contract addresses
24+
25+
The following are the contract addresses for the
26+
[Delegation Framework version 1.3.0](https://github.com/MetaMask/delegation-framework/blob/v1.3.0/documents/Deployments.md),
27+
as used by this version of the toolkit.
28+
29+
### Delegation Framework
30+
31+
| Contract | Address |
32+
| --------------------- | -------------------------------------------- |
33+
| EntryPoint | `0x0000000071727De22E5E9d8BAf0edAc6f37da032` |
34+
| SimpleFactory | `0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c` |
35+
| DelegationManager | `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3` |
36+
| MultiSigDeleGatorImpl | `0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7` |
37+
| HybridDeleGatorImpl | `0x48dBe696A4D990079e039489bA2053B36E8FFEC4` |
38+
39+
### Caveat enforcers
40+
41+
| Enforcer | Address |
42+
| ---------------------------------------- | -------------------------------------------- |
43+
| AllowedCalldataEnforcer | `0xc2b0d624c1c4319760C96503BA27C347F3260f55` |
44+
| AllowedMethodsEnforcer | `0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5` |
45+
| AllowedTargetsEnforcer | `0x7F20f61b1f09b08D970938F6fa563634d65c4EeB` |
46+
| ArgsEqualityCheckEnforcer | `0x44B8C6ae3C304213c3e298495e12497Ed3E56E41` |
47+
| BlockNumberEnforcer | `0x5d9818dF0AE3f66e9c3D0c5029DAF99d1823ca6c` |
48+
| DeployedEnforcer | `0x24ff2AA430D53a8CD6788018E902E098083dcCd2` |
49+
| ERC20BalanceChangeEnforcer | `0xcdF6aB796408598Cea671d79506d7D48E97a5437` |
50+
| ERC20TransferAmountEnforcer | `0xf100b0819427117EcF76Ed94B358B1A5b5C6D2Fc` |
51+
| ERC20PeriodTransferEnforcer | `0x474e3Ae7E169e940607cC624Da8A15Eb120139aB` |
52+
| ERC20StreamingEnforcer | `0x56c97aE02f233B29fa03502Ecc0457266d9be00e` |
53+
| ERC721BalanceChangeEnforcer | `0x8aFdf96eDBbe7e1eD3f5Cd89C7E084841e12A09e` |
54+
| ERC721TransferEnforcer | `0x3790e6B7233f779b09DA74C72b6e94813925b9aF` |
55+
| ERC1155BalanceChangeEnforcer | `0x63c322732695cAFbbD488Fc6937A0A7B66fC001A` |
56+
| ExactCalldataBatchEnforcer | `0x982FD5C86BBF425d7d1451f974192d4525113DfD` |
57+
| ExactCalldataEnforcer | `0x99F2e9bF15ce5eC84685604836F71aB835DBBdED` |
58+
| ExactExecutionBatchEnforcer | `0x1e141e455d08721Dd5BCDA1BaA6Ea5633Afd5017` |
59+
| ExactExecutionEnforcer | `0x146713078D39eCC1F5338309c28405ccf85Abfbb` |
60+
| IdEnforcer | `0xC8B5D93463c893401094cc70e66A206fb5987997` |
61+
| LimitedCallsEnforcer | `0x04658B29F6b82ed55274221a06Fc97D318E25416` |
62+
| MultiTokenPeriodEnforcer | `0xFB2f1a9BD76d3701B730E5d69C3219D42D80eBb7` |
63+
| NonceEnforcer | `0xDE4f2FAC4B3D87A1d9953Ca5FC09FCa7F366254f` |
64+
| NativeBalanceChangeEnforcer | `0xbD7B277507723490Cd50b12EaaFe87C616be6880` |
65+
| NativeTokenPaymentEnforcer | `0x4803a326ddED6dDBc60e659e5ed12d85c7582811` |
66+
| NativeTokenTransferAmountEnforcer | `0xF71af580b9c3078fbc2BBF16FbB8EEd82b330320` |
67+
| NativeTokenStreamingEnforcer | `0xD10b97905a320b13a0608f7E9cC506b56747df19` |
68+
| NativeTokenPeriodTransferEnforcer | `0x9BC0FAf4Aca5AE429F4c06aEEaC517520CB16BD9` |
69+
| OwnershipTransferEnforcer | `0x7EEf9734E7092032B5C56310Eb9BbD1f4A524681` |
70+
| RedeemerEnforcer | `0xE144b0b2618071B4E56f746313528a669c7E65c5` |
71+
| SpecificActionERC20TransferBatchEnforcer | `0x00e0251aaA263dfE3B3541B758A82D1CBA1c3B6D` |
72+
| TimestampEnforcer | `0x1046bb45C8d673d4ea75321280DB34899413c069` |
73+
| ValueLteEnforcer | `0x92Bf12322527cAA612fd31a0e810472BBB106A8F` |
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
---
2+
sidebar_label: 1.0.0
3+
description: MetaMask Smart Accounts Kit v1.0.0 changelog
4+
---
5+
6+
# What's new in v1.0.0?
7+
8+
:::info First stable release
9+
10+
This is the first stable release of MetaMask Smart Accounts Kit. From v1.0.0 onward, breaking changes will be released only in major version bumps, as per the [semantic versioning specification](https://semver.org/#spec-item-4).
11+
12+
:::
13+
14+
## Breaking changes
15+
16+
### ⚠️ `sendTransactionWithDelegation`
17+
18+
- The `permissionsContext` parameter has been renamed to `permissionContext` (singular).
19+
- `permissionContext` now accepts `PermissionContext` which represents encoded delegation chain (`Hex`) or a decoded delegation chain (`Delegation[]`) for redeeming delegations.
20+
21+
```ts
22+
await walletClient.sendTransactionWithDelegation({
23+
// remove-next-line
24+
- permissionsContext: "0x...",
25+
// add-next-line
26+
+ permissionContext: "0x...",
27+
delegationManager: "0x..,
28+
// ...
29+
});
30+
```
31+
32+
### ⚠️ `sendUserOperationWithDelegation`
33+
34+
- The `permissionsContext` parameter has been renamed to `permissionContext` (singular).
35+
- `permissionContext` now accepts `PermissionContext` which represents encoded delegation chain (`Hex`) or a decoded delegation chain (`Delegation[]`) for redeeming delegations.
36+
- The `accountMetadata` parameter has been replaced with `dependencies`.
37+
38+
```ts
39+
await bundlerClient.sendUserOperationWithDelegation({
40+
// remove-next-line
41+
- accountMetadata: {
42+
// add-next-line
43+
+ dependencies: {
44+
factory: "0x..",
45+
factoryData: "0x..."
46+
},
47+
// ...
48+
calls: [
49+
{
50+
to: sessionAccount.address,
51+
data: "0x",
52+
value: 1n,
53+
// remove-next-line
54+
- permissionsContext: "0x..",
55+
// add-next-line
56+
+ permissionContext: "0x..",
57+
delegationManager: "0x..",
58+
},
59+
],
60+
// ...
61+
});
62+
```
63+
64+
### ⚠️ `getDelegationHashOffchain`
65+
66+
The function has been renamed to `hashDelegation` for improved clarity.
67+
68+
```typescript
69+
// remove-next-line
70+
- import { getDelegationHashOffchain } from "@metamask/smart-accounts-kit";
71+
// add-next-line
72+
+ import { hashDelegation } from "@metamask/smart-accounts-kit/utils";
73+
74+
// remove-next-line
75+
- const delegationHash = getDelegationHashOffchain(delegation);
76+
// add-next-line
77+
+ const delegationHash = hashDelegation(delegation);
78+
```
79+
80+
### ⚠️ `requestExecutionPermissions`
81+
82+
- The action now accepts `isAdjustmentAllowed` inside each permission object as per new ERC-7715 specification.
83+
- The action now accepts `to` instead of `signer` for the session account.
84+
- The action now returns developer friendly types, `chainId` as `number` and token amounts as `bigint`.
85+
- `expiry` is now an optional parameter.
86+
87+
```ts
88+
await walletClient.requestExecutionPermissions([{
89+
chainId: chain.id,
90+
expiry,
91+
// The requested permissions will be granted to the
92+
// session account.
93+
// add-next-line
94+
+ to: sessionAccount.address,
95+
// remove-start
96+
- signer: {
97+
- type: "account",
98+
- data: {
99+
- address: sessionAccount.address,
100+
- },
101+
- },
102+
// remove-end
103+
// remove-next-line
104+
- isAdjustmentAllowed: true,
105+
permission: {
106+
type: "erc20-token-periodic",
107+
data: {
108+
// ...
109+
},
110+
// add-next-line
111+
+ isAdjustmentAllowed: true,
112+
},
113+
}]);
114+
```
115+
116+
### ⚠️ `encodePermissionContexts`
117+
118+
The utility function has been removed. See [`encodeDelegations`](../reference/delegation/index.md#encodedelegations) to encode the delegations.
119+
120+
### ⚠️ `decodePermissionContexts`
121+
122+
The utility function has been removed. See [`decodeDelegations`](../reference/delegation/index.md#decodedelegations) to decode the delegations.
123+
124+
### ⚠️ `redeemDelegations`
125+
126+
The `redeemDelegations` function and `Redemption` type have been removed. Use the [`DelegationManager.encode.redeemDelegations`](../reference/delegation/index.md#redeemdelegations) encoding utility.
127+
128+
## Enhancements
129+
130+
- New ERC-7715 Wallet Client actions have been added to [get the supported permission](../guides/advanced-permissions/get-supported-permissions.md), and [get granted permissions](../guides/advanced-permissions/get-granted-permissions.md) from a wallet.
131+
- The `signer` parameter in `toMetaMaskSmartAccount` is now optional. If omitted, non-signing operations still work, but signing operations such as `signUserOperation`, `signDelegation`, `signMessage`, and `signTypedData` throw an error.
132+
- Added [`encodeDelegation`](../reference/delegation/index.md#encodedelegation) and [`decodeDelegation`](../reference/delegation/index.md#decodedelegation) utilities for encoding and decoding single delegation.
133+
- Allow scope type to be specified either as [ScopeType enum](../reference/types.md#scopetype) or string literal.
134+
- Allow caveat type to be specified either as [CaveatType enum](../reference/types.md#caveattype) or string literal.
135+
- Added support for Tempo Mainnet and Tempo Moderato Testnet.
136+
- The `webauthn-p256` dependency has been replaced with the `ox` p256 module. This doesn't impact developer facing APIs.
137+
- Improved `@metamask/delegation-abis` tree-shakability.
138+
139+
## Fixes
140+
141+
- Fixed `signDelegation` to correctly await the signer and return the signed signature.
142+
- The `delegation.salt` and `caveat.args` now default to `0x00` instead of `0x`. This prevents
143+
`Cannot convert 0x to a BigInt` errors when encoding delegations directly with Viem.
144+
145+
## Contract addresses
146+
147+
The following are the contract addresses for the
148+
[Delegation Framework version 1.3.0](https://github.com/MetaMask/delegation-framework/blob/v1.3.0/documents/Deployments.md),
149+
as used by this version of the toolkit.
150+
151+
### Delegation Framework
152+
153+
| Contract | Address |
154+
| --------------------- | -------------------------------------------- |
155+
| EntryPoint | `0x0000000071727De22E5E9d8BAf0edAc6f37da032` |
156+
| SimpleFactory | `0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c` |
157+
| DelegationManager | `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3` |
158+
| MultiSigDeleGatorImpl | `0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7` |
159+
| HybridDeleGatorImpl | `0x48dBe696A4D990079e039489bA2053B36E8FFEC4` |
160+
161+
### Caveat enforcers
162+
163+
| Enforcer | Address |
164+
| ---------------------------------------- | -------------------------------------------- |
165+
| AllowedCalldataEnforcer | `0xc2b0d624c1c4319760C96503BA27C347F3260f55` |
166+
| AllowedMethodsEnforcer | `0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5` |
167+
| AllowedTargetsEnforcer | `0x7F20f61b1f09b08D970938F6fa563634d65c4EeB` |
168+
| ArgsEqualityCheckEnforcer | `0x44B8C6ae3C304213c3e298495e12497Ed3E56E41` |
169+
| BlockNumberEnforcer | `0x5d9818dF0AE3f66e9c3D0c5029DAF99d1823ca6c` |
170+
| DeployedEnforcer | `0x24ff2AA430D53a8CD6788018E902E098083dcCd2` |
171+
| ERC20BalanceChangeEnforcer | `0xcdF6aB796408598Cea671d79506d7D48E97a5437` |
172+
| ERC20TransferAmountEnforcer | `0xf100b0819427117EcF76Ed94B358B1A5b5C6D2Fc` |
173+
| ERC20PeriodTransferEnforcer | `0x474e3Ae7E169e940607cC624Da8A15Eb120139aB` |
174+
| ERC20StreamingEnforcer | `0x56c97aE02f233B29fa03502Ecc0457266d9be00e` |
175+
| ERC721BalanceChangeEnforcer | `0x8aFdf96eDBbe7e1eD3f5Cd89C7E084841e12A09e` |
176+
| ERC721TransferEnforcer | `0x3790e6B7233f779b09DA74C72b6e94813925b9aF` |
177+
| ERC1155BalanceChangeEnforcer | `0x63c322732695cAFbbD488Fc6937A0A7B66fC001A` |
178+
| ExactCalldataBatchEnforcer | `0x982FD5C86BBF425d7d1451f974192d4525113DfD` |
179+
| ExactCalldataEnforcer | `0x99F2e9bF15ce5eC84685604836F71aB835DBBdED` |
180+
| ExactExecutionBatchEnforcer | `0x1e141e455d08721Dd5BCDA1BaA6Ea5633Afd5017` |
181+
| ExactExecutionEnforcer | `0x146713078D39eCC1F5338309c28405ccf85Abfbb` |
182+
| IdEnforcer | `0xC8B5D93463c893401094cc70e66A206fb5987997` |
183+
| LimitedCallsEnforcer | `0x04658B29F6b82ed55274221a06Fc97D318E25416` |
184+
| MultiTokenPeriodEnforcer | `0xFB2f1a9BD76d3701B730E5d69C3219D42D80eBb7` |
185+
| NonceEnforcer | `0xDE4f2FAC4B3D87A1d9953Ca5FC09FCa7F366254f` |
186+
| NativeBalanceChangeEnforcer | `0xbD7B277507723490Cd50b12EaaFe87C616be6880` |
187+
| NativeTokenPaymentEnforcer | `0x4803a326ddED6dDBc60e659e5ed12d85c7582811` |
188+
| NativeTokenTransferAmountEnforcer | `0xF71af580b9c3078fbc2BBF16FbB8EEd82b330320` |
189+
| NativeTokenStreamingEnforcer | `0xD10b97905a320b13a0608f7E9cC506b56747df19` |
190+
| NativeTokenPeriodTransferEnforcer | `0x9BC0FAf4Aca5AE429F4c06aEEaC517520CB16BD9` |
191+
| OwnershipTransferEnforcer | `0x7EEf9734E7092032B5C56310Eb9BbD1f4A524681` |
192+
| RedeemerEnforcer | `0xE144b0b2618071B4E56f746313528a669c7E65c5` |
193+
| SpecificActionERC20TransferBatchEnforcer | `0x00e0251aaA263dfE3B3541B758A82D1CBA1c3B6D` |
194+
| TimestampEnforcer | `0x1046bb45C8d673d4ea75321280DB34899413c069` |
195+
| ValueLteEnforcer | `0x92Bf12322527cAA612fd31a0e810472BBB106A8F` |
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
sidebar_label: 1.1.0
3+
description: MetaMask Smart Accounts Kit v1.1.0 changelog
4+
---
5+
6+
# What's new in v1.1.0?
7+
8+
## Enhancements
9+
10+
- `toMetaMaskSmartAccount` accepts a new `nonceKeyManager` parameter for managing custom nonces. If provided, it enables
11+
support for parallel execution.
12+
- `getNonce` accepts a new `key` parameter to retrieve the nonce for a specified key.
13+
- Smart Accounts Kit now supports Mantle.
14+
See [supported networks](../get-started/supported-networks.md) for more details.
15+
16+
### Contract addresses
17+
18+
The following are the contract addresses for the
19+
[Delegation Framework version 1.3.0](https://github.com/MetaMask/delegation-framework/blob/v1.3.0/documents/Deployments.md),
20+
as used by this version of the toolkit.
21+
22+
### Delegation Framework
23+
24+
| Contract | Address |
25+
| --------------------- | -------------------------------------------- |
26+
| EntryPoint | `0x0000000071727De22E5E9d8BAf0edAc6f37da032` |
27+
| SimpleFactory | `0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c` |
28+
| DelegationManager | `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3` |
29+
| MultiSigDeleGatorImpl | `0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7` |
30+
| HybridDeleGatorImpl | `0x48dBe696A4D990079e039489bA2053B36E8FFEC4` |
31+
32+
### Caveat enforcers
33+
34+
| Enforcer | Address |
35+
| ---------------------------------------- | -------------------------------------------- |
36+
| AllowedCalldataEnforcer | `0xc2b0d624c1c4319760C96503BA27C347F3260f55` |
37+
| AllowedMethodsEnforcer | `0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5` |
38+
| AllowedTargetsEnforcer | `0x7F20f61b1f09b08D970938F6fa563634d65c4EeB` |
39+
| ArgsEqualityCheckEnforcer | `0x44B8C6ae3C304213c3e298495e12497Ed3E56E41` |
40+
| BlockNumberEnforcer | `0x5d9818dF0AE3f66e9c3D0c5029DAF99d1823ca6c` |
41+
| DeployedEnforcer | `0x24ff2AA430D53a8CD6788018E902E098083dcCd2` |
42+
| ERC20BalanceChangeEnforcer | `0xcdF6aB796408598Cea671d79506d7D48E97a5437` |
43+
| ERC20TransferAmountEnforcer | `0xf100b0819427117EcF76Ed94B358B1A5b5C6D2Fc` |
44+
| ERC20PeriodTransferEnforcer | `0x474e3Ae7E169e940607cC624Da8A15Eb120139aB` |
45+
| ERC20StreamingEnforcer | `0x56c97aE02f233B29fa03502Ecc0457266d9be00e` |
46+
| ERC721BalanceChangeEnforcer | `0x8aFdf96eDBbe7e1eD3f5Cd89C7E084841e12A09e` |
47+
| ERC721TransferEnforcer | `0x3790e6B7233f779b09DA74C72b6e94813925b9aF` |
48+
| ERC1155BalanceChangeEnforcer | `0x63c322732695cAFbbD488Fc6937A0A7B66fC001A` |
49+
| ExactCalldataBatchEnforcer | `0x982FD5C86BBF425d7d1451f974192d4525113DfD` |
50+
| ExactCalldataEnforcer | `0x99F2e9bF15ce5eC84685604836F71aB835DBBdED` |
51+
| ExactExecutionBatchEnforcer | `0x1e141e455d08721Dd5BCDA1BaA6Ea5633Afd5017` |
52+
| ExactExecutionEnforcer | `0x146713078D39eCC1F5338309c28405ccf85Abfbb` |
53+
| IdEnforcer | `0xC8B5D93463c893401094cc70e66A206fb5987997` |
54+
| LimitedCallsEnforcer | `0x04658B29F6b82ed55274221a06Fc97D318E25416` |
55+
| MultiTokenPeriodEnforcer | `0xFB2f1a9BD76d3701B730E5d69C3219D42D80eBb7` |
56+
| NonceEnforcer | `0xDE4f2FAC4B3D87A1d9953Ca5FC09FCa7F366254f` |
57+
| NativeBalanceChangeEnforcer | `0xbD7B277507723490Cd50b12EaaFe87C616be6880` |
58+
| NativeTokenPaymentEnforcer | `0x4803a326ddED6dDBc60e659e5ed12d85c7582811` |
59+
| NativeTokenTransferAmountEnforcer | `0xF71af580b9c3078fbc2BBF16FbB8EEd82b330320` |
60+
| NativeTokenStreamingEnforcer | `0xD10b97905a320b13a0608f7E9cC506b56747df19` |
61+
| NativeTokenPeriodTransferEnforcer | `0x9BC0FAf4Aca5AE429F4c06aEEaC517520CB16BD9` |
62+
| OwnershipTransferEnforcer | `0x7EEf9734E7092032B5C56310Eb9BbD1f4A524681` |
63+
| RedeemerEnforcer | `0xE144b0b2618071B4E56f746313528a669c7E65c5` |
64+
| SpecificActionERC20TransferBatchEnforcer | `0x00e0251aaA263dfE3B3541B758A82D1CBA1c3B6D` |
65+
| TimestampEnforcer | `0x1046bb45C8d673d4ea75321280DB34899413c069` |
66+
| ValueLteEnforcer | `0x92Bf12322527cAA612fd31a0e810472BBB106A8F` |

0 commit comments

Comments
 (0)