Skip to content

Commit e540d61

Browse files
committed
Merge branch 'main' into fix-links
2 parents 84d7487 + c12a5b4 commit e540d61

File tree

7 files changed

+57
-42
lines changed

7 files changed

+57
-42
lines changed

delegation-toolkit/get-started/erc7715-quickstart.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,22 @@ This quickstart demonstrates how to request and redeem ERC-7715 permissions.
1010

1111
## Prerequisites
1212

13-
- [Install and set up the Delegation Toolkit.](install.md)
14-
- [Install MetaMask Flask 12.14.2 or later.](/snaps/get-started/install-flask)
13+
- Install [Node.js](https://nodejs.org/en/blog/release/v18.18.0) v18 or later.
14+
- Install [Yarn](https://yarnpkg.com/),
15+
[npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), or another package manager.
16+
- [Install MetaMask Flask 12.14.2 or later](/snaps/get-started/install-flask).
1517

1618
## Steps
1719

18-
### 1. Set up a Wallet Client
20+
### 1. Install the toolkit
21+
22+
Install the [MetaMask Delegation Toolkit](https://www.npmjs.com/package/@metamask/delegation-toolkit):
23+
24+
```bash npm2yarn
25+
npm install @metamask/delegation-toolkit
26+
```
27+
28+
### 2. Set up a Wallet Client
1929

2030
Set up a [Viem Wallet Client](https://viem.sh/docs/clients/wallet) using Viem's `createWalletClient` function. This client will help you interact with MetaMask Flask.
2131

@@ -32,7 +42,7 @@ const walletClient = createWalletClient({
3242
}).extend(erc7715ProviderActions());
3343
```
3444

35-
### 2. Set up a Public Client
45+
### 3. Set up a Public Client
3646

3747
Set up a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function.
3848
This client will help you query the account state and interact with blockchain networks.
@@ -47,7 +57,7 @@ const publicClient = createPublicClient({
4757
});
4858
```
4959

50-
### 3. Set up a session account
60+
### 4. Set up a session account
5161

5262
Set up a session account which can either be a smart account or an externally owned
5363
account (EOA) to request ERC-7715 permissions. This account is responsible
@@ -74,7 +84,7 @@ const sessionAccount = await toMetaMaskSmartAccount({
7484
});
7585
```
7686

77-
### 4. Request ERC-7715 permissions
87+
### 5. Request ERC-7715 permissions
7888

7989
Request ERC-7715 permissions from the user. Currently, only the
8090
`native-token-stream` permission type is supported, which allows the dapp to stream
@@ -106,7 +116,7 @@ const grantedPermissions = await walletClient.grantPermissions([{
106116
}]);
107117
```
108118

109-
### 5. Set up a Bundler Client
119+
### 6. Set up a Bundler Client
110120

111121
Set up a [Viem Bundler Client](https://viem.sh/account-abstraction/clients/bundler)
112122
using Viem's `createBundlerClient` function. This lets you use the bundler service
@@ -127,7 +137,7 @@ const bundlerClient = createBundlerClient({
127137
}).extend(erc7710BundlerActions());
128138
```
129139

130-
### 6. Redeem ERC-7715 permissions
140+
### 7. Redeem ERC-7715 permissions
131141

132142
The session account can now [redeem the delegation](../experimental/erc-7710-redeem-delegations.md). The redeem transaction is sent to the `DelegationManager` contract, which validates the delegation and executes actions on the user's behalf.
133143

delegation-toolkit/get-started/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This page provides instructions to install and set up the MetaMask Delegation To
2323

2424
### 1. Install the toolkit
2525

26-
Install the [MetaMask Delegation Toolkit](https://github.com/MetaMask/delegation-toolkit) dependencies:
26+
Install the [MetaMask Delegation Toolkit](https://www.npmjs.com/package/@metamask/delegation-toolkit):
2727

2828
```bash npm2yarn
2929
npm install @metamask/delegation-toolkit

delegation-toolkit/get-started/smart-account-quickstart/eip7702.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,22 @@ abstraction, such as batch transactions, gas sponsorship, and [delegation capabi
1111

1212
## Prerequisites
1313

14-
- [Install and set up the Delegation Toolkit.](../install.md)
15-
- [Install Viem.](https://viem.sh/)
14+
- Install [Node.js](https://nodejs.org/en/blog/release/v18.18.0) v18 or later.
15+
- Install [Yarn](https://yarnpkg.com/),
16+
[npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), or another package manager.
17+
- [Install Viem](https://viem.sh/).
1618

1719
## Steps
1820

19-
### 1. Set up a Public Client
21+
### 1. Install the toolkit
22+
23+
Install the [MetaMask Delegation Toolkit](https://www.npmjs.com/package/@metamask/delegation-toolkit):
24+
25+
```bash npm2yarn
26+
npm install @metamask/delegation-toolkit
27+
```
28+
29+
### 2. Set up a Public Client
2030

2131
Set up a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function.
2232
This client will let the EOA query the account state and interact with blockchain network.
@@ -31,7 +41,7 @@ const publicClient = createPublicClient({
3141
});
3242
```
3343

34-
### 2. Set up a Bundler Client
44+
### 3. Set up a Bundler Client
3545

3646
Set up a [Viem Bundler Client](https://viem.sh/account-abstraction/clients/bundler) using Viem's `createBundlerClient` function.
3747
This lets you use the bundler service to estimate gas for user operations and submit transactions to the network.
@@ -45,7 +55,7 @@ const bundlerClient = createBundlerClient({
4555
});
4656
```
4757

48-
### 3. Set up a Wallet Client
58+
### 4. Set up a Wallet Client
4959

5060
Set up [Viem Wallet Client](https://viem.sh/docs/clients/wallet) using Viem's `createWalletClient` function.
5161
This lets you sign and submit EIP-7702 authorization.
@@ -64,7 +74,7 @@ export const walletClient = createWalletClient({
6474
});
6575
```
6676

67-
### 4. Authorize a 7702 delegation
77+
### 5. Authorize a 7702 delegation
6878

6979
Create an authorization to map the contract code to an EOA, and sign it
7080
using Viem's [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) action. The `signAuthorization` action
@@ -92,7 +102,7 @@ const authorization = await walletClient.signAuthorization({
92102
});
93103
```
94104

95-
### 5. Submit the authorization
105+
### 6. Submit the authorization
96106

97107
Once you have signed an authorization, you can send an EIP-7702 transaction to set the EOA code.
98108
Since the authorization cannot be sent by itself, you can include it alongside a dummy transaction.
@@ -107,7 +117,7 @@ const hash = await walletClient.sendTransaction({
107117
});
108118
```
109119

110-
### 6. Create a MetaMask smart account
120+
### 7. Create a MetaMask smart account
111121

112122
Create a smart account instance for the EOA and start
113123
leveraging the benefits of account abstraction.
@@ -129,7 +139,7 @@ const smartAccount = await toMetaMaskSmartAccount({
129139
});
130140
```
131141

132-
### 7. Send a user operation
142+
### 8. Send a user operation
133143

134144
Send a user operation through the upgraded EOA, using Viem's [`sendUserOperation`](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation) method.
135145

delegation-toolkit/get-started/smart-account-quickstart/index.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,21 @@ You can get started quickly with [MetaMask Smart Accounts](../../concepts/smart-
99

1010
## Prerequisites
1111

12-
[Install and set up the Delegation Toolkit.](../install.md)
12+
- Install [Node.js](https://nodejs.org/en/blog/release/v18.18.0) v18 or later.
13+
- Install [Yarn](https://yarnpkg.com/),
14+
[npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), or another package manager.
1315

1416
## Steps
1517

16-
### 1. Set up a Public Client
18+
### 1. Install the toolkit
19+
20+
Install the [MetaMask Delegation Toolkit](https://www.npmjs.com/package/@metamask/delegation-toolkit):
21+
22+
```bash npm2yarn
23+
npm install @metamask/delegation-toolkit
24+
```
25+
26+
### 2. Set up a Public Client
1727

1828
Set up a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function. This client will let the smart account query the signer's account state and interact with blockchain network.
1929

@@ -27,7 +37,7 @@ const publicClient = createPublicClient({
2737
});
2838
```
2939

30-
### 2. Set up a Bundler Client
40+
### 3. Set up a Bundler Client
3141

3242
Set up a [Viem Bundler Client](https://viem.sh/account-abstraction/clients/bundler) using Viem's `createBundlerClient` function. This lets you use the bundler service to estimate gas for user operations and submit transactions to the network.
3343

@@ -40,7 +50,7 @@ const bundlerClient = createBundlerClient({
4050
});
4151
```
4252

43-
### 3. Create a MetaMask smart account
53+
### 4. Create a MetaMask smart account
4454

4555
[Create a MetaMask smart account](../../guides/smart-accounts/create-smart-account.md) to send the first user operation.
4656

@@ -62,7 +72,7 @@ const smartAccount = await toMetaMaskSmartAccount({
6272
});
6373
```
6474

65-
### 4. Send a user operation
75+
### 5. Send a user operation
6676

6777
Send a user operation using Viem's [`sendUserOperation`](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation) method.
6878

gator_versioned_docs/version-0.12.0/get-started/llm-context.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/pages/tutorials/use-erc20-paymaster.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,5 +152,5 @@ const userOperationHash = await bundlerClient.sendUserOperation({
152152

153153
## Next steps
154154

155-
- See [Create a MetaMask smart account](/delegation-toolkit/development/guides/smart-accounts/create-smart-account) to learn more about smart account implementations.
156-
- See [Send a gasless transaction](/delegation-toolkit/development/guides/smart-accounts/send-gasless-transaction) to learn how to use gasless paymaster.
155+
- Learn more about [smart account implementations](/delegation-toolkit/development/guides/smart-accounts/create-smart-account).
156+
- To sponsor gas for end users, see how to [send a gasless transaction](/delegation-toolkit/development/guides/smart-accounts/send-gasless-transaction).

src/pages/tutorials/use-passkey-as-backup-signer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,5 +163,5 @@ const smartAccount = await toMetaMaskSmartAccount({
163163

164164
## Next steps
165165

166-
- See [Create a MetaMask smart account](/delegation-toolkit/guides/smart-accounts/create-smart-account) to learn more about smart account implementations.
167-
- See [Send a gasless transaction](/delegation-toolkit/guides/smart-accounts/send-gasless-transaction) to learn how to sponsor gas fees when adding a passkey as a backup signer.
166+
- Learn more about [smart account implementations](/delegation-toolkit/development/guides/smart-accounts/create-smart-account).
167+
- To sponsor gas fees when adding a passkey as a backup signer, see how to [send a gasless transaction](/delegation-toolkit/development/guides/smart-accounts/send-gasless-transaction).

0 commit comments

Comments
 (0)