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
The Smart Accounts Kit 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 Smart Accounts Kit 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.
Copy file name to clipboardExpand all lines: delegation-toolkit/experimental/erc-7710-redeem-delegations.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -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.
@@ -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.
[ERC-7715 permissions](../../concepts/erc7715.md) are fine-grained permissions that your dapp can request from a MetaMask user to execute transactions on their
12
+
[Advanced Permissions (ERC-7115)](../../concepts/advanced-permissions.md) are fine-grained permissions that your dapp can request from a MetaMask user to execute transactions on their
13
13
behalf. For example, a user can grant your dapp permission to spend 10 USDC per day to buy ETH over the course
14
14
of a month. Once the permission is granted, your dapp can use the allocated 10 USDC each day to
15
15
purchase ETH directly from the MetaMask user's account.
@@ -26,12 +26,11 @@ In this guide, you'll request an ERC-20 periodic transfer permission from a Meta
26
26
Set up a [Viem Wallet Client](https://viem.sh/docs/clients/wallet) using Viem's `createWalletClient` function. This client will
27
27
help you interact with MetaMask Flask.
28
28
29
-
Then, extend the Wallet Client functionality using `erc7715ProviderActions`. These actions enable you to request ERC-7715
30
-
permissions from the user.
29
+
Then, extend the Wallet Client functionality using `erc7715ProviderActions`. These actions enable you to request Advanced Permissions from the user.
Currently, ERC-7715 does not support automatically upgrading a MetaMask user's account to a [MetaMask smart account](../../concepts/smart-accounts.md). Therefore, you must
101
-
ensure that the user is upgraded to a smart account before requesting ERC-7715 permissions.
99
+
Currently, Advanced Permissions do not support automatically upgrading a MetaMask user's account to a [MetaMask smart account](../../concepts/smart-accounts.md). Therefore, you must
100
+
ensure that the user is upgraded to a smart account before requesting Advanced Permissions.
102
101
103
102
If the user has not yet been upgraded, you can handle the upgrade [programmatically](/wallet/how-to/send-transactions/send-batch-transactions/#about-atomic-batch-transactions) or ask the
104
103
user to [switch to a smart account manually](https://support.metamask.io/configure/accounts/switch-to-or-revert-from-a-smart-account/#how-to-switch-to-a-metamask-smart-account).
105
104
106
105
:::info Why is a Smart Account upgrade is required?
107
-
MetaMask's ERC-7715 implementation requires the user to be upgraded to a MetaMask
106
+
MetaMask's Advanced Permissions (ERC-7115) implementation requires the user to be upgraded to a MetaMask
108
107
Smart Account because, under the hood, you're requesting a signature for an [ERC-7710 delegation](../../concepts/delegation/index.md).
109
108
ERC-7710 delegation is one of the core features supported only by MetaMask Smart Accounts.
110
109
:::
@@ -138,11 +137,11 @@ if (code) {
138
137
}
139
138
```
140
139
141
-
### 5. Request ERC-7715 permissions
140
+
### 5. Request Advanced Permissions
142
141
143
-
Request ERC-7715 permissions from the user. In this example, you'll request an
142
+
Request Advanced Permissions from the user. In this example, you'll request an
144
143
[ERC-20 periodic permission](use-permissions/erc20-token.md#erc-20-periodic-permission) using the Wallet Client's
@@ -193,14 +192,14 @@ to estimate gas for user operations and submit transactions to the network.
193
192
For an EOA, set up a [Viem Wallet Client](https://viem.sh/docs/clients/wallet)
194
193
using Viem's `createWalletClient` function. This lets you send transactions directly to the network.
195
194
196
-
The toolkit provides public actions for both of the clients which can be used to redeem ERC-7715 permissions, and execute transactions on a user's behalf.
195
+
The toolkit provides public actions for both of the clients which can be used to redeem Advanced Permissions, and execute transactions on a user's behalf.
The session account can now redeem the permissions. The redeem transaction is sent to the `DelegationManager` contract, which validates the delegation and executes actions on the user's behalf.
235
234
236
235
To redeem the permissions, use the client action based on your session account type.
237
-
A smart account uses the Bundler Client's [`sendUserOperationWithDelegation`](../../reference/erc7715/bundler-client.md#senduseroperationwithdelegation) action,
238
-
and an EOA uses the Wallet Client's [`sendTransactionWithDelegation`](../../reference/erc7715/wallet-client.md#sendtransactionwithdelegation) action:
236
+
A smart account uses the Bundler Client's [`sendUserOperationWithDelegation`](../../reference/advanced-permissions/bundler-client.md#senduseroperationwithdelegation) action,
237
+
and an EOA uses the Wallet Client's [`sendTransactionWithDelegation`](../../reference/advanced-permissions/wallet-client.md#sendtransactionwithdelegation) action:
@@ -8,7 +8,7 @@ import TabItem from "@theme/TabItem";
8
8
9
9
# Use ERC-20 token permissions
10
10
11
-
[ERC-7715](https://eips.ethereum.org/EIPS/eip-7715) supports ERC-20 token permission types that allow you to request fine-grained
11
+
[Advanced Permissions (ERC-7715)](../../../concepts/advanced-permissions.md) supports ERC-20 token permission types that allow you to request fine-grained
12
12
permissions for ERC-20 token transfers with time-based (periodic) or streaming conditions, depending on your use case.
0 commit comments