Skip to content

Commit e4819e1

Browse files
AyushBherwani1998“AyushBherwani1998”alexandratran
authored
Update guides structure for MM smart accounts
* add send gasless transaction guide * minor edits, fix links, add redirects * update eip7702 next steps --------- Co-authored-by: “AyushBherwani1998” <“ayush.bherwani1998@gmail.com”> Co-authored-by: Alexandra Tran <alexandratran@protonmail.com>
1 parent b061240 commit e4819e1

24 files changed

+181
-50
lines changed

delegation-toolkit/concepts/caveat-enforcers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ This "all-or-nothing" approach ensures that delegations only execute exactly as
119119

120120
## Caveat builder
121121

122-
While caveat enforcers operate at the smart contract level, most developers interact with them through the [`CaveatBuilder`](../how-to/create-delegation/restrict-delegation.md) interface in the MetaMask Delegation Toolkit.
122+
While caveat enforcers operate at the smart contract level, most developers interact with them through the [`CaveatBuilder`](../guides/create-delegation/restrict-delegation.md) interface in the MetaMask Delegation Toolkit.
123123

124124
The `CaveatBuilder` provides a developer-friendly TypeScript API that:
125125

@@ -160,11 +160,11 @@ for common restriction patterns, including:
160160
- Restricting token transfers and approvals.
161161
- Limiting execution frequency.
162162

163-
For more complex scenarios, you can also [create custom caveat enforcers](../how-to/create-delegation/create-custom-caveat-enforcer.md) by implementing the `ICaveatEnforcer` interface.
163+
For more complex scenarios, you can also [create custom caveat enforcers](../guides/create-delegation/create-custom-caveat-enforcer.md) by implementing the `ICaveatEnforcer` interface.
164164

165165
## Attenuating authority with redelegations
166166

167-
When [creating chains of delegations](../how-to/create-delegation/index.md#create-a-redelegation), it's important to understand how authority flows and can be restricted.
167+
When [creating chains of delegations](../guides/create-delegation/index.md#create-a-redelegation), it's important to understand how authority flows and can be restricted.
168168

169169
Caveats applied to a chain of delegations are *accumulative*—they stack on top of each other:
170170

delegation-toolkit/concepts/delegation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The delegation lifecycle is as follows:
5050
delegation through an [ERC-4337 user operation](smart-accounts.md#account-abstraction-erc-4337),
5151
which verifies that the delegated authority is valid in order to perform the execution.
5252

53-
See [how to create a delegation](../how-to/create-delegation/index.md) to get started with the
53+
See [how to create a delegation](../guides/create-delegation/index.md) to get started with the
5454
delegation lifecycle.
5555

5656
## Delegation Framework

delegation-toolkit/concepts/environment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ See the changelog of the toolkit version you are using (in the left sidebar) for
7171

7272
Alternatively, you can use the [`getDelegatorEnvironment`](../reference/api/delegation.md#getdelegatorenvironment) function to resolve the environment.
7373
This function is especially useful if your delegator is not a smart account when
74-
[creating a redelegation](../how-to/create-delegation/index.md#create-a-redelegation).
74+
[creating a redelegation](../guides/create-delegation/index.md#create-a-redelegation).
7575

7676
```typescript
7777
import {

delegation-toolkit/concepts/smart-accounts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ERC-4337 introduces the following concepts:
3939

4040
The MetaMask Delegation Toolkit supports three types of MetaMask Smart Accounts, each offering unique features and use cases.
4141

42-
See [Create a smart account](../how-to/create-smart-account.md) to learn how to use these different account types.
42+
See [Create a smart account](../guides/smart-accounts/create-smart-account.md) to learn how to use these different account types.
4343

4444
### Hybrid smart account
4545

delegation-toolkit/experimental/erc-7710-redeem-delegations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Redeem a delegation with a [MetaMask smart account](#redeem-with-a-metamask-smar
8484

8585
### Redeem with a MetaMask smart account
8686

87-
To redeem a delegation with a MetaMask smart account, [create a smart account](../how-to/create-smart-account.md)
87+
To redeem a delegation with a MetaMask smart account, [create a smart account](../guides/smart-accounts/create-smart-account.md)
8888
and a [Viem Bundler Client](https://viem.sh/account-abstraction/clients/bundler).
8989

9090
After setting up your Bundler Client, you can extend its functionality with `erc7710BundlerActions` actions to support ERC-7710. Once extended, use [`sendUserOperationWithDelegation`](../reference/api/experimental-actions/bundler-client.md#senduseroperationwithdelegation) to redeem the permission.

delegation-toolkit/experimental/store-retrieve-delegations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You can use methods provided by the `DelegationStorageClient` of the MetaMask De
2020
## Prerequisites
2121

2222
- [Install and set up the Delegation Toolkit.](../get-started/install.md)
23-
- [Configure the Delegation Toolkit.](../how-to/configure.md)
23+
- [Configure the Delegation Toolkit.](../guides/configure.md)
2424
- Ensure you have an API key and API key ID to interact with the `DelegationStorageClient`.
2525
If you need to gain access, email hellogators@consensys.net.
2626

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ const bundlerClient = createBundlerClient({
130130

131131
### 6. Redeem ERC-7715 permissions
132132

133-
The session account can now [redeem the delegation](../how-to/redeem-delegation.md). The redeem transaction is sent to the `DelegationManager` contract, which validates the delegation and executes actions on the user's behalf.
133+
The session account can now [redeem the delegation](../guides/redeem-delegation.md). The redeem transaction is sent to the `DelegationManager` contract, which validates the delegation and executes actions on the user's behalf.
134134

135135
To redeem the permissions, you can use the `sendUserOperationWithDelegation` bundler client action.
136136

delegation-toolkit/get-started/install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This page provides instructions to install and set up the MetaMask Delegation To
1717
- Install [Yarn](https://yarnpkg.com/),
1818
[npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), or another package manager.
1919
- If you plan to use any smart contracts (for example, to
20-
[create a custom caveat enforcer](../how-to/create-delegation/create-custom-caveat-enforcer.md)),
20+
[create a custom caveat enforcer](../guides/create-delegation/create-custom-caveat-enforcer.md)),
2121
install [Foundry](https://book.getfoundry.sh/getting-started/installation).
2222

2323
## Steps
@@ -33,7 +33,7 @@ npm install @metamask/delegation-toolkit
3333
### 2. (Optional) Install the contracts
3434

3535
If you plan to extend the Delegation Framework smart contracts (for example, to
36-
[create a custom caveat enforcer](../how-to/create-delegation/create-custom-caveat-enforcer.md)), install
36+
[create a custom caveat enforcer](../guides/create-delegation/create-custom-caveat-enforcer.md)), install
3737
the contract package using Foundry's command-line tool, Forge:
3838

3939
```bash

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,4 @@ const userOperationHash = await bundlerClient.sendUserOperation({
158158

159159
- To grant specific permissions to other accounts from your smart account, [create a delegation](../../how-to/create-delegation/index.md).
160160
- To quickly bootstrap a MetaMask Smart Accounts project, [use the CLI](../use-the-cli.md).
161-
- You can also [use MetaMask SDK to upgrade an EOA to a smart account](/sdk/tutorials/upgrade-eoa-to-smart-account).
161+
- You can also [use MetaMask SDK to upgrade a MetaMask account to a smart account](/sdk/tutorials/upgrade-eoa-to-smart-account).

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const bundlerClient = createBundlerClient({
4343

4444
### 3. Create a MetaMask smart account
4545

46-
[Create a MetaMask smart account](../../how-to/create-smart-account.md) to send the first user operation.
46+
[Create a MetaMask smart account](../../guides/smart-accounts/create-smart-account.md) to send the first user operation.
4747

4848
This example configures a Hybrid smart account,
4949
which is a flexible smart account implementation that supports both an externally owned account (EOA) owner and any number of P256 (passkey) signers:
@@ -67,7 +67,7 @@ const smartAccount = await toMetaMaskSmartAccount({
6767

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

70-
See [Send a user operation](../../how-to/send-user-operation.md) to learn how to estimate fee per gas, and wait for the transaction receipt.
70+
See [Send a user operation](../../guides/smart-accounts/send-user-operation.md) to learn how to estimate fee per gas, and wait for the transaction receipt.
7171

7272
The smart account will remain counterfactual until the first user operation. If the smart account is not
7373
deployed, it will be automatically deployed upon the sending first user operation.
@@ -94,8 +94,8 @@ const userOperationHash = await bundlerClient.sendUserOperation({
9494

9595
## Next steps
9696

97-
- To grant specific permissions to other accounts from your smart account, [create a delegation](../../how-to/create-delegation/index.md).
97+
- To grant specific permissions to other accounts from your smart account, [create a delegation](../../guides/create-delegation/index.md).
9898
- This quickstart example uses a Hybrid smart account.
99-
You can also [configure other smart account types](../../how-to/create-smart-account/configure-accounts-signers.md).
99+
You can also [configure other smart account types](../../guides/smart-accounts/create-smart-account.md).
100100
- To upgrade an EOA to a smart account, see the [EIP-7702 quickstart](eip7702-quickstart.md).
101101
- To quickly bootstrap a MetaMask Smart Accounts project, [use the CLI](../use-the-cli.md).

0 commit comments

Comments
 (0)