You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/PULL_REQUEST_TEMPLATE.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,3 +18,10 @@ Fixes #
18
18
19
19
-[ ] If this PR updates or adds documentation content that changes or adds technical meaning, it has received an approval from an engineer or DevRel from the relevant team.
20
20
-[ ] If this PR updates or adds documentation content, it has received an approval from a technical writer.
21
+
22
+
## External contributor checklist
23
+
24
+
<!-- If you are an external contributor (outside of the MetaMask organization), complete the following checklist. -->
25
+
26
+
-[ ] I've read the [contribution guidelines](https://github.com/MetaMask/metamask-docs/blob/main/CONTRIBUTING.md).
27
+
-[ ] I've created a new issue (or assigned myself to an existing issue) describing what this PR addresses.
The Delegation Toolkit supports [ERC-7715](https://eips.ethereum.org/EIPS/eip-7715), which lets you request fine-grained permissions from a MetaMask user to execute transactions on their behalf.
8
+
The Smart Accounts Kit supports Advanced Permissions ([ERC-7715](https://eips.ethereum.org/EIPS/eip-7715)), which lets you request fine-grained permissions from a MetaMask user to execute transactions on their behalf.
9
9
For example, a user can grant your dapp permission to spend 10 USDC per day to buy ETH over the course of a month.
10
10
Once the permission is granted, your dapp can use the allocated 10 USDC each day to purchase ETH directly from the MetaMask user's account.
11
11
12
-
ERC-7715 eliminates the need for users to approve every transaction, which is useful for highly interactive dapps.
12
+
Advanced Permissions eliminate the need for users to approve every transaction, which is useful for highly interactive dapps.
13
13
It also enables dapps to execute transactions for users without an active wallet connection.
14
14
15
15
:::note
@@ -23,42 +23,42 @@ Dapps can use this method to request a wallet to grant the dapp permission to ex
23
23
`wallet_grantPermissions` requires a `signer` parameter, which identifies the entity requesting or managing the permission.
24
24
Common signer implementations include wallet signers, single key and multisig signers, and account signers.
25
25
26
-
The Delegation Toolkit supports multiple types of signers, but[an account signer is used in this documentation's examples](../guides/erc7715/execute-on-metamask-users-behalf.md) as a common implementation.
27
-
With an account signer, a session account is created and used for the single purpose of requesting and redeeming ERC-7715 permissions, and does not contain tokens.
26
+
Smart Accounts Kit supports multiple signer types. The documentation uses[an account signer](../guides/advanced-permissions/execute-on-metamask-users-behalf.md) as a common implementation example.
27
+
When you use an account signer, a session account is created solely to request and redeem Advanced Permissions, and doesn't contain tokens
28
28
The session account can be granted with permissions and redeem them as specified in [ERC-7710](https://eips.ethereum.org/EIPS/eip-7710).
29
29
The session account can be a smart account or an externally owned account (EOA).
30
30
31
31
The MetaMask user that the session account requests permissions from must be upgraded to a [MetaMask smart account](smart-accounts.md).
32
32
33
-
## ERC-7715 vs. delegations
33
+
## Advanced Permissions vs. delegations
34
34
35
-
ERC-7715 expands on regular [delegations](delegation/index.md) by enabling permission sharing *via the MetaMask browser extension*.
35
+
Advanced Permissions expand on regular [delegations](delegation/index.md) by enabling permission sharing *via the MetaMask browser extension*.
36
36
37
37
With regular delegations, the dapp constructs a delegation and requests the user to sign it.
38
38
These delegations are not human-readable, so it is the dapp's responsibility to provide context for the user.
39
39
Regular delegations cannot be signed through the MetaMask extension, because if a dapp requests a delegation without constraints, the whole wallet can be exposed to the dapp.
40
40
41
-
In contrast, ERC-7715 enables dapps (and AI agents) to request permissions from a user directly via the MetaMask extension.
42
-
ERC-7715 requires a permission configuration which displays a human-readable confirmation for the MetaMask user.
41
+
In contrast, Advanced Permissions enable dapps (and AI agents) to request permissions from a user directly via the MetaMask extension.
42
+
Advanced Permissions require a permission configuration which displays a human-readable confirmation for the MetaMask user.
43
43
The user can modify the permission parameters if the request is configured to allow adjustments.
44
44
45
-
For example, the following ERC-7715 permission request displays a rich UI including the start time, amount, and period duration for an [ERC-20 token periodic transfer](../guides/erc7715/use-permissions/erc20-token.md#erc-20-periodic-permission):
45
+
For example, the following Advanced Permissions request displays a rich UI including the start time, amount, and period duration for an [ERC-20 token periodic transfer](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-periodic-permission):
4.**Redeem permissions** - Once the permission is granted, the session account can redeem the permission, executing on the user's behalf.
63
63
64
-
See [how to perform executions on a MetaMask user's behalf](../guides/erc7715/execute-on-metamask-users-behalf.md) to get started with the ERC-7715 lifecycle.
64
+
See [how to perform executions on a MetaMask user's behalf](../guides/advanced-permissions/execute-on-metamask-users-behalf.md) to get started with the Advanced Permissions lifecycle.
The MetaMask Delegation Toolkit provides *caveat enforcers*, which are smart contracts that implement rules and restrictions (*caveats*) on delegations.
8
+
The Smart Accounts Kit provides *caveat enforcers*, which are smart contracts that implement rules and restrictions (*caveats*) on delegations.
9
9
They serve as the underlying mechanism that enables conditional execution within the [Delegation Framework](./index.md#delegation-framework).
10
10
11
11
A caveat enforcer acts as a gate that validates whether a delegation can be used for a particular execution. When a delegate attempts to execute an action on behalf of a delegator, each caveat enforcer specified in the delegation evaluates whether the execution meets its defined criteria.
@@ -119,7 +119,7 @@ This "all-or-nothing" approach ensures that delegations only execute exactly as
119
119
120
120
## Caveat builder
121
121
122
-
While caveat enforcers operate at the smart contract level, most developers interact with them through the `CaveatBuilder` interface in the MetaMask Delegation Toolkit.
122
+
While caveat enforcers operate at the smart contract level, most developers interact with them through the `CaveatBuilder` interface in the Smart Accounts Kit.
123
123
124
124
The `CaveatBuilder` provides a developer-friendly TypeScript API that:
125
125
@@ -152,7 +152,7 @@ When designing delegations with caveats, consider these best practices:
152
152
153
153
## Available caveat enforcers
154
154
155
-
The Delegation Toolkit provides [out-of-the-box caveat enforcers](../../reference/delegation/caveats.md)
155
+
The Smart Accounts Kit provides [out-of-the-box caveat enforcers](../../reference/delegation/caveats.md)
@@ -14,7 +14,7 @@ or externally owned account (EOA) to perform specific executions on its behalf.
14
14
The account that grants the permission is called the *delegator account*, while the account that receives the permission
15
15
is called the *delegate account*.
16
16
17
-
The MetaMask Delegation Toolkit follows the [ERC-7710](https://eips.ethereum.org/EIPS/eip-7710) standard for smart contract delegation.
17
+
The Smart Accounts Kit follows the [ERC-7710](https://eips.ethereum.org/EIPS/eip-7710) standard for smart contract delegation.
18
18
In addition, users can use [caveat enforcers](caveat-enforcers.md) to apply rules and restrictions to delegations.
19
19
For example: Alice delegates the ability to spend her USDC to Bob, limiting the amount to 100 USDC.
20
20
@@ -65,7 +65,7 @@ You can create the following delegation types:
65
65
66
66
## Delegation Framework
67
67
68
-
The MetaMask Delegation Toolkit includes the Delegation Framework, which is a
68
+
The Smart Accounts Kit includes the Delegation Framework, which is a
69
69
[set of comprehensively audited smart contracts](https://github.com/MetaMask/delegation-framework) that
70
70
collectively handle delegator account creation, the delegation lifecycle,
71
71
and caveat enforcement.
@@ -152,7 +152,7 @@ sequenceDiagram
152
152
## Execution modes
153
153
154
154
When redeeming a delegation using [`redeemDelegations`](../../reference/delegation/index.md#redeemdelegations), you must pass an execution mode for each delegation chain you pass to the method.
155
-
The Delegation Toolkit supports the following execution modes, based on [ERC-7579](https://erc7579.com/):
155
+
The Smart Accounts Kit supports the following execution modes, based on [ERC-7579](https://erc7579.com/):
156
156
157
157
| Execution mode | Number of delegation chains passed to `redeemDelegations`| Processing method | Does user operation continue execution if redemption reverts? |
Copy file name to clipboardExpand all lines: delegation-toolkit/experimental/erc-7710-redeem-delegations.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ This is an experimental feature and may change in future releases.
14
14
[ERC-7710](https://eip.tools/eip/7710) introduces a standard way for MetaMask Smart Accounts to delegate capabilities to other
15
15
smart accounts or externally owned accounts (EOAs).
16
16
17
-
The MetaMask Delegation Toolkit provides two experimental functions, `erc7710BundlerActions()` and `erc7710WalletActions()`, that let
17
+
The MetaMask Smart Accounts Kit provides two experimental functions, `erc7710BundlerActions()` and `erc7710WalletActions()`, that let
18
18
a caller redeem delegations granted by MetaMask's permissions system.
19
19
20
20
## Extract relevant data
@@ -65,7 +65,7 @@ This data encodes the authority that lets the delegate redeem the permission.
65
65
### Security considerations for `accountMeta`
66
66
67
67
When a user grants a permission, they can provide `accountMeta` which is an array of `factory` and `factoryData` values.
68
-
These calls must be executed before redeeming the permission (this is handled for you in [`sendUserOperationWithDelegation`](../reference/erc7715/bundler-client.md#senduseroperationwithdelegation)).
68
+
These calls must be executed before redeeming the permission (this is handled for you in [`sendUserOperationWithDelegation`](../reference/advanced-permissions/bundler-client.md#senduseroperationwithdelegation)).
69
69
70
70
Because each `accountMeta` is an arbitrary call specified by the granter, it is important that these are executed carefully.
71
71
We recommend taking the following precautions:
@@ -86,7 +86,7 @@ Redeem a delegation with a [MetaMask smart account](#redeem-with-a-metamask-smar
86
86
To redeem a delegation with a MetaMask smart account, [create a smart account](../guides/smart-accounts/create-smart-account.md)
87
87
and a [Viem Bundler Client](https://viem.sh/account-abstraction/clients/bundler).
88
88
89
-
After setting up your Bundler Client, you can extend its functionality with `erc7710BundlerActions` actions to support ERC-7710. Once extended, use [`sendUserOperationWithDelegation`](../reference/erc7715/bundler-client.md#senduseroperationwithdelegation) to redeem the permission.
89
+
After setting up your Bundler Client, you can extend its functionality with `erc7710BundlerActions` actions to support ERC-7710. Once extended, use [`sendUserOperationWithDelegation`](../reference/advanced-permissions/bundler-client.md#senduseroperationwithdelegation) to redeem the permission.
To redeem a delegation with an EOA, create a [Viem Wallet Client](https://viem.sh/docs/clients/wallet).
170
170
171
-
After creating your Wallet Client, you can extend its functionality with `erc7710WalletActions` actions to support ERC-7710. Once extended, use [`sendTransactionWithDelegation`](../reference/erc7715/wallet-client.md#sendtransactionwithdelegation) to redeem the permission.
171
+
After creating your Wallet Client, you can extend its functionality with `erc7710WalletActions` actions to support ERC-7710. Once extended, use [`sendTransactionWithDelegation`](../reference/advanced-permissions/wallet-client.md#sendtransactionwithdelegation) to redeem the permission.
Copy file name to clipboardExpand all lines: delegation-toolkit/experimental/erc-7715-request-permissions.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ It requires MetaMask Flask 13.5.0 or later, and may change in future releases.
15
15
[ERC-7715](https://eip.tools/eip/7715) introduces a standard way for dapps to request permissions from a wallet to execute
16
16
transactions on a user's behalf.
17
17
18
-
The MetaMask Delegation Toolkit provides the experimental actions for ERC-7715 that lets a caller request permissions from MetaMask's permissions system.
18
+
The MetaMask Smart Accounts Kit provides the experimental actions for ERC-7715 that lets a caller request permissions from MetaMask's permissions system.
@@ -165,7 +165,7 @@ You should always verify the granted permissions and adjust your dapp's behavior
165
165
## Security considerations for `accountMeta`
166
166
167
167
When a user grants a permission, they can provide [`accountMeta`](erc-7710-redeem-delegations.md#extract-relevant-data) which is an array of `factory` and `factoryData` values.
168
-
These calls must be executed before redeeming the permission (this is handled for you in [`sendUserOperationWithDelegation`](../reference/erc7715/bundler-client.md#senduseroperationwithdelegation)).
168
+
These calls must be executed before redeeming the permission (this is handled for you in [`sendUserOperationWithDelegation`](../reference/advanced-permissions/bundler-client.md#senduseroperationwithdelegation)).
169
169
170
170
Because each `accountMeta` is an arbitrary call specified by the granter, it is important that these are executed carefully.
0 commit comments