Skip to content

Commit bce4458

Browse files
Release v0.1.0 Smart Accounts Kit docs
* lock files for smart accounts kit * update version 0.1.0 docs * fix asset issue * add changelog * remove 0.11.0 version * fix minor issues * fix passkey tutorial
1 parent 25ba63f commit bce4458

File tree

77 files changed

+6541
-4263
lines changed

Some content is hidden

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

77 files changed

+6541
-4263
lines changed

docusaurus.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ const config = {
213213
sidebarCollapsed: false,
214214
includeCurrentVersion: true,
215215
// Set to the latest release.
216-
lastVersion: '0.13.0',
216+
lastVersion: '0.1.0',
217217
versions: {
218218
// Defaults to the ./docs folder.
219219
// Using "development" instead of "next" as path.
@@ -222,8 +222,8 @@ const config = {
222222
path: 'development',
223223
},
224224
// The latest release.
225-
'0.13.0': {
226-
label: 'latest (0.13.0)',
225+
'0.1.0': {
226+
label: 'latest (0.1.0)',
227227
},
228228
},
229229
},
87.3 KB
Loading
792 KB
Loading
864 KB
Loading
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
sidebar_label: 0.1.0
3+
description: MetaMask Smart Accounts Kit v0.1.0 changelog
4+
---
5+
6+
# What's new in v0.1.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 onwards, breaking changes will be released only in major version bumps.
11+
12+
:::
13+
14+
## Breaking Changes
15+
16+
### ⚠️ Package name
17+
18+
- Updates the package name from `@metamask/delegation-toolkit` to `@metamask/smart-accounts-kit`. This change does not impact the entrypoints.
19+
20+
```typescript
21+
// remove-next-line
22+
- import { } from '@metamask/delegation-toolkit'
23+
// add-next-line
24+
+ import { } from '@metamask/smart-accounts-kit'
25+
26+
// Contracts entrypoint
27+
// remove-next-line
28+
- import { } from '@metamask/delegation-toolkit/contracts'
29+
// add-next-line
30+
+ import { } from '@metamask/smart-accounts-kit/contracts'
31+
32+
// Utils entrypoint
33+
// remove-next-line
34+
- import { } from '@metamask/delegation-toolkit/utils'
35+
// add-next-line
36+
+ import { } from '@metamask/smart-accounts-kit/utils'
37+
38+
// Actions entrypoint
39+
// remove-next-line
40+
- import { } from '@metamask/delegation-toolkit/actions'
41+
// add-next-line
42+
+ import { } from '@metamask/smart-accounts-kit/actions'
43+
```
44+
45+
### ⚠️ Advanced Permissions actions
46+
47+
- Advanced Permissions related actions have been moved out of the `/experimental` to `/actions` entrypoint.
48+
49+
```typescript
50+
// remove-next-line
51+
- import { erc7715ProviderActions } from '@metamask/delegation-toolkit/experimental'
52+
// add-next-line
53+
+ import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
54+
```
55+
56+
### ⚠️ Toolkit environment
57+
58+
- Renames the `DeleGatorEnvironment` type to `SmartAccountsEnvironment`.
59+
- Renames the `getDeleGatorEnvironment` function to `getSmartAccountsEnvironment`.
60+
61+
```typescript
62+
// remove-next-line
63+
- import { getDeleGatorEnvironment, DeleGatorEnvironment } from '@metamask/delegation-toolkit'
64+
// add-next-line
65+
+ import { getSmartAccountsEnvironment, SmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
66+
```
67+
68+
## Contract addresses
69+
70+
The following are the contract addresses for the
71+
[Delegation Framework version 1.3.0](https://github.com/MetaMask/delegation-framework/blob/v1.3.0/documents/Deployments.md),
72+
as used by this version of the toolkit.
73+
74+
### Delegation Framework
75+
76+
| Contract | Address |
77+
|----------|---------|
78+
| EntryPoint | `0x0000000071727De22E5E9d8BAf0edAc6f37da032` |
79+
| SimpleFactory | `0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c` |
80+
| DelegationManager | `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3` |
81+
| MultiSigDeleGatorImpl | `0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7` |
82+
| HybridDeleGatorImpl | `0x48dBe696A4D990079e039489bA2053B36E8FFEC4` |
83+
84+
### Caveat enforcers
85+
86+
| Enforcer | Address |
87+
|----------|---------|
88+
| AllowedCalldataEnforcer | `0xc2b0d624c1c4319760C96503BA27C347F3260f55` |
89+
| AllowedMethodsEnforcer | `0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5` |
90+
| AllowedTargetsEnforcer | `0x7F20f61b1f09b08D970938F6fa563634d65c4EeB` |
91+
| ArgsEqualityCheckEnforcer | `0x44B8C6ae3C304213c3e298495e12497Ed3E56E41` |
92+
| BlockNumberEnforcer | `0x5d9818dF0AE3f66e9c3D0c5029DAF99d1823ca6c` |
93+
| DeployedEnforcer | `0x24ff2AA430D53a8CD6788018E902E098083dcCd2` |
94+
| ERC20BalanceChangeEnforcer | `0xcdF6aB796408598Cea671d79506d7D48E97a5437` |
95+
| ERC20TransferAmountEnforcer | `0xf100b0819427117EcF76Ed94B358B1A5b5C6D2Fc` |
96+
| ERC20PeriodTransferEnforcer| `0x474e3Ae7E169e940607cC624Da8A15Eb120139aB` |
97+
| ERC20StreamingEnforcer | `0x56c97aE02f233B29fa03502Ecc0457266d9be00e` |
98+
| ERC721BalanceChangeEnforcer | `0x8aFdf96eDBbe7e1eD3f5Cd89C7E084841e12A09e` |
99+
| ERC721TransferEnforcer | `0x3790e6B7233f779b09DA74C72b6e94813925b9aF` |
100+
| ERC1155BalanceChangeEnforcer | `0x63c322732695cAFbbD488Fc6937A0A7B66fC001A` |
101+
| ExactCalldataBatchEnforcer | `0x982FD5C86BBF425d7d1451f974192d4525113DfD` |
102+
| ExactCalldataEnforcer | `0x99F2e9bF15ce5eC84685604836F71aB835DBBdED` |
103+
| ExactExecutionBatchEnforcer | `0x1e141e455d08721Dd5BCDA1BaA6Ea5633Afd5017` |
104+
| ExactExecutionEnforcer | `0x146713078D39eCC1F5338309c28405ccf85Abfbb` |
105+
| IdEnforcer | `0xC8B5D93463c893401094cc70e66A206fb5987997` |
106+
| LimitedCallsEnforcer | `0x04658B29F6b82ed55274221a06Fc97D318E25416` |
107+
| MultiTokenPeriodEnforcer | `0xFB2f1a9BD76d3701B730E5d69C3219D42D80eBb7` |
108+
| NonceEnforcer | `0xDE4f2FAC4B3D87A1d9953Ca5FC09FCa7F366254f` |
109+
| NativeBalanceChangeEnforcer | `0xbD7B277507723490Cd50b12EaaFe87C616be6880` |
110+
| NativeTokenPaymentEnforcer | `0x4803a326ddED6dDBc60e659e5ed12d85c7582811` |
111+
| NativeTokenTransferAmountEnforcer | `0xF71af580b9c3078fbc2BBF16FbB8EEd82b330320` |
112+
| NativeTokenStreamingEnforcer | `0xD10b97905a320b13a0608f7E9cC506b56747df19` |
113+
| NativeTokenPeriodTransferEnforcer | `0x9BC0FAf4Aca5AE429F4c06aEEaC517520CB16BD9` |
114+
| OwnershipTransferEnforcer | `0x7EEf9734E7092032B5C56310Eb9BbD1f4A524681` |
115+
| RedeemerEnforcer | `0xE144b0b2618071B4E56f746313528a669c7E65c5` |
116+
| SpecificActionERC20TransferBatchEnforcer | `0x00e0251aaA263dfE3B3541B758A82D1CBA1c3B6D` |
117+
| TimestampEnforcer | `0x1046bb45C8d673d4ea75321280DB34899413c069` |
118+
| ValueLteEnforcer | `0x92Bf12322527cAA612fd31a0e810472BBB106A8F` |
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
---
2+
sidebar_label: Delegation Toolkit (0.12.0)
3+
description: MetaMask Delegation Toolkit v0.12.0 changelog
4+
---
5+
6+
# What's new in v0.12.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 onwards, breaking changes will be released only in major version bumps.
11+
12+
:::
13+
14+
## Breaking Changes
15+
16+
### ⚠️ `createExecution`
17+
18+
The function now accepts named parameters instead of positional parameters.
19+
20+
```typescript
21+
22+
// remove-start
23+
- const execution = createExecution(
24+
- "0x..",
25+
- 0n,
26+
- "0x",
27+
- );
28+
// remove-end
29+
30+
// add-start
31+
+ const execution = createExecution({
32+
+ target: "0x..",
33+
+ value: 0n,
34+
+ callData: "0x",
35+
+ });
36+
// add-end
37+
38+
```
39+
40+
### ⚠️ `redeemDelegations`
41+
42+
The function is now part of `DelegationManager` contract namespace.
43+
44+
```typescript
45+
// remove-next-line
46+
- import { DelegationFramework } from "@metamask/delegation-toolkit";
47+
// add-next-line
48+
- import { DelegationManager } from "@metamask/delegation-toolkit/contracts";
49+
50+
// remove-next-line
51+
- const data = DelegationFramework.encode.redeemDelegations({
52+
// add-next-line
53+
+ const data = DelegationManager.encode.redeemDelegations({
54+
delegations: [[delegation]],
55+
modes: [SINGLE_DEFAULT_MODE],
56+
executions: [[execution]],
57+
});
58+
```
59+
60+
### ⚠️ `ExecutionStruct`
61+
62+
The `target` parameter now accepts a `Address` instead of `Hex`.
63+
64+
### ⚠️ Utility exports
65+
66+
Some functions and interfaces have been moved from root to the utils export. Several of them are listed below.
67+
68+
#### ⚠️ `overrideDeployedEnvironment`
69+
70+
The function has been moved from root export to utils export.
71+
72+
```typescript
73+
74+
// remove-next-line
75+
- import { overrideDeployedEnvironment } from "@metamask/delegation-toolkit";
76+
// add-next-line
77+
+ import { overrideDeployedEnvironment } from "@metamask/delegation-toolkit/utils";
78+
79+
```
80+
81+
#### ⚠️ `deployDeleGatorEnvironment`
82+
83+
The function has been moved from root export to utils export.
84+
85+
```typescript
86+
87+
// remove-next-line
88+
- import { deployDeleGatorEnvironment } from "@metamask/delegation-toolkit";
89+
// add-next-line
90+
+ import { deployDeleGatorEnvironment } from "@metamask/delegation-toolkit/utils";
91+
92+
```
93+
94+
#### ⚠️ `ExecutionMode` types
95+
96+
The `ExecutionMode` types have been moved from root export to utils export.
97+
98+
```typescript
99+
100+
import {
101+
SINGLE_DEFAULT_MODE,
102+
SINGLE_TRY_MODE,
103+
BATCH_DEFAULT_MODE
104+
// remove-next-line
105+
- } from "@metamask/delegation-toolkit";
106+
// add-next-line
107+
+ } from "@metamask/delegation-toolkit/utils";
108+
109+
```
110+
111+
### ⚠️ Contract utility functions
112+
113+
The contract utility functions have been moved from root to the contract exports. Some of them are listed below.
114+
115+
```typescript
116+
import {
117+
DelegationManager,
118+
MultiSigDeleGator,
119+
HybridDeleGator,
120+
// remove-next-line
121+
- } from "@metamask/delegation-toolkit";
122+
// add-next-line
123+
+ } from "@metamask/delegation-toolkit/contracts";
124+
```
125+
126+
## Enhancements
127+
128+
- Delegation Framework now supports the Unichain, Arbitrum Nova, Berachain,
129+
Arbitrum Sepolia, Optimism Sepolia, Binance Smart Chain testnet, Polygon Amoy, and
130+
Monad 🎉. See [supported networks](../get-started/supported-networks.md) for more details.
131+
- The [`createDelegation`](../reference/delegation/index.md#createdelegation) and [`createOpenDelegation`](../reference/delegation/index.md#createopendelegation) functions now accept `salt` as a parameter. This helps
132+
prevent hash collisions when creating identical delegations.
133+
- A new implementation type has been added to `MetaMaskSmartAccount` for externally owned accounts (EOAs) upgraded using EIP-7702. See the [EIP-7702 quickstart](../get-started/smart-account-quickstart/eip7702.md) to learn how to upgrade EOAs and create a `MetaMaskSmartAccount`.
134+
- New decode functions have been added for delegations.
135+
136+
137+
## Contract addresses
138+
139+
The following are the contract addresses for the
140+
[Delegation Framework version 1.3.0](https://github.com/MetaMask/delegation-framework/blob/v1.3.0/documents/Deployments.md),
141+
as used by this version of the toolkit.
142+
143+
### Delegation Framework
144+
145+
| Contract | Address |
146+
|----------|---------|
147+
| EntryPoint | `0x0000000071727De22E5E9d8BAf0edAc6f37da032` |
148+
| SimpleFactory | `0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c` |
149+
| DelegationManager | `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3` |
150+
| MultiSigDeleGatorImpl | `0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7` |
151+
| HybridDeleGatorImpl | `0x48dBe696A4D990079e039489bA2053B36E8FFEC4` |
152+
153+
### Caveat enforcers
154+
155+
| Enforcer | Address |
156+
|----------|---------|
157+
| AllowedCalldataEnforcer | `0xc2b0d624c1c4319760C96503BA27C347F3260f55` |
158+
| AllowedMethodsEnforcer | `0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5` |
159+
| AllowedTargetsEnforcer | `0x7F20f61b1f09b08D970938F6fa563634d65c4EeB` |
160+
| ArgsEqualityCheckEnforcer | `0x44B8C6ae3C304213c3e298495e12497Ed3E56E41` |
161+
| BlockNumberEnforcer | `0x5d9818dF0AE3f66e9c3D0c5029DAF99d1823ca6c` |
162+
| DeployedEnforcer | `0x24ff2AA430D53a8CD6788018E902E098083dcCd2` |
163+
| ERC20BalanceChangeEnforcer | `0xcdF6aB796408598Cea671d79506d7D48E97a5437` |
164+
| ERC20TransferAmountEnforcer | `0xf100b0819427117EcF76Ed94B358B1A5b5C6D2Fc` |
165+
| ERC20PeriodTransferEnforcer| `0x474e3Ae7E169e940607cC624Da8A15Eb120139aB` |
166+
| ERC20StreamingEnforcer | `0x56c97aE02f233B29fa03502Ecc0457266d9be00e` |
167+
| ERC721BalanceChangeEnforcer | `0x8aFdf96eDBbe7e1eD3f5Cd89C7E084841e12A09e` |
168+
| ERC721TransferEnforcer | `0x3790e6B7233f779b09DA74C72b6e94813925b9aF` |
169+
| ERC1155BalanceChangeEnforcer | `0x63c322732695cAFbbD488Fc6937A0A7B66fC001A` |
170+
| ExactCalldataBatchEnforcer | `0x982FD5C86BBF425d7d1451f974192d4525113DfD` |
171+
| ExactCalldataEnforcer | `0x99F2e9bF15ce5eC84685604836F71aB835DBBdED` |
172+
| ExactExecutionBatchEnforcer | `0x1e141e455d08721Dd5BCDA1BaA6Ea5633Afd5017` |
173+
| ExactExecutionEnforcer | `0x146713078D39eCC1F5338309c28405ccf85Abfbb` |
174+
| IdEnforcer | `0xC8B5D93463c893401094cc70e66A206fb5987997` |
175+
| LimitedCallsEnforcer | `0x04658B29F6b82ed55274221a06Fc97D318E25416` |
176+
| MultiTokenPeriodEnforcer | `0xFB2f1a9BD76d3701B730E5d69C3219D42D80eBb7` |
177+
| NonceEnforcer | `0xDE4f2FAC4B3D87A1d9953Ca5FC09FCa7F366254f` |
178+
| NativeBalanceChangeEnforcer | `0xbD7B277507723490Cd50b12EaaFe87C616be6880` |
179+
| NativeTokenPaymentEnforcer | `0x4803a326ddED6dDBc60e659e5ed12d85c7582811` |
180+
| NativeTokenTransferAmountEnforcer | `0xF71af580b9c3078fbc2BBF16FbB8EEd82b330320` |
181+
| NativeTokenStreamingEnforcer | `0xD10b97905a320b13a0608f7E9cC506b56747df19` |
182+
| NativeTokenPeriodTransferEnforcer | `0x9BC0FAf4Aca5AE429F4c06aEEaC517520CB16BD9` |
183+
| OwnershipTransferEnforcer | `0x7EEf9734E7092032B5C56310Eb9BbD1f4A524681` |
184+
| RedeemerEnforcer | `0xE144b0b2618071B4E56f746313528a669c7E65c5` |
185+
| SpecificActionERC20TransferBatchEnforcer | `0x00e0251aaA263dfE3B3541B758A82D1CBA1c3B6D` |
186+
| TimestampEnforcer | `0x1046bb45C8d673d4ea75321280DB34899413c069` |
187+
| ValueLteEnforcer | `0x92Bf12322527cAA612fd31a0e810472BBB106A8F` |

0 commit comments

Comments
 (0)