Get supported permissions
ERC-7715 defines an RPC method that returns the execution permissions a wallet supports. Use the method to verify the available Advanced Permissions types and rules before sending requests.
Prerequisites
Request supported permissions
Request the supported Advanced Permissions types for a wallet with the
Wallet Client's getSupportedExecutionPermissions action.
- example.ts
- config.ts
- Example response
import { walletClient } from "./config.ts";
const supportedPermissions = await walletClient.getSupportedExecutionPermissions();
import { createWalletClient, custom } from "viem";;
import { erc7715ProviderActions } from "@metamask/smart-accounts-kit/actions";
export const walletClient = createWalletClient({
transport: custom(window.ethereum),
}).extend(erc7715ProviderActions());
{
"native-token-stream": {
"chainIds": [
1,
10,
],
"ruleTypes": [
"expiry"
]
},
// ...
}
Supported permissions table
The following table displays the Advanced Permissions types supported by the Smart Accounts Kit, MetaMask Flask, and MetaMask production, and the minimum version required for each.
If you don't see the Advanced Permissions type you're looking for, you can request it by emailing hellogators@consensys.net.
| Permission type | Smart Accounts Kit | MetaMask Flask | MetaMask |
|---|---|---|---|
| ERC-20 periodic | >= v0.1.0 | >= v13.5.0 | N/A |
| ERC-20 stream | >= v0.1.0 | >= v13.5.0 | N/A |
| ERC-20 revocation | >= v0.3.0 | >= v13.14.0 | >= 13.18.1 |
| Native token periodic | >= v0.1.0 | >= v13.5.0 | N/A |
| Native token stream | >= v0.1.0 | >= v13.5.0 | N/A |