diff --git a/docusaurus.config.js b/docusaurus.config.js
index 3e6086a4d62..a5d5930a767 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -277,7 +277,7 @@ const config = {
sidebarCollapsed: false,
includeCurrentVersion: true,
// Set to the latest release.
- lastVersion: '1.6.0',
+ lastVersion: '1.7.0',
versions: {
// Defaults to the ./docs folder.
// Using "development" instead of "next" as path.
@@ -286,8 +286,8 @@ const config = {
path: 'development',
},
// The latest release.
- '1.6.0': {
- label: 'latest (1.6.0)',
+ '1.7.0': {
+ label: 'latest (1.7.0)',
},
},
},
diff --git a/gator_versioned_docs/version-1.0.0/changelog/1.0.0.md b/gator_versioned_docs/version-1.0.0/changelog/1.0.0.md
deleted file mode 100644
index 9410743c68f..00000000000
--- a/gator_versioned_docs/version-1.0.0/changelog/1.0.0.md
+++ /dev/null
@@ -1,195 +0,0 @@
----
-sidebar_label: 1.0.0
-description: MetaMask Smart Accounts Kit v1.0.0 changelog
----
-
-# What's new in v1.0.0?
-
-:::info First stable release
-
-This is the first stable release of MetaMask Smart Accounts Kit. From v1.0.0 onward, breaking changes will be released only in major version bumps, as per the [semantic versioning specification](https://semver.org/#spec-item-4).
-
-:::
-
-## Breaking changes
-
-### ⚠️ `sendTransactionWithDelegation`
-
-- The `permissionsContext` parameter has been renamed to `permissionContext` (singular).
-- `permissionContext` now accepts `PermissionContext` which represents encoded delegation chain (`Hex`) or a decoded delegation chain (`Delegation[]`) for redeeming delegations.
-
-```ts
-await walletClient.sendTransactionWithDelegation({
-// remove-next-line
-- permissionsContext: "0x...",
-// add-next-line
-+ permissionContext: "0x...",
- delegationManager: "0x..,
- // ...
-});
-```
-
-### ⚠️ `sendUserOperationWithDelegation`
-
-- The `permissionsContext` parameter has been renamed to `permissionContext` (singular).
-- `permissionContext` now accepts `PermissionContext` which represents encoded delegation chain (`Hex`) or a decoded delegation chain (`Delegation[]`) for redeeming delegations.
-- The `accountMetadata` parameter has been replaced with `dependencies`.
-
-```ts
-await bundlerClient.sendUserOperationWithDelegation({
- // remove-next-line
-- accountMetadata: {
- // add-next-line
-+ dependencies: {
- factory: "0x..",
- factoryData: "0x..."
- },
- // ...
- calls: [
- {
- to: sessionAccount.address,
- data: "0x",
- value: 1n,
- // remove-next-line
-- permissionsContext: "0x..",
- // add-next-line
-+ permissionContext: "0x..",
- delegationManager: "0x..",
- },
- ],
- // ...
-});
-```
-
-### ⚠️ `getDelegationHashOffchain`
-
-The function has been renamed to `hashDelegation` for improved clarity.
-
-```typescript
-// remove-next-line
-- import { getDelegationHashOffchain } from "@metamask/smart-accounts-kit";
-// add-next-line
-+ import { hashDelegation } from "@metamask/smart-accounts-kit/utils";
-
-// remove-next-line
-- const delegationHash = getDelegationHashOffchain(delegation);
-// add-next-line
-+ const delegationHash = hashDelegation(delegation);
-```
-
-### ⚠️ `requestExecutionPermissions`
-
-- The action now accepts `isAdjustmentAllowed` inside each permission object as per new ERC-7715 specification.
-- The action now accepts `to` instead of `signer` for the session account.
-- The action now returns developer friendly types, `chainId` as `number` and token amounts as `bigint`.
-- `expiry` is now an optional parameter.
-
-```ts
-await walletClient.requestExecutionPermissions([{
- chainId: chain.id,
- expiry,
- // The requested permissions will be granted to the
- // session account.
- // add-next-line
-+ to: sessionAccount.address,
- // remove-start
-- signer: {
-- type: "account",
-- data: {
-- address: sessionAccount.address,
-- },
-- },
- // remove-end
- // remove-next-line
-- isAdjustmentAllowed: true,
- permission: {
- type: "erc20-token-periodic",
- data: {
- // ...
- },
- // add-next-line
-+ isAdjustmentAllowed: true,
- },
-}]);
-```
-
-### ⚠️ `encodePermissionContexts`
-
-The utility function has been removed. See [`encodeDelegations`](../reference/delegation/index.md#encodedelegations) to encode the delegations.
-
-### ⚠️ `decodePermissionContexts`
-
-The utility function has been removed. See [`decodeDelegations`](../reference/delegation/index.md#decodedelegations) to decode the delegations.
-
-### ⚠️ `redeemDelegations`
-
-The `redeemDelegations` function and `Redemption` type have been removed. Use the [`DelegationManager.encode.redeemDelegations`](../reference/delegation/index.md#redeemdelegations) encoding utility.
-
-## Enhancements
-
-- New ERC-7715 Wallet Client actions have been added to [get the supported permission](../guides/advanced-permissions/get-supported-permissions.md), and [get granted permissions](../guides/advanced-permissions/get-granted-permissions.md) from a wallet.
-- The `signer` parameter in `toMetaMaskSmartAccount` is now optional. If omitted, non-signing operations still work, but signing operations such as `signUserOperation`, `signDelegation`, `signMessage`, and `signTypedData` throw an error.
-- Added [`encodeDelegation`](../reference/delegation/index.md#encodedelegation) and [`decodeDelegation`](../reference/delegation/index.md#decodedelegation) utilities for encoding and decoding single delegation.
-- Allow scope type to be specified either as [ScopeType enum](../reference/types.md#scopetype) or string literal.
-- Allow caveat type to be specified either as [CaveatType enum](../reference/types.md#caveattype) or string literal.
-- Added support for Tempo Mainnet and Tempo Moderato Testnet.
-- The `webauthn-p256` dependency has been replaced with the `ox` p256 module. This doesn't impact developer facing APIs.
-- Improved `@metamask/delegation-abis` tree-shakability.
-
-## Fixes
-
-- Fixed `signDelegation` to correctly await the signer and return the signed signature.
-- The `delegation.salt` and `caveat.args` now default to `0x00` instead of `0x`. This prevents
- `Cannot convert 0x to a BigInt` errors when encoding delegations directly with Viem.
-
-## Contract addresses
-
-The following are the contract addresses for the
-[Delegation Framework version 1.3.0](https://github.com/MetaMask/delegation-framework/blob/v1.3.0/documents/Deployments.md),
-as used by this version of the toolkit.
-
-### Delegation Framework
-
-| Contract | Address |
-| --------------------- | -------------------------------------------- |
-| EntryPoint | `0x0000000071727De22E5E9d8BAf0edAc6f37da032` |
-| SimpleFactory | `0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c` |
-| DelegationManager | `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3` |
-| MultiSigDeleGatorImpl | `0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7` |
-| HybridDeleGatorImpl | `0x48dBe696A4D990079e039489bA2053B36E8FFEC4` |
-
-### Caveat enforcers
-
-| Enforcer | Address |
-| ---------------------------------------- | -------------------------------------------- |
-| AllowedCalldataEnforcer | `0xc2b0d624c1c4319760C96503BA27C347F3260f55` |
-| AllowedMethodsEnforcer | `0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5` |
-| AllowedTargetsEnforcer | `0x7F20f61b1f09b08D970938F6fa563634d65c4EeB` |
-| ArgsEqualityCheckEnforcer | `0x44B8C6ae3C304213c3e298495e12497Ed3E56E41` |
-| BlockNumberEnforcer | `0x5d9818dF0AE3f66e9c3D0c5029DAF99d1823ca6c` |
-| DeployedEnforcer | `0x24ff2AA430D53a8CD6788018E902E098083dcCd2` |
-| ERC20BalanceChangeEnforcer | `0xcdF6aB796408598Cea671d79506d7D48E97a5437` |
-| ERC20TransferAmountEnforcer | `0xf100b0819427117EcF76Ed94B358B1A5b5C6D2Fc` |
-| ERC20PeriodTransferEnforcer | `0x474e3Ae7E169e940607cC624Da8A15Eb120139aB` |
-| ERC20StreamingEnforcer | `0x56c97aE02f233B29fa03502Ecc0457266d9be00e` |
-| ERC721BalanceChangeEnforcer | `0x8aFdf96eDBbe7e1eD3f5Cd89C7E084841e12A09e` |
-| ERC721TransferEnforcer | `0x3790e6B7233f779b09DA74C72b6e94813925b9aF` |
-| ERC1155BalanceChangeEnforcer | `0x63c322732695cAFbbD488Fc6937A0A7B66fC001A` |
-| ExactCalldataBatchEnforcer | `0x982FD5C86BBF425d7d1451f974192d4525113DfD` |
-| ExactCalldataEnforcer | `0x99F2e9bF15ce5eC84685604836F71aB835DBBdED` |
-| ExactExecutionBatchEnforcer | `0x1e141e455d08721Dd5BCDA1BaA6Ea5633Afd5017` |
-| ExactExecutionEnforcer | `0x146713078D39eCC1F5338309c28405ccf85Abfbb` |
-| IdEnforcer | `0xC8B5D93463c893401094cc70e66A206fb5987997` |
-| LimitedCallsEnforcer | `0x04658B29F6b82ed55274221a06Fc97D318E25416` |
-| MultiTokenPeriodEnforcer | `0xFB2f1a9BD76d3701B730E5d69C3219D42D80eBb7` |
-| NonceEnforcer | `0xDE4f2FAC4B3D87A1d9953Ca5FC09FCa7F366254f` |
-| NativeBalanceChangeEnforcer | `0xbD7B277507723490Cd50b12EaaFe87C616be6880` |
-| NativeTokenPaymentEnforcer | `0x4803a326ddED6dDBc60e659e5ed12d85c7582811` |
-| NativeTokenTransferAmountEnforcer | `0xF71af580b9c3078fbc2BBF16FbB8EEd82b330320` |
-| NativeTokenStreamingEnforcer | `0xD10b97905a320b13a0608f7E9cC506b56747df19` |
-| NativeTokenPeriodTransferEnforcer | `0x9BC0FAf4Aca5AE429F4c06aEEaC517520CB16BD9` |
-| OwnershipTransferEnforcer | `0x7EEf9734E7092032B5C56310Eb9BbD1f4A524681` |
-| RedeemerEnforcer | `0xE144b0b2618071B4E56f746313528a669c7E65c5` |
-| SpecificActionERC20TransferBatchEnforcer | `0x00e0251aaA263dfE3B3541B758A82D1CBA1c3B6D` |
-| TimestampEnforcer | `0x1046bb45C8d673d4ea75321280DB34899413c069` |
-| ValueLteEnforcer | `0x92Bf12322527cAA612fd31a0e810472BBB106A8F` |
diff --git a/gator_versioned_docs/version-1.0.0/concepts/smart-accounts.md b/gator_versioned_docs/version-1.0.0/concepts/smart-accounts.md
deleted file mode 100644
index 3bc48237cc9..00000000000
--- a/gator_versioned_docs/version-1.0.0/concepts/smart-accounts.md
+++ /dev/null
@@ -1,94 +0,0 @@
----
-description: Learn about MetaMask Smart Accounts.
-keywords: [MetaMask, smart accounts, account abstraction, ERC-4337]
----
-
-# MetaMask Smart Accounts
-
-The Smart Accounts Kit enables you to create and manage _MetaMask Smart Accounts_.
-MetaMask Smart Accounts are [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) smart contract accounts
-that support programmable account behavior and advanced features such as multi-signature approvals,
-automated transaction batching, and custom security policies.
-Unlike traditional wallets, which rely on private keys for every transaction, MetaMask Smart Accounts use smart contracts to govern account logic.
-
-MetaMask Smart Accounts are referenced in the toolkit as `MetaMaskSmartAccount`.
-
-## Account abstraction (ERC-4337)
-
-Account abstraction, specified by [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337), is a
-mechanism that enables users to manage smart contract accounts containing arbitrary verification logic.
-ERC-4337 enables smart contracts to be used as primary accounts in place of traditional private key-based
-accounts, or externally owned accounts (EOAs).
-
-ERC-4337 introduces the following concepts:
-
-- **User operation** - A package of instructions signed by a user, specifying executions for
- the smart account to perform.
- User operations are collected and submitted to the network by bundlers.
-
-- **Bundler** - A service that collects multiple user operations, packages them into a single transaction,
- and submits them to the network, optimizing gas costs and transaction efficiency.
-
-- **Entry point contract** - A contract that validates and processes bundled user operations, ensuring they
- adhere to the required rules and security checks.
-
-- **Paymasters** - Entities that handle the payment of gas fees on behalf of users, often integrated
- into smart accounts to facilitate gas abstraction.
-
-## Smart account implementation types
-
-The toolkit supports three types of MetaMask Smart Accounts, each offering unique features and use cases.
-
-See [Create a smart account](../guides/smart-accounts/create-smart-account.md) to learn how to use these different account types.
-
-### Hybrid smart account
-
-The Hybrid smart account is a flexible implementation that supports both an externally owned account (EOA) owner and any number of passkey (WebAuthn) signers.
-You can configure any of these signers, and use them to sign any data, including user operations, on behalf of the smart account.
-
-This type is referenced in the toolkit as `Implementation.Hybrid`.
-
-### Multisig smart account
-
-The Multisig smart account is an implementation that supports multiple signers with a configurable threshold, allowing for enhanced security and flexibility in account management.
-A valid signature requires signatures from at least the number of signers specified by the threshold.
-
-This type is referenced in the toolkit as `Implementation.Multisig`.
-
-### Stateless 7702 smart account
-
-The Stateless 7702 smart account implementation represents an externally owned account (EOA) upgraded to
-support smart account functionality as defined by [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702). This implementation enables EOAs to perform smart account operations, including the creation and management of delegations.
-
-This type is referenced in the toolkit as `Implementation.Stateless7702`.
-
-## Smart account flow
-
-The MetaMask Smart Accounts flow is as follows:
-
-1. **Account setup** - A user creates a smart account by deploying a smart contract, and initializing it with
- ownership and security settings.
- The user can customize the smart account in the following ways:
- - **Account logic** - They can configure custom logic for actions such as multi-signature
- approvals, spending limits, and automated transaction batching.
-
- - **Security and recovery** - They can configure advanced security features such as two-factor
- authentication and mechanisms for account recovery involving trusted parties.
-
- - **Gas management** - They can configure flexible gas payment options, including alternative
- tokens or third-party sponsorship.
-
-2. **User operation creation** - For actions such as sending transactions, a user operation is created with
- necessary details and signed by the configured signers.
-
-3. **Bundlers and mempool** - The signed user operation is submitted to a special mempool, where bundlers
- collect and package multiple user operations into a single transaction to save on gas costs.
-
-4. **Validation and execution** - The bundled transaction goes to an entry point contract, which
- validates each user operation and executes them if they meet the smart contract's rules.
-
-## Delegator accounts
-
-Delegator accounts are a type of MetaMask smart account that allows users to grant permission to other smart accounts or EOAs
-to perform specific executions on their behalf, under defined rules and restrictions.
-Learn more about [delegation](delegation/overview.md).
diff --git a/gator_versioned_docs/version-1.0.0/get-started/smart-account-quickstart/eip7702.md b/gator_versioned_docs/version-1.0.0/get-started/smart-account-quickstart/eip7702.md
deleted file mode 100644
index 560e7499ae9..00000000000
--- a/gator_versioned_docs/version-1.0.0/get-started/smart-account-quickstart/eip7702.md
+++ /dev/null
@@ -1,168 +0,0 @@
----
-description: Upgrade an externally owned account (EOA) to a smart account
-sidebar_label: EIP-7702 quickstart
-keywords: [quickstart, EIP-7702, externally owned account, EOA, smart account]
----
-
-# EIP-7702 quickstart
-
-This quickstart demonstrates how to upgrade your externally owned account (EOA) to support MetaMask Smart Accounts
-functionality using an [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) transaction. This enables your EOA to leverage the benefits of account
-abstraction, such as batch transactions, gas sponsorship, and [delegation capabilities](../../concepts/delegation/overview.md).
-
-## Prerequisites
-
-- Install [Node.js](https://nodejs.org/en/blog/release/v18.18.0) v18 or later.
-- Install [Yarn](https://yarnpkg.com/),
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), or another package manager.
-- [Install Viem](https://viem.sh/).
-
-## Steps
-
-### 1. Install the Smart Accounts Kit
-
-Install the [Smart Accounts Kit](https://www.npmjs.com/package/@metamask/smart-accounts-kit):
-
-```bash npm2yarn
-npm install @metamask/smart-accounts-kit
-```
-
-### 2. Set up a Public Client
-
-Set up a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function.
-This client will let the EOA query the account state and interact with the blockchain network.
-
-```typescript
-import { createPublicClient, http } from 'viem'
-import { sepolia as chain } from 'viem/chains'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-```
-
-### 3. Set up a Bundler Client
-
-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.
-
-```typescript
-import { createBundlerClient } from 'viem/account-abstraction'
-
-const bundlerClient = createBundlerClient({
- client: publicClient,
- transport: http('https://your-bundler-rpc.com'),
-})
-```
-
-### 4. Set up a Wallet Client
-
-Set up [Viem Wallet Client](https://viem.sh/docs/clients/wallet) using Viem's `createWalletClient` function.
-This lets you sign and submit EIP-7702 authorization.
-
-```typescript
-import { createWalletClient, http } from 'viem'
-import { sepolia as chain } from 'viem/chains'
-import { privateKeyToAccount } from 'viem/accounts'
-
-export const account = privateKeyToAccount('0x...')
-
-export const walletClient = createWalletClient({
- account,
- chain,
- transport: http(),
-})
-```
-
-### 5. Authorize a 7702 delegation
-
-Create an authorization to map the contract code to an EOA, and sign it
-using Viem's [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) action. The `signAuthorization` action
-does not support JSON-RPC accounts.
-
-This example uses [`EIP7702StatelessDeleGator`](https://github.com/MetaMask/delegation-framework/blob/main/src/EIP7702/EIP7702StatelessDeleGator.sol) as the EIP-7702 delegator contract.
-It follows a stateless design, as it does not store signer data in the contract's state. This approach
-provides a lightweight and secure way to upgrade an EOA to a smart account.
-
-```typescript
-import {
- Implementation,
- toMetaMaskSmartAccount,
- getSmartAccountsEnvironment,
-} from '@metamask/smart-accounts-kit'
-import { privateKeyToAccount } from 'viem/accounts'
-
-const environment = getSmartAccountsEnvironment(sepolia.id)
-const contractAddress = environment.implementations.EIP7702StatelessDeleGatorImpl
-
-const authorization = await walletClient.signAuthorization({
- account,
- contractAddress,
- executor: 'self',
-})
-```
-
-### 6. Submit the authorization
-
-Once you have signed an authorization, you can send an EIP-7702 transaction to set the EOA code.
-Since the authorization cannot be sent by itself, you can include it alongside a dummy transaction.
-
-```ts
-import { zeroAddress } from 'viem'
-
-const hash = await walletClient.sendTransaction({
- authorizationList: [authorization],
- data: '0x',
- to: zeroAddress,
-})
-```
-
-### 7. Create a MetaMask smart account
-
-Create a smart account instance for the EOA and start
-leveraging the benefits of account abstraction.
-
-```ts
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const addresses = await walletClient.getAddresses()
-const address = addresses[0]
-
-const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Stateless7702,
- address,
- signer: { walletClient },
-})
-```
-
-### 8. Send a user operation
-
-Send a user operation through the upgraded EOA, using Viem's [`sendUserOperation`](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation) method.
-
-```ts
-import { parseEther } from 'viem'
-
-// Appropriate fee per gas must be determined for the specific bundler being used.
-const maxFeePerGas = 1n
-const maxPriorityFeePerGas = 1n
-
-const userOperationHash = await bundlerClient.sendUserOperation({
- account: smartAccount,
- calls: [
- {
- to: '0x1234567890123456789012345678901234567890',
- value: parseEther('1'),
- },
- ],
- maxFeePerGas,
- maxPriorityFeePerGas,
-})
-```
-
-## Next steps
-
-- To grant specific permissions to other accounts from your smart account, [create a delegation](../../guides/delegation/execute-on-smart-accounts-behalf.md).
-- To quickly bootstrap a MetaMask Smart Accounts project, [use the CLI](../use-the-cli.md).
-- You can also [use MetaMask Connect to upgrade a MetaMask account to a smart account](/tutorials/upgrade-eoa-to-smart-account).
diff --git a/gator_versioned_docs/version-1.0.0/get-started/smart-account-quickstart/index.md b/gator_versioned_docs/version-1.0.0/get-started/smart-account-quickstart/index.md
deleted file mode 100644
index 2d22d8c36c9..00000000000
--- a/gator_versioned_docs/version-1.0.0/get-started/smart-account-quickstart/index.md
+++ /dev/null
@@ -1,111 +0,0 @@
----
-description: Get started quickly with the MetaMask Smart Accounts
-sidebar_label: Smart account quickstart
-keywords: [quickstart, smart accounts, user operation]
----
-
-# MetaMask Smart Accounts quickstart
-
-You can get started quickly with [MetaMask Smart Accounts](../../concepts/smart-accounts.md) by creating your first smart account and sending a user operation.
-
-## Prerequisites
-
-- Install [Node.js](https://nodejs.org/en/blog/release/v18.18.0) v18 or later.
-- Install [Yarn](https://yarnpkg.com/),
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), or another package manager.
-
-## Steps
-
-### 1. Install the Smart Accounts Kit
-
-Install the [Smart Accounts Kit](https://www.npmjs.com/package/@metamask/smart-accounts-kit):
-
-```bash npm2yarn
-npm install @metamask/smart-accounts-kit
-```
-
-### 2. Set up a Public Client
-
-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 the blockchain network.
-
-```typescript
-import { createPublicClient, http } from 'viem'
-import { sepolia as chain } from 'viem/chains'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-```
-
-### 3. Set up a Bundler Client
-
-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.
-
-```typescript
-import { createBundlerClient } from 'viem/account-abstraction'
-
-const bundlerClient = createBundlerClient({
- client: publicClient,
- transport: http('https://your-bundler-rpc.com'),
-})
-```
-
-### 4. Create a MetaMask smart account
-
-[Create a MetaMask smart account](../../guides/smart-accounts/create-smart-account.md) to send the first user operation.
-
-This example configures a Hybrid smart account,
-which is a flexible smart account implementation that supports both an externally owned account (EOA) owner and any number of passkey (WebAuthn) signers:
-
-```typescript
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-import { privateKeyToAccount } from 'viem/accounts'
-
-const account = privateKeyToAccount('0x...')
-
-const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [account.address, [], [], []],
- deploySalt: '0x',
- signer: { account },
-})
-```
-
-### 5. Send a user operation
-
-Send a user operation using Viem's [`sendUserOperation`](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation) method.
-
-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.
-
-The smart account will remain counterfactual until the first user operation. If the smart account is not
-deployed, it will be automatically deployed upon the sending first user operation.
-
-```ts
-import { parseEther } from 'viem'
-
-// Appropriate fee per gas must be determined for the specific bundler being used.
-const maxFeePerGas = 1n
-const maxPriorityFeePerGas = 1n
-
-const userOperationHash = await bundlerClient.sendUserOperation({
- account: smartAccount,
- calls: [
- {
- to: '0x1234567890123456789012345678901234567890',
- value: parseEther('1'),
- },
- ],
- maxFeePerGas,
- maxPriorityFeePerGas,
-})
-```
-
-## Next steps
-
-- To grant specific permissions to other accounts from your smart account, [create a delegation](../../guides/delegation/execute-on-smart-accounts-behalf.md).
-- This quickstart example uses a Hybrid smart account.
- You can also [configure other smart account types](../../guides/smart-accounts/create-smart-account.md).
-- To upgrade an EOA to a smart account, see the [EIP-7702 quickstart](eip7702.md).
-- To quickly bootstrap a MetaMask Smart Accounts project, [use the CLI](../use-the-cli.md).
diff --git a/gator_versioned_docs/version-1.0.0/get-started/supported-advanced-permissions.md b/gator_versioned_docs/version-1.0.0/get-started/supported-advanced-permissions.md
deleted file mode 100644
index 9664ab0a22d..00000000000
--- a/gator_versioned_docs/version-1.0.0/get-started/supported-advanced-permissions.md
+++ /dev/null
@@ -1,19 +0,0 @@
----
-title: Supported Advanced Permissions
-description: Supported Advanced Permissions for Smart Accounts Kit, MetaMask Flask, and MetaMask.
-keywords: [MetaMask, smart accounts kit, supported advanced permissions, erc-7715, 7715]
----
-
-The following table displays the Advanced Permissions types supported by the
-Smart Accounts Kit, [MetaMask Flask](/snaps/get-started/install-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](mailto:hellogators@consensys.net).
-
-| Permission type | Smart Accounts Kit | MetaMask Flask | MetaMask |
-| ------------------------------------------------------------------------------------------------------------------------ | ------------------ | -------------- | ----------- |
-| [ERC-20 periodic](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-periodic-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
-| [ERC-20 stream](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-stream-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
-| [ERC-20 revocation](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-revocation-permission) | >= v0.3.0 | >= v13.14.0 | >= 13.18.1 |
-| [Native token periodic](../guides/advanced-permissions/use-permissions/native-token.md#native-token-periodic-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
-| [Native token stream](../guides/advanced-permissions/use-permissions/native-token.md#native-token-stream-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
diff --git a/gator_versioned_docs/version-1.0.0/get-started/supported-networks.md b/gator_versioned_docs/version-1.0.0/get-started/supported-networks.md
deleted file mode 100644
index 5021cf94559..00000000000
--- a/gator_versioned_docs/version-1.0.0/get-started/supported-networks.md
+++ /dev/null
@@ -1,104 +0,0 @@
----
-title: Supported networks
-sidebar_label: Supported networks
-description: Supported networks for Smart Accounts Kit.
-keywords: [MetaMask, smart accounts kit, supported networks, mainnet, testnet]
----
-
-The following tables display the networks supported by each version of the Smart Accounts Kit.
-
-If you don't see the network you're looking for, you can request support by emailing hellogators@consensys.net.
-
-## MetaMask Smart Accounts
-
-### Mainnet networks
-
-| Network Name | v0.1.0 | v0.2.0 | v0.3.0 | v1.0.0 |
-| ------------------- | ------ | ------ | ------ | ------ |
-| Arbitrum Nova | ✅ | ✅ | ✅ | ✅ |
-| Arbitrum One | ✅ | ✅ | ✅ | ✅ |
-| Base | ✅ | ✅ | ✅ | ✅ |
-| Berachain | ✅ | ✅ | ✅ | ✅ |
-| Binance Smart Chain | ✅ | ✅ | ✅ | ✅ |
-| Celo | ❌ | ❌ | ❌ | ✅ |
-| Citrea | ❌ | ❌ | ❌ | ✅ |
-| Ethereum | ✅ | ✅ | ✅ | ✅ |
-| Gnosis Chain | ✅ | ✅ | ✅ | ✅ |
-| Ink | ✅ | ✅ | ✅ | ✅ |
-| Linea | ✅ | ✅ | ✅ | ✅ |
-| MegaETH | ❌ | ❌ | ❌ | ✅ |
-| Monad | ❌ | ✅ | ✅ | ✅ |
-| Optimism | ✅ | ✅ | ✅ | ✅ |
-| Polygon | ✅ | ✅ | ✅ | ✅ |
-| Ronin | ❌ | ❌ | ❌ | ✅ |
-| Sei | ✅ | ✅ | ✅ | ✅ |
-| Sonic | ❌ | ✅ | ✅ | ✅ |
-| Tempo | ❌ | ❌ | ❌ | ✅ |
-| Unichain | ✅ | ✅ | ✅ | ✅ |
-
-### Testnet networks
-
-| Network Name | v0.1.0 | v0.2.0 | v0.3.0 | v1.0.0 |
-| ------------------- | ------ | ------ | ------ | ------ |
-| Arbitrum Sepolia | ✅ | ✅ | ✅ | ✅ |
-| Base Sepolia | ✅ | ✅ | ✅ | ✅ |
-| Berachain Bepolia | ✅ | ✅ | ✅ | ✅ |
-| Binance Smart Chain | ✅ | ✅ | ✅ | ✅ |
-| Celo Alfajores | ❌ | ❌ | ❌ | ✅ |
-| Citrea | ✅ | ✅ | ✅ | ✅ |
-| Ethereum Sepolia | ✅ | ✅ | ✅ | ✅ |
-| Gnosis Chiado | ✅ | ✅ | ✅ | ✅ |
-| Hoodi | ❌ | ✅ | ✅ | ✅ |
-| Ink Sepolia | ✅ | ✅ | ✅ | ✅ |
-| Linea Sepolia | ✅ | ✅ | ✅ | ✅ |
-| MegaETH | ✅ | ✅ | ✅ | ✅ |
-| Monad | ✅ | ✅ | ✅ | ✅ |
-| Optimism Sepolia | ✅ | ✅ | ✅ | ✅ |
-| Polygon Amoy | ✅ | ✅ | ✅ | ✅ |
-| Ronin Saigon | ❌ | ❌ | ❌ | ✅ |
-| Sei | ❌ | ✅ | ✅ | ✅ |
-| Sonic | ❌ | ✅ | ✅ | ✅ |
-| Tempo Moderato | ❌ | ❌ | ❌ | ✅ |
-| Unichain Sepolia | ✅ | ✅ | ✅ | ✅ |
-
-## Advanced Permissions (ERC-7715)
-
-### Mainnet networks
-
-| Network Name | v0.1.0 | v0.2.0 | v0.3.0 | v1.0.0 |
-| ------------------- | ------ | ------ | ------ | ------ |
-| Arbitrum Nova | ✅ | ✅ | ✅ | ✅ |
-| Arbitrum One | ✅ | ✅ | ✅ | ✅ |
-| Base | ✅ | ✅ | ✅ | ✅ |
-| Berachain | ✅ | ✅ | ✅ | ✅ |
-| Binance Smart Chain | ✅ | ✅ | ✅ | ✅ |
-| Citrea | ✅ | ✅ | ✅ | ✅ |
-| Ethereum | ✅ | ✅ | ✅ | ✅ |
-| Gnosis | ✅ | ✅ | ✅ | ✅ |
-| Linea | ✅ | ✅ | ✅ | ✅ |
-| Monad | ✅ | ✅ | ✅ | ✅ |
-| Optimism | ✅ | ✅ | ✅ | ✅ |
-| Polygon | ✅ | ✅ | ✅ | ✅ |
-| Sei | ✅ | ✅ | ✅ | ✅ |
-| Sonic | ✅ | ✅ | ✅ | ✅ |
-| Unichain | ✅ | ✅ | ✅ | ✅ |
-
-### Testnet networks
-
-| Network Name | v0.1.0 | v0.2.0 | v0.3.0 | v1.0.0 |
-| ------------------- | ------ | ------ | ------ | ------ |
-| Arbitrum Sepolia | ✅ | ✅ | ✅ | ✅ |
-| Base Sepolia | ✅ | ✅ | ✅ | ✅ |
-| Berachain Bepolia | ✅ | ✅ | ✅ | ✅ |
-| Binance Smart Chain | ✅ | ✅ | ✅ | ✅ |
-| Chiado | ✅ | ✅ | ✅ | ✅ |
-| Citrea | ✅ | ✅ | ✅ | ✅ |
-| Hoodi | ✅ | ✅ | ✅ | ✅ |
-| Linea Sepolia | ✅ | ✅ | ✅ | ✅ |
-| MegaETH | ✅ | ✅ | ✅ | ✅ |
-| Optimism Sepolia | ✅ | ✅ | ✅ | ✅ |
-| Polygon Amoy | ✅ | ✅ | ✅ | ✅ |
-| Sei | ✅ | ✅ | ✅ | ✅ |
-| Sepolia | ✅ | ✅ | ✅ | ✅ |
-| Sonic | ✅ | ✅ | ✅ | ✅ |
-| Unichain Sepolia | ✅ | ✅ | ✅ | ✅ |
diff --git a/gator_versioned_docs/version-1.0.0/get-started/use-scaffold-eth/advanced-permissions.md b/gator_versioned_docs/version-1.0.0/get-started/use-scaffold-eth/advanced-permissions.md
deleted file mode 100644
index 27d6f83e3be..00000000000
--- a/gator_versioned_docs/version-1.0.0/get-started/use-scaffold-eth/advanced-permissions.md
+++ /dev/null
@@ -1,60 +0,0 @@
----
-description: Get started with the Advanced Permissions (ERC-7715) using Scaffold-ETH 2.
-sidebar_label: Advanced Permissions (ERC-7715)
-keywords: [scaffold-eth, delegation, advanced permissions, erc7715, 7715, template]
----
-
-# Use Advanced Permissions with Scaffold-ETH 2
-
-Use the [Advanced Permissions (ERC-7715) extension](https://github.com/MetaMask/erc-7715-extension) for [Scaffold-ETH 2](https://docs.scaffoldeth.io/) to bootstrap a project in
-under two minutes. This extension helps you quickly generate the boilerplate code to request fine-grained permissions
-from a MetaMask user, and execute transactions on their behalf.
-
-## Prerequisites
-
-- Install [Node.js](https://nodejs.org/en/blog/release/v20.18.3) v20.18.3 or later.
-- Install [Yarn](https://yarnpkg.com/) package manager.
-- Install [Git](https://git-scm.com/install/).
-- [Create a Pimlico API key](https://docs.pimlico.io/guides/create-api-key#create-api-key).
-
-### 1. Install the extension
-
-Run the following command to install the Smart Accounts Kit extension:
-
-```bash
-npx create-eth@latest -e metamask/erc-7715-extension your-project-name
-```
-
-### 2. Set up enviroment variables
-
-Navigate into the project's `nextjs` package, and create a `.env.local` file. Once created, update the
-`NEXT_PUBLIC_PIMLICO_API_KEY` environment variable with your Pimlico API Key.
-
-```bash
-cd your-project-name/packages/nextjs
-cp .env.example .env.local
-```
-
-### 3. Start the frontend
-
-In the project's root directory start the development server.
-
-```bash
-yarn start
-```
-
-### 4. Complete the Advanced Permissions lifecycle
-
-Navigate to the **Advanced Permissions (ERC-7715)** page in your Scaffold-ETH
-frontend at http://localhost:3000/erc-7715-permissions, and follow the steps to request an advanced
-permission, and execute a transaction on the user's behalf.
-
-You can view the completed transaction on Etherscan.
-
-
-
-
-
-## Next steps
-
-Learn more about [Advanced Permissions (ERC-7715)](../../concepts/advanced-permissions.md).
diff --git a/gator_versioned_docs/version-1.0.0/get-started/use-with-openclaw.md b/gator_versioned_docs/version-1.0.0/get-started/use-with-openclaw.md
deleted file mode 100644
index db85364a71c..00000000000
--- a/gator_versioned_docs/version-1.0.0/get-started/use-with-openclaw.md
+++ /dev/null
@@ -1,104 +0,0 @@
----
-sidebar_label: Use with OpenClaw
-description: Use the MetaMask Smart Accounts Kit skill with OpenClaw to build and deploy applications with smart accounts support.
-toc_max_heading_level: 2
-keywords: [openclaw, skill, delegation, smart accounts, ai, metamask smart accounts kit]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Use the Smart Accounts Kit with OpenClaw
-
-Use the MetaMask Smart Accounts Kit [OpenClaw skills](https://docs.openclaw.ai/tools/skills) to interact with the Smart Accounts Kit using natural language prompts.
-
-[OpenClaw](https://openclaw.ai/) is an open-source platform for AI agents that enables you to build, deploy, and
-manage AI assistants with access to various tools and skills. The Smart Accounts Kit provides the below two skills.
-
-## Gator CLI skill
-
-This skill enables your agent to grant, redeem, inspect and revoke ERC-7710 delegations using the [`@metamask/gator-cli`](https://www.npmjs.com/package/@metamask/gator-cli) package.
-
-:::warning Alpha version
-
-This CLI is in alpha version, and stores agent's private key in a local
-JSON file (`~/.gator-cli/`). Please proceed with caution, and do not use
-it with accounts holding significant funds.
-
-:::
-
-### Install
-
-
-
-
-```bash
-clawhub install gator-cli
-```
-
-
-
-
-```txt
-Install the skill from https://github.com/MetaMask/openclaw-skills/blob/main/metamask/gator-cli/SKILL.md
-```
-
-
-
-
-### Reference
-
-The skill provides access to the following commands:
-
-| Command | Description |
-| --------- | -------------------------------------------- |
-| `init` | Generate a private key and save config. |
-| `create` | Upgrade an EOA to an EIP-7702 smart account. |
-| `show` | Display the EOA address. |
-| `status` | Check config and on chain account status. |
-| `balance` | Show native or ERC-20 balance. |
-| `grant` | Create, sign, and store a delegation. |
-| `redeem` | Redeem a delegation using an action type. |
-| `revoke` | Revoke a delegation on chain. |
-| `inspect` | View delegations for your account. |
-
-## Smart Accounts Kit skill
-
-This skill helps your agent learn about the Smart Accounts Kit and its capabilities, and integrate them into your applications.
-
-### Install
-
-
-
-
-```bash
-clawhub install smart-accounts-kit
-```
-
-
-
-
-```bash
-cd ~/.openclaw/workspace/skills
-git clone https://github.com/smartgator/smart-accounts-kit-skills.git
-```
-
-
-
-
-```txt
-Install the skill from https://github.com/smartgator/smart-accounts-kit-skills.git
-```
-
-
-
-
-### Reference
-
-The skill provides access to the following capabilities:
-
-| Capability | Description |
-| ---------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
-| [Smart accounts](https://github.com/smartgator/smart-accounts-kit-skills/blob/main/references/smart-accounts.md) | Helps you integrate MetaMask Smart Accounts to support batch transactions, multi-sig signatures, and gas sponsorship. |
-| [Delegation](https://github.com/smartgator/smart-accounts-kit-skills/blob/main/references/delegations.md) | Helps you integrate delegations with scopes and caveats. |
-| [Advanced Permissions](https://github.com/smartgator/smart-accounts-kit-skills/blob/main/references/advanced-permissions.md) | Helps you integrate Advanced Permissions. |
diff --git a/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/create-redelegation.md b/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/create-redelegation.md
deleted file mode 100644
index e1736c2c43a..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/create-redelegation.md
+++ /dev/null
@@ -1,210 +0,0 @@
----
-description: Learn how to create a redelegation for Advanced Permissions.
-sidebar_label: Create a redelegation
-keywords: [advanced permissions, caveat, delegation scope, redelegation, delegation]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Create a redelegation
-
-Redelegation is a core feature that sets Advanced Permissions apart from other permission sharing frameworks.
-It allows a session account (delegate) to create a delegation chain, passing on the same or reduced level of authority
-from the MetaMask account (delegator).
-
-For example, if a dapp is granted permission to spend 10 USDC on a user's behalf, it can
-further delegate that permission to specific agents, such as allowing a Swap agent to spend
-up to 5 USDC. This creates a permission sharing chain in which the root permissions are
-shared with additional parties.
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../get-started/install.md)
-- [Learn about Advanced Permissions.](../../concepts/advanced-permissions.md)
-- [Learn how to request Advanced Permissions.](execute-on-metamask-users-behalf.md)
-
-## Request Advanced Permissions
-
-Request Advanced Permissions from the user with the Wallet Client's [`requestExecutionPermissions`](../../reference/advanced-permissions/wallet-client.md#requestexecutionpermissions) action.
-
-This example uses the [ERC-20 periodic permission](./use-permissions/erc20-token.md#erc-20-periodic-permission), allowing the
-user to grant dapp the ability to spend 10 USDC on their behalf.
-
-
-
-
-```typescript
-import { sepolia as chain } from 'viem/chains'
-import { sessionAccount, walletClient, tokenAddress } from './config.ts'
-import { parseUnits } from 'viem'
-
-// Since current time is in seconds, we need to convert milliseconds to seconds.
-const currentTime = Math.floor(Date.now() / 1000)
-// 1 week from now.
-const expiry = currentTime + 604800
-
-const grantedPermissions = await walletClient.requestExecutionPermissions([
- {
- chainId: chain.id,
- expiry,
- // The requested permissions will granted to the
- // session account.
- to: sessionAccount.address,
- permission: {
- type: 'erc20-token-periodic',
- data: {
- tokenAddress,
- // 10 USDC in wei format. Since USDC has 6 decimals, 10 * 10^6
- periodAmount: parseUnits('10', 6),
- // 1 day in seconds
- periodDuration: 86400,
- justification: 'Permission to transfer 10 USDC every day',
- },
- isAdjustmentAllowed: true,
- },
- },
-])
-```
-
-
-
-
-
-```ts
-import { createWalletClient, custom, createPublicClient, http } from 'viem'
-import { privateKeyToAccount } from 'viem/accounts'
-import { toMetaMaskSmartAccount, Implementation } from '@metamask/smart-accounts-kit'
-import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
-import { sepolia as chain } from 'viem/chains'
-
-// USDC address on Ethereum Sepolia.
-export const tokenAddress = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const privateKey = '0x...'
-const account = privateKeyToAccount(privateKey)
-
-export const sessionAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [account.address, [], [], []],
- deploySalt: '0x',
- signer: { account },
-})
-
-export const walletClient = createWalletClient({
- transport: custom(window.ethereum),
-}).extend(erc7715ProviderActions())
-```
-
-
-
-
-## Decode delegations
-
-The granted permissions object includes a `context` property that represents the encoded delegations.
-
-To create a redelegation, you must first decode these delegations to access the
-underlying delegations. To decode the delegations, use the [`decodeDelegations`](../../reference/delegation/index.md#decodedelegations) utility function.
-
-```ts
-import { decodeDelegations } from '@metamask/smart-accounts-kit/utils'
-
-const permissionContext = grantedPermissions[0].context
-
-const delegations = decodeDelegations(permissionContext)
-const rootDelegation = delegations[0]
-```
-
-## Create a redelegation
-
-Create a [redelegation](../../concepts/delegation/overview.md#redelegation) from dapp to a Swap agent.
-
-To create a redelegation, provide the signed delegation as the `parentDelegation` argument when calling [`createDelegation`](../../reference/delegation/index.md#createdelegation).
-
-This example uses the [`erc20TransferAmount`](../delegation/use-delegation-scopes/spending-limit.md#erc-20-transfer-scope) scope, allowing
-dapp to delegate to a Swap agent the ability to spend 5 USDC on user's behalf.
-
-:::note
-When creating a redelegation, you can only narrow the scope of the original authority, not expand it.
-:::
-
-
-
-
-```typescript
-import { sessionAccount, agentSmartAccount, tokenAddress } from './config.ts'
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { parseUnits } from 'viem'
-
-const redelegation = createDelegation({
- scope: {
- type: ScopeType.Erc20TransferAmount,
- tokenAddress,
- // USDC has 6 decimal places.
- maxAmount: parseUnits('5', 6),
- },
- to: agentSmartAccount.address,
- from: sessionAccount.address,
- // Signed root delegation extracted from Advanced Permissions.
- parentDelegation: rootDelegation,
- environment: sessionAccount.environment,
-})
-
-const signedRedelegation = await sessionAccount.signDelegation({ delegation: redelegation })
-```
-
-
-
-
-```typescript
-// Update the existing config to create a smart account for a Swap agent.
-
-const agentAccount = privateKeyToAccount('0x...')
-
-export const agentSmartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [agentAccount.address, [], [], []],
- deploySalt: '0x',
- signer: { account: agentAccount },
-})
-```
-
-
-
-
-### Limit redelegation using caveats
-
-When you create a redelegation, apply the toolkit's [caveats](../../reference/delegation/caveats.md) to narrow the Swap agent's authority. For example, you can limit the authority so Swap agent can use the delegation only once.
-
-To apply caveats, create the `Delegation` object and use [`createCaveatBuilder`](../../reference/delegation/index.md#createcaveatbuilder).
-Use [`hashDelegation`](../../reference/delegation/index.md#hashdelegation) to get the delegation hash, then provide it as the `authority` field.
-
-This example uses the [`limitedCalls`](../../reference/delegation/caveats.md#limitedcalls) caveat with a limit of `1`.
-
-```ts
-// Use the config from previous step.
-import { sessionAccount, agentSmartAccount, tokenAddress } from './config.ts'
-import { CaveatType } from '@metamask/smart-accounts-kit'
-import { createCaveatBuilder, hashDelegation } from '@metamask/smart-accounts-kit/utils'
-
-const caveatBuilder = createCaveatBuilder(sessionAccount.environment)
-
-const caveats = caveatBuilder.addCaveat(CaveatType.LimitedCalls, { limit: 1 })
-
-const redelegation: Delegation = {
- delegate: sessionAccount.address,
- delegator: agentSmartAccount.address,
- authority: hashDelegation(rootDelegation),
- caveats: caveats.build(),
- salt: '0x',
-}
-
-const signedRedelegation = await sessionAccount.signDelegation({ delegation: redelegation })
-```
diff --git a/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/execute-on-metamask-users-behalf.md b/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/execute-on-metamask-users-behalf.md
deleted file mode 100644
index f0d71551dba..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/execute-on-metamask-users-behalf.md
+++ /dev/null
@@ -1,324 +0,0 @@
----
-description: Use Advanced Permissions (ERC-7715) to perform executions on a MetaMask user's behalf.
-sidebar_label: Execute on a MetaMask user's behalf
-keywords:
- [
- execution,
- smart account,
- create,
- redeem,
- delegation,
- erc 7715,
- 7715,
- session account,
- advanced permissions,
- ]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Perform executions on a MetaMask user's behalf
-
-[Advanced Permissions (ERC-7715)](../../concepts/advanced-permissions.md) are fine-grained permissions that your dapp can request from a MetaMask user to execute transactions on their
-behalf. For example, a user can grant your dapp permission to spend 10 USDC per day to buy ETH over the course
-of a month. 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.
-
-In this guide, you'll request an ERC-20 periodic transfer permission from a MetaMask user to transfer 1 USDC every day on their behalf.
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../get-started/install.md)
-- [Install MetaMask Flask 13.5.0 or later.](/snaps/get-started/install-flask)
-
-## Steps
-
-### 1. Set up a Wallet Client
-
-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.
-
-Then, extend the Wallet Client functionality using `erc7715ProviderActions`. These actions enable you to request Advanced Permissions from the user.
-
-```typescript
-import { createWalletClient, custom } from 'viem'
-import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
-
-const walletClient = createWalletClient({
- transport: custom(window.ethereum),
-}).extend(erc7715ProviderActions())
-```
-
-### 2. Set up a Public Client
-
-Set up a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function.
-This client will help you query the account state and interact with the blockchain network.
-
-```typescript
-import { createPublicClient, http } from 'viem'
-import { sepolia as chain } from 'viem/chains'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-```
-
-### 3. Set up a session account
-
-Set up a session account which can either be a smart account or an externally owned account (EOA)
-to request Advanced Permissions. The requested permissions are granted to the session account, which
-is responsible for executing transactions on behalf of the user.
-
-
-
-
-```typescript
-import { privateKeyToAccount } from 'viem/accounts'
-import { toMetaMaskSmartAccount, Implementation } from '@metamask/smart-accounts-kit'
-
-const privateKey = '0x...'
-const account = privateKeyToAccount(privateKey)
-
-const sessionAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [account.address, [], [], []],
- deploySalt: '0x',
- signer: { account },
-})
-```
-
-
-
-
-```typescript
-import { privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-import { createWalletClient, http } from 'viem'
-
-const sessionAccount = privateKeyToAccount('0x...')
-```
-
-
-
-
-### 4. Check the EOA account code
-
-With MetaMask Flask 13.9.0 or later, Advanced Permissions support automatically upgrading a user’s
-account to a [MetaMask smart account](../../concepts/smart-accounts.md). On earlier versions, upgrade
-the user to a smart account before requesting Advanced Permissions.
-
-If the user has not yet been upgraded, you can handle the upgrade [programmatically](/metamask-connect/evm/guides/send-transactions/batch-transactions) or ask the
-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).
-
-:::info Why is a Smart Account upgrade is required?
-MetaMask's Advanced Permissions (ERC-7715) implementation requires the user to be upgraded to a MetaMask
-Smart Account because, under the hood, you're requesting a signature for an [ERC-7710 delegation](../../concepts/delegation/overview.md).
-ERC-7710 delegation is one of the core features supported only by MetaMask Smart Accounts.
-:::
-
-```typescript
-import { getSmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-import { sepolia as chain } from 'viem/chains'
-
-const addresses = await walletClient.requestAddresses()
-const address = addresses[0]
-
-// Get the EOA account code
-const code = await publicClient.getCode({
- address,
-})
-
-if (code) {
- // The address to which EOA has delegated. According to EIP-7702, 0xef0100 || address
- // represents the delegation.
- //
- // You need to remove the first 8 characters (0xef0100) to get the delegator address.
- const delegatorAddress = `0x${code.substring(8)}`
-
- const statelessDelegatorAddress = getSmartAccountsEnvironment(chain.id).implementations
- .EIP7702StatelessDeleGatorImpl
-
- // If account is not upgraded to MetaMask smart account, you can
- // either upgrade programmatically or ask the user to switch to a smart account manually.
- const isAccountUpgraded =
- delegatorAddress.toLowerCase() === statelessDelegatorAddress.toLowerCase()
-}
-```
-
-### 5. Request Advanced Permissions
-
-Request Advanced Permissions from the user with the Wallet Client's `requestExecutionPermissions` action.
-In this example, you'll request an
-[ERC-20 periodic permission](use-permissions/erc20-token.md#erc-20-periodic-permission).
-
-See the [`requestExecutionPermissions`](../../reference/advanced-permissions/wallet-client.md#requestexecutionpermissions) API reference for more information.
-
-```typescript
-import { sepolia as chain } from 'viem/chains'
-import { parseUnits } from 'viem'
-
-// Since current time is in seconds, we need to convert milliseconds to seconds.
-const currentTime = Math.floor(Date.now() / 1000)
-// 1 week from now.
-const expiry = currentTime + 604800
-
-// USDC address on Ethereum Sepolia.
-const tokenAddress = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
-
-const grantedPermissions = await walletClient.requestExecutionPermissions([
- {
- chainId: chain.id,
- expiry,
- // The requested permissions will granted to the
- // session account.
- to: sessionAccount.address,
- permission: {
- type: 'erc20-token-periodic',
- data: {
- tokenAddress,
- // 10 USDC in WEI format. Since USDC has 6 decimals, 10 * 10^6
- periodAmount: parseUnits('10', 6),
- // 1 day in seconds
- periodDuration: 86400,
- justification: 'Permission to transfer 10 USDC every day',
- },
- isAdjustmentAllowed: true,
- },
- },
-])
-```
-
-### 6. Set up a Viem client
-
-Set up a Viem client depending on your session account type.
-
-For a smart account, 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.
-
-For an EOA, set up a [Viem Wallet Client](https://viem.sh/docs/clients/wallet)
-using Viem's `createWalletClient` function. This lets you send transactions directly to the network.
-
-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.
-
-
-
-
-```typescript
-import { createBundlerClient } from 'viem/account-abstraction'
-import { erc7710BundlerActions } from '@metamask/smart-accounts-kit/actions'
-
-const bundlerClient = createBundlerClient({
- client: publicClient,
- transport: http('https://your-bundler-rpc.com'),
- // Allows you to use the same Bundler Client as paymaster.
- paymaster: true,
-}).extend(erc7710BundlerActions())
-```
-
-
-
-
-```typescript
-import { createWalletClient, http } from 'viem'
-import { erc7710WalletActions } from '@metamask/smart-accounts-kit/actions'
-import { sepolia as chain } from 'viem/chains'
-
-const sessionAccountWalletClient = createWalletClient({
- account: sessionAccount,
- chain,
- transport: http(),
-}).extend(erc7710WalletActions())
-```
-
-
-
-
-### 7. Redeem Advanced Permissions
-
-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.
-
-To redeem the permissions, use the client action based on your session account type.
-A smart account uses the Bundler Client's `sendUserOperationWithDelegation` action,
-and an EOA uses the Wallet Client's `sendTransactionWithDelegation` action.
-
-See the [`sendUserOperationWithDelegation`](../../reference/erc7710/bundler-client.md#senduseroperationwithdelegation) and [`sendTransactionWithDelegation`](../../reference/erc7710/wallet-client.md#sendtransactionwithdelegation) API reference for more information.
-
-
-
-
-```typescript
-import { calldata } from './config.ts'
-
-// These properties must be extracted from the permission response.
-const permissionContext = grantedPermissions[0].context
-const delegationManager = grantedPermissions[0].signerMeta.delegationManager
-
-// USDC address on Ethereum Sepolia.
-const tokenAddress = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
-
-// Calls without permissionContext and delegationManager will be executed
-// as a normal user operation.
-const userOperationHash = await bundlerClient.sendUserOperationWithDelegation({
- publicClient,
- account: sessionAccount,
- calls: [
- {
- to: tokenAddress,
- data: calldata,
- permissionContext,
- delegationManager,
- },
- ],
- // Appropriate values must be used for fee-per-gas.
- maxFeePerGas: 1n,
- maxPriorityFeePerGas: 1n,
-})
-```
-
-
-
-
-```typescript
-import { calldata } from './config.ts'
-
-// These properties must be extracted from the permission response.
-const permissionContext = grantedPermissions[0].context
-const delegationManager = grantedPermissions[0].signerMeta.delegationManager
-
-// USDC address on Ethereum Sepolia.
-const tokenAddress = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
-
-const transactionHash = await sessionAccountWalletClient.sendTransactionWithDelegation({
- to: tokenAddress,
- data: calldata,
- permissionContext,
- delegationManager,
-})
-```
-
-
-
-
-
-```typescript
-import { encodeFunctionData, erc20Abi, parseUnits } from 'viem'
-
-export const calldata = encodeFunctionData({
- abi: erc20Abi,
- args: [sessionAccount.address, parseUnits('1', 6)],
- functionName: 'transfer',
-})
-```
-
-
-
-
-## Next steps
-
-- See how to [get the supported execution permissions](get-supported-permissions.md).
-- See how to configure different [ERC-20 token permissions](use-permissions/erc20-token.md) and
- [native token permissions](use-permissions/native-token.md).
diff --git a/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/get-granted-permissions.md b/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/get-granted-permissions.md
deleted file mode 100644
index f8821e99b51..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/get-granted-permissions.md
+++ /dev/null
@@ -1,72 +0,0 @@
----
-description: Learn how to get the granted Advanced Permissions for a wallet.
-sidebar_label: Get granted permissions
-keywords: [advanced permissions, granted execution permissions, erc-7715, 7715]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Get granted permissions
-
-[ERC-7715](https://eip.tools/eip/7715) defines an RPC method that returns the granted execution permissions
-for a wallet. Use the method to get the granted Advanced Permissions for a wallet.
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../get-started/install.md)
-- [Learn about Advanced Permissions.](../../concepts/advanced-permissions.md)
-
-## Request granted permissions
-
-Request the granted Advanced Permissions for a wallet with the
-Wallet Client's [`getGrantedExecutionPermissions`](../../reference/advanced-permissions/wallet-client.md#getgrantedexecutionpermissions) action.
-
-
-
-
-```ts
-[
- {
- chainId: 84532,
- context: "0x0000...0000",
- delegationManager: "0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3",
- dependencies: [],
- from: "0x993fC0d346A8AfA40Da014bA8834A56cE8B17f31",
- permission: {
- type: "erc20-token-periodic",
- isAdjustmentAllowed: false,
- data: { ... },
- },
- rules: [
- { type: "expiry", data: { ... } },
- ],
- to: "0xAB57cfCDaF510594eA68D47ffBEF04Ebf73e7F1f",
- },
- // ...
-]
-```
-
-
-
-
-```typescript
-import { walletClient } from './config.ts'
-
-const grantedExecutionPermissions = await walletClient.getGrantedExecutionPermissions()
-```
-
-
-
-
-```ts
-import { createWalletClient, custom } from 'viem'
-import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
-
-export const walletClient = createWalletClient({
- transport: custom(window.ethereum),
-}).extend(erc7715ProviderActions())
-```
-
-
-
diff --git a/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/get-supported-permissions.md b/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/get-supported-permissions.md
deleted file mode 100644
index b8cb9af514d..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/get-supported-permissions.md
+++ /dev/null
@@ -1,68 +0,0 @@
----
-description: Learn how to get supported Advanced Permissions for a wallet.
-sidebar_label: Get supported permissions
-keywords: [advanced permissions, supported execution permissions, erc-7715, 7715]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Get supported permissions
-
-[ERC-7715](https://eip.tools/eip/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
-
-- [Install and set up the Smart Accounts Kit](../../get-started/install.md)
-- [Learn about Advanced Permissions](../../concepts/advanced-permissions.md)
-
-## Request supported permissions
-
-Request the supported Advanced Permissions types for a wallet with the
-Wallet Client's [`getSupportedExecutionPermissions`](../../reference/advanced-permissions/wallet-client.md#getsupportedexecutionpermissions) action.
-
-
-
-
-```ts
-{
- "native-token-stream": {
- "chainIds": [
- 1,
- 10,
- ],
- "ruleTypes": [
- "expiry"
- ]
- },
- // ...
-}
-```
-
-
-
-
-```typescript
-import { walletClient } from './config.ts'
-
-const supportedPermissions = await walletClient.getSupportedExecutionPermissions()
-```
-
-
-
-
-```ts
-import { createWalletClient, custom } from 'viem'
-import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
-
-export const walletClient = createWalletClient({
- transport: custom(window.ethereum),
-}).extend(erc7715ProviderActions())
-```
-
-
-
-
-See the full list of [supported Advanced Permissions](../../get-started/supported-advanced-permissions.md).
diff --git a/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/use-permissions/erc20-token.md b/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/use-permissions/erc20-token.md
deleted file mode 100644
index a272d0ba54b..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/use-permissions/erc20-token.md
+++ /dev/null
@@ -1,203 +0,0 @@
----
-description: Learn how to use the ERC-20 token permissions with Advanced Permissions (ERC-7715).
-keywords: [permissions, spending limit, restrict, 7715, erc-7715, erc20-permissions, revocation]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Use ERC-20 token permissions
-
-[Advanced Permissions (ERC-7715)](../../../concepts/advanced-permissions.md) supports ERC-20 token permission types that allow you to request fine-grained
-permissions for ERC-20 token transfers with time-based (periodic), streaming, or revocation conditions, depending on your use case.
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../../get-started/install.md)
-- [Configure the Smart Accounts Kit.](../../configure-toolkit.md)
-- [Create a session account.](../execute-on-metamask-users-behalf.md#3-set-up-a-session-account)
-
-## ERC-20 periodic permission
-
-This permission type ensures a per-period limit for ERC-20 token transfers. At the start of each new period, the allowance resets.
-
-For example, a user signs an ERC-7715 permission that lets a dapp spend up to 10 USDC on their behalf each day. The dapp can transfer a total of
-10 USDC per day; the limit resets at the beginning of the next day.
-
-See the [ERC-20 periodic permission API reference](../../../reference/advanced-permissions/permissions.md#erc-20-periodic-permission) for more information.
-
-
-
-
-```typescript
-import { sepolia as chain } from 'viem/chains'
-import { parseUnits } from 'viem'
-import { walletClient } from './client.ts'
-
-// Since current time is in seconds, convert milliseconds to seconds.
-const currentTime = Math.floor(Date.now() / 1000)
-// 1 week from now.
-const expiry = currentTime + 604800
-
-// USDC address on Ethereum Sepolia.
-const tokenAddress = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
-
-const grantedPermissions = await walletClient.requestExecutionPermissions([
- {
- chainId: chain.id,
- expiry,
- // The requested permissions will granted to the
- // session account.
- to: sessionAccount.address,
- permission: {
- type: 'erc20-token-periodic',
- data: {
- tokenAddress,
- // 10 USDC in WEI format. Since USDC has 6 decimals, 10 * 10^6.
- periodAmount: parseUnits('10', 6),
- // 1 day in seconds.
- periodDuration: 86400,
- justification: 'Permission to transfer 10 USDC every day',
- },
- isAdjustmentAllowed: true,
- },
- },
-])
-```
-
-
-
-
-```typescript
-import { createWalletClient, custom } from 'viem'
-import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
-
-export const walletClient = createWalletClient({
- transport: custom(window.ethereum),
-}).extend(erc7715ProviderActions())
-```
-
-
-
-
-## ERC-20 stream permission
-
-This permission type ensures a linear streaming transfer limit for ERC-20 tokens. Token transfers are blocked until the
-defined start timestamp. At the start, a specified initial amount is released, after which tokens accrue linearly at the
-configured rate, up to the maximum allowed amount.
-
-For example, a user signs an ERC-7715 permission that allows a dapp to spend 0.1 USDC per second, starting with an initial amount
-of 1 USDC, up to a maximum of 2 USDC.
-
-See the [ERC-20 stream permission API reference](../../../reference/advanced-permissions/permissions.md#erc-20-stream-permission) for more information.
-
-
-
-
-```typescript
-import { sepolia as chain } from 'viem/chains'
-import { parseUnits } from 'viem'
-import { walletClient } from './client.ts'
-
-// Since current time is in seconds, convert milliseconds to seconds.
-const currentTime = Math.floor(Date.now() / 1000)
-// 1 week from now.
-const expiry = currentTime + 604800
-
-// USDC address on Ethereum Sepolia.
-const tokenAddress = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
-
-const grantedPermissions = await walletClient.requestExecutionPermissions([
- {
- chainId: chain.id,
- expiry,
- // The requested permissions will granted to the
- // session account.
- to: sessionAccount.address,
- permission: {
- type: 'erc20-token-stream',
- data: {
- tokenAddress,
- // 0.1 USDC in WEI format. Since USDC has 6 decimals, 0.1 * 10^6.
- amountPerSecond: parseUnits('0.1', 6),
- // 1 USDC in WEI format. Since USDC has 6 decimals, 1 * 10^6.
- initialAmount: parseUnits('1', 6),
- // 2 USDC in WEI format. Since USDC has 6 decimals, 2 * 10^6.
- maxAmount: parseUnits('2', 6),
- startTime: currentTime,
- justification: 'Permission to use 0.1 USDC per second',
- },
- isAdjustmentAllowed: true,
- },
- },
-])
-```
-
-
-
-
-```typescript
-import { createWalletClient, custom } from 'viem'
-import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
-
-export const walletClient = createWalletClient({
- transport: custom(window.ethereum),
-}).extend(erc7715ProviderActions())
-```
-
-
-
-
-## ERC-20 revocation permission
-
-This permission type enables revoking an existing ERC-20 token allowance on behalf of the user.
-
-For example, a user signs an ERC-7715 permission that lets a dapp revoke any ERC-20 token allowances
-periodically, or during an ongoing exploit.
-
-See the [ERC-20 revocation permission API reference](../../../reference/advanced-permissions/permissions.md#erc-20-revocation-permission) for more information.
-
-
-
-
-```typescript
-import { sepolia as chain } from 'viem/chains'
-import { walletClient } from './client.ts'
-
-// Since current time is in seconds, convert milliseconds to seconds.
-const currentTime = Math.floor(Date.now() / 1000)
-// 1 week from now.
-const expiry = currentTime + 604800
-
-const grantedPermissions = await walletClient.requestExecutionPermissions([
- {
- chainId: chain.id,
- expiry,
- // The requested permissions will granted to the
- // session account.
- to: sessionAccount.address,
- permission: {
- type: 'erc20-token-revocation',
- data: {
- justification: 'Permission to revoke ERC-20 token allowances',
- },
- isAdjustmentAllowed: true,
- },
- },
-])
-```
-
-
-
-
-```typescript
-import { createWalletClient, custom } from 'viem'
-import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
-
-export const walletClient = createWalletClient({
- transport: custom(window.ethereum),
-}).extend(erc7715ProviderActions())
-```
-
-
-
diff --git a/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/use-permissions/native-token.md b/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/use-permissions/native-token.md
deleted file mode 100644
index 5460a15e17c..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/advanced-permissions/use-permissions/native-token.md
+++ /dev/null
@@ -1,151 +0,0 @@
----
-description: Learn how to use the native token permissions with Advanced Permissions (ERC-7715).
-keywords:
- [
- permissions,
- spending limit,
- restrict,
- 7715,
- erc-7715,
- native-token-permissions,
- advanced permissions,
- ]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Use native token permissions
-
-[Advanced Permissions (ERC-7715)](../../../concepts/advanced-permissions.md) supports native token permission types that allow you to request fine-grained
-permissions for native token transfers with time-based (periodic) or streaming conditions, depending on your use case.
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../../get-started/install.md)
-- [Configure the Smart Accounts Kit.](../../configure-toolkit.md)
-- [Create a session account.](../execute-on-metamask-users-behalf.md#3-set-up-a-session-account)
-
-## Native token periodic permission
-
-This permission type ensures a per-period limit for native token transfers. At the start of each new period, the allowance resets.
-
-For example, a user signs an ERC-7715 permission that lets a dapp spend up to 0.001 ETH on their behalf each day. The dapp can transfer a total of
-0.001 ETH per day; the limit resets at the beginning of the next day.
-
-See the [native token periodic permission API reference](../../../reference/advanced-permissions/permissions.md#native-token-periodic-permission) for more information.
-
-
-
-
-```typescript
-import { sepolia as chain } from 'viem/chains'
-import { parseEther } from 'viem'
-import { walletClient } from './client.ts'
-
-// Since current time is in seconds, convert milliseconds to seconds.
-const currentTime = Math.floor(Date.now() / 1000)
-// 1 week from now.
-const expiry = currentTime + 604800
-
-const grantedPermissions = await walletClient.requestExecutionPermissions([
- {
- chainId: chain.id,
- expiry,
- // The requested permissions will granted to the
- // session account.
- to: sessionAccount.address,
- permission: {
- type: 'native-token-periodic',
- data: {
- // 0.001 ETH in wei format.
- periodAmount: parseEther('0.001'),
- // 1 hour in seconds.
- periodDuration: 86400,
- startTime: currentTime,
- justification: 'Permission to use 0.001 ETH every day',
- },
- isAdjustmentAllowed: true,
- },
- },
-])
-```
-
-
-
-
-```typescript
-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 permission
-
-This permission type ensures a linear streaming transfer limit for native tokens. Token transfers are blocked until the
-defined start timestamp. At the start, a specified initial amount is released, after which tokens accrue linearly at the
-configured rate, up to the maximum allowed amount.
-
-For example, a user signs an ERC-7715 permission that allows a dapp to spend 0.0001 ETH per second, starting with an initial amount
-of 0.1 ETH, up to a maximum of 1 ETH.
-
-See the [native token stream permission API reference](../../../reference/advanced-permissions/permissions.md#native-token-stream-permission) for more information.
-
-
-
-
-```typescript
-import { sepolia as chain } from 'viem/chains'
-import { parseEther } from 'viem'
-import { walletClient } from './client.ts'
-
-// Since current time is in seconds, convert milliseconds to seconds.
-const currentTime = Math.floor(Date.now() / 1000)
-// 1 week from now.
-const expiry = currentTime + 604800
-
-const grantedPermissions = await walletClient.requestExecutionPermissions([
- {
- chainId: chain.id,
- expiry,
- // The requested permissions will granted to the
- // session account.
- to: sessionAccount.address,
- permission: {
- type: 'native-token-stream',
- data: {
- // 0.0001 ETH in wei format.
- amountPerSecond: parseEther('0.0001'),
- // 0.1 ETH in wei format.
- initialAmount: parseEther('0.1'),
- // 1 ETH in wei format.
- maxAmount: parseEther('1'),
- startTime: currentTime,
- justification: 'Permission to use 0.0001 ETH per second',
- },
- isAdjustmentAllowed: true,
- },
- },
-])
-```
-
-
-
-
-```typescript
-import { createWalletClient, custom } from 'viem'
-import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
-
-export const walletClient = createWalletClient({
- transport: custom(window.ethereum),
-}).extend(erc7715ProviderActions())
-```
-
-
-
diff --git a/gator_versioned_docs/version-1.0.0/guides/delegation/disable-delegation.md b/gator_versioned_docs/version-1.0.0/guides/delegation/disable-delegation.md
deleted file mode 100644
index 78c8de1f4fb..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/delegation/disable-delegation.md
+++ /dev/null
@@ -1,102 +0,0 @@
----
-description: Learn how to disable the delegation.
-sidebar_label: Disable a delegation
-toc_max_heading_level: 3
-keywords: [delegation, disable, revoke]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Disable a delegation
-
-Delegations are created off-chain and can be stored anywhere, but you can disable a delegation on-chain using the
-toolkit. When a delegation is disabled, any attempt to redeem it will revert, effectively revoking the permissions
-that were previously granted.
-
-For example, if Alice has given permission to Bob to spend 10 USDC on her behalf, and after a week she wants to
-revoke that permission, Alice can disable the delegation she created for Bob. If Bob tries to redeem the disabled
-delegation, the transaction will revert, preventing him from spending Alice's USDC.
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../get-started/install.md)
-- [Create a delegator account.](execute-on-smart-accounts-behalf.md#3-create-a-delegator-account)
-- [Create a delegate account.](execute-on-smart-accounts-behalf.md#4-create-a-delegate-account)
-
-## Disable a delegation
-
-To disable a delegation, you can use the [`disableDelegation`](../../reference/delegation/index.md#disabledelegation) utility function from the
-toolkit to generate calldata. Once the calldata is prepared, you can send it to the
-Delegation Manager to disable the delegation.
-
-
-
-
-```typescript
-import { DelegationManager } from '@metamask/smart-accounts-kit/contracts'
-import { environment, delegation, bundlerClient } from './config.ts'
-
-const disableDelegationData = DelegationManager.encode.disableDelegation({
- delegation,
-})
-
-// Appropriate fee per gas must be determined for the specific bundler being used.
-const maxFeePerGas = 1n
-const maxPriorityFeePerGas = 1n
-
-const userOperationHash = await bundlerClient.sendUserOperation({
- account: delegatorAccount,
- calls: [
- {
- to: environment.DelegationManager,
- data: disableDelegationData,
- },
- ],
- maxFeePerGas,
- maxPriorityFeePerGas,
-})
-```
-
-
-
-
-```typescript
-import { sepolia as chain } from 'viem/chains'
-import { createPublicClient, http, parseEther } from 'viem'
-import { createBundlerClient } from 'viem/account-abstraction'
-import {
- getSmartAccountsEnvironment,
- createDelegation,
- ScopeType,
-} from '@metamask/smart-accounts-kit'
-
-export const environment = getSmartAccountsEnvironment(chain.id)
-
-const currentTime = Math.floor(Date.now() / 1000)
-
-export const delegation = createDelegation({
- scope: {
- type: ScopeType.NativeTokenPeriodTransfer,
- periodAmount: parseEther('0.01'),
- periodDuration: 86400,
- startDate: currentTime,
- },
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-export const bundlerClient = createBundlerClient({
- client: publicClient,
- transport: http('https://api.pimlico.io/v2/11155111/rpc?apikey='),
-})
-```
-
-
-
diff --git a/gator_versioned_docs/version-1.0.0/guides/delegation/use-delegation-scopes/constrain-scope.md b/gator_versioned_docs/version-1.0.0/guides/delegation/use-delegation-scopes/constrain-scope.md
deleted file mode 100644
index b6b6e7bbeef..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/delegation/use-delegation-scopes/constrain-scope.md
+++ /dev/null
@@ -1,63 +0,0 @@
----
-description: Learn how to constrain a delegation scope using caveat enforcers.
-sidebar_label: Constrain a scope
-toc_max_heading_level: 3
-keywords: [constrain, restrict, scope, caveat, caveat enforcer]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Constrain a delegation scope
-
-[Delegation scopes](index.md) define the delegation's initial authority and help prevent delegation misuse.
-You can further constrain these scopes and limit the delegation's authority by applying [caveat enforcers](../../../concepts/delegation/caveat-enforcers.md).
-
-## Prerequisites
-
-[Configure a delegation scope.](index.md)
-
-## Apply a caveat enforcer
-
-For example, Alice creates a delegation with an [ERC-20 transfer scope](spending-limit.md#erc-20-transfer-scope) that allows Bob to spend up to 10 USDC.
-If Alice wants to further restrict the scope to limit Bob's delegation to be valid for only seven days,
-she can apply the [`timestamp`](../../../reference/delegation/caveats.md#timestamp) caveat enforcer.
-
-The following example creates a delegation using [`createDelegation`](../../../reference/delegation/index.md#createdelegation), applies the ERC-20 transfer scope with a spending limit of 10 USDC, and applies the `timestamp` caveat enforcer to restrict the delegation's validity to a seven-day period:
-
-```typescript
-import { createDelegation, ScopeType, CaveatType } from '@metamask/smart-accounts-kit'
-
-// Convert milliseconds to seconds.
-const currentTime = Math.floor(Date.now() / 1000)
-
-// Seven days after current time.
-const beforeThreshold = currentTime + 604800
-
-const caveats = [
- {
- type: CaveatType.Timestamp,
- afterThreshold: currentTime,
- beforeThreshold,
- },
-]
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.Erc20TransferAmount,
- tokenAddress: '0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92',
- maxAmount: 10000n,
- },
- // Apply caveats to the delegation.
- caveats,
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-```
-
-## Next steps
-
-- See the [caveats reference](../../../reference/delegation/caveats.md) for the full list of caveat types and their parameters.
-- For more specific or custom control, you can also [create custom caveat enforcers](/tutorials/create-custom-caveat-enforcer)
- and apply them to delegations.
diff --git a/gator_versioned_docs/version-1.0.0/guides/delegation/use-delegation-scopes/function-call.md b/gator_versioned_docs/version-1.0.0/guides/delegation/use-delegation-scopes/function-call.md
deleted file mode 100644
index 499d38973e0..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/delegation/use-delegation-scopes/function-call.md
+++ /dev/null
@@ -1,151 +0,0 @@
----
-description: Learn how to use the function call scope for a delegation.
-keywords: [delegation scope, function call, restrict, delegation]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Use the function call scope
-
-The function call scope defines the specific methods, contract addresses, and calldata that are allowed for the delegation.
-For example, Alice delegates to Bob the ability to call the `approve` function on the USDC contract, with the approval amount set to `0`.
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../../get-started/install.md)
-- [Configure the Smart Accounts Kit.](../../configure-toolkit.md)
-- [Create a delegator account.](../execute-on-smart-accounts-behalf.md#3-create-a-delegator-account)
-- [Create a delegate account.](../execute-on-smart-accounts-behalf.md#4-create-a-delegate-account)
-
-## Function call scope
-
-This scope requires `targets`, which specifies the permitted contract addresses, and `selectors`, which specifies the allowed methods.
-
-Internally, this scope uses the [`allowedTargets`](../../../reference/delegation/caveats.md#allowedtargets), [`allowedMethods`](../../../reference/delegation/caveats.md#allowedmethods), and [`valueLte`](../../../reference/delegation/caveats.md#valuelte) caveat enforcers, and
-optionally uses the [`allowedCalldata`](../../../reference/delegation/caveats.md#allowedcalldata) or [`exactCalldata`](../../../reference/delegation/caveats.md#exactcalldata) caveat enforcers when those parameters are specified.
-See the [function call scope reference](../../../reference/delegation/delegation-scopes.md#function-call-scope) for more details.
-
-The following example sets the delegation scope to allow the delegate to call the `approve` function on the USDC token contract:
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-
-// USDC address on Sepolia.
-const USDC_ADDRESS = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.FunctionCall,
- targets: [USDC_ADDRESS],
- selectors: ['approve(address, uint256)'],
- },
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-```
-
-### Define allowed calldata
-
-You can further restrict the scope by defining the `allowedCalldata`. For example, you can set
-`allowedCalldata` so the delegate is only permitted to call the `approve` function on the
-USDC token contract with an allowance value of `0`. This effectively limits the delegate to
-revoking ERC-20 approvals.
-
-:::important Usage
-The `allowedCalldata` doesn't support multiple selectors. Each entry in the
-list represents a portion of calldata corresponding to the same function signature.
-
-You can include or exclude specific parameters to precisely define what parts of the calldata are valid.
-:::
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { encodeAbiParameters, erc20Abi } from 'viem'
-
-// USDC address on Sepolia.
-const USDC_ADDRESS = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.FunctionCall,
- targets: [USDC_ADDRESS],
- selectors: ['approve(address, uint256)'],
- allowedCalldata: [
- {
- // Limits the allowance amount to be 0.
- value: encodeAbiParameters([{ name: 'amount', type: 'uint256' }], [0n]),
- // The first 4 bytes are for selector, and next 32 bytes
- // are for spender address.
- startIndex: 36,
- },
- ],
- },
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-```
-
-### Define exact calldata
-
-You can define the `exactCalldata` instead of the `allowedCalldata`. For example, you can
-set `exactCalldata` so the delegate is permitted to call only the `approve` function on the USDC token
-contract, with a specific spender address and an allowance value of 0. This effectively limits the delegate to
-revoking ERC-20 approvals for a specific spender.
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { encodeFunctionData, erc20Abi } from 'viem'
-
-// USDC address on Sepolia.
-const USDC_ADDRESS = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.FunctionCall,
- targets: [USDC_ADDRESS],
- selectors: ['approve(address, uint256)'],
- exactCalldata: {
- calldata: encodeFunctionData({
- abi: erc20Abi,
- args: ['0x0227628f3F023bb0B980b67D528571c95c6DaC1c', 0n],
- functionName: 'approve',
- }),
- },
- },
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-```
-
-### Allow native token transfer
-
-You can set `valueLte` to allow native token transfer up to a specified amount per call. By default, this value is set to `0`. For example, Alice can allow Bob
-to take `0.00001` ETH as a fee each time he revokes a token approval on her behalf.
-
-```ts
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { parseEther } from 'viem'
-
-// USDC address on Sepolia.
-const USDC_ADDRESS = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.FunctionCall,
- targets: [USDC_ADDRESS],
- selectors: ['approve(address, uint256)'],
- valueLte: { maxValue: parseEther('0.00001') },
- },
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-```
-
-## Next steps
-
-See [how to further constrain the authority of a delegation](constrain-scope.md) using caveat enforcers.
diff --git a/gator_versioned_docs/version-1.0.0/guides/delegation/use-delegation-scopes/spending-limit.md b/gator_versioned_docs/version-1.0.0/guides/delegation/use-delegation-scopes/spending-limit.md
deleted file mode 100644
index 4412368d47b..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/delegation/use-delegation-scopes/spending-limit.md
+++ /dev/null
@@ -1,244 +0,0 @@
----
-description: Learn how to use the spending limit scopes for a delegation.
-keywords: [delegation scope, spending limit, restrict, delegation]
----
-
-# Use spending limit scopes
-
-Spending limit scopes define how much a delegate can spend in native, ERC-20, or ERC-721 tokens.
-You can set transfer limits with or without time-based (periodic) or streaming conditions, depending on your use case.
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../../get-started/install.md)
-- [Configure the Smart Accounts Kit.](../../configure-toolkit.md)
-- [Create a delegator account.](../execute-on-smart-accounts-behalf.md#3-create-a-delegator-account)
-- [Create a delegate account.](../execute-on-smart-accounts-behalf.md#4-create-a-delegate-account)
-
-## ERC-20 periodic scope
-
-This scope ensures a per-period limit for ERC-20 token transfers.
-You set the amount, period, and start data.
-At the start of each new period, the allowance resets.
-For example, Alice creates a delegation that lets Bob spend up to 10 USDC on her behalf each day.
-Bob can transfer a total of 10 USDC per day; the limit resets at the beginning of the next day.
-
-When this scope is applied, the toolkit automatically disallows native token transfers (sets the native token transfer limit to `0`).
-
-Internally, this scope uses the [`erc20PeriodTransfer`](../../../reference/delegation/caveats.md#erc20periodtransfer) and [`valueLte`](../../../reference/delegation/caveats.md#valuelte) caveat enforcers.
-See the [ERC-20 periodic scope reference](../../../reference/delegation/delegation-scopes.md#erc-20-periodic-scope) for more details.
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { parseUnits } from 'viem'
-
-// startDate should be in seconds.
-const startDate = Math.floor(Date.now() / 1000)
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.Erc20PeriodTransfer,
- tokenAddress: '0xb4aE654Aca577781Ca1c5DE8FbE60c2F423f37da',
- // USDC has 6 decimal places.
- periodAmount: parseUnits('10', 6),
- periodDuration: 86400,
- startDate,
- },
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-```
-
-## ERC-20 streaming scope
-
-This scopes ensures a linear streaming transfer limit for ERC-20 tokens.
-Token transfers are blocked until the defined start timestamp.
-At the start, a specified initial amount is released, after which tokens accrue linearly at the configured rate, up to the maximum allowed amount.
-For example, Alice creates a delegation that allows Bob to spend 0.1 USDC per second, starting with an initial amount of 10 USDC, up to a maximum of 100 USDC.
-
-When this scope is applied, the toolkit automatically disallows native token transfers (sets the native token transfer limit to `0`).
-
-Internally, this scope uses the [`erc20Streaming`](../../../reference/delegation/caveats.md#erc20streaming) and [`valueLte`](../../../reference/delegation/caveats.md#valuelte) caveat enforcers.
-See the [ERC-20 streaming scope reference](../../../reference/delegation/delegation-scopes.md#erc-20-streaming-scope) for more details.
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { parseUnits } from 'viem'
-
-// startTime should be in seconds.
-const startTime = Math.floor(Date.now() / 1000)
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.Erc20Streaming,
- tokenAddress: '0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92',
- // USDC has 6 decimal places.
- amountPerSecond: parseUnits('0.1', 6),
- initialAmount: parseUnits('10', 6),
- maxAmount: parseUnits('100', 6),
- startTime,
- },
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-```
-
-## ERC-20 transfer scope
-
-This scope ensures that ERC-20 token transfers are limited to a predefined maximum amount.
-This scope is useful for setting simple, fixed transfer limits without any time-based or streaming conditions.
-For example, Alice creates a delegation that allows Bob to spend up to 10 USDC without any conditions.
-Bob may use the 10 USDC in a single transaction or make multiple transactions, as long as the total does not exceed 10 USDC.
-
-When this scope is applied, the toolkit automatically disallows native token transfers (sets the native token transfer limit to `0`).
-
-Internally, this scope uses the [`erc20TransferAmount`](../../../reference/delegation/caveats.md#erc20transferamount) and [`valueLte`](../../../reference/delegation/caveats.md#valuelte) caveat enforcers.
-See the [ERC-20 transfer scope reference](../../../reference/delegation/delegation-scopes.md#erc-20-transfer-scope) for more details.
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { parseUnits } from 'viem'
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.Erc20TransferAmount,
- tokenAddress: '0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92',
- // USDC has 6 decimal places.
- maxAmount: parseUnits('10', 6),
- },
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-```
-
-## ERC-721 scope
-
-This scope limits the delegation to ERC-721 token transfers only.
-For example, Alice creates a delegation that allows Bob to transfer an NFT she owns on her behalf.
-
-Internally, this scope uses the [`erc721Transfer`](../../../reference/delegation/caveats.md#erc721transfer) caveat enforcer.
-See the [ERC-721 scope reference](../../../reference/delegation/delegation-scopes.md#erc-721-scope) for more details.
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.Erc721Transfer,
- tokenAddress: '0x3fF528De37cd95b67845C1c55303e7685c72F319',
- tokenId: 1n,
- },
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-```
-
-## Native token periodic scope
-
-This scope ensures a per-period limit for native token transfers.
-You set the amount, period, and start date.
-At the start of each new period, the allowance resets.
-For example, Alice creates a delegation that lets Bob spend up to 0.01 ETH on her behalf each day.
-Bob can transfer a total of 0.01 ETH per day; the limit resets at the beginning of the next day.
-
-When this scope is applied, the toolkit disallows ERC-20 and ERC-721 token transfers by default (sets `exactCalldata` to `0x`).
-You can optionally configure `exactCalldata` to restrict transactions to a specific operation, or configure
-`allowedCalldata` to allow transactions that match certain patterns or ranges.
-
-Internally, this scope uses the [`nativeTokenPeriodTransfer`](../../../reference/delegation/caveats.md#nativetokenperiodtransfer) caveat enforcer, and
-optionally uses the [`allowedCalldata`](../../../reference/delegation/caveats.md#allowedcalldata) or [`exactCalldata`](../../../reference/delegation/caveats.md#exactcalldata) caveat enforcers when those parameters are specified.
-See the [native token periodic scope reference](../../../reference/delegation/delegation-scopes.md#native-token-periodic-scope) for more details.
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { parseEther } from 'viem'
-
-// startDate should be in seconds.
-const startDate = Math.floor(Date.now() / 1000)
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.NativeTokenPeriodTransfer,
- periodAmount: parseEther('0.01'),
- periodDuration: 86400,
- startDate,
- },
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-```
-
-## Native token streaming scope
-
-This scopes ensures a linear streaming transfer limit for native tokens.
-Token transfers are blocked until the defined start timestamp.
-At the start, a specified initial amount is released, after which tokens accrue linearly at the configured rate, up to the maximum allowed amount.
-For example, Alice creates delegation that allows Bob to spend 0.001 ETH per second, starting with an initial amount of 0.01 ETH, up to a maximum of 0.1 ETH.
-
-When this scope is applied, the toolkit disallows ERC-20 and ERC-721 token transfers by default (sets `exactCalldata` to `0x`).
-You can optionally configure `exactCalldata` to restrict transactions to a specific operation, or configure
-`allowedCalldata` to allow transactions that match certain patterns or ranges.
-
-Internally, this scope uses the [`nativeTokenStreaming`](../../../reference/delegation/caveats.md#nativetokenstreaming) caveat enforcer, and
-optionally uses the [`allowedCalldata`](../../../reference/delegation/caveats.md#allowedcalldata) or [`exactCalldata`](../../../reference/delegation/caveats.md#exactcalldata) caveat enforcers when those parameters are specified.
-See the [native token streaming scope reference](../../../reference/delegation/delegation-scopes.md#native-token-streaming-scope) for more details.
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { parseEther } from 'viem'
-
-// startTime should be in seconds.
-const startTime = Math.floor(Date.now() / 1000)
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.NativeTokenStreaming,
- amountPerSecond: parseEther('0.001'),
- initialAmount: parseEther('0.01'),
- maxAmount: parseEther('0.1'),
- startTime,
- },
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-```
-
-## Native token transfer scope
-
-This scope ensures that native token transfers are limited to a predefined maximum amount.
-This scope is useful for setting simple, fixed transfer limits without any time-based or streaming conditions.
-For example, Alice creates a delegation that allows Bob to spend up to 0.1 ETH without any conditions.
-Bob may use the 0.1 ETH in a single transaction or make multiple transactions, as long as the total does not exceed 0.1 ETH.
-
-When this scope is applied, the toolkit disallows ERC-20 and ERC-721 token transfers by default (sets `exactCalldata` to `0x`).
-You can optionally configure `exactCalldata` to restrict transactions to a specific operation, or configure
-`allowedCalldata` to allow transactions that match certain patterns or ranges.
-
-Internally, this scope uses the [`nativeTokenTransferAmount`](../../../reference/delegation/caveats.md#nativetokentransferamount) caveat enforcer, and
-optionally uses the [`allowedCalldata`](../../../reference/delegation/caveats.md#allowedcalldata) or [`exactCalldata`](../../../reference/delegation/caveats.md#exactcalldata) caveat enforcers when those parameters are specified.
-See the [native token transfer scope reference](../../../reference/delegation/delegation-scopes.md#native-token-transfer-scope) for more details.
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { parseEther } from 'viem'
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.NativeTokenTransferAmount,
- maxAmount: parseEther('0.001'),
- },
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-```
-
-## Next steps
-
-See [how to further constrain the authority of a delegation](constrain-scope.md) using caveat enforcers.
diff --git a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/deploy-smart-account.md b/gator_versioned_docs/version-1.0.0/guides/smart-accounts/deploy-smart-account.md
deleted file mode 100644
index 27b94623bca..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/deploy-smart-account.md
+++ /dev/null
@@ -1,152 +0,0 @@
----
-description: Learn how to deploy a MetaMask smart account.
-keywords: [deploy, smart account, user operation]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Deploy a smart account
-
-You can deploy MetaMask Smart Accounts in two different ways. You can either deploy a smart account automatically when sending
-the first user operation, or manually deploy the account.
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../get-started/install.md)
-- [Create a MetaMask smart account.](create-smart-account.md)
-
-## Deploy with the first user operation
-
-When you send the first user operation from a smart account, the Smart Accounts Kit checks whether the account is already deployed. If the account
-is not deployed, the toolkit adds the `initCode` to the user operation to deploy the account within the
-same operation. Internally, the `initCode` is encoded using the `factory` and `factoryData`.
-
-
-
-
-```typescript
-import { bundlerClient, smartAccount } from './config.ts'
-import { parseEther } from 'viem'
-
-// Appropriate fee per gas must be determined for the specific bundler being used.
-const maxFeePerGas = 1n
-const maxPriorityFeePerGas = 1n
-
-const userOperationHash = await bundlerClient.sendUserOperation({
- account: smartAccount,
- calls: [
- {
- to: '0x1234567890123456789012345678901234567890',
- value: parseEther('0.001'),
- },
- ],
- maxFeePerGas,
- maxPriorityFeePerGas,
-})
-```
-
-
-
-
-
-```typescript
-import { createPublicClient, http } from 'viem'
-import { createBundlerClient } from 'viem/account-abstraction'
-import { sepolia as chain } from 'viem/chains'
-import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const privateKey = generatePrivateKey()
-const account = privateKeyToAccount(privateKey)
-
-export const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [account.address, [], [], []],
- deploySalt: '0x',
- signer: { account },
-})
-
-export const bundlerClient = createBundlerClient({
- client: publicClient,
- transport: http('https://public.pimlico.io/v2/11155111/rpc'),
-})
-```
-
-
-
-
-## Deploy manually
-
-To deploy a smart account manually, call the [`getFactoryArgs`](../../reference/smart-account.md#getfactoryargs)
-method from the smart account to retrieve the `factory` and `factoryData`. This allows you to use a relay account to sponsor the deployment without needing a paymaster.
-
-The `factory` represents the contract address responsible for deploying the smart account, while `factoryData` contains the
-calldata that will be executed by the `factory` to deploy the smart account.
-
-The relay account can be either an externally owned account (EOA) or another smart account. This example uses an EOA.
-
-
-
-
-```typescript
-import { walletClient, smartAccount } from './config.ts'
-
-const { factory, factoryData } = await smartAccount.getFactoryArgs()
-
-// Deploy smart account using relay account.
-const hash = await walletClient.sendTransaction({
- to: factory,
- data: factoryData,
-})
-```
-
-
-
-
-
-```typescript
-import { createPublicClient, createWalletClient, http } from 'viem'
-import { sepolia as chain } from 'viem/chains'
-import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const privateKey = generatePrivateKey()
-const account = privateKeyToAccount(privateKey)
-
-export const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [account.address, [], [], []],
- deploySalt: '0x',
- signer: { account },
-})
-
-const relayAccountPrivateKey = '0x121..'
-const relayAccount = privateKeyToAccount(relayAccountPrivateKey)
-
-export const walletClient = createWalletClient({
- account: relayAccount,
- chain,
- transport: http(),
-})
-```
-
-
-
-
-## Next steps
-
-- Learn more about [sending user operations](send-user-operation.md).
-- To sponsor gas for end users, see how to [send a gasless transaction](send-gasless-transaction.md).
diff --git a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/generate-multisig-signature.md b/gator_versioned_docs/version-1.0.0/guides/smart-accounts/generate-multisig-signature.md
deleted file mode 100644
index dbdd9372251..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/generate-multisig-signature.md
+++ /dev/null
@@ -1,120 +0,0 @@
----
-description: Learn how to generate a Multisig signature.
-keywords: [generate, multsig, signature, smart account]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Generate a multisig signature
-
-The Smart Accounts Kit supports [Multisig smart accounts](../../concepts/smart-accounts.md#multisig-smart-account),
-allowing you to add multiple externally owned accounts (EOA)
-signers with a configurable execution threshold. When the threshold
-is greater than 1, you can collect signatures from the required signers
-and use the [`aggregateSignature`](../../reference/smart-account.md#aggregatesignature) function to combine them
-into a single aggregated signature.
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../get-started/install.md)
-- [Create a Multisig smart account.](create-smart-account.md#multisig-smart-account)
-
-## Generate a multisig signature
-
-The following example configures a Multisig smart account with two different signers: Alice
-and Bob. The account has a threshold of 2, meaning that signatures from
-both parties are required for any execution.
-
-
-
-
-```typescript
-import {
- bundlerClient,
- aliceSmartAccount,
- bobSmartAccount,
- aliceAccount,
- bobAccount,
-} from './config.ts'
-import { aggregateSignature } from '@metamask/smart-accounts-kit'
-
-const userOperation = await bundlerClient.prepareUserOperation({
- account: aliceSmartAccount,
- calls: [
- {
- target: zeroAddress,
- value: 0n,
- data: '0x',
- },
- ],
-})
-
-const aliceSignature = await aliceSmartAccount.signUserOperation(userOperation)
-const bobSignature = await bobSmartAccount.signUserOperation(userOperation)
-
-const aggregatedSignature = aggregateSignature({
- signatures: [
- {
- signer: aliceAccount.address,
- signature: aliceSignature,
- type: 'ECDSA',
- },
- {
- signer: bobAccount.address,
- signature: bobSignature,
- type: 'ECDSA',
- },
- ],
-})
-```
-
-
-
-
-
-```typescript
-import { createPublicClient, http } from 'viem'
-import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'
-import { createBundlerClient } from 'viem/account-abstraction'
-import { sepolia as chain } from 'viem/chains'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const alicePrivateKey = generatePrivateKey()
-export const aliceAccount = privateKeyToAccount(alicePrivateKey)
-
-const bobPrivateKey = generatePrivateKey()
-export const bobAccount = privateKeyToAccount(bobPrivateKey)
-
-const signers = [aliceAccount.address, bobAccount.address]
-const threshold = 2n
-
-export const aliceSmartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.MultiSig,
- deployParams: [signers, threshold],
- deploySalt: '0x',
- signer: [{ account: aliceAccount }],
-})
-
-export const bobSmartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.MultiSig,
- deployParams: [signers, threshold],
- deploySalt: '0x',
- signer: [{ account: bobAccount }],
-})
-
-export const bundlerClient = createBundlerClient({
- client: publicClient,
- transport: http('https://public.pimlico.io/v2/rpc'),
-})
-```
-
-
-
diff --git a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/signers/dynamic.md b/gator_versioned_docs/version-1.0.0/guides/smart-accounts/signers/dynamic.md
deleted file mode 100644
index 8ef5f7f82c9..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/signers/dynamic.md
+++ /dev/null
@@ -1,134 +0,0 @@
----
-description: Learn how to use Dynamic signer with MetaMask Smart Accounts.
-sidebar_label: Dynamic
-keywords: [dynamic, smart account, signer, metamask smart account]
----
-
-# Use Dynamic with MetaMask Smart Accounts
-
-[Dynamic](https://www.dynamic.xyz/) is an embedded wallet solution that enables seamless social login and passkey based
-wallets, making user onboarding easier. MetaMask Smart Accounts is a signer-agnostic implementation
-that allows you to use Dynamic's EOA wallet as a signer for MetaMask Smart Accounts.
-
-View the complete code for this guide in the [`gator-examples`](https://github.com/MetaMask/gator-examples/tree/main/examples/smart-accounts/signers/dynamic) repository.
-
-:::info
-This guide supports React and React-based frameworks.
-:::
-
-## Prerequisites
-
-- Install [Node.js](https://nodejs.org/en/blog/release/v18.18.0) v18 or later.
-- Install [Yarn](https://yarnpkg.com/),
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), or another package manager.
-- Create a [Dynamic Environment ID](https://www.dynamic.xyz/docs/developer-dashboard/tokens-api-keys#environment-id).
-
-## Steps
-
-### 1. Install dependencies
-
-Install the following dependencies:
-
-```bash npm2yarn
-npm install @dynamic-labs/ethereum @dynamic-labs/sdk-react-core @dynamic-labs/wagmi-connector @metamask/smart-accounts-kit @tanstack/react-query wagmi viem
-```
-
-### 2. Create the Dynamic provider
-
-In this step, you'll configure the [`DynamicContextProvider`](https://www.dynamic.xyz/docs/react-sdk/providers/providers-introduction#dynamic-context-provider) component to provide Dynamic's context
-to your application. You'll also use the [`DynamicWagmiConnector`](https://www.dynamic.xyz/docs/react-sdk/providers/providers-introduction#dynamic-wagmi-connector) to integrate Dynamic with Wagmi. This
-connector enables you to use Wagmi hooks with Dynamic.
-
-Once you have created the `DynamicProvider`, you must wrap it at the root of your application so
-that the rest of your application has access to the Dynamic's context.
-
-For an advanced configuration, see how to [configure Dynamic and Wagmi](https://www.dynamic.xyz/docs/react-sdk/using-wagmi).
-
-
-
-
-```ts
-import { QueryClientProvider } from "@tanstack/react-query";
-import { WagmiProvider } from "wagmi";
-import { ReactNode } from "react";
-import { EthereumWalletConnectors } from "@dynamic-labs/ethereum";
-import { DynamicContextProvider } from "@dynamic-labs/sdk-react-core";
-import { DynamicWagmiConnector } from "@dynamic-labs/wagmi-connector";
-import { wagmiConfig, queryClient } from "./config.ts"
-
-export function DynamicProvider({ children }: { children: ReactNode }) {
- return (
- ",
- walletConnectors: [EthereumWalletConnectors],
- }}
- >
-
-
-
- {children}
-
-
-
-
- );
-}
-```
-
-
-
-
-
-```ts
-import { QueryClient } from '@tanstack/react-query'
-import { createConfig, http } from 'wagmi'
-import { sepolia } from 'viem/chains'
-
-export const queryClient = new QueryClient()
-
-export const wagmiConfig = createConfig({
- chains: [sepolia],
- ssr: true,
- transports: {
- [sepolia.id]: http(),
- },
-})
-```
-
-
-
-
-### 3. Create a smart account
-
-Once the user has connected their wallet, use the [Wallet Client](https://viem.sh/docs/clients/wallet) from Wagmi as the signer to create a
-MetaMask smart account.
-
-```ts
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-import { useAccount, usePublicClient, useWalletClient } from 'wagmi'
-
-const { address } = useAccount()
-const publicClient = usePublicClient()
-const { data: walletClient } = useWalletClient()
-
-// Additional check to make sure the Dyanmic is connected
-// and values are available.
-if (!address || !walletClient || !publicClient) {
- // Handle the error case
-}
-
-const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [address, [], [], []],
- deploySalt: '0x',
- signer: { walletClient },
-})
-```
-
-## Next steps
-
-- See how to [send a user operation](../send-user-operation.md).
-- To sponsor gas for end users, see how to [send a gasless transaction](../send-gasless-transaction.md).
diff --git a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/signers/embedded-wallets.md b/gator_versioned_docs/version-1.0.0/guides/smart-accounts/signers/embedded-wallets.md
deleted file mode 100644
index 8b9106396be..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/signers/embedded-wallets.md
+++ /dev/null
@@ -1,122 +0,0 @@
----
-description: Learn how to use MetaMask Embedded Wallets (Web3Auth) with MetaMask Smart Accounts.
-sidebar_label: MetaMask Embedded Wallets
-keywords: [web3auth, smart account, signer, metamask smart account]
----
-
-# Use MetaMask Embedded Wallets with MetaMask Smart Accounts
-
-[MetaMask Embedded Wallets (Web3Auth)](/embedded-wallets/) provides a pluggable embedded wallet
-infrastructure to simplify Web3 wallet integration and user onboarding. It supports social logins allowing
-users to access Web3 applications through familiar authentication methods in under a minute.
-
-MetaMask Smart Accounts is a signer-agnostic implementation that allows you to use Embedded Wallets as a signer for MetaMask Smart Accounts.
-
-:::info
-This guide supports React and React-based frameworks.
-:::
-
-## Prerequisites
-
-- Install [Node.js](https://nodejs.org/en/blog/release/v18.18.0) v18 or later.
-- Install [Yarn](https://yarnpkg.com/),
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), or another package manager.
-- Create an [Embedded Wallets Client ID](/embedded-wallets/dashboard).
-
-## Steps
-
-### 1. Install dependencies
-
-Install the [Smart Accounts Kit](https://www.npmjs.com/package/@metamask/smart-accounts-kit) and other dependencies in your project:
-
-```bash npm2yarn
-npm install @metamask/smart-accounts-kit @web3auth/modal wagmi @tanstack/react-query viem
-```
-
-### 2. Create the Web3Auth provider
-
-Configure the `Web3AuthProvider` component to provide the Embedded Wallets context to your application.
-You'll also use the `WagmiProvider` to integrate Embedded Wallets with Wagmi.
-This provider enables you to use Wagmi hooks with Embedded Wallets.
-
-Once you've created the `Web3AuthAppProvider`, wrap it at the root of your application so
-the rest of your application has access to the Embedded Wallets context.
-
-For an advanced configuration, see the [Embedded Wallets guide](/embedded-wallets/sdk/react/advanced/).
-
-
-
-
-```ts
-import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
-import { ReactNode } from "react";
-import { Web3AuthProvider } from "@web3auth/modal/react";
-// Make sure to import `WagmiProvider` from `@web3auth/modal/react/wagmi`, not `wagmi`
-import { WagmiProvider } from "@web3auth/modal/react/wagmi";
-import { web3authConfig } from "./config.ts";
-
-const queryClient = new QueryClient();
-
-export function Web3AuthAppProvider({ children }: { children: ReactNode }) {
- return (
-
-
- {children}
-
-
- );
-}
-```
-
-
-
-
-
-```ts
-import { Web3AuthOptions } from '@web3auth/modal'
-
-const web3AuthOptions: Web3AuthOptions = {
- clientId: '',
- web3AuthNetwork: '',
-}
-
-export const web3authConfig = {
- web3AuthOptions,
-}
-```
-
-
-
-
-### 3. Create a smart account
-
-Once the user has connected their wallet, use the [Wallet Client](https://viem.sh/docs/clients/wallet) from Wagmi as the signer to create a
-MetaMask smart account.
-
-```ts
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-import { useAccount, usePublicClient, useWalletClient } from 'wagmi'
-
-const { address } = useAccount()
-const publicClient = usePublicClient()
-const { data: walletClient } = useWalletClient()
-
-// Additional check to make sure the Embedded Wallets is connected
-// and values are available.
-if (!address || !walletClient || !publicClient) {
- // Handle the error case
-}
-
-const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [address, [], [], []],
- deploySalt: '0x',
- signer: { walletClient },
-})
-```
-
-## Next steps
-
-- See how to [send a user operations](../send-user-operation.md).
-- To sponsor gas for end users, see how to [send a gasless transaction](../send-gasless-transaction.md).
diff --git a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/signers/index.md b/gator_versioned_docs/version-1.0.0/guides/smart-accounts/signers/index.md
deleted file mode 100644
index a833f88dbb3..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/signers/index.md
+++ /dev/null
@@ -1,53 +0,0 @@
----
-description: Learn how to configure signers for MetaMask Smart Accounts.
-keywords:
- [signers, metamask smart accounts, smart account, embedded wallets, web3auth, dynamic, privy]
----
-
-import CardList from "@site/src/components/CardList"
-
-# Configure a signer
-
-When [creating a smart account](../create-smart-account.md), you must specify a signer. The signer owns the smart account and is responsible for
-generating the signatures required to submit user operations. MetaMask Smart Accounts is signer-agnostic, allowing you
-to use any signer you prefer, such as Embedded Wallets, passkeys, EOA wallets, or a custom signer.
-
-MetaMask Smart Accounts has a native integration with [MetaMask Embedded Wallets](/embedded-wallets/), making user onboarding easier. In addition to the native integration, you can use
-third-party wallet providers as Privy, Dynamic, or Para as the signer for your smart account.
-
-See the following guides to learn how to configure different signers:
-
-## Recommended
-
-
-
-## Other signers
-
-
diff --git a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/signers/passkey.md b/gator_versioned_docs/version-1.0.0/guides/smart-accounts/signers/passkey.md
deleted file mode 100644
index a8d196cb6ff..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/signers/passkey.md
+++ /dev/null
@@ -1,99 +0,0 @@
----
-description: Learn how to use Passkey with MetaMask Smart Accounts.
-sidebar_label: Passkey
-keywords: [passkey, smart account, signer, metamask smart account]
----
-
-# Use a passkey with MetaMask Smart Accounts
-
-Passkeys eliminate the need for traditional seed phrases that are difficult to remember, enabling a more seamless
-and secure way for users to access their externally owned accounts (EOAs). Compared to traditional EOAs which use
-secp256k1 elliptic curve to generate key pairs and signatures, a passkey-based EOA uses the
-secp256r1 (P-256) elliptic curve.
-
-MetaMask Smart Accounts is signer-agnostic and natively supports passkeys (P-256 elliptic curve signatures), so you can use a passkey as the signer.
-
-## Prerequisites
-
-- Install [Node.js](https://nodejs.org/en/blog/release/v18.18.0) v18 or later.
-- Install [Yarn](https://yarnpkg.com/),
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), or another package manager.
-
-## Steps
-
-### 1. Install dependencies
-
-Install the [Smart Accounts Kit](https://www.npmjs.com/package/@metamask/smart-accounts-kit) and other dependencies in your project:
-
-```bash npm2yarn
-npm install @metamask/smart-accounts-kit ox
-```
-
-### 2. Create a passkey
-
-To create a passkey signer, use Viem's [`createWebAuthnCredential`](https://viem.sh/account-abstraction/accounts/webauthn/createWebAuthnCredential) function to securely register the passkey (WebAuthn credential).
-
-```ts
-import { createWebAuthnCredential } from 'viem/account-abstraction'
-
-const credential = await createWebAuthnCredential({
- name: 'MetaMask Smart Account',
-})
-```
-
-### 3. Create a smart account
-
-Once the passkey is created, use the [Viem WebAuthn Account](https://viem.sh/account-abstraction/accounts/webauthn) to configure your passkey as a MetaMask smart account signer.
-
-The `deployParams` parameter needs the X and Y coordinates of the P-256 public key. Since WebAuthn credentials store
-a compressed public key, you need to deserialize it, and extract the X and Y coordinates.
-
-
-
-
-```typescript
-import { publicClient } from './config.ts'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-import { toWebAuthnAccount } from 'viem/account-abstraction'
-import { Address, PublicKey } from 'ox'
-import { toHex } from 'viem'
-
-const webAuthnAccount = toWebAuthnAccount({ credential })
-
-// Deserialize compressed public key
-const publicKey = PublicKey.fromHex(credential.publicKey)
-
-// Convert public key to address
-const owner = Address.fromPublicKey(publicKey)
-
-const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [owner, [toHex(credential.id)], [publicKey.x], [publicKey.y]],
- deploySalt: '0x',
- signer: { webAuthnAccount, keyId: toHex(credential.id) },
-})
-```
-
-
-
-
-
-```typescript
-import { http, createPublicClient } from 'viem'
-import { sepolia as chain } from 'viem/chains'
-
-const transport = http()
-export const publicClient = createPublicClient({
- transport,
- chain,
-})
-```
-
-
-
-
-## Next steps
-
-- See how to [send a user operation](../send-user-operation.md).
-- To sponsor gas for end users, see how to [send a gasless transaction](../send-gasless-transaction.md).
diff --git a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/signers/privy.md b/gator_versioned_docs/version-1.0.0/guides/smart-accounts/signers/privy.md
deleted file mode 100644
index fc08bbe120f..00000000000
--- a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/signers/privy.md
+++ /dev/null
@@ -1,123 +0,0 @@
----
-description: Learn how to use Privy signer with MetaMask Smart Accounts.
-sidebar_label: Privy
-keywords: [privy, smart account, signer, metamask smart account]
----
-
-# Use Privy with MetaMask Smart Accounts
-
-[Privy](https://docs.privy.io/welcome) provides an embedded wallet solution that enables seamless social login for Web3 applications making user onboarding easier. MetaMask Smart Accounts is a signer-agnostic implementation
-that allows you to use Privy's EOA wallet as a signer for MetaMask Smart Accounts.
-
-:::info
-This guide supports React and React-based frameworks.
-:::
-
-## Prerequisites
-
-- Install [Node.js](https://nodejs.org/en/blog/release/v18.18.0) v18 or later.
-- Install [Yarn](https://yarnpkg.com/),
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), or another package manager.
-- Create a [Privy App ID](https://docs.privy.io/basics/get-started/dashboard/create-new-app#get-api-credentials).
-
-## Steps
-
-### 1. Install dependencies
-
-Install the following dependencies:
-
-```bash npm2yarn
-npm install @privy-io/react-auth @privy-io/wagmi @metamask/smart-accounts-kit @tanstack/react-query wagmi viem
-```
-
-### 2. Create the Privy provider
-
-In this step, you'll configure the `PrivyProvider` component to provide the Privy's context
-to your application. You'll also use the Privy's `WagmiProvider` component to integrate Privy with Wagmi. This
-provider enables you to use Wagmi hooks with Privy.
-
-Once you have created the `PrivyAppProvider`, you must wrap it at the root of your application so
-that the rest of your application has access to the Privy's context.
-
-For the advance configuration, see Privy's [configuring appearance](https://docs.privy.io/basics/get-started/dashboard/configuring-appearance) and [configuring login methods](https://docs.privy.io/basics/get-started/dashboard/configure-login-methods) guide.
-
-
-
-
-```ts
-import { QueryClientProvider } from "@tanstack/react-query";
-import { ReactNode } from "react";
-import { PrivyProvider } from '@privy-io/react-auth';
-// Make sure to import `WagmiProvider` from `@privy-io/wagmi`, not `wagmi`
-import { WagmiProvider } from '@privy-io/wagmi';
-import { QueryClientProvider } from '@tanstack/react-query';
-import { wagmiConfig, queryClient } from "./config.ts"
-
-export function PrivyAppProvider({ children }: { children: ReactNode }) {
- return (
-
-
-
- {children}
-
-
-
- );
-}
-```
-
-
-
-
-
-```ts
-import { QueryClient } from '@tanstack/react-query'
-import { createConfig, http } from 'wagmi'
-import { sepolia } from 'viem/chains'
-
-export const queryClient = new QueryClient()
-
-export const wagmiConfig = createConfig({
- chains: [sepolia],
- ssr: true,
- transports: {
- [sepolia.id]: http(),
- },
-})
-```
-
-
-
-
-### 3. Create a smart account
-
-Once the user has connected their wallet, use the [Wallet Client](https://viem.sh/docs/clients/wallet) from Wagmi as the signer to create a
-MetaMask smart account.
-
-```ts
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-import { useAccount, usePublicClient, useWalletClient } from 'wagmi'
-
-const { address } = useAccount()
-const publicClient = usePublicClient()
-const { data: walletClient } = useWalletClient()
-
-// Additional check to make sure the Privy is connected
-// and values are available.
-if (!address || !walletClient || !publicClient) {
- // Handle the error case
-}
-
-const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [address, [], [], []],
- deploySalt: '0x',
- signer: { walletClient },
-})
-```
-
-## Next steps
-
-- See how to [send a user operation](../send-user-operation.md).
-- To sponsor gas for end users, see how to [send a gasless transaction](../send-gasless-transaction.md).
diff --git a/gator_versioned_docs/version-1.0.0/reference/advanced-permissions/permissions.md b/gator_versioned_docs/version-1.0.0/reference/advanced-permissions/permissions.md
deleted file mode 100644
index 83427d2931f..00000000000
--- a/gator_versioned_docs/version-1.0.0/reference/advanced-permissions/permissions.md
+++ /dev/null
@@ -1,183 +0,0 @@
----
-description: Advanced Permissions (ERC-7715) reference.
-sidebar_label: Permissions
-keywords: [ERC-7715, permissions, ERC-20 token, native token, reference, advanced permissions]
----
-
-# Advanced Permissions reference
-
-When [executing on a MetaMask user's behalf](../../guides/advanced-permissions/execute-on-metamask-users-behalf.md), you can request the following permission types for ERC-20 token and native token transfers.
-Learn [how to use Advanced Permissions types](../../guides/advanced-permissions/use-permissions/erc20-token.md).
-
-## ERC-20 token permissions
-
-### ERC-20 periodic permission
-
-Ensures a per-period limit for ERC-20 token transfers.
-At the start of each new period, the allowance resets.
-
-#### Parameters
-
-| Name | Type | Required | Description |
-| ---------------- | --------- | -------- | ---------------------------------------------------------------------- |
-| `tokenAddress` | `Address` | Yes | The ERC-20 token contract address as a hex string. |
-| `periodAmount` | `bigint` | Yes | The maximum amount of tokens that can be transferred per period. |
-| `periodDuration` | `number` | Yes | The duration of each period in seconds. |
-| `startTime` | `number` | No | The start timestamp in seconds. The default is the current time. |
-| `justification` | `string` | No | A human-readable explanation of why the permission is being requested. |
-
-#### Example
-
-```typescript
-import { parseUnits } from 'viem'
-
-const currentTime = Math.floor(Date.now() / 1000)
-const expiry = currentTime + 604800
-
-const permission = {
- type: 'erc20-token-periodic',
- data: {
- tokenAddress: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238',
- periodAmount: parseUnits('10', 6),
- periodDuration: 86400,
- justification: 'Permission to transfer 10 USDC every day',
- },
- isAdjustmentAllowed: true,
-}
-```
-
-### ERC-20 stream permission
-
-Ensures a linear streaming transfer limit for ERC-20 tokens.
-Token transfers are blocked until the defined start timestamp.
-At the start, a specified initial amount is released, after which tokens accrue linearly at the configured rate, up to the maximum allowed amount.
-
-#### Parameters
-
-| Name | Type | Required | Description |
-| ----------------- | --------- | -------- | ----------------------------------------------------------------------------- |
-| `tokenAddress` | `Address` | Yes | The ERC-20 token contract address. |
-| `initialAmount` | `bigint` | No | The initial amount that can be transferred at start time. The default is `0`. |
-| `maxAmount` | `bigint` | No | The maximum total amount that can be unlocked. The default is no limit. |
-| `amountPerSecond` | `bigint` | Yes | The rate at which tokens accrue per second. |
-| `startTime` | `number` | No | The start timestamp in seconds. The default is the current time. |
-| `justification` | `string` | No | A human-readable explanation of why the permission is being requested. |
-
-#### Example
-
-```typescript
-import { parseUnits } from 'viem'
-
-const currentTime = Math.floor(Date.now() / 1000)
-const expiry = currentTime + 604800
-
-const permission = {
- type: 'erc20-token-stream',
- data: {
- tokenAddress: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238',
- amountPerSecond: parseUnits('0.1', 6),
- initialAmount: parseUnits('1', 6),
- maxAmount: parseUnits('2', 6),
- startTime: currentTime,
- justification: 'Permission to use 0.1 USDC per second',
- },
- isAdjustmentAllowed: true,
-}
-```
-
-### ERC-20 revocation permission
-
-Enables revoking an existing ERC-20 token allowance on behalf of the user.
-
-#### Parameters
-
-| Name | Type | Required | Description |
-| --------------- | -------- | -------- | ---------------------------------------------------------------------- |
-| `justification` | `string` | No | A human-readable explanation of why the permission is being requested. |
-
-#### Example
-
-```typescript
-const permission = {
- type: 'erc20-token-revocation',
- data: {
- justification: 'Permission to revoke ERC-20 token allowances',
- },
- isAdjustmentAllowed: true,
-}
-```
-
-## Native token permissions
-
-### Native token periodic permission
-
-Ensures a per-period limit for native token transfers.
-At the start of each new period, the allowance resets.
-
-#### Parameters
-
-| Name | Type | Required | Description |
-| ---------------- | -------- | -------- | ---------------------------------------------------------------------- |
-| `periodAmount` | `bigint` | Yes | The maximum amount of tokens that can be transferred per period. |
-| `periodDuration` | `number` | Yes | The duration of each period in seconds. |
-| `startTime` | `number` | No | The start timestamp in seconds. The default is the current time. |
-| `justification` | `string` | No | A human-readable explanation of why the permission is being requested. |
-
-#### Example
-
-```typescript
-import { parseEther } from 'viem'
-
-const currentTime = Math.floor(Date.now() / 1000)
-const expiry = currentTime + 604800
-
-const permission = {
- type: 'native-token-periodic',
- data: {
- periodAmount: parseEther('0.001'),
- periodDuration: 86400,
- startTime: currentTime,
- justification: 'Permission to use 0.001 ETH every day',
- },
- isAdjustmentAllowed: true,
-}
-```
-
-### Native token stream permission
-
-Ensures a linear streaming transfer limit for native tokens.
-Token transfers are blocked until the defined start timestamp.
-At the start, a specified initial amount is released, after which tokens accrue linearly at the configured rate, up to the maximum allowed amount.
-
-#### Parameters
-
-| Name | Type | Required | Description |
-| ----------------- | -------- | -------- | ----------------------------------------------------------------------------- |
-| `initialAmount` | `bigint` | No | The initial amount that can be transferred at start time. The default is `0`. |
-| `maxAmount` | `bigint` | No | The maximum total amount that can be unlocked. The default is no limit. |
-| `amountPerSecond` | `bigint` | Yes | The rate at which tokens accrue per second. |
-| `startTime` | `number` | No | The start timestamp in seconds. The default is the current time. |
-| `justification` | `string` | No | A human-readable explanation of why the permission is being requested. |
-
-#### Example
-
-```typescript
-import { sepolia as chain } from 'viem/chains'
-import { parseEther } from 'viem'
-import { walletClient } from './client.ts'
-
-const currentTime = Math.floor(Date.now() / 1000)
-const expiry = currentTime + 604800
-
-const permission = {
- type: 'native-token-stream',
- data: {
- amountPerSecond: parseEther('0.0001'),
- initialAmount: parseEther('0.1'),
- maxAmount: parseEther('1'),
- startTime: currentTime,
- justification: 'Permission to use 0.0001 ETH per second',
- },
- isAdjustmentAllowed: true,
-}
-```
diff --git a/gator_versioned_docs/version-1.0.0/reference/advanced-permissions/wallet-client.md b/gator_versioned_docs/version-1.0.0/reference/advanced-permissions/wallet-client.md
deleted file mode 100644
index 05b63997ed7..00000000000
--- a/gator_versioned_docs/version-1.0.0/reference/advanced-permissions/wallet-client.md
+++ /dev/null
@@ -1,191 +0,0 @@
----
-description: Wallet Client actions reference.
-sidebar_label: Wallet Client actions
-toc_max_heading_level: 2
-keywords: [ERC-7715, Viem, wallet client, actions, reference, advanced permissions]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Wallet Client actions reference
-
-The following actions are related to the [Viem Wallet Client](https://viem.sh/docs/clients/wallet) used to [execute on a MetaMask user's behalf](../../guides/advanced-permissions/execute-on-metamask-users-behalf.md).
-
-:::info
-To use Advanced Permissions (ERC-7715) actions, the Viem Wallet Client must be extended with `erc7715ProviderActions`.
-:::
-
-## `requestExecutionPermissions`
-
-Requests Advanced Permissions from the MetaMask extension account according to the [ERC-7715](https://eips.ethereum.org/EIPS/eip-7715) specification. Returns a [`RequestExecutionPermissionsReturnType`](../types.md#requestexecutionpermissionsreturntype).
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------ | --------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `chainId` | `number` | Yes | The chain ID on which the permission is being requested. |
-| `from` | `Address` | No | The wallet address to request the permission from. |
-| `expiry` | `number` | Yes | The timestamp (in seconds) by which the permission must expire. |
-| `permission` | `SupportedPermissionParams` | Yes | The permission to request. The toolkit supports multiple [Advanced Permissions types](permissions.md). Set `isAdjustmentAllowed` to define whether the user can modify the requested permission. |
-| `to` | `Address` | Yes | The account to which the permission will be assigned. |
-
-### Example
-
-
-
-
-```ts
-import { sepolia as chain } from 'viem/chains'
-import { parseUnits } from 'viem'
-import { walletClient } from './client.ts'
-
-const currentTime = Math.floor(Date.now() / 1000)
-const expiry = currentTime + 604800
-
-const grantedPermissions = await walletClient.requestExecutionPermissions([
- {
- chainId: chain.id,
- expiry,
- // The requested permissions will be granted to the
- // session account.
- to: sessionAccount.address,
- permission: {
- type: 'erc20-token-periodic',
- data: {
- tokenAddress: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238',
- periodAmount: parseUnits('10', 6),
- periodDuration: 86400,
- justification: 'Permission to transfer 10 USDC every day',
- },
- isAdjustmentAllowed: true,
- },
- },
-])
-```
-
-
-
-
-```ts
-import { createWalletClient, custom } from 'viem'
-import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
-
-export const walletClient = createWalletClient({
- transport: custom(window.ethereum),
-}).extend(erc7715ProviderActions())
-```
-
-
-
-
-## `getSupportedExecutionPermissions`
-
-Returns the Advanced Permissions types that the wallet supports, according to the
-[ERC-7715](https://eips.ethereum.org/EIPS/eip-7715)
-specification. Use this to verify the available permission types and supported
-chains before requesting permissions.
-
-This action takes no parameters and returns a [`GetSupportedExecutionPermissionsResult`](../types.md#getsupportedexecutionpermissionsresult).
-
-### Example
-
-
-
-
-```ts
-{
- "native-token-stream": {
- "chainIds": [1, 10],
- "ruleTypes": ["expiry"]
- },
- "erc20-token-periodic": {
- "chainIds": [1, 137],
- "ruleTypes": ["expiry"]
- },
-// ...
-}
-```
-
-
-
-
-```ts
-import { walletClient } from './client.ts'
-
-const supportedPermissions = await walletClient.getSupportedExecutionPermissions()
-```
-
-
-
-
-```ts
-import { createWalletClient, custom } from 'viem'
-import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
-
-export const walletClient = createWalletClient({
- transport: custom(window.ethereum),
-}).extend(erc7715ProviderActions())
-```
-
-
-
-
-## `getGrantedExecutionPermissions`
-
-Returns all previously granted permissions for the connected wallet, according to the
-[ERC-7715](https://eips.ethereum.org/EIPS/eip-7715) specification.
-
-This action takes no parameters and returns a [`GetGrantedExecutionPermissionsResult`](../types.md#getgrantedexecutionpermissionsresult).
-
-### Example
-
-
-
-
-```ts
-[
- {
- chainId: 84532,
- context: "0x0000...0000",
- delegationManager: "0xdb9B...7dB3",
- dependencies: [],
- from: "0x993f...7f31",
- permission: {
- type: "erc20-token-periodic",
- isAdjustmentAllowed: false,
- data: { ... },
- },
- rules: [
- { type: "expiry", data: { ... } },
- ],
- to: "0xAB57...7F1f",
- },
-// ...
-]
-```
-
-
-
-
-
-```ts
-import { walletClient } from './client.ts'
-
-const grantedPermissions = await walletClient.getGrantedExecutionPermissions()
-```
-
-
-
-
-```ts
-import { createWalletClient, custom } from 'viem'
-import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
-
-export const walletClient = createWalletClient({
- transport: custom(window.ethereum),
-}).extend(erc7715ProviderActions())
-```
-
-
-
diff --git a/gator_versioned_docs/version-1.0.0/reference/erc7710/wallet-client.md b/gator_versioned_docs/version-1.0.0/reference/erc7710/wallet-client.md
deleted file mode 100644
index 2709ed45355..00000000000
--- a/gator_versioned_docs/version-1.0.0/reference/erc7710/wallet-client.md
+++ /dev/null
@@ -1,83 +0,0 @@
----
-description: Wallet Client actions reference.
-sidebar_label: Wallet Client actions
-toc_max_heading_level: 2
-keywords:
- [ERC-7710, Viem, wallet client, actions, reference, advanced permissions, redeem delegation]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Wallet Client actions reference
-
-These actions extend the [Viem Wallet Client](https://viem.sh/docs/clients/wallet) to support [ERC-7710](https://eips.ethereum.org/EIPS/eip-7710) utilities.
-
-## `sendTransactionWithDelegation`
-
-Sends a transaction to redeem delegated permissions according to the [ERC-7710](https://eips.ethereum.org/EIPS/eip-7710) specifications.
-
-:::info
-To use `sendTransactionWithDelegation`, the Viem Wallet Client must be
-extended with `erc7710WalletActions`.
-:::
-
-### Parameters
-
-See the [Viem `sendTransaction` parameters](https://viem.sh/docs/actions/wallet/sendTransaction#parameters).
-This function has the same parameters, and it also requires the following parameters:
-
-| Name | Type | Required | Description |
-| ------------------- | ------------------- | -------- | ------------------------------------------------------------------------------------------------------------- |
-| `delegationManager` | `Address` | Yes | The address of the Delegation Manager. |
-| `permissionContext` | `PermissionContext` | Yes | An encoded delegation chain (`Hex`) or a decoded delegation chain (`Delegation[]`) for redeeming delegations. |
-
-### Example
-
-
-
-
-```ts
-import { walletClient, publicClient } from './client.ts'
-
-// These properties must be extracted from the permission response. See
-// `grantPermissions` action to learn how to request permissions.
-const permissionContext = permissionsResponse[0].context
-const delegationManager = permissionsResponse[0].signerMeta.delegationManager
-
-const hash = walletClient.sendTransactionWithDelegation({
- chain,
- to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
- value: 1n,
- permissionContext,
- delegationManager,
-})
-```
-
-
-
-
-```ts
-import { http, createPublicClient, createWalletClient } from 'viem'
-import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-import { erc7710WalletActions } from '@metamask/smart-accounts-kit/actions'
-
-export const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-// Your session account for requesting and redeeming should be the same.
-const privateKey = '0x...'
-const account = privateKeyToAccount(privateKey)
-
-const walletClient = createWalletClient({
- account,
- transport: http(),
- chain,
-}).extend(erc7710WalletActions())
-```
-
-
-
diff --git a/gator_versioned_docs/version-1.0.0/reference/smart-account.md b/gator_versioned_docs/version-1.0.0/reference/smart-account.md
deleted file mode 100644
index 0b765d2a8a0..00000000000
--- a/gator_versioned_docs/version-1.0.0/reference/smart-account.md
+++ /dev/null
@@ -1,663 +0,0 @@
----
-description: MetaMask Smart Accounts-related API methods reference.
-sidebar_label: MetaMask Smart Accounts
-toc_max_heading_level: 2
-keywords: [smart accounts, API, methods, reference]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# MetaMask Smart Accounts API reference
-
-The following API methods are related to creating, managing, and signing with [MetaMask Smart Accounts](../concepts/smart-accounts.md).
-
-## `aggregateSignature`
-
-Aggregates multiple partial signatures into a single combined multisig signature.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------ | --------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------ |
-| `signatures` | [`PartialSignature`](./types.md#partialsignature)[] | Yes | Collection of partial signatures provided by signers, to be merged into an aggregated signature. |
-
-### Example
-
-
-
-
-```typescript
-import {
- bundlerClient,
- aliceSmartAccount,
- bobSmartAccount,
- aliceAccount,
- bobAccount,
-} from './config.ts'
-import { aggregateSignature } from '@metamask/smart-accounts-kit'
-
-const userOperation = await bundlerClient.prepareUserOperation({
- account: aliceSmartAccount,
- calls: [
- {
- target: zeroAddress,
- value: 0n,
- data: '0x',
- },
- ],
-})
-
-const aliceSignature = await aliceSmartAccount.signUserOperation(userOperation)
-const bobSignature = await bobSmartAccount.signUserOperation(userOperation)
-
-const aggregatedSignature = aggregateSignature({
- signatures: [
- {
- signer: aliceAccount.address,
- signature: aliceSignature,
- type: 'ECDSA',
- },
- {
- signer: bobAccount.address,
- signature: bobSignature,
- type: 'ECDSA',
- },
- ],
-})
-```
-
-
-
-
-```typescript
-import { createPublicClient, http } from 'viem'
-import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'
-import { createBundlerClient } from 'viem/account-abstraction'
-import { sepolia as chain } from 'viem/chains'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const alicePrivateKey = generatePrivateKey()
-const aliceAccount = privateKeyToAccount(alicePrivateKey)
-
-const bobPrivateKey = generatePrivateKey()
-const bobAccount = privateKeyToAccount(bobPrivateKey)
-
-const signers = [aliceAccount.address, bobAccount.address]
-const threshold = 2n
-
-export const aliceSmartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.MultiSig,
- deployParams: [signers, threshold],
- deploySalt: '0x',
- signer: [{ account: aliceAccount }],
-})
-
-export const bobSmartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.MultiSig,
- deployParams: [signers, threshold],
- deploySalt: '0x',
- signer: [{ account: bobAccount }],
-})
-
-export const bundlerClient = createBundlerClient({
- client: publicClient,
- transport: http('https://public.pimlico.io/v2/rpc'),
-})
-```
-
-
-
-
-## `encodeCalls`
-
-Encodes calls for execution by a MetaMask smart account. If there's a single call directly to the smart account, it returns the call data directly. For multiple calls or calls to other addresses, it creates executions and encodes them for the smart account's `execute` function.
-
-The execution mode is set to `SingleDefault` for a single call to other address, or `BatchDefault` for multiple calls.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------- | -------- | -------- | ---------------------------- |
-| `calls` | `Call[]` | Yes | List of calls to be encoded. |
-
-### Example
-
-
-
-
-```ts
-import { smartAccount } from './config.ts'
-
-const calls = [
- {
- to: zeroAddress,
- data: '0x',
- value: 0n,
- },
-]
-
-const executeCallData = await smartAccount.encodeCalls(calls)
-```
-
-
-
-
-
-```ts
-import { createPublicClient, http } from 'viem'
-import { privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const delegatorAccount = privateKeyToAccount('0x...')
-
-export const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [delegatorAccount.address, [], [], []],
- deploySalt: '0x',
- signer: { account: delegatorAccount },
-})
-```
-
-
-
-
-## `getFactoryArgs`
-
-Returns the factory address and factory data that can be used to deploy a smart account.
-
-### Example
-
-
-
-
-```ts
-import { smartAccount } from './config.ts'
-
-const { factory, factoryData } = await smartAccount.getFactoryArgs()
-```
-
-
-
-
-
-```ts
-import { createPublicClient, http } from 'viem'
-import { privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const delegatorAccount = privateKeyToAccount('0x...')
-
-export const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [delegatorAccount.address, [], [], []],
- deploySalt: '0x',
- signer: { account: delegatorAccount },
-})
-```
-
-
-
-
-## `getNonce`
-
-Returns the nonce for a smart account.
-
-### Example
-
-
-
-
-```ts
-import { smartAccount } from './config.ts'
-
-const nonce = await smartAccount.getNonce()
-```
-
-
-
-
-
-```ts
-import { createPublicClient, http } from 'viem'
-import { privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const delegatorAccount = privateKeyToAccount('0x...')
-
-export const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [delegatorAccount.address, [], [], []],
- deploySalt: '0x',
- signer: { account: delegatorAccount },
-})
-```
-
-
-
-
-## `signDelegation`
-
-Signs the delegation and returns the delegation signature.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------ | ------------------------------- | -------- | --------------------------------------------------------- |
-| `delegation` | `Omit` | Yes | The unsigned delegation object to sign. |
-| `chainId` | `number` | No | The chain ID on which the Delegation Manager is deployed. |
-
-### Example
-
-
-
-
-```ts
-import {
- createDelegation,
- getSmartAccountsEnvironment,
- ScopeType,
-} from '@metamask/smart-accounts-kit'
-import { delegatorSmartAccount } from './config.ts'
-
-// The address to which the delegation is granted. It can be an EOA address, or
-// smart account address.
-const delegate = '0x2FcB88EC2359fA635566E66415D31dD381CF5585'
-
-const delegation = createDelegation({
- to: delegate,
- from: account.address,
- environment: delegatorSmartAccount.environment,
- scope: {
- type: ScopeType.NativeTokenTransferAmount,
- // 0.001 ETH in wei format.
- maxAmount: 1000000000000000n,
- },
-})
-
-const signature = delegatorSmartAccount.signDelegation({ delegation })
-```
-
-
-
-
-```ts
-import { createPublicClient, http } from 'viem'
-import { privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const delegatorAccount = privateKeyToAccount('0x...')
-
-export const delegatorSmartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [delegatorAccount.address, [], [], []],
- deploySalt: '0x',
- signer: { account: delegatorAccount },
-})
-```
-
-
-
-
-## `signMessage`
-
-Generates the [EIP-191](https://eips.ethereum.org/EIPS/eip-191) signature
-using the `MetaMaskSmartAccount` signer. The Smart Accounts Kit
-uses Viem under the hood to provide this functionality.
-
-### Parameters
-
-See the [Viem `signMessage` parameters](https://viem.sh/account-abstraction/accounts/smart/signMessage).
-
-### Example
-
-
-
-
-```ts
-import { smartAccount } from './config.ts'
-
-const signature = smartAccount.signMessage({
- message: 'hello world',
-})
-```
-
-
-
-
-```ts
-import { createPublicClient, http } from 'viem'
-import { privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const account = privateKeyToAccount('0x...')
-
-export const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [account.address, [], [], []],
- deploySalt: '0x',
- signer: { account },
-})
-```
-
-
-
-
-## `signTypedData`
-
-Generates the [EIP-712](https://eips.ethereum.org/EIPS/eip-712) signature
-using the `MetaMaskSmartAccount` signer. The Smart Accounts Kit
-uses Viem under the hood to provide this functionality.
-
-### Parameters
-
-See the [Viem `signTypedData` parameters](https://viem.sh/account-abstraction/accounts/smart/signTypedData).
-
-### Example
-
-
-
-
-```ts
-import { smartAccount } from './config.ts'
-
-const signature = smartAccount.signTypedData({
- domain,
- types,
- primaryType: 'Mail',
- message: {
- from: {
- name: 'Cow',
- wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
- },
- to: {
- name: 'Bob',
- wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
- },
- contents: 'Hello, Bob!',
- },
-})
-```
-
-
-
-
-```ts
-import { createPublicClient, http } from 'viem'
-import { privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const account = privateKeyToAccount('0x...')
-
-export const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [account.address, [], [], []],
- deploySalt: '0x',
- signer: { account },
-})
-```
-
-
-
-
-## `signUserOperation`
-
-Signs a user operation with the `MetaMaskSmartAccount` signer. The Delegation
-Toolkit uses Viem under the hood to provide this functionality.
-
-### Parameters
-
-See the [Viem `signUserOperation` parameters](https://viem.sh/account-abstraction/accounts/smart/signUserOperation#parameters).
-
-### Example
-
-
-
-
-```ts
-import { smartAccount } from './config.ts'
-
-const userOpSignature = smartAccount.signUserOperation({
- callData: '0xdeadbeef',
- callGasLimit: 141653n,
- maxFeePerGas: 15000000000n,
- maxPriorityFeePerGas: 2000000000n,
- nonce: 0n,
- preVerificationGas: 53438n,
- sender: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
- verificationGasLimit: 259350n,
- signature: '0x',
-})
-```
-
-
-
-
-```ts
-import { createPublicClient, http } from 'viem'
-import { privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const account = privateKeyToAccount('0x...')
-
-export const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [account.address, [], [], []],
- deploySalt: '0x',
- signer: { account },
-})
-```
-
-
-
-
-## `toMetaMaskSmartAccount`
-
-Creates a `MetaMaskSmartAccount` instance.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ---------------- | ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `client` | `Client` | Yes | Viem Client to retrieve smart account data. |
-| `implementation` | `TImplementation` | Yes | Implementation type for the smart account. Can be Hybrid, Multisig, or Stateless7702. |
-| `signer` | `SignerConfigByImplementation ` | No | Signer for the smart account. Can be a Viem Account, Viem Wallet Client, or a WebAuthn Account. WebAuthn accounts are only supported for Hybrid implementations. If omitted, non-signing operations still work, but signing operations such as `signUserOperation`, `signDelegation`, `signMessage`, and `signTypedData` will throw an error. |
-| `environment` | [`SmartAccountsEnvironment`](./types.md#smartaccountsenvironment) | No | Environment to resolve the smart contracts. |
-| `deployParams` | `DeployParams` | Required if `address` is not provided | The parameters that will be used to deploy the smart account and generate its deterministic address. |
-| `deploySalt` | `Hex` | Required if `address` is not provided | The salt that will be used to deploy the smart account. |
-| `address` | `Address` | Required if `deployParams` and `deploySalt` are not provided, or if the implementation is `Stateless7702`. | The address of the smart account. If an address is provided, the smart account will not be deployed. This should be used if you intend to interact with an existing smart account. |
-
-### Hybrid implementation
-
-#### `deployParams`
-
-All Hybrid deploy parameters are required:
-
-| Name | Type | Description |
-| ------------- | ---------- | ------------------------------------------------------------------------------------------------------------- |
-| `owner` | `Hex` | The owner's account address. The owner can be the zero address, indicating that there is no owner configured. |
-| `p256KeyIds` | `Hex[]` | An array of key identifiers for passkey signers. |
-| `p256XValues` | `bigint[]` | An array of public key x-values for passkey signers. |
-| `p256YValues` | `bigint[]` | An array of public key y-values for passkey signers. |
-
-#### Example
-
-
-
-
-```ts
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-import { publicClient, account } from './config.ts'
-
-const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [account.address, [], [], []],
- deploySalt: '0x',
- signer: { account: account },
-})
-```
-
-
-
-
-```ts
-import { createPublicClient, http } from 'viem'
-import { privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-
-export const account = privateKeyToAccount('0x...')
-export const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-```
-
-
-
-
-### Multisig implementation
-
-#### `deployParams`
-
-All Multisig deploy parameters are required:
-
-| Name | Type | Description |
-| ----------- | -------- | -------------------------------------------------------- |
-| `signers` | `Hex[]` | An array of EOA signer addresses. |
-| `threshold` | `bigint` | The number of signers required to execute a transaction. |
-
-#### Example
-
-
-
-
-```ts
-import { publicClient, aliceAccount, bobAccount } from './config.ts'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const signers = [aliceAccount.address, bobAccount.address]
-const threshold = 2n
-
-const aliceSmartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.MultiSig,
- deployParams: [signers, threshold],
- deploySalt: '0x',
- signer: [{ account: aliceAccount }],
-})
-```
-
-
-
-
-```ts
-import { createPublicClient, http } from 'viem'
-import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-
-export const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const alicePrivateKey = generatePrivateKey()
-export const aliceAccount = privateKeyToAccount(alicePrivateKey)
-
-const bobPrivateKey = generatePrivateKey()
-export const bobAccount = privateKeyToAccount(bobPrivateKey)
-```
-
-
-
-
-### Stateless7702 implementation example
-
-
-
-
-```ts
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-import { publicClient, account } from './config.ts'
-
-const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Stateless7702,
- address: account.address,
- signer: { account },
-})
-```
-
-
-
-
-```ts
-import { createPublicClient, http } from 'viem'
-import { privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-
-export const account = privateKeyToAccount('0x...')
-export const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-```
-
-
-
diff --git a/gator_versioned_docs/version-1.0.0/reference/types.md b/gator_versioned_docs/version-1.0.0/reference/types.md
deleted file mode 100644
index 37dfa7f70cf..00000000000
--- a/gator_versioned_docs/version-1.0.0/reference/types.md
+++ /dev/null
@@ -1,224 +0,0 @@
----
-description: Reference for types used across the Smart Accounts Kit.
-sidebar_label: Types
-keywords: [types, delegation, smart accounts, reference, enums]
----
-
-# Types
-
-This page documents the TypeScript [enums](#enums) and [types](#types-1) used in Smart Accounts Kit APIs.
-
-## Enums
-
-### `CaveatType`
-
-Enum representing the [caveat](delegation/caveats.md) type.
-
-| Value | String |
-| --------------------------------------------- | ------------------------------------ |
-| `CaveatType.AllowedCalldata` | `"allowedCalldata"` |
-| `CaveatType.AllowedMethods` | `"allowedMethods"` |
-| `CaveatType.AllowedTargets` | `"allowedTargets"` |
-| `CaveatType.ArgsEqualityCheck` | `"argsEqualityCheck"` |
-| `CaveatType.BlockNumber` | `"blockNumber"` |
-| `CaveatType.Deployed` | `"deployed"` |
-| `CaveatType.Erc1155BalanceChange` | `"erc1155BalanceChange"` |
-| `CaveatType.Erc20BalanceChange` | `"erc20BalanceChange"` |
-| `CaveatType.Erc20PeriodTransfer` | `"erc20PeriodTransfer"` |
-| `CaveatType.Erc20Streaming` | `"erc20Streaming"` |
-| `CaveatType.Erc20TransferAmount` | `"erc20TransferAmount"` |
-| `CaveatType.Erc721BalanceChange` | `"erc721BalanceChange"` |
-| `CaveatType.Erc721Transfer` | `"erc721Transfer"` |
-| `CaveatType.ExactCalldata` | `"exactCalldata"` |
-| `CaveatType.ExactCalldataBatch` | `"exactCalldataBatch"` |
-| `CaveatType.ExactExecution` | `"exactExecution"` |
-| `CaveatType.ExactExecutionBatch` | `"exactExecutionBatch"` |
-| `CaveatType.Id` | `"id"` |
-| `CaveatType.LimitedCalls` | `"limitedCalls"` |
-| `CaveatType.MultiTokenPeriod` | `"multiTokenPeriod"` |
-| `CaveatType.NativeBalanceChange` | `"nativeBalanceChange"` |
-| `CaveatType.NativeTokenPayment` | `"nativeTokenPayment"` |
-| `CaveatType.NativeTokenPeriodTransfer` | `"nativeTokenPeriodTransfer"` |
-| `CaveatType.NativeTokenStreaming` | `"nativeTokenStreaming"` |
-| `CaveatType.NativeTokenTransferAmount` | `"nativeTokenTransferAmount"` |
-| `CaveatType.Nonce` | `"nonce"` |
-| `CaveatType.OwnershipTransfer` | `"ownershipTransfer"` |
-| `CaveatType.Redeemer` | `"redeemer"` |
-| `CaveatType.SpecificActionERC20TransferBatch` | `"specificActionERC20TransferBatch"` |
-| `CaveatType.Timestamp` | `"timestamp"` |
-| `CaveatType.ValueLte` | `"valueLte"` |
-
-### `ExecutionMode`
-
-Enum specifying how delegated executions are processed when [redeeming delegations](delegation/index.md#redeemdelegations).
-
-| Value | Description |
-| ----------------------------- | --------------------------------------------------------------- |
-| `ExecutionMode.SingleDefault` | Executes a single call and reverts on failure. |
-| `ExecutionMode.SingleTry` | Executes a single call and silently continues on failure. |
-| `ExecutionMode.BatchDefault` | Executes a batch of calls and reverts if any call fails. |
-| `ExecutionMode.BatchTry` | Executes a batch of calls and silently continues past failures. |
-
-### `Implementation`
-
-Enum representing the [MetaMask smart account](../concepts/smart-accounts.md) implementation type.
-
-| Value | Description |
-| ------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
-| `Implementation.Hybrid` | Supports both ECDSA and WebAuthn (passkey) signers. |
-| `Implementation.MultiSig` | Supports multiple ECDSA signers with threshold-based signing. |
-| `Implementation.Stateless7702` | Uses [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) to upgrade an EOA to a smart account without deployment. |
-
-### `ScopeType`
-
-Enum representing [delegation scope types](delegation/delegation-scopes.md).
-
-| Value | String |
-| ------------------------------------- | ----------------------------- |
-| `ScopeType.Erc20TransferAmount` | `"erc20TransferAmount"` |
-| `ScopeType.Erc20Streaming` | `"erc20Streaming"` |
-| `ScopeType.Erc20PeriodTransfer` | `"erc20PeriodTransfer"` |
-| `ScopeType.NativeTokenTransferAmount` | `"nativeTokenTransferAmount"` |
-| `ScopeType.NativeTokenStreaming` | `"nativeTokenStreaming"` |
-| `ScopeType.NativeTokenPeriodTransfer` | `"nativeTokenPeriodTransfer"` |
-| `ScopeType.Erc721Transfer` | `"erc721Transfer"` |
-| `ScopeType.OwnershipTransfer` | `"ownershipTransfer"` |
-| `ScopeType.FunctionCall` | `"functionCall"` |
-
-### `TransferWindow`
-
-Enum representing predefined time intervals in seconds for transfer period durations.
-
-| Value | Seconds |
-| -------------------------- | ---------- |
-| `TransferWindow.Hourly` | `3600` |
-| `TransferWindow.Daily` | `86400` |
-| `TransferWindow.Weekly` | `604800` |
-| `TransferWindow.BiWeekly` | `1209600` |
-| `TransferWindow.Monthly` | `2592000` |
-| `TransferWindow.Quarterly` | `7776000` |
-| `TransferWindow.Yearly` | `31536000` |
-
-## Types
-
-### `AllowedCalldataBuilderConfig`
-
-Defines an expected calldata segment for a single function signature.
-
-| Name | Type | Required | Description |
-| ------------ | -------- | -------- | ------------------------------------------------------------------------------------------------ |
-| `startIndex` | `number` | Yes | The byte offset in the calldata (including the 4-byte selector) where the expected value starts. |
-| `value` | `Hex` | Yes | The expected hex-encoded calldata at that offset. |
-
-### `Caveat`
-
-Represents a restriction or condition applied to a delegation.
-
-| Name | Type | Required | Description |
-| ---------- | ----- | -------- | -------------------------------------------------------------------------- |
-| `enforcer` | `Hex` | Yes | The contract address of the enforcer. |
-| `terms` | `Hex` | Yes | The terms of the caveat encoded as hex data. |
-| `args` | `Hex` | Yes | Additional arguments required by the caveat enforcer, encoded as hex data. |
-
-### `CaveatBuilderConfig`
-
-Optional configuration for [`createCaveatBuilder`](delegation/index.md#createcaveatbuilder).
-
-| Name | Type | Required | Description |
-| ------------------------------------- | --------- | -------- | ---------------------------------------------------------------------------------- |
-| `allowInsecureUnrestrictedDelegation` | `boolean` | No | Whether to allow unrestricted delegations with no caveats. The default is `false`. |
-
-### `Delegation`
-
-Represents a delegation that grants permissions from a delegator to a delegate.
-
-| Name | Type | Required | Description |
-| ----------- | ----------------------- | -------- | -------------------------------------------------------------------------------------------------------------------- |
-| `delegate` | `Hex` | Yes | The address to which the delegation is being granted. |
-| `delegator` | `Hex` | Yes | The address that is granting the delegation. |
-| `authority` | `Hex` | Yes | The parent delegation hash, or `ROOT_AUTHORITY` for creating root delegations. |
-| `caveats` | [`Caveat`](#caveat)`[]` | Yes | An array of [caveats](delegation/caveats.md) that constrain the delegation. |
-| `salt` | `Hex` | Yes | The salt for generating the delegation hash. This helps prevent hash collisions when creating identical delegations. |
-| `signature` | `Hex` | Yes | The signature to validate the delegation. |
-
-### `ExactCalldataBuilderConfig`
-
-Defines the exact calldata the delegate is allowed to call.
-
-| Name | Type | Required | Description |
-| ---------- | ----- | -------- | --------------------------------------------------- |
-| `calldata` | `Hex` | Yes | The exact calldata the delegate is allowed to call. |
-
-### `ExecutionStruct`
-
-Represents a single execution to perform on behalf of a delegator.
-
-| Name | Type | Required | Description |
-| ---------- | --------- | -------- | ------------------------------------------------------------------ |
-| `target` | `Address` | Yes | Address of the contract or recipient that the call is directed to. |
-| `value` | `bigint` | Yes | Value of native tokens to send along with the call in wei format. |
-| `callData` | `Hex` | Yes | Encoded function data to be executed on the target address. |
-
-### `GetGrantedExecutionPermissionsResult`
-
-The return type of [`getGrantedExecutionPermissions`](advanced-permissions/wallet-client.md#getgrantedexecutionpermissions). An array of [`PermissionResponse`](#permissionresponse) objects.
-
-### `GetSupportedExecutionPermissionsResult`
-
-The return type of [`getSupportedExecutionPermissions`](advanced-permissions/wallet-client.md#getsupportedexecutionpermissions). A `Record` keyed by permission type.
-
-### `PartialSignature`
-
-Represents a single signer's contribution to a multisig aggregated signature.
-
-| Name | Type | Required | Description |
-| ----------- | --------------- | -------- | ------------------------------------------------------------------------------------- |
-| `signer` | `Address` | Yes | The address of the signer. |
-| `signature` | `Hex` | Yes | The signer's signature over the user operation. |
-| `type` | `SignatureType` | Yes | The signature type to represent signature algorithm. Only supported value is `ECDSA`. |
-
-### `PermissionResponse`
-
-Represents a granted Advanced Permission.
-
-| Name | Type | Required | Description |
-| ------------------- | ------------------------------------------ | -------- | ------------------------------------------------------------------------------------ |
-| `chainId` | `number` | Yes | The chain ID for which the permission was granted. |
-| `from` | `Address` | Yes | The account address that granted the permission. |
-| `to` | `Hex` | Yes | The account address that received the permission. |
-| `permission` | `PermissionTypes` | Yes | The granted [permission](advanced-permissions/permissions.md) details. |
-| `rules` | `Record[]` | No | The rules applied to the permission. For example, permission expiry. |
-| `context` | `Hex` | Yes | The permission context (encoded delegation list) used when redeeming the permission. |
-| `dependencies` | `{ factory: Address, factoryData: Hex }[]` | Yes | Factory dependencies for account deployment. |
-| `delegationManager` | `Address` | Yes | The address of the Delegation Manager contract for the permission. |
-
-### `RequestExecutionPermissionsReturnType`
-
-The return type of [`requestExecutionPermissions`](advanced-permissions/wallet-client.md#requestexecutionpermissions). An array of [`PermissionResponse`](#permissionresponse) objects.
-
-### `SmartAccountsEnvironment`
-
-An object containing the contract addresses required to interact with the Delegation Framework on a specific chain.
-
-| Name | Type | Required | Description |
-| ------------------- | --------------------- | -------- | --------------------------------------------------------------------------------- |
-| `DelegationManager` | `Hex` | Yes | The address of the Delegation Manager contract. |
-| `EntryPoint` | `Hex` | Yes | The address of the ERC-4337 EntryPoint contract. |
-| `SimpleFactory` | `Hex` | Yes | The address of the factory contract for deploying MetaMask smart accounts. |
-| `implementations` | `Record` | Yes | A map of MetaMask smart account implementation types to their deployed addresses. |
-| `caveatEnforcers` | `Record` | Yes | A map of caveat enforcer types to their deployed addresses. |
-
-### `SupportedPermissionInfo`
-
-Describes a supported Advanced Permission type. Used in [`GetSupportedExecutionPermissionsResult`](#getsupportedexecutionpermissionsresult).
-
-| Name | Type | Required | Description |
-| ----------- | ---------- | -------- | --------------------------------------------------------------------------- |
-| `chainIds` | `number[]` | Yes | The chain IDs on which the permission type is supported. |
-| `ruleTypes` | `string[]` | Yes | The rule types supported for the permission type (for example, `"expiry"`). |
-
-### `ValueLteBuilderConfig`
-
-| Name | Type | Required | Description |
-| ---------- | -------- | -------- | ------------------------------------------------------------------- |
-| `maxValue` | `bigint` | Yes | The maximum native token amount the delegate can transfer per call. |
diff --git a/gator_versioned_docs/version-1.0.0/troubleshooting/allowance-exceeded.md b/gator_versioned_docs/version-1.0.0/troubleshooting/allowance-exceeded.md
deleted file mode 100644
index 32728be1d5b..00000000000
--- a/gator_versioned_docs/version-1.0.0/troubleshooting/allowance-exceeded.md
+++ /dev/null
@@ -1,59 +0,0 @@
----
-description: How to resolve allowance exceeded errors when redeeming delegations.
-sidebar_label: Allowance exceeded
-toc_max_heading_level: 2
-keywords:
- [allowance, allowance exceeded, erc20 transfer amount exceeded, spending limit, troubleshooting]
----
-
-# Allowance exceeded
-
-Spending limit [caveat enforcers](../concepts/delegation/caveat-enforcers.md) revert with an
-`allowance-exceeded` error in the following cases.
-
-## Spending limit exceeded
-
-The delegation's spending limit has been fully or partially used up by previous redemptions.
-Enforcers track cumulative spending on-chain using the delegation hash as a key, and revert when
-the next transfer exceeds the allowed limit.
-
-### Solution
-
-Use the [`CaveatEnforcerClient`](../reference/delegation/caveat-enforcer-client.md) to check the
-available amount before redeeming the delegation.
-
-If the available amount is insufficient, you must wait for the next period (for periodic
-enforcers) or for more tokens to accrue (for streaming enforcers). For fixed-limit enforcers,
-create a new delegation with a higher limit.
-
-## Delegation hash collision
-
-If you create a new delegation with the same parameters as a previous delegation, both produce
-the same delegation hash.
-
-Enforcers track spent amounts using the delegation hash as a key. When two delegations share the
-same hash, they also share the same spent balance. This means the new delegation can immediately
-revert with `allowance-exceeded`, even if you haven't redeemed it before.
-
-### Solution
-
-Use a unique `salt` when creating the delegation. This produces a different delegation hash,
-giving the new delegation a fresh spending allowance.
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { parseUnits } from 'viem'
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.Erc20TransferAmount,
- tokenAddress: '0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92',
- // USDC has 6 decimal places.
- maxAmount: parseUnits('10', 6),
- },
- salt: '0x00131412',
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-```
diff --git a/gator_versioned_docs/version-1.0.0/troubleshooting/invalid-delegate.md b/gator_versioned_docs/version-1.0.0/troubleshooting/invalid-delegate.md
deleted file mode 100644
index 149db3fb86c..00000000000
--- a/gator_versioned_docs/version-1.0.0/troubleshooting/invalid-delegate.md
+++ /dev/null
@@ -1,61 +0,0 @@
----
-description: How to resolve the InvalidDelegate error when redeeming delegations.
-sidebar_label: Invalid delegate
-toc_max_heading_level: 2
-keywords: [InvalidDelegate, error code, delegation, troubleshooting]
----
-
-# Invalid delegate
-
-The Delegation Manager reverts with `InvalidDelegate()` in the following two cases.
-
-## Account is not the delegate
-
-The account redeeming the delegation is not the delegate specified in the delegation.
-The Delegation Manager checks that `msg.sender` matches the `delegate` field of
-the delegation, unless it's an [open delegation](../reference/delegation/index.md#createopendelegation).
-
-### Solution
-
-Verify that the account redeeming the delegation matches the address in the
-delegation’s `to` field. If the delegate is a smart account, send the user operation
-from that smart account.
-
-## Broken redelegation chain
-
-When Delegation Manager validates a [redelegation chain](../guides/delegation/create-redelegation.md), each child delegation's `delegator`
-must match the parent delegation's `delegate`. If any link in the chain fails this check, the
-authority is invalid.
-
-### Solution
-
-Verify that the redelegation chain is consistent. For each pair of adjacent
-delegations, the child's `delegator` must be the parent's `delegate`.
-
-This error can also occur if the delegations are not passed in the correct order. The
-delegation array order should be from leaf to root.
-
-For example, if the delegation chain is Alice to Bob to Carol, the order should be following:
-
-```ts
-const rootDelegation = createDelegation({
- from: '0xAlice',
- to: '0xBob',
- //..
-})
-
-const leafDelegation = createDelegation({
- from: 'OxBob',
- to: '0xCarol',
- parentDelegation: rootDelegation,
- // ...
-})
-
-const data = DelegationManager.encode.redeemDelegations({
- // Make sure the order is from leaf to root.
- // Passing them in the wrong order causes the authority validation to fail.
- delegations: [[leafDelegation, rootDelegation]],
- modes: [ExecutionMode.SingleDefault],
- executions: [[execution]],
-})
-```
diff --git a/gator_versioned_docs/version-1.0.0/troubleshooting/user-operation-reverted.md b/gator_versioned_docs/version-1.0.0/troubleshooting/user-operation-reverted.md
deleted file mode 100644
index 133bdb0c2cd..00000000000
--- a/gator_versioned_docs/version-1.0.0/troubleshooting/user-operation-reverted.md
+++ /dev/null
@@ -1,112 +0,0 @@
----
-description: How to resolve user operation reverted errors with 0x revert data.
-sidebar_label: User operation reverted
-toc_max_heading_level: 2
-keywords: [user operation, reverted, reason 0x, empty revert, execution, troubleshooting]
----
-
-# User operation reverted
-
-A user operation reverts with reason `0x` when validation succeeds, but execution fails without a
-revert reason. This differs from AA-coded `EntryPoint` contract errors such as `AA23`, `AA25`,
-or `AA21`.
-
-When the `EntryPoint` contract calls the smart account's execution function, it performs a low-level
-`call` internally. If that inner call reverts with empty data, the bundler reports
-reason `0x` with no additional details.
-
-The following sections describe common causes and how to troubleshoot them.
-
-## Function doesn't exist
-
-The `callData` encodes a call from the smart account to a target contract, but the function
-selector doesn't match any function on that contract, and no fallback function exists. The EVM
-reverts with empty data.
-
-This commonly happens when:
-
-- The function selector has a typo or doesn't match the target's ABI.
-- The target address is wrong or points to a different contract.
-- The target contract isn't deployed on the current chain.
-
-### Solution
-
-Decode `callData` and verify the inner call. Confirm that the target address has deployed code
-and that the function selector matches the target's ABI.
-
-```typescript
-const code = await publicClient.getCode({
- address: targetAddress,
-})
-
-if (!code) {
- console.log('No contract deployed at this address')
-}
-```
-
-## Bare revert without a message
-
-The target contract uses `require(false)` or `revert` without a reason string. The revert
-returns empty data. Contracts commonly use bare reverts in access control checks, reentrancy locks,
-or guard functions.
-
-### Solution
-
-Look at the target contract's source code to identify which `require` or `revert` your call
-parameters could trigger.
-
-Use [Tenderly](https://tenderly.co) to simulate the transaction and pinpoint the exact line. See the
-[Tenderly debugger documentation](https://docs.tenderly.co/debugger) for details.
-
-## Out of gas in the inner call
-
-Smart accounts use a low-level `call` internally in their `execute` function. When the inner
-call runs out of gas, the call returns `false` with empty return data.
-
-This differs from the `AA95` error code, which applies when `handleOps` itself runs out of gas.
-In this case, `callGasLimit` might be enough for the smart account's execution overhead but not
-enough for the actual target contract call.
-
-### Solution
-
-Increase `callGasLimit`. If you estimate gas manually, try doubling the value. Target
-contracts doing complex operations often need more gas than default estimates provide.
-
-## Insufficient balance or allowance
-
-The inner call performs an ERC-20 `transferFrom` but the smart account hasn't approved the
-spender, or doesn't hold enough tokens. Some ERC-20 implementations use bare `require` statements
-that revert without a reason string.
-
-### Solution
-
-Check that the smart account has sufficient token balance and approvals for the operation.
-
-```typescript
-import { erc20Abi } from 'viem'
-
-const balance = await publicClient.readContract({
- address: tokenAddress,
- abi: erc20Abi,
- functionName: 'balanceOf',
- args: [smartAccount.address],
-})
-
-const allowance = await publicClient.readContract({
- address: tokenAddress,
- abi: erc20Abi,
- functionName: 'allowance',
- args: [smartAccount.address, spenderAddress],
-})
-```
-
-## Manual debugging
-
-If the cause isn't immediately clear, follow these steps:
-
-1. Decode the inner call: Extract the `(to, value, data)` tuple from your `callData` to
- confirm what the smart account executes.
-2. Use Tenderly: Simulate the user operation in [Tenderly](https://tenderly.co) to get a full
- execution trace. The trace view shows the exact line where the inner call reverts.
-3. Check the basics: Verify the target has deployed code, the smart account has enough
- ETH and tokens, and the function selector is correct.
diff --git a/gator_versioned_docs/version-1.1.0/assets/erc7715-request.png b/gator_versioned_docs/version-1.1.0/assets/erc7715-request.png
deleted file mode 100644
index 01eef3bda26..00000000000
Binary files a/gator_versioned_docs/version-1.1.0/assets/erc7715-request.png and /dev/null differ
diff --git a/gator_versioned_docs/version-1.1.0/assets/scaffold-eth-7715.png b/gator_versioned_docs/version-1.1.0/assets/scaffold-eth-7715.png
deleted file mode 100644
index 41848a9b7ed..00000000000
Binary files a/gator_versioned_docs/version-1.1.0/assets/scaffold-eth-7715.png and /dev/null differ
diff --git a/gator_versioned_docs/version-1.1.0/assets/scaffold-eth-smart-accounts.png b/gator_versioned_docs/version-1.1.0/assets/scaffold-eth-smart-accounts.png
deleted file mode 100644
index b83ec787390..00000000000
Binary files a/gator_versioned_docs/version-1.1.0/assets/scaffold-eth-smart-accounts.png and /dev/null differ
diff --git a/gator_versioned_docs/version-1.1.0/changelog/1.0.0.md b/gator_versioned_docs/version-1.1.0/changelog/1.0.0.md
deleted file mode 100644
index 9410743c68f..00000000000
--- a/gator_versioned_docs/version-1.1.0/changelog/1.0.0.md
+++ /dev/null
@@ -1,195 +0,0 @@
----
-sidebar_label: 1.0.0
-description: MetaMask Smart Accounts Kit v1.0.0 changelog
----
-
-# What's new in v1.0.0?
-
-:::info First stable release
-
-This is the first stable release of MetaMask Smart Accounts Kit. From v1.0.0 onward, breaking changes will be released only in major version bumps, as per the [semantic versioning specification](https://semver.org/#spec-item-4).
-
-:::
-
-## Breaking changes
-
-### ⚠️ `sendTransactionWithDelegation`
-
-- The `permissionsContext` parameter has been renamed to `permissionContext` (singular).
-- `permissionContext` now accepts `PermissionContext` which represents encoded delegation chain (`Hex`) or a decoded delegation chain (`Delegation[]`) for redeeming delegations.
-
-```ts
-await walletClient.sendTransactionWithDelegation({
-// remove-next-line
-- permissionsContext: "0x...",
-// add-next-line
-+ permissionContext: "0x...",
- delegationManager: "0x..,
- // ...
-});
-```
-
-### ⚠️ `sendUserOperationWithDelegation`
-
-- The `permissionsContext` parameter has been renamed to `permissionContext` (singular).
-- `permissionContext` now accepts `PermissionContext` which represents encoded delegation chain (`Hex`) or a decoded delegation chain (`Delegation[]`) for redeeming delegations.
-- The `accountMetadata` parameter has been replaced with `dependencies`.
-
-```ts
-await bundlerClient.sendUserOperationWithDelegation({
- // remove-next-line
-- accountMetadata: {
- // add-next-line
-+ dependencies: {
- factory: "0x..",
- factoryData: "0x..."
- },
- // ...
- calls: [
- {
- to: sessionAccount.address,
- data: "0x",
- value: 1n,
- // remove-next-line
-- permissionsContext: "0x..",
- // add-next-line
-+ permissionContext: "0x..",
- delegationManager: "0x..",
- },
- ],
- // ...
-});
-```
-
-### ⚠️ `getDelegationHashOffchain`
-
-The function has been renamed to `hashDelegation` for improved clarity.
-
-```typescript
-// remove-next-line
-- import { getDelegationHashOffchain } from "@metamask/smart-accounts-kit";
-// add-next-line
-+ import { hashDelegation } from "@metamask/smart-accounts-kit/utils";
-
-// remove-next-line
-- const delegationHash = getDelegationHashOffchain(delegation);
-// add-next-line
-+ const delegationHash = hashDelegation(delegation);
-```
-
-### ⚠️ `requestExecutionPermissions`
-
-- The action now accepts `isAdjustmentAllowed` inside each permission object as per new ERC-7715 specification.
-- The action now accepts `to` instead of `signer` for the session account.
-- The action now returns developer friendly types, `chainId` as `number` and token amounts as `bigint`.
-- `expiry` is now an optional parameter.
-
-```ts
-await walletClient.requestExecutionPermissions([{
- chainId: chain.id,
- expiry,
- // The requested permissions will be granted to the
- // session account.
- // add-next-line
-+ to: sessionAccount.address,
- // remove-start
-- signer: {
-- type: "account",
-- data: {
-- address: sessionAccount.address,
-- },
-- },
- // remove-end
- // remove-next-line
-- isAdjustmentAllowed: true,
- permission: {
- type: "erc20-token-periodic",
- data: {
- // ...
- },
- // add-next-line
-+ isAdjustmentAllowed: true,
- },
-}]);
-```
-
-### ⚠️ `encodePermissionContexts`
-
-The utility function has been removed. See [`encodeDelegations`](../reference/delegation/index.md#encodedelegations) to encode the delegations.
-
-### ⚠️ `decodePermissionContexts`
-
-The utility function has been removed. See [`decodeDelegations`](../reference/delegation/index.md#decodedelegations) to decode the delegations.
-
-### ⚠️ `redeemDelegations`
-
-The `redeemDelegations` function and `Redemption` type have been removed. Use the [`DelegationManager.encode.redeemDelegations`](../reference/delegation/index.md#redeemdelegations) encoding utility.
-
-## Enhancements
-
-- New ERC-7715 Wallet Client actions have been added to [get the supported permission](../guides/advanced-permissions/get-supported-permissions.md), and [get granted permissions](../guides/advanced-permissions/get-granted-permissions.md) from a wallet.
-- The `signer` parameter in `toMetaMaskSmartAccount` is now optional. If omitted, non-signing operations still work, but signing operations such as `signUserOperation`, `signDelegation`, `signMessage`, and `signTypedData` throw an error.
-- Added [`encodeDelegation`](../reference/delegation/index.md#encodedelegation) and [`decodeDelegation`](../reference/delegation/index.md#decodedelegation) utilities for encoding and decoding single delegation.
-- Allow scope type to be specified either as [ScopeType enum](../reference/types.md#scopetype) or string literal.
-- Allow caveat type to be specified either as [CaveatType enum](../reference/types.md#caveattype) or string literal.
-- Added support for Tempo Mainnet and Tempo Moderato Testnet.
-- The `webauthn-p256` dependency has been replaced with the `ox` p256 module. This doesn't impact developer facing APIs.
-- Improved `@metamask/delegation-abis` tree-shakability.
-
-## Fixes
-
-- Fixed `signDelegation` to correctly await the signer and return the signed signature.
-- The `delegation.salt` and `caveat.args` now default to `0x00` instead of `0x`. This prevents
- `Cannot convert 0x to a BigInt` errors when encoding delegations directly with Viem.
-
-## Contract addresses
-
-The following are the contract addresses for the
-[Delegation Framework version 1.3.0](https://github.com/MetaMask/delegation-framework/blob/v1.3.0/documents/Deployments.md),
-as used by this version of the toolkit.
-
-### Delegation Framework
-
-| Contract | Address |
-| --------------------- | -------------------------------------------- |
-| EntryPoint | `0x0000000071727De22E5E9d8BAf0edAc6f37da032` |
-| SimpleFactory | `0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c` |
-| DelegationManager | `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3` |
-| MultiSigDeleGatorImpl | `0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7` |
-| HybridDeleGatorImpl | `0x48dBe696A4D990079e039489bA2053B36E8FFEC4` |
-
-### Caveat enforcers
-
-| Enforcer | Address |
-| ---------------------------------------- | -------------------------------------------- |
-| AllowedCalldataEnforcer | `0xc2b0d624c1c4319760C96503BA27C347F3260f55` |
-| AllowedMethodsEnforcer | `0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5` |
-| AllowedTargetsEnforcer | `0x7F20f61b1f09b08D970938F6fa563634d65c4EeB` |
-| ArgsEqualityCheckEnforcer | `0x44B8C6ae3C304213c3e298495e12497Ed3E56E41` |
-| BlockNumberEnforcer | `0x5d9818dF0AE3f66e9c3D0c5029DAF99d1823ca6c` |
-| DeployedEnforcer | `0x24ff2AA430D53a8CD6788018E902E098083dcCd2` |
-| ERC20BalanceChangeEnforcer | `0xcdF6aB796408598Cea671d79506d7D48E97a5437` |
-| ERC20TransferAmountEnforcer | `0xf100b0819427117EcF76Ed94B358B1A5b5C6D2Fc` |
-| ERC20PeriodTransferEnforcer | `0x474e3Ae7E169e940607cC624Da8A15Eb120139aB` |
-| ERC20StreamingEnforcer | `0x56c97aE02f233B29fa03502Ecc0457266d9be00e` |
-| ERC721BalanceChangeEnforcer | `0x8aFdf96eDBbe7e1eD3f5Cd89C7E084841e12A09e` |
-| ERC721TransferEnforcer | `0x3790e6B7233f779b09DA74C72b6e94813925b9aF` |
-| ERC1155BalanceChangeEnforcer | `0x63c322732695cAFbbD488Fc6937A0A7B66fC001A` |
-| ExactCalldataBatchEnforcer | `0x982FD5C86BBF425d7d1451f974192d4525113DfD` |
-| ExactCalldataEnforcer | `0x99F2e9bF15ce5eC84685604836F71aB835DBBdED` |
-| ExactExecutionBatchEnforcer | `0x1e141e455d08721Dd5BCDA1BaA6Ea5633Afd5017` |
-| ExactExecutionEnforcer | `0x146713078D39eCC1F5338309c28405ccf85Abfbb` |
-| IdEnforcer | `0xC8B5D93463c893401094cc70e66A206fb5987997` |
-| LimitedCallsEnforcer | `0x04658B29F6b82ed55274221a06Fc97D318E25416` |
-| MultiTokenPeriodEnforcer | `0xFB2f1a9BD76d3701B730E5d69C3219D42D80eBb7` |
-| NonceEnforcer | `0xDE4f2FAC4B3D87A1d9953Ca5FC09FCa7F366254f` |
-| NativeBalanceChangeEnforcer | `0xbD7B277507723490Cd50b12EaaFe87C616be6880` |
-| NativeTokenPaymentEnforcer | `0x4803a326ddED6dDBc60e659e5ed12d85c7582811` |
-| NativeTokenTransferAmountEnforcer | `0xF71af580b9c3078fbc2BBF16FbB8EEd82b330320` |
-| NativeTokenStreamingEnforcer | `0xD10b97905a320b13a0608f7E9cC506b56747df19` |
-| NativeTokenPeriodTransferEnforcer | `0x9BC0FAf4Aca5AE429F4c06aEEaC517520CB16BD9` |
-| OwnershipTransferEnforcer | `0x7EEf9734E7092032B5C56310Eb9BbD1f4A524681` |
-| RedeemerEnforcer | `0xE144b0b2618071B4E56f746313528a669c7E65c5` |
-| SpecificActionERC20TransferBatchEnforcer | `0x00e0251aaA263dfE3B3541B758A82D1CBA1c3B6D` |
-| TimestampEnforcer | `0x1046bb45C8d673d4ea75321280DB34899413c069` |
-| ValueLteEnforcer | `0x92Bf12322527cAA612fd31a0e810472BBB106A8F` |
diff --git a/gator_versioned_docs/version-1.1.0/concepts/advanced-permissions.md b/gator_versioned_docs/version-1.1.0/concepts/advanced-permissions.md
deleted file mode 100644
index 12ae2d3305a..00000000000
--- a/gator_versioned_docs/version-1.1.0/concepts/advanced-permissions.md
+++ /dev/null
@@ -1,64 +0,0 @@
----
-description: Learn about MetaMask Advanced Permissions (ERC-7715).
-keywords: [ERC-7715, 7715, permissions, wallet, smart account]
----
-
-# Advanced Permissions (ERC-7715)
-
-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.
-For example, a user can grant your dapp permission to spend 10 USDC per day to buy ETH over the course of a month.
-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.
-
-Advanced Permissions eliminate the need for users to approve every transaction, which is useful for highly interactive dapps.
-It also enables dapps to execute transactions for users without an active wallet connection.
-
-:::note
-This feature requires [MetaMask Flask 13.5.0](/snaps/get-started/install-flask) or later.
-:::
-
-## ERC-7715 technical overview
-
-[ERC-7715](https://eips.ethereum.org/EIPS/eip-7715) defines a JSON-RPC method `wallet_grantPermissions`.
-Dapps can use this method to request a wallet to grant the dapp permission to execute transactions on a user's behalf.
-`wallet_grantPermissions` requires a `signer` parameter, which identifies the entity requesting or managing the permission.
-Common signer implementations include wallet signers, single key and multisig signers, and account signers.
-
-The 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.
-When you use an account signer, a session account is created solely to request and redeem Advanced Permissions, and doesn't contain tokens.
-The session account can be granted with permissions and redeem them as specified in [ERC-7710](https://eips.ethereum.org/EIPS/eip-7710).
-The session account can be a smart account or an externally owned account (EOA).
-
-The MetaMask user that the session account requests permissions from must be upgraded to a [MetaMask smart account](smart-accounts.md).
-
-## Advanced Permissions vs. delegations
-
-Advanced Permissions expand on regular [delegations](delegation/overview.md) by enabling permission sharing _via the MetaMask browser extension_.
-
-With regular delegations, the dapp constructs a delegation and requests the user to sign it.
-These delegations are not human-readable, so it is the dapp's responsibility to provide context for the user.
-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.
-
-In contrast, Advanced Permissions enable dapps (and AI agents) to request permissions from a user directly via the MetaMask extension.
-Advanced Permissions require a permission configuration which displays a human-readable confirmation for the MetaMask user.
-The user can modify the permission parameters if the request is configured to allow adjustments.
-
-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):
-
-
-
-
-
-## Advanced Permissions lifecycle
-
-The Advanced Permissions lifecycle is as follows:
-
-1. **Set up a session account** - Set up a session account to execute transactions on behalf of the MetaMask user.
- It can be a [smart account](smart-accounts.md) or an externally owned account (EOA).
-
-2. **Request permissions** - Request permissions from the user.
- The Smart Accounts Kit supports [ERC-20 token permissions](../guides/advanced-permissions/use-permissions/erc20-token.md) and
- [native token permissions](../guides/advanced-permissions/use-permissions/native-token.md).
-
-3. **Redeem permissions** - Once the permission is granted, the session account can redeem the permission, executing on the user's behalf.
-
-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.
diff --git a/gator_versioned_docs/version-1.1.0/concepts/delegation/caveat-enforcers.md b/gator_versioned_docs/version-1.1.0/concepts/delegation/caveat-enforcers.md
deleted file mode 100644
index a393d3d401c..00000000000
--- a/gator_versioned_docs/version-1.1.0/concepts/delegation/caveat-enforcers.md
+++ /dev/null
@@ -1,61 +0,0 @@
----
-description: Learn about caveat enforcers and how they restrict delegations.
-keywords: [caveats, caveat enforcers, delegation]
----
-
-# Caveat enforcers
-
-The Smart Accounts Kit provides caveat enforcers, which are smart contracts that implement rules and restrictions
-on delegations. They serve as the underlying mechanism that enables conditional execution within the [Delegation Framework](./overview.md#delegation-framework).
-See the [delegation flow](overview.md#delegation-flow) for how caveat enforcer hooks are called during delegation redemption.
-
-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.
-
-:::warning Important
-
-- Without caveat enforcers, a delegation has infinite and unbounded authority to make any execution the original account can make.
- We strongly recommend using caveat enforcers.
-- Caveat enforcers safeguard the execution process but do not guarantee a final state post-redemption.
- Always consider the full impact of combined caveat enforcers.
- :::
-
-## Hooks
-
-The interface consists of four key hook functions that are called at different stages of the delegation redemption process.
-Each of these hooks receives comprehensive information about the execution context, including:
-
-- The caveat terms specified by the delegator.
-- Optional arguments provided by the redeemer.
-- The execution mode and calldata.
-- The delegation hash.
-- The delegator and redeemer addresses.
-
-| Hook | Description |
-| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `beforeAllHook` | Called before any actions in a batch redemption process begin. Verifies conditions that must be true for the entire batch execution. |
-| `beforeHook` | Called before the execution tied to a specific delegation. Allows for pre-execution validation of conditions specific to that delegation. |
-| `afterHook` | Called after the execution tied to a specific delegation completes. Verifies post-execution state changes or effects specific to that delegation. |
-| `afterAllHook` | Called after all actions in a batch redemption process have completed. Verifies final conditions after the entire batch has executed. |
-
-The most important safety feature of these hooks is their ability to block executions:
-
-- If any hook determines its conditions aren't met, it will **revert** (throw an exception).
-- When a reversion occurs, the entire delegation redemption process is canceled.
-- This prevents partial or invalid executions from occurring.
-- No state changes from the attempted execution will be committed to the blockchain.
-
-This "all-or-nothing" approach ensures that delegations only execute exactly as intended by their caveats.
-
-## Available caveat enforcers
-
-The Smart Accounts Kit provides [out-of-the-box caveat enforcers](../../reference/delegation/caveats.md)
-for common restriction patterns, including:
-
-- Limiting target addresses and methods.
-- Setting time or block number constraints.
-- Restricting token transfers and approvals.
-- Limiting execution frequency.
-
-For other restriction patterns, you can also [create custom caveat enforcers](/tutorials/create-custom-caveat-enforcer) by implementing the `ICaveatEnforcer` interface.
diff --git a/gator_versioned_docs/version-1.1.0/concepts/delegation/delegation-manager.md b/gator_versioned_docs/version-1.1.0/concepts/delegation/delegation-manager.md
deleted file mode 100644
index 6c9ce37dfd5..00000000000
--- a/gator_versioned_docs/version-1.1.0/concepts/delegation/delegation-manager.md
+++ /dev/null
@@ -1,43 +0,0 @@
----
-description: Learn about the Delegation Manager and execution modes.
-keywords: [delegation manager, delegation, execution modes, delegation framework]
----
-
-# Delegation Manager
-
-The Delegation Manager is a core component of the [Delegation Framework](./overview.md#delegation-framework).
-It validates delegations and triggers executions on behalf of the delegator, ensuring tasks are executed accurately,
-and securely.
-
-See the [delegation flow](./overview.md#delegation-flow) for a full overview of how delegations are created, validated, and redeemed.
-
-## Execution modes
-
-The Delegation Manager processes delegations based on a specified execution mode. 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. The Smart Accounts Kit supports the following
-execution modes, based on [ERC-7579](https://erc7579.com/):
-
-| Execution mode | Number of delegation chains passed to `redeemDelegations` | Processing method | Does user operation continue execution if redemption reverts? |
-| --------------- | --------------------------------------------------------- | ----------------- | ------------------------------------------------------------- |
-| `SingleDefault` | One | Sequential | No |
-| `SingleTry` | One | Sequential | Yes |
-| `BatchDefault` | Multiple | Interleaved | No |
-| `BatchTry` | Multiple | Interleaved | Yes |
-
-### Sequential processing
-
-In `Single` modes, the Delegation Manager processes delegations sequentially:
-
-1. For each delegation in the chain, all caveats' `before` hooks are called.
-2. The single redeemed action is executed.
-3. For each delegation in the chain, all caveats' `after` hooks are called.
-
-### Interleaved processing
-
-In `Batch` modes, the Delegation Manager processes delegations in an interleaved manner:
-
-1. For each chain in the batch, and each delegation in the chain, all caveats' `before` hooks are called.
-2. Each redeemed action is executed.
-3. For each chain in the batch, and each delegation in the chain, all caveats' `after` hooks are called.
-
-`Batch` mode allows for powerful use cases, but the Delegation Framework currently does not include any `Batch` compatible caveat enforcers.
diff --git a/gator_versioned_docs/version-1.1.0/concepts/delegation/delegation-scopes.md b/gator_versioned_docs/version-1.1.0/concepts/delegation/delegation-scopes.md
deleted file mode 100644
index bac1891a896..00000000000
--- a/gator_versioned_docs/version-1.1.0/concepts/delegation/delegation-scopes.md
+++ /dev/null
@@ -1,32 +0,0 @@
----
-description: Learn about delegation scopes and how they define the initial authority of a delegation.
-keywords:
- [delegation scopes, delegation, authority, spending limit, function call, ownership transfer]
----
-
-# Delegation scopes
-
-When creating a delegation, you must configure a scope to define the delegation's initial authority and help prevent delegation misuse.
-
-Scopes are not part of the [Delegation Framework](overview.md#delegation-framework) itself, but an abstraction introduced in the Smart Accounts Kit that builds on top of [caveat enforcers](caveat-enforcers.md) to provide pre-configured restriction patterns for common use cases.
-
-## Scopes vs. caveats
-
-Scopes and caveats work together to define and restrict a delegation's authority:
-
-- **Scopes** define the _initial authority_ of a delegation. They determine the broad category of actions the delegate is permitted to perform, such as transferring tokens or calling specific contract functions.
-- **Caveats** further _constrain_ the authority granted by the scope. They add additional restrictions on top of the scope, such as time limits or execution frequency.
-
-For example, a spending limit scope might allow a delegate to transfer up to 100 USDC, while an additional caveat could restrict the transfers to only occur within a specific time window.
-
-See [how to constrain a delegation's scope by adding caveats](../../guides/delegation/use-delegation-scopes/constrain-scope.md).
-
-## Categories
-
-The Smart Accounts Kit supports three categories of scopes:
-
-| Scope type | Description |
-| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
-| [Spending limit scopes](../../guides/delegation/use-delegation-scopes/spending-limit.md) | Restricts the spending of native, ERC-20, and ERC-721 tokens based on defined conditions. |
-| [Function call scope](../../guides/delegation/use-delegation-scopes/function-call.md) | Restricts the delegation to specific contract methods, contract addresses, or calldata. |
-| [Ownership transfer scope](../../guides/delegation/use-delegation-scopes/ownership-transfer.md) | Restricts the delegation to only allow ownership transfers, specifically the `transferOwnership` function for a specified contract. |
diff --git a/gator_versioned_docs/version-1.1.0/concepts/delegation/overview.md b/gator_versioned_docs/version-1.1.0/concepts/delegation/overview.md
deleted file mode 100644
index 6426766d795..00000000000
--- a/gator_versioned_docs/version-1.1.0/concepts/delegation/overview.md
+++ /dev/null
@@ -1,162 +0,0 @@
----
-description: Learn about delegation, the delegation lifecycle, and the Delegation Framework.
-sidebar_label: Overview
-toc_max_heading_level: 3
-keywords: [smart accounts kit, delegation, delegator, delegate, delegation framework]
----
-
-# Delegation
-
-Delegation is the ability for a [MetaMask smart account](../smart-accounts.md) to grant permission to another smart contract
-or externally owned account (EOA) to perform specific executions on its behalf.
-The account that grants the permission is called the delegator account, while the account that receives the permission
-is called the delegate account.
-
-The Smart Accounts Kit follows the [ERC-7710](https://eips.ethereum.org/EIPS/eip-7710) standard for smart contract delegation.
-In addition, users can use [delegation scopes](delegation-scopes.md) and [caveat enforcers](caveat-enforcers.md) to apply rules and restrictions to delegations.
-For example, Alice delegates the ability to spend her USDC to Bob, limiting the amount to 100 USDC.
-
-## Delegation types
-
-You can create the following delegation types:
-
-### Root delegation
-
-A root delegation is when a delegator delegates their own authority away, as opposed to _redelegating_ permissions
-they received from a previous delegation. In a chain of delegations, the first delegation is the root delegation.
-For example, Alice delegates the ability to spend her USDC to Bob, limiting the amount to 100 USDC.
-
-Use [`createDelegation`](../../reference/delegation/index.md#createdelegation) to create a root delegation.
-
-### Open root delegation
-
-An open root delegation is a root delegation that doesn't specify a delegate. This means that any account can
-redeem the delegation. For example, Alice delegates the ability to spend 100 of her USDC to anyone.
-
-You must create open root delegations carefully, to ensure that they are not misused.
-Use [`createOpenDelegation`](../../reference/delegation/index.md#createopendelegation) to create an open root delegation.
-
-### Redelegation
-
-A delegate can redelegate permissions that have been granted to them, creating a chain of delegations across trusted parties.
-For example, Alice delegates the ability to spend 100 of her USDC to Bob. Bob redelegates the ability to spend
-50 of Alice's 100 USDC to Carol.
-
-See [how to create a redelegation](../../guides/delegation/create-redelegation.md) guide to learn more.
-
-### Open redelegation
-
-An open redelegation is a redelegation that doesn't specify a delegate. This means that any account can redeem
-the redelegation. For example, Alice delegates the ability to spend 100 of her USDC to Bob. Bob redelegates
-the ability to spend 50 of Alice's 100 USDC to anyone.
-
-As with open root delegations, you must create open redelegations carefully, to ensure that they are not misused.
-Use [`createOpenDelegation`](../../reference/delegation/index.md#createopendelegation) to create an open redelegation.
-
-## Attenuating authority
-
-When creating chains of delegations via redelegations, it's important to understand how authority flows and can be restricted.
-
-- Each delegation in the chain inherits all restrictions from its parent delegation.
-- New caveats can add further restrictions, but can't remove existing ones.
-
-This means that a delegate can only redelegate with equal or lesser authority than they received.
-
-## Delegation flow
-
-The delegation flow consists of the following steps:
-
-```mermaid
-%%{
- init: {
- 'sequence': {
- 'actorMargin': 30,
- 'width': 250
- }
- }
-}%%
-
-sequenceDiagram
- participant Delegator
- participant Delegate
- participant Manager as Delegation Manager
- participant Enforcer as Caveat enforcer
-
- Delegator->>Delegator: Create delegation with caveat enforcers
- Delegator->>Delegator: Sign delegation
- Delegator->>Delegate: Send signed delegation
- Note right of Delegate: Hold delegation until redemption
-
- Delegate->>Manager: redeemDelegations() with delegation & execution details
- Manager->>Delegator: isValidSignature()
- Delegator-->>Manager: Confirm valid (or not)
-
- Manager->>Enforcer: beforeAllHook()
- Note right of Manager: Expect no error
- Manager->>Enforcer: beforeHook()
- Note right of Manager: Expect no error
-
- Manager->>Delegator: executeFromExecutor() with execution details
- Delegator->>Delegator: Perform execution
- Note right of Manager: Expect no error
-
- Manager->>Enforcer: afterHook()
- Note right of Manager: Expect no error
- Manager->>Enforcer: afterAllHook()
- Note right of Manager: Expect no error
-```
-
-### Step 1. Create a delegation
-
-The delegator creates a delegation, configuring a [scope](delegation-scopes.md) and
-optional [caveats](caveat-enforcers.md) that define the conditions under which the delegation can be redeemed.
-
-### Step 2. Sign the delegation
-
-The delegator signs the delegation, producing a verifiable signature that the [Delegation Manager](delegation-manager.md) can later validate.
-
-### Step 3. Send the signed delegation
-
-The delegator sends the signed delegation to the delegate. A dapp can store the delegation in the storage solution
-of their choice (such as a local database, Filecoin, or other databases), enabling retrieval for future redemption.
-
-### Step 4. Redeem the delegation
-
-The delegate submits the signed delegation to the Delegation Manager by calling `redeemDelegations()` with the
-delegation and execution details.
-
-### Step 5. Validate the delegation
-
-The Delegation Manager validates the input data by ensuring the lengths of `delegations`, `modes`, and
-`executions` match. It also verifies delegation signatures, ensuring validity using ECDSA (for EOAs) or
-`isValidSignature` (for contracts).
-
-### Step 6. Execute `beforeHook`
-
-If the signature validation passes, the Delegation Manager executes the `beforeHook` for each [caveat](caveat-enforcers.md)
-in the delegation, passing relevant data (`terms`, `arguments`, `mode`, `execution` `calldata`, and `delegationHash`) to
-the caveat enforcer.
-
-### Step 7. Perform execution
-
-If `beforeHook` validation passes, the Delegation Manager calls `executeFromExecutor` to perform the delegation's
-execution, either by the delegator or the caller for self-authorized executions.
-
-### Step 8. Execute `afterHook`
-
-The Delegation Manager runs each caveat enforcer's `afterHook` and `afterAllHook` to verify post-execution conditions.
-
-See [how to perform executions on a smart account's behalf](../../guides/delegation/execute-on-smart-accounts-behalf.md) for a step-by-step guide.
-
-## Delegation Framework
-
-The Smart Accounts Kit includes the Delegation Framework, a
-[set of comprehensively audited smart contracts](https://github.com/MetaMask/delegation-framework) that
-collectively handle smart account creation, the delegation lifecycle, and caveat enforcement.
-
-It consists of the following components:
-
-| Component | Description |
-| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
-| [Delegation Manager](delegation-manager.md) | Validates delegations and triggers executions on behalf of the delegator, ensuring tasks are executed accurately and securely. |
-| [Caveat enforcers](caveat-enforcers.md) | Manage rules and restrictions for delegations, providing fine-tuned control over delegated executions. |
diff --git a/gator_versioned_docs/version-1.1.0/get-started/install.md b/gator_versioned_docs/version-1.1.0/get-started/install.md
deleted file mode 100644
index 056832b48e1..00000000000
--- a/gator_versioned_docs/version-1.1.0/get-started/install.md
+++ /dev/null
@@ -1,48 +0,0 @@
----
-sidebar_label: Install and set up
-description: Learn how to install and set up the MetaMask Smart Accounts Kit.
-keywords: [install, MetaMask, delegation, smart accounts kit, smart, accounts]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Install and set up the Smart Accounts Kit
-
-This page provides instructions to install and set up the Smart Accounts Kit, enabling you to create and interact with [MetaMask Smart Accounts](../concepts/smart-accounts.md) into your dapp.
-
-## Prerequisites
-
-- Install [Node.js](https://nodejs.org/en/blog/release/v18.18.0) v18 or later.
-- Install [Yarn](https://yarnpkg.com/),
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), or another package manager.
-- If you plan to use any smart contracts (for example, to
- [create a custom caveat enforcer](/tutorials/create-custom-caveat-enforcer)),
- install [Foundry](https://book.getfoundry.sh/getting-started/installation).
-
-## Steps
-
-### 1. Install the Smart Accounts Kit
-
-Install the [Smart Accounts Kit](https://www.npmjs.com/package/@metamask/smart-accounts-kit):
-
-```bash npm2yarn
-npm install @metamask/smart-accounts-kit
-```
-
-### 2. (Optional) Install the contracts
-
-If you plan to extend the Delegation Framework smart contracts (for example, to
-[create a custom caveat enforcer](/tutorials/create-custom-caveat-enforcer)), install
-the contract package using Foundry's command-line tool, Forge:
-
-```bash
-forge install metamask/delegation-framework@v1.3.0
-```
-
-Add `@metamask/delegation-framework/=lib/metamask/delegation-framework/` in your `remappings.txt` file.
-
-### 3. Get started
-
-You're now ready to start using the Smart Accounts Kit.
-See the [MetaMask Smart Accounts quickstart](smart-account-quickstart/index.md) to walk through a simple example.
diff --git a/gator_versioned_docs/version-1.1.0/get-started/supported-advanced-permissions.md b/gator_versioned_docs/version-1.1.0/get-started/supported-advanced-permissions.md
deleted file mode 100644
index 9664ab0a22d..00000000000
--- a/gator_versioned_docs/version-1.1.0/get-started/supported-advanced-permissions.md
+++ /dev/null
@@ -1,19 +0,0 @@
----
-title: Supported Advanced Permissions
-description: Supported Advanced Permissions for Smart Accounts Kit, MetaMask Flask, and MetaMask.
-keywords: [MetaMask, smart accounts kit, supported advanced permissions, erc-7715, 7715]
----
-
-The following table displays the Advanced Permissions types supported by the
-Smart Accounts Kit, [MetaMask Flask](/snaps/get-started/install-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](mailto:hellogators@consensys.net).
-
-| Permission type | Smart Accounts Kit | MetaMask Flask | MetaMask |
-| ------------------------------------------------------------------------------------------------------------------------ | ------------------ | -------------- | ----------- |
-| [ERC-20 periodic](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-periodic-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
-| [ERC-20 stream](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-stream-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
-| [ERC-20 revocation](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-revocation-permission) | >= v0.3.0 | >= v13.14.0 | >= 13.18.1 |
-| [Native token periodic](../guides/advanced-permissions/use-permissions/native-token.md#native-token-periodic-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
-| [Native token stream](../guides/advanced-permissions/use-permissions/native-token.md#native-token-stream-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
diff --git a/gator_versioned_docs/version-1.1.0/get-started/use-scaffold-eth/smart-accounts.md b/gator_versioned_docs/version-1.1.0/get-started/use-scaffold-eth/smart-accounts.md
deleted file mode 100644
index 8a491b7e080..00000000000
--- a/gator_versioned_docs/version-1.1.0/get-started/use-scaffold-eth/smart-accounts.md
+++ /dev/null
@@ -1,62 +0,0 @@
----
-description: Get started with the MetaMask Smart Accounts using Scaffold-ETH 2.
-sidebar_label: MetaMask Smart Accounts
-keywords: [scaffold-eth, delegation, smart accounts, template]
----
-
-# Use MetaMask Smart Accounts with Scaffold-ETH 2
-
-Use the [MetaMask Smart Accounts extension](https://github.com/metamask/gator-extension) for [Scaffold-ETH 2](https://docs.scaffoldeth.io/) to bootstrap a project in
-under two minutes. This extension helps you quickly generate the boilerplate code to create an embedded smart account, and complete
-the delegation lifecycle (create, sign, and redeem a delegation).
-
-## Prerequisites
-
-- Install [Node.js](https://nodejs.org/en/blog/release/v20.18.3) v20.18.3 or later.
-- Install [Yarn](https://yarnpkg.com/) package manager.
-- Install [Git](https://git-scm.com/install/).
-- [Create a Pimlico API key](https://docs.pimlico.io/guides/create-api-key#create-api-key).
-
-## Steps
-
-### 1. Install the extension
-
-Run the following command to install the Smart Accounts Kit extension:
-
-```bash
-npx create-eth@latest -e metamask/gator-extension your-project-name
-```
-
-### 2. Set up enviroment variables
-
-Navigate into the project's `nextjs` package, and create a `.env.local` file. Once created, update the
-`NEXT_PUBLIC_PIMLICO_API_KEY` environment variable with your Pimlico API Key.
-
-```bash
-cd your-project-name/packages/nextjs
-cp .env.example .env.local
-```
-
-### 3. Start the frontend
-
-In the project's root directory start the development server.
-
-```bash
-yarn start
-```
-
-### 4. Complete the delegation lifecycle
-
-Navigate to the **MetaMask Smart Accounts & Delegation** page in your Scaffold-ETH
-frontend at http://localhost:3000/delegations, and follow the steps to deploy a delegator
-account, create a delegate wallet, create a delegation, and redeem a delegation.
-
-You can view the completed transaction on Etherscan.
-
-
-
-
-
-## Next steps
-
-Learn more about [MetaMask Smart Accounts](../../concepts/smart-accounts.md) and [delegation](../../concepts/delegation/overview.md).
diff --git a/gator_versioned_docs/version-1.1.0/get-started/use-the-cli.md b/gator_versioned_docs/version-1.1.0/get-started/use-the-cli.md
deleted file mode 100644
index 62e79151e85..00000000000
--- a/gator_versioned_docs/version-1.1.0/get-started/use-the-cli.md
+++ /dev/null
@@ -1,80 +0,0 @@
----
-description: Get started with the MetaMask Smart Accounts Kit using the `@metamask/create-gator-app` CLI.
-sidebar_label: Use the CLI
-keywords: [CLI, delegation, smart accounts, template]
----
-
-# Use the Smart Accounts Kit CLI
-
-Use the `@metamask/create-gator-app` interactive CLI to bootstrap a project with the Smart Accounts Kit in under two minutes.
-The CLI automatically installs the required dependencies and sets up a project structure using a selected template,
-allowing you to focus on building your dapp.
-
-## Run the CLI
-
-Run the following command to automatically install the `@metamask/create-gator-app` package:
-
-```bash
-npx @metamask/create-gator-app@latest
-```
-
-Upon installation, you'll be asked the following prompts:
-
-```bash
-? What is your project named? (my-gator-app)
-? Pick a framework: (Use arrow keys)
-❯ nextjs
- vite-react
-? Pick a template: (Use arrow keys)
-❯ MetaMask Smart Accounts Starter
- MetaMask Smart Accounts & Delegation Starter
- Farcaster Mini App Delegation Starter
- Advanced Permissions (ERC-7715) Starter
-? Pick a package manager: (Use arrow keys)
-❯ npm
- yarn
- pnpm
-```
-
-Once you've answered the prompts with the required configuration and selected a template, the CLI will create the
-project using the specified name and settings.
-See the following section to learn more about available CLI configurations.
-
-## Options
-
-The CLI provides the following options to display CLI details, and further customize the template configuration.
-
-| Option | Description |
-| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `-v` or `--version` | Check the current version of the `@metamask/create-gator-app` CLI. |
-| `-h` or `--help` | Display the available options. |
-| `--skip-install` | Skip the installation of dependencies. |
-| `--add-web3auth` | Add [MetaMask Embedded Wallets (previously Web3Auth)](/embedded-wallets) as a signer for the delegator account.
Supported templates:
- MetaMask Smart Accounts Starter
- MetaMask Smart Accounts & Delegation Starter |
-
-## Examples
-
-### MetaMask Embedded Wallets configuration
-
-To create a project that uses [MetaMask Embedded Wallets](/embedded-wallets) as the signer for your delegator
-account, use the `--add-web3auth` option with `@metamask/create-gator-app`:
-
-```bash
-npx @metamask/create-gator-app --add-web3auth
-```
-
-You'll be prompted to provide additional Web3Auth configuration details:
-
-```bash
-? Which Web3Auth network do you want to use? (Use arrow keys)
-❯ Sapphire Devnet
- Sapphire Mainnet
-```
-
-## Supported templates
-
-| Template | Next.js | Vite React |
-| ------------------------------------------------ | ------- | ---------- |
-| MetaMask Smart Accounts Starter | ✅ | ✅ |
-| MetaMask Smart Accounts & Delegation Starter | ✅ | ✅ |
-| Farcaster Mini App Delegation Starter | ✅ | |
-| Advanced Permissions (ERC-7715) Starter | ✅ | |
diff --git a/gator_versioned_docs/version-1.1.0/get-started/use-with-openclaw.md b/gator_versioned_docs/version-1.1.0/get-started/use-with-openclaw.md
deleted file mode 100644
index db85364a71c..00000000000
--- a/gator_versioned_docs/version-1.1.0/get-started/use-with-openclaw.md
+++ /dev/null
@@ -1,104 +0,0 @@
----
-sidebar_label: Use with OpenClaw
-description: Use the MetaMask Smart Accounts Kit skill with OpenClaw to build and deploy applications with smart accounts support.
-toc_max_heading_level: 2
-keywords: [openclaw, skill, delegation, smart accounts, ai, metamask smart accounts kit]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Use the Smart Accounts Kit with OpenClaw
-
-Use the MetaMask Smart Accounts Kit [OpenClaw skills](https://docs.openclaw.ai/tools/skills) to interact with the Smart Accounts Kit using natural language prompts.
-
-[OpenClaw](https://openclaw.ai/) is an open-source platform for AI agents that enables you to build, deploy, and
-manage AI assistants with access to various tools and skills. The Smart Accounts Kit provides the below two skills.
-
-## Gator CLI skill
-
-This skill enables your agent to grant, redeem, inspect and revoke ERC-7710 delegations using the [`@metamask/gator-cli`](https://www.npmjs.com/package/@metamask/gator-cli) package.
-
-:::warning Alpha version
-
-This CLI is in alpha version, and stores agent's private key in a local
-JSON file (`~/.gator-cli/`). Please proceed with caution, and do not use
-it with accounts holding significant funds.
-
-:::
-
-### Install
-
-
-
-
-```bash
-clawhub install gator-cli
-```
-
-
-
-
-```txt
-Install the skill from https://github.com/MetaMask/openclaw-skills/blob/main/metamask/gator-cli/SKILL.md
-```
-
-
-
-
-### Reference
-
-The skill provides access to the following commands:
-
-| Command | Description |
-| --------- | -------------------------------------------- |
-| `init` | Generate a private key and save config. |
-| `create` | Upgrade an EOA to an EIP-7702 smart account. |
-| `show` | Display the EOA address. |
-| `status` | Check config and on chain account status. |
-| `balance` | Show native or ERC-20 balance. |
-| `grant` | Create, sign, and store a delegation. |
-| `redeem` | Redeem a delegation using an action type. |
-| `revoke` | Revoke a delegation on chain. |
-| `inspect` | View delegations for your account. |
-
-## Smart Accounts Kit skill
-
-This skill helps your agent learn about the Smart Accounts Kit and its capabilities, and integrate them into your applications.
-
-### Install
-
-
-
-
-```bash
-clawhub install smart-accounts-kit
-```
-
-
-
-
-```bash
-cd ~/.openclaw/workspace/skills
-git clone https://github.com/smartgator/smart-accounts-kit-skills.git
-```
-
-
-
-
-```txt
-Install the skill from https://github.com/smartgator/smart-accounts-kit-skills.git
-```
-
-
-
-
-### Reference
-
-The skill provides access to the following capabilities:
-
-| Capability | Description |
-| ---------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
-| [Smart accounts](https://github.com/smartgator/smart-accounts-kit-skills/blob/main/references/smart-accounts.md) | Helps you integrate MetaMask Smart Accounts to support batch transactions, multi-sig signatures, and gas sponsorship. |
-| [Delegation](https://github.com/smartgator/smart-accounts-kit-skills/blob/main/references/delegations.md) | Helps you integrate delegations with scopes and caveats. |
-| [Advanced Permissions](https://github.com/smartgator/smart-accounts-kit-skills/blob/main/references/advanced-permissions.md) | Helps you integrate Advanced Permissions. |
diff --git a/gator_versioned_docs/version-1.1.0/guides/advanced-permissions/create-redelegation.md b/gator_versioned_docs/version-1.1.0/guides/advanced-permissions/create-redelegation.md
deleted file mode 100644
index e1736c2c43a..00000000000
--- a/gator_versioned_docs/version-1.1.0/guides/advanced-permissions/create-redelegation.md
+++ /dev/null
@@ -1,210 +0,0 @@
----
-description: Learn how to create a redelegation for Advanced Permissions.
-sidebar_label: Create a redelegation
-keywords: [advanced permissions, caveat, delegation scope, redelegation, delegation]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Create a redelegation
-
-Redelegation is a core feature that sets Advanced Permissions apart from other permission sharing frameworks.
-It allows a session account (delegate) to create a delegation chain, passing on the same or reduced level of authority
-from the MetaMask account (delegator).
-
-For example, if a dapp is granted permission to spend 10 USDC on a user's behalf, it can
-further delegate that permission to specific agents, such as allowing a Swap agent to spend
-up to 5 USDC. This creates a permission sharing chain in which the root permissions are
-shared with additional parties.
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../get-started/install.md)
-- [Learn about Advanced Permissions.](../../concepts/advanced-permissions.md)
-- [Learn how to request Advanced Permissions.](execute-on-metamask-users-behalf.md)
-
-## Request Advanced Permissions
-
-Request Advanced Permissions from the user with the Wallet Client's [`requestExecutionPermissions`](../../reference/advanced-permissions/wallet-client.md#requestexecutionpermissions) action.
-
-This example uses the [ERC-20 periodic permission](./use-permissions/erc20-token.md#erc-20-periodic-permission), allowing the
-user to grant dapp the ability to spend 10 USDC on their behalf.
-
-
-
-
-```typescript
-import { sepolia as chain } from 'viem/chains'
-import { sessionAccount, walletClient, tokenAddress } from './config.ts'
-import { parseUnits } from 'viem'
-
-// Since current time is in seconds, we need to convert milliseconds to seconds.
-const currentTime = Math.floor(Date.now() / 1000)
-// 1 week from now.
-const expiry = currentTime + 604800
-
-const grantedPermissions = await walletClient.requestExecutionPermissions([
- {
- chainId: chain.id,
- expiry,
- // The requested permissions will granted to the
- // session account.
- to: sessionAccount.address,
- permission: {
- type: 'erc20-token-periodic',
- data: {
- tokenAddress,
- // 10 USDC in wei format. Since USDC has 6 decimals, 10 * 10^6
- periodAmount: parseUnits('10', 6),
- // 1 day in seconds
- periodDuration: 86400,
- justification: 'Permission to transfer 10 USDC every day',
- },
- isAdjustmentAllowed: true,
- },
- },
-])
-```
-
-
-
-
-
-```ts
-import { createWalletClient, custom, createPublicClient, http } from 'viem'
-import { privateKeyToAccount } from 'viem/accounts'
-import { toMetaMaskSmartAccount, Implementation } from '@metamask/smart-accounts-kit'
-import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
-import { sepolia as chain } from 'viem/chains'
-
-// USDC address on Ethereum Sepolia.
-export const tokenAddress = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const privateKey = '0x...'
-const account = privateKeyToAccount(privateKey)
-
-export const sessionAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [account.address, [], [], []],
- deploySalt: '0x',
- signer: { account },
-})
-
-export const walletClient = createWalletClient({
- transport: custom(window.ethereum),
-}).extend(erc7715ProviderActions())
-```
-
-
-
-
-## Decode delegations
-
-The granted permissions object includes a `context` property that represents the encoded delegations.
-
-To create a redelegation, you must first decode these delegations to access the
-underlying delegations. To decode the delegations, use the [`decodeDelegations`](../../reference/delegation/index.md#decodedelegations) utility function.
-
-```ts
-import { decodeDelegations } from '@metamask/smart-accounts-kit/utils'
-
-const permissionContext = grantedPermissions[0].context
-
-const delegations = decodeDelegations(permissionContext)
-const rootDelegation = delegations[0]
-```
-
-## Create a redelegation
-
-Create a [redelegation](../../concepts/delegation/overview.md#redelegation) from dapp to a Swap agent.
-
-To create a redelegation, provide the signed delegation as the `parentDelegation` argument when calling [`createDelegation`](../../reference/delegation/index.md#createdelegation).
-
-This example uses the [`erc20TransferAmount`](../delegation/use-delegation-scopes/spending-limit.md#erc-20-transfer-scope) scope, allowing
-dapp to delegate to a Swap agent the ability to spend 5 USDC on user's behalf.
-
-:::note
-When creating a redelegation, you can only narrow the scope of the original authority, not expand it.
-:::
-
-
-
-
-```typescript
-import { sessionAccount, agentSmartAccount, tokenAddress } from './config.ts'
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { parseUnits } from 'viem'
-
-const redelegation = createDelegation({
- scope: {
- type: ScopeType.Erc20TransferAmount,
- tokenAddress,
- // USDC has 6 decimal places.
- maxAmount: parseUnits('5', 6),
- },
- to: agentSmartAccount.address,
- from: sessionAccount.address,
- // Signed root delegation extracted from Advanced Permissions.
- parentDelegation: rootDelegation,
- environment: sessionAccount.environment,
-})
-
-const signedRedelegation = await sessionAccount.signDelegation({ delegation: redelegation })
-```
-
-
-
-
-```typescript
-// Update the existing config to create a smart account for a Swap agent.
-
-const agentAccount = privateKeyToAccount('0x...')
-
-export const agentSmartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [agentAccount.address, [], [], []],
- deploySalt: '0x',
- signer: { account: agentAccount },
-})
-```
-
-
-
-
-### Limit redelegation using caveats
-
-When you create a redelegation, apply the toolkit's [caveats](../../reference/delegation/caveats.md) to narrow the Swap agent's authority. For example, you can limit the authority so Swap agent can use the delegation only once.
-
-To apply caveats, create the `Delegation` object and use [`createCaveatBuilder`](../../reference/delegation/index.md#createcaveatbuilder).
-Use [`hashDelegation`](../../reference/delegation/index.md#hashdelegation) to get the delegation hash, then provide it as the `authority` field.
-
-This example uses the [`limitedCalls`](../../reference/delegation/caveats.md#limitedcalls) caveat with a limit of `1`.
-
-```ts
-// Use the config from previous step.
-import { sessionAccount, agentSmartAccount, tokenAddress } from './config.ts'
-import { CaveatType } from '@metamask/smart-accounts-kit'
-import { createCaveatBuilder, hashDelegation } from '@metamask/smart-accounts-kit/utils'
-
-const caveatBuilder = createCaveatBuilder(sessionAccount.environment)
-
-const caveats = caveatBuilder.addCaveat(CaveatType.LimitedCalls, { limit: 1 })
-
-const redelegation: Delegation = {
- delegate: sessionAccount.address,
- delegator: agentSmartAccount.address,
- authority: hashDelegation(rootDelegation),
- caveats: caveats.build(),
- salt: '0x',
-}
-
-const signedRedelegation = await sessionAccount.signDelegation({ delegation: redelegation })
-```
diff --git a/gator_versioned_docs/version-1.1.0/guides/configure-toolkit.md b/gator_versioned_docs/version-1.1.0/guides/configure-toolkit.md
deleted file mode 100644
index 1f37d479e7d..00000000000
--- a/gator_versioned_docs/version-1.1.0/guides/configure-toolkit.md
+++ /dev/null
@@ -1,265 +0,0 @@
----
-description: Learn how to configure the bundler client, paymaster client, and toolkit environment.
-sidebar_label: Configure the toolkit
-keywords: [configure, smart accounts kit, bundler, paymaster, smart accounts environment]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Configure the Smart Accounts Kit
-
-The Smart Accounts Kit is highly configurable, providing support for custom [bundlers and paymasters](#configure-the-bundler).
-You can also configure the [toolkit environment](#optional-configure-the-toolkit-environment) to interact with the [Delegation Framework](../concepts/delegation/overview.md#delegation-framework).
-
-## Prerequisites
-
-[Install and set up the Smart Accounts Kit.](../get-started/install.md)
-
-## Configure the bundler
-
-The toolkit uses Viem's Account Abstraction API to configure custom bundlers and paymasters.
-This provides a robust and flexible foundation for creating and managing [MetaMask Smart Accounts](../concepts/smart-accounts.md).
-See Viem's [account abstraction documentation](https://viem.sh/account-abstraction) for more information on the API's features, methods, and best practices.
-
-To use the bundler and paymaster clients with the toolkit, create instances of these clients and configure them as follows:
-
-```typescript
-import { createPaymasterClient, createBundlerClient } from 'viem/account-abstraction'
-import { http } from 'viem'
-import { sepolia as chain } from 'viem/chains'
-
-// Replace these URLs with your actual bundler and paymaster endpoints.
-const bundlerUrl = 'https://your-bundler-url.com'
-const paymasterUrl = 'https://your-paymaster-url.com'
-
-// The paymaster is optional.
-const paymasterClient = createPaymasterClient({
- transport: http(paymasterUrl),
-})
-
-const bundlerClient = createBundlerClient({
- transport: http(bundlerUrl),
- paymaster: paymasterClient,
- chain,
-})
-```
-
-Replace the bundler and paymaster URLs with your bundler and paymaster endpoints.
-For example, you can use endpoints from [Pimlico](https://docs.pimlico.io/references/bundler), [Infura](https://docs.infura.io/), or [ZeroDev](https://docs.zerodev.app/meta-infra/intro).
-
-:::note
-Providing a paymaster is optional when configuring your bundler client. However, if you choose not to use a paymaster, the smart contract account must have enough funds to pay gas fees.
-:::
-
-## (Optional) Configure the toolkit environment
-
-The toolkit environment (`SmartAccountsEnvironment`) defines the contract addresses necessary for interacting with the [Delegation Framework](../concepts/delegation/overview.md#delegation-framework) on a specific network.
-It serves several key purposes:
-
-- It provides a centralized configuration for all the contract addresses required by the Delegation Framework.
-- It enables easy switching between different networks (for example, Mainnet and testnet) or custom deployments.
-- It ensures consistency across different parts of the application that interact with the Delegation Framework.
-
-### Resolve the environment
-
-When you create a [MetaMask smart account](../concepts/smart-accounts.md), the toolkit automatically
-resolves the environment based on the version it requires and the chain configured.
-If no environment is found for the specified chain, it throws an error.
-
-
-
-
-```typescript
-import { SmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-import { delegatorSmartAccount } from './config.ts'
-
-const environment: SmartAccountsEnvironment = delegatorSmartAccount.environment
-```
-
-
-
-
-```typescript
-import {
- Implementation,
- toMetaMaskSmartAccount,
-} from "@metamask/smart-accounts-kit";
-import { privateKeyToAccount } from "viem/accounts";
-import { createPublicClient, http } from "viem";
-import { sepolia as chain } from "viem/chains";
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-});
-
-const delegatorAccount = privateKeyToAccount("0x...");
-
-const delegatorSmartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [delegatorAccount.address, [], [], []],
- deploySalt: "0x",
- signer: { account: delegatorAccount },
-});
-
-export delegatorSmartAccount;
-```
-
-
-
-
-:::note
-See the changelog of the toolkit version you are using (in the left sidebar) for supported chains.
-:::
-
-Alternatively, you can use the [`getSmartAccountsEnvironment`](../reference/delegation/index.md#getsmartaccountsenvironment) function to resolve the environment.
-This function is especially useful if your delegator is not a smart account when
-creating a [redelegation](../concepts/delegation/overview.md#delegation-types).
-
-```typescript
-import { getSmartAccountsEnvironment, SmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-import { sepolia } from 'viem/chains'
-
-// Resolves the SmartAccountsEnvironment for Sepolia
-const environment: SmartAccountsEnvironment = getSmartAccountsEnvironment(sepolia.id)
-```
-
-### Deploy a custom environment
-
-You can deploy the contracts using any method, but the toolkit provides a convenient [`deploySmartAccountsEnvironment`](../reference/delegation/index.md#deploysmartaccountsenvironment) function. This function simplifies deploying the Delegation Framework contracts to your desired EVM chain.
-
-This function requires a Viem [Public Client](https://viem.sh/docs/clients/public), [Wallet Client](https://viem.sh/docs/clients/wallet), and [Chain](https://viem.sh/docs/glossary/types#chain)
-to deploy the contracts and resolve the `SmartAccountsEnvironment`.
-
-Your wallet must have a sufficient native token balance to deploy the contracts.
-
-
-
-
-```typescript
-import { walletClient, publicClient } from './config.ts'
-import { sepolia as chain } from 'viem/chains'
-import { deploySmartAccountsEnvironment } from '@metamask/smart-accounts-kit/utils'
-
-const environment = await deploySmartAccountsEnvironment(walletClient, publicClient, chain)
-```
-
-
-
-
-```typescript
-import { privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-import { http, createWalletClient, createPublicClient } from 'viem'
-
-// Your deployer wallet private key.
-const privateKey = '0x123..'
-const account = privateKeyToAccount(privateKey)
-
-export const walletClient = createWalletClient({
- account,
- chain,
- transport: http(),
-})
-
-export const publicClient = createPublicClient({
- transport: http(),
- chain,
-})
-```
-
-
-
-
-You can also override specific contracts when calling `deploySmartAccountsEnvironment`.
-For example, if you've already deployed the `EntryPoint` contract on the target chain, you can pass the contract address to the function.
-
-```typescript
-// The config.ts is the same as in the previous example.
-import { walletClient, publicClient } from "./config.ts";
-import { sepolia as chain } from "viem/chains";
-import { deploySmartAccountsEnvironment } from "@metamask/smart-accounts-kit/utils";
-
-const environment = await deploySmartAccountsEnvironment(
- walletClient,
- publicClient,
- chain,
- // add-start
-+ {
-+ EntryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032"
-+ }
- // add-end
-);
-```
-
-Once the contracts are deployed, you can use them to override the environment.
-
-### Override the environment
-
-To override the environment, the toolkit provides an [`overrideDeployedEnvironment`](../reference/delegation/index.md#overridedeployedenvironment) function to resolve
-`SmartAccountsEnvironment` with specified contracts for the given chain and contract version.
-
-```typescript
-// The config.ts is the same as in the previous example.
-import { walletClient, publicClient } from './config.ts'
-import { sepolia as chain } from 'viem/chains'
-import { SmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-import {
- overrideDeployedEnvironment,
- deploySmartAccountsEnvironment,
-} from '@metamask/smart-accounts-kit'
-
-const environment: SmartAccountsEnvironment = await deploySmartAccountsEnvironment(
- walletClient,
- publicClient,
- chain
-)
-
-overrideDeployedEnvironment(chain.id, '1.3.0', environment)
-```
-
-If you've already deployed the contracts using a different method, you can create a `SmartAccountsEnvironment` instance with the required contract addresses, and pass it to the function.
-
-```typescript
-// remove-start
-- import { walletClient, publicClient } from "./config.ts";
-- import { sepolia as chain } from "viem/chains";
-// remove-end
-import { SmartAccountsEnvironment } from "@metamask/smart-accounts-kit";
-import {
- overrideDeployedEnvironment,
- // remove-next-line
-- deploySmartAccountsEnvironment
-} from "@metamask/smart-accounts-kit";
-
-// remove-start
-- const environment: SmartAccountsEnvironment = await deploySmartAccountsEnvironment(
-- walletClient,
-- publicClient,
-- chain
-- );
-// remove-end
-
-// add-start
-+ const environment: SmartAccountsEnvironment = {
-+ SimpleFactory: "0x124..",
-+ // ...
-+ implementations: {
-+ // ...
-+ },
-+ };
-// add-end
-
-overrideDeployedEnvironment(
- chain.id,
- "1.3.0",
- environment
-);
-```
-
-:::note
-Make sure to specify the Delegation Framework version required by the toolkit.
-See the changelog of the toolkit version you are using (in the left sidebar) for its required Framework version.
-:::
diff --git a/gator_versioned_docs/version-1.1.0/guides/delegation/check-delegation-state.md b/gator_versioned_docs/version-1.1.0/guides/delegation/check-delegation-state.md
deleted file mode 100644
index 8642d9b5cd0..00000000000
--- a/gator_versioned_docs/version-1.1.0/guides/delegation/check-delegation-state.md
+++ /dev/null
@@ -1,110 +0,0 @@
----
-description: Learn how to check the delegation state.
-sidebar_label: Check the delegation state
-toc_max_heading_level: 3
-keywords: [delegation, state, caveat enforcer, delegation scope]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Check the delegation state
-
-When using [spending limit delegation scopes](use-delegation-scopes/spending-limit.md) or relevant [caveat enforcers](../../reference/delegation/caveats.md),
-you might need to check the remaining transferrable amount in a delegation.
-For example, if a delegation allows a user to spend 10 USDC per week and they have already spent 10 - n USDC in the current period,
-you can determine how much of the allowance is still available for transfer.
-
-Use the `CaveatEnforcerClient` to check the available balances for specific scopes or caveats.
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../get-started/install.md)
-- [Create a delegator account.](execute-on-smart-accounts-behalf.md#3-create-a-delegator-account)
-- [Create a delegate account.](execute-on-smart-accounts-behalf.md#4-create-a-delegate-account)
-- [Create a delegation with an ERC-20 periodic scope.](use-delegation-scopes/spending-limit.md#erc-20-periodic-scope)
-
-## Create a `CaveatEnforcerClient`
-
-To check the delegation state, create a [`CaveatEnforcerClient`](../../reference/delegation/caveat-enforcer-client.md).
-This client allows you to interact with the caveat enforcers of the delegation, and read the required state.
-
-
-
-
-```typescript
-import { environment, publicClient as client } from './config.ts'
-import { createCaveatEnforcerClient } from '@metamask/smart-accounts-kit'
-
-const caveatEnforcerClient = createCaveatEnforcerClient({
- environment,
- client,
-})
-```
-
-
-
-
-```typescript
-import { sepolia as chain } from 'viem/chains'
-import { createPublicClient, http } from 'viem'
-import { getSmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-
-export const environment = getSmartAccountsEnvironment(chain.id)
-
-export const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-```
-
-
-
-
-## Read the caveat enforcer state
-
-This example uses the [`getErc20PeriodTransferEnforcerAvailableAmount`](../../reference/delegation/caveat-enforcer-client.md#geterc20periodtransferenforceravailableamount) method to read the state and retrieve the remaining amount for the current transfer period.
-
-
-
-
-```typescript
-import { delegation } from './config.ts'
-
-// Returns the available amount for current period.
-const { availableAmount } =
- await caveatEnforcerClient.getErc20PeriodTransferEnforcerAvailableAmount({
- delegation,
- })
-```
-
-
-
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { parseUnits } from 'viem'
-
-// startDate should be in seconds.
-const startDate = Math.floor(Date.now() / 1000)
-
-export const delegation = createDelegation({
- scope: {
- type: ScopeType.Erc20PeriodTransfer,
- tokenAddress: '0xb4aE654Aca577781Ca1c5DE8FbE60c2F423f37da',
- periodAmount: parseUnits('10', 6),
- periodDuration: 86400,
- startDate,
- },
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-```
-
-
-
-
-## Next steps
-
-See the [Caveat Enforcer Client reference](../../reference/delegation/caveat-enforcer-client.md) for the full list of available methods.
diff --git a/gator_versioned_docs/version-1.1.0/guides/delegation/create-redelegation.md b/gator_versioned_docs/version-1.1.0/guides/delegation/create-redelegation.md
deleted file mode 100644
index 5001df971a5..00000000000
--- a/gator_versioned_docs/version-1.1.0/guides/delegation/create-redelegation.md
+++ /dev/null
@@ -1,177 +0,0 @@
----
-description: Learn how to create a redelegation.
-sidebar_label: Create a redelegation
-toc_max_heading_level: 3
-keywords: [delegation, state, caveat enforcer, delegation scope, redelegation]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Create a redelegation
-
-Redelegation is a core feature that sets delegations apart from other permission sharing frameworks.
-It allows a delegate to create a delegation chain, passing on the same or reduced level of authority
-from the root delegator.
-
-For example, if Alice grants Bob permission to spend 10 USDC on her behalf, Bob can further grant Carol
-permission to spend up to 5 USDC on Alice's behalf-that is, Bob can redelegate. This creates a delegation
-chain where the root permissions are reshared with additional parties.
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../get-started/install.md)
-- [Learn how to create a delegation.](execute-on-smart-accounts-behalf.md)
-
-## Create a delegation
-
-Create a [root delegation](../../concepts/delegation/overview.md#root-delegation) from Alice to Bob.
-
-This example uses the [`erc20TransferAmount`](use-delegation-scopes/spending-limit.md#erc-20-transfer-scope) scope, allowing
-Alice to delegate to Bob the ability to spend 10 USDC on her behalf.
-
-
-
-
-```typescript
-import { aliceSmartAccount, bobSmartAccount } from './config.ts'
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { parseUnits } from 'viem'
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.Erc20TransferAmount,
- tokenAddress: '0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92',
- // USDC has 6 decimal places.
- maxAmount: parseUnits('10', 6),
- },
- to: bobSmartAccount.address,
- from: aliceSmartAccount.address,
- environment: aliceSmartAccount.environment,
-})
-
-const signedDelegation = aliceSmartAccount.signDelegation({ delegation })
-```
-
-
-
-
-```typescript
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-import { privateKeyToAccount } from 'viem/accounts'
-import { createPublicClient, http } from 'viem'
-import { sepolia as chain } from 'viem/chains'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const aliceAccount = privateKeyToAccount('0x...')
-const bobAccount = privateKeyToAccount('0x...')
-
-export const aliceSmartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [aliceAccount.address, [], [], []],
- deploySalt: '0x',
- signer: { account: aliceAccount },
-})
-
-export const bobSmartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [bobAccount.address, [], [], []],
- deploySalt: '0x',
- signer: { account: bobAccount },
-})
-```
-
-
-
-
-## Create a redelegation
-
-Create a [redelegation](../../concepts/delegation/overview.md#redelegation) from Bob to Carol. When creating a redelegation, you can only narrow the scope of the original authority, not expand it.
-
-To create a redelegation, provide the signed delegation as the `parentDelegation` argument when calling [createDelegation](../../reference/delegation/index.md#createdelegation).
-This example uses the [`erc20TransferAmount`](use-delegation-scopes/spending-limit.md#erc-20-transfer-scope) scope, allowing
-Bob to delegate to Carol the ability to spend 5 USDC on Alice's behalf.
-
-
-
-
-```typescript
-import { bobSmartAccount, carolSmartAccount } from './config.ts'
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { parseUnits } from 'viem'
-
-const redelegation = createDelegation({
- scope: {
- type: ScopeType.Erc20TransferAmount,
- tokenAddress: '0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92',
- // USDC has 6 decimal places.
- maxAmount: parseUnits('5', 6),
- },
- to: carolSmartAccount.address,
- from: bobSmartAccount.address,
- // Signed root delegation from previous step.
- parentDelegation: signedDelegation,
- environment: bobSmartAccount.environment,
-})
-
-const signedRedelegation = bobSmartAccount.signDelegation({ delegation: redelegation })
-```
-
-
-
-
-```typescript
-// Update the existing config to create a smart account for Carol.
-
-const carolAccount = privateKeyToAccount('0x...')
-
-export const carolSmartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [carolAccount.address, [], [], []],
- deploySalt: '0x',
- signer: { account: carolAccount },
-})
-```
-
-
-
-
-### Limit redelegation using caveats
-
-When you create a redelegation, apply the toolkit's [caveats](../../reference/delegation/caveats.md) to narrow the Carol's authority. For example, you can limit the authority so Carol can use the delegation only once.
-
-To apply caveats, create the `Delegation` object and use [`createCaveatBuilder`](../../reference/delegation/index.md#createcaveatbuilder). Use [`hashDelegation`](../../reference/delegation/index.md#hashdelegation) to get the delegation hash, then provide it as the `authority` field.
-
-This example uses the [`limitedCalls`](../../reference/delegation/caveats.md#limitedcalls) caveat with a limit of `1`.
-
-```ts
-// Use the config from previous step.
-import { bobSmartAccount, carolSmartAccount } from './config.ts'
-import { CaveatType } from '@metamask/smart-accounts-kit'
-import { createCaveatBuilder, hashDelegation } from '@metamask/smart-accounts-kit/utils'
-
-const caveatBuilder = createCaveatBuilder(bobSmartAccount.environment)
-
-const caveats = caveatBuilder.addCaveat(CaveatType.LimitedCalls, { limit: 1 })
-
-const redelegation: Delegation = {
- delegate: carolSmartAccount.address,
- delegator: bobSmartAccount.address,
- authority: hashDelegation(rootDelegation),
- caveats: caveats.build(),
- salt: '0x',
-}
-
-const signedRedelegation = await bobSmartAccount.signDelegation({ delegation: redelegation })
-```
-
-## Next steps
-
-See [how to disable a delegation](disable-delegation.md) to revoke permissions.
diff --git a/gator_versioned_docs/version-1.1.0/guides/delegation/execute-on-smart-accounts-behalf.md b/gator_versioned_docs/version-1.1.0/guides/delegation/execute-on-smart-accounts-behalf.md
deleted file mode 100644
index 77769353951..00000000000
--- a/gator_versioned_docs/version-1.1.0/guides/delegation/execute-on-smart-accounts-behalf.md
+++ /dev/null
@@ -1,272 +0,0 @@
----
-description: Use delegations to perform executions on a smart account's behalf.
-sidebar_label: Execute on a smart account's behalf
-keywords: [execution, smart account, create, redeem, delegation, delegator, delegate]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Perform executions on a smart account's behalf
-
-[Delegation](../../concepts/delegation/overview.md) is the ability for a [MetaMask smart account](../../concepts/smart-accounts.md) to grant permission to another account to perform executions on its behalf.
-
-In this guide, you'll create a delegator account (Alice) and a delegate account (Bob), and grant Bob permission to perform executions on Alice's behalf.
-You'll complete the delegation lifecycle (create, sign, and redeem a delegation).
-
-## Prerequisites
-
-[Install and set up the Smart Accounts Kit.](../../get-started/install.md)
-
-## Steps
-
-### 1. Create a Public Client
-
-Create a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function.
-You will configure Alice's account (the delegator) and the Bundler Client with the Public Client, which you can use to query the signer's account state and interact with smart contracts.
-
-```typescript
-import { createPublicClient, http } from 'viem'
-import { sepolia as chain } from 'viem/chains'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-```
-
-### 2. Create a Bundler Client
-
-Create a [Viem Bundler Client](https://viem.sh/account-abstraction/clients/bundler) using Viem's `createBundlerClient` function.
-You can use the bundler service to estimate gas for user operations and submit transactions to the network.
-
-```typescript
-import { createBundlerClient } from 'viem/account-abstraction'
-
-const bundlerClient = createBundlerClient({
- client: publicClient,
- transport: http('https://your-bundler-rpc.com'),
-})
-```
-
-### 3. Create a delegator account
-
-Create an account to represent Alice, the delegator who will create a delegation.
-The delegator must be a MetaMask smart account; use the toolkit's [`toMetaMaskSmartAccount`](../../reference/smart-account.md#tometamasksmartaccount) method to create the delegator account.
-
-A Hybrid smart account is a flexible smart account implementation that supports both an externally owned account (EOA) owner and any number of P256 (passkey) signers.
-This examples configures a [Hybrid smart account](../smart-accounts/create-smart-account.md#hybrid-smart-account) with an Account signer:
-
-```typescript
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-import { privateKeyToAccount } from 'viem/accounts'
-
-const delegatorAccount = privateKeyToAccount('0x...')
-
-const delegatorSmartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [delegatorAccount.address, [], [], []],
- deploySalt: '0x',
- signer: { account: delegatorAccount },
-})
-```
-
-:::note
-See [how to configure other smart account types](../smart-accounts/create-smart-account.md).
-:::
-
-### 4. Create a delegate account
-
-Create an account to represent Bob, the delegate who will receive the delegation. The delegate can be a smart account or an externally owned account (EOA):
-
-
-
-
-```typescript
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-import { privateKeyToAccount } from 'viem/accounts'
-
-const delegateAccount = privateKeyToAccount('0x...')
-
-const delegateSmartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid, // Hybrid smart account
- deployParams: [delegateAccount.address, [], [], []],
- deploySalt: '0x',
- signer: { account: delegateAccount },
-})
-```
-
-
-
-
-```typescript
-import { privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-import { createWalletClient, http } from 'viem'
-
-const delegateAccount = privateKeyToAccount('0x...')
-
-export const delegateWalletClient = createWalletClient({
- account: delegateAccount,
- chain,
- transport: http(),
-})
-```
-
-
-
-
-### 5. Create a delegation
-
-Create a [root delegation](../../concepts/delegation/overview.md#root-delegation) from Alice to Bob.
-With a root delegation, Alice is delegating her own authority away, as opposed to _redelegating_ permissions she received from a previous delegation.
-
-Use the toolkit's [`createDelegation`](../../reference/delegation/index.md#createdelegation) method to create a root delegation. When creating
-delegation, you need to configure the scope of the delegation to define the initial authority.
-
-This example uses the [`erc20TransferAmount`](use-delegation-scopes/spending-limit.md#erc-20-transfer-scope) scope, allowing Alice to delegate to Bob the ability to spend her USDC, with a
-specified limit on the total amount.
-
-:::warning Important
-
-Before creating a delegation, ensure that the delegator account (in this example, Alice's account) has been deployed. If the account is not deployed, redeeming the delegation will fail.
-
-:::
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { parseUnits } from 'viem'
-
-// USDC address on Ethereum Sepolia.
-const tokenAddress = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
-
-const delegation = createDelegation({
- to: delegateSmartAccount.address, // This example uses a delegate smart account
- from: delegatorSmartAccount.address,
- environment: delegatorSmartAccount.environment,
- scope: {
- type: ScopeType.Erc20TransferAmount,
- tokenAddress,
- // 10 USDC
- maxAmount: parseUnits('10', 6),
- },
-})
-```
-
-### 6. Sign the delegation
-
-Sign the delegation with Alice's account, using the [`signDelegation`](../../reference/smart-account.md#signdelegation) method from `MetaMaskSmartAccount`. Alternatively, you can use the toolkit's [`signDelegation`](../../reference/delegation/index.md#signdelegation) utility method. Bob will later use the signed delegation to perform actions on Alice's behalf.
-
-```typescript
-const signature = await delegatorSmartAccount.signDelegation({
- delegation,
-})
-
-const signedDelegation = {
- ...delegation,
- signature,
-}
-```
-
-### 7. Redeem the delegation
-
-Bob can now redeem the delegation. The redeem transaction is sent to the `DelegationManager` contract, which validates the delegation and executes actions on Alice's behalf.
-
-To prepare the calldata for the redeem transaction, use the [`redeemDelegations`](../../reference/delegation/index.md#redeemdelegations) method from `DelegationManager`.
-Since Bob is redeeming a single delegation chain, use the [`SingleDefault`](../../concepts/delegation/delegation-manager.md#execution-modes) execution mode.
-
-Bob can redeem the delegation by submitting a user operation if his account is a smart account, or a regular transaction if his account is an EOA. In this example, Bob transfers 1 USDC from Alice's account to his own.
-
-
-
-
-```typescript
-import { createExecution, ExecutionMode } from '@metamask/smart-accounts-kit'
-import { DelegationManager } from '@metamask/smart-accounts-kit/contracts'
-import { zeroAddress } from 'viem'
-import { callData } from './config.ts'
-
-const delegations = [signedDelegation]
-
-// USDC address on Ethereum Sepolia.
-const tokenAddress = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
-
-const executions = [createExecution({ target: tokenAddress, callData })]
-
-const redeemDelegationCalldata = DelegationManager.encode.redeemDelegations({
- delegations: [delegations],
- modes: [ExecutionMode.SingleDefault],
- executions: [executions],
-})
-
-const userOperationHash = await bundlerClient.sendUserOperation({
- account: delegateSmartAccount,
- calls: [
- {
- to: delegateSmartAccount.address,
- data: redeemDelegationCalldata,
- },
- ],
- maxFeePerGas: 1n,
- maxPriorityFeePerGas: 1n,
-})
-```
-
-
-
-
-```typescript
-import {
- createExecution,
- getSmartAccountsEnvironment,
- ExecutionMode,
-} from '@metamask/smart-accounts-kit'
-import { DelegationManager } from '@metamask/smart-accounts-kit/contracts'
-import { zeroAddress } from 'viem'
-import { callData } from './config.ts'
-
-const delegations = [signedDelegation]
-
-// USDC address on Ethereum Sepolia.
-const tokenAddress = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
-
-const executions = [createExecution({ target: tokenAddress, callData })]
-
-const redeemDelegationCalldata = DelegationManager.encode.redeemDelegations({
- delegations: [delegations],
- modes: [ExecutionMode.SingleDefault],
- executions: [executions],
-})
-
-const transactionHash = await delegateWalletClient.sendTransaction({
- to: getSmartAccountsEnvironment(chain.id).DelegationManager,
- data: redeemDelegationCalldata,
- chain,
-})
-```
-
-
-
-
-
-```typescript
-import { encodeFunctionData, erc20Abi, parseUnits } from 'viem'
-
-// calldata to transfer 1 USDC to delegate address.
-export const callData = encodeFunctionData({
- abi: erc20Abi,
- args: [delegateSmartAccount.address, parseUnits('1', 6)],
- functionName: 'transfer',
-})
-```
-
-
-
-
-## Next steps
-
-- See [how to configure different scopes](use-delegation-scopes/index.md) to define the initial authority of a delegation.
-- See [how to further refine the authority of a delegation](use-delegation-scopes/constrain-scope.md) using caveat enforcers.
-- See [how to disable a delegation](disable-delegation.md) to revoke permissions.
diff --git a/gator_versioned_docs/version-1.1.0/guides/delegation/use-delegation-scopes/index.md b/gator_versioned_docs/version-1.1.0/guides/delegation/use-delegation-scopes/index.md
deleted file mode 100644
index f0d91efb030..00000000000
--- a/gator_versioned_docs/version-1.1.0/guides/delegation/use-delegation-scopes/index.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-description: Learn how to use the delegation scopes.
-keywords: [delegation scope, delegation, restrict, authority]
----
-
-# Use delegation scopes
-
-When [creating a delegation](../execute-on-smart-accounts-behalf.md), you must configure a scope to define the delegation's initial authority and help prevent delegation misuse.
-You can further constrain this initial authority by [adding caveats to a delegation](constrain-scope.md).
-
-The Smart Accounts Kit currently supports three categories of scopes:
-
-| Scope type | Description |
-| ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
-| [Spending limit scopes](spending-limit.md) | Restricts the spending of native, ERC-20, and ERC-721 tokens based on defined conditions. |
-| [Function call scope](function-call.md) | Restricts the delegation to specific contract methods, contract addresses, or calldata. |
-| [Ownership transfer scope](ownership-transfer.md) | Restricts the delegation to only allow ownership transfers, specifically the `transferOwnership` function for a specified contract. |
diff --git a/gator_versioned_docs/version-1.1.0/guides/delegation/use-delegation-scopes/ownership-transfer.md b/gator_versioned_docs/version-1.1.0/guides/delegation/use-delegation-scopes/ownership-transfer.md
deleted file mode 100644
index a2381eba6b9..00000000000
--- a/gator_versioned_docs/version-1.1.0/guides/delegation/use-delegation-scopes/ownership-transfer.md
+++ /dev/null
@@ -1,43 +0,0 @@
----
-description: Learn how to use the ownership transfer scope for a delegation.
-keywords: [delegation scope, ownership transfer, restrict, delegation]
----
-
-# Use the ownership transfer scope
-
-The ownership transfer scope restricts a delegation to ownership transfer calls only.
-For example, Alice has deployed a smart contract, and she delegates to Bob the ability to transfer ownership of that contract.
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../../get-started/install.md)
-- [Configure the Smart Accounts Kit.](../../configure-toolkit.md)
-- [Create a delegator account.](../execute-on-smart-accounts-behalf.md#3-create-a-delegator-account)
-- [Create a delegate account.](../execute-on-smart-accounts-behalf.md#4-create-a-delegate-account)
-
-## Ownership transfer scope
-
-This scope requires a `contractAddress`, which represents the address of the deployed contract.
-
-Internally, this scope uses the [`ownershipTransfer`](../../../reference/delegation/caveats.md#ownershiptransfer) caveat enforcer.
-See the [ownership transfer scope reference](../../../reference/delegation/delegation-scopes.md#ownership-transfer-scope) for more details.
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-
-const contractAddress = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.OwnershipTransfer,
- contractAddress,
- },
- to: delegateAccount,
- from: delegatorAccount,
- environment: delegatorAccount.environment,
-})
-```
-
-## Next steps
-
-See [how to further constrain the authority of a delegation](constrain-scope.md) using caveat enforcers.
diff --git a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/create-smart-account.md b/gator_versioned_docs/version-1.1.0/guides/smart-accounts/create-smart-account.md
deleted file mode 100644
index 5f79d6b8364..00000000000
--- a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/create-smart-account.md
+++ /dev/null
@@ -1,220 +0,0 @@
----
-description: Learn how to create a MetaMask smart account using Smart Accounts Kit.
-keywords: [create, smart account, signer, hybrid, multisig, 7702]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Create a smart account
-
-You can enable users to create a [MetaMask smart account](../../concepts/smart-accounts.md) directly
-in your dapp. Use [`toMetaMaskSmartAccount`](../../reference/smart-account.md#tometamasksmartaccount)
-to create different types of smart accounts with different signature schemes.
-
-## Prerequisites
-
-[Install and set up the Smart Accounts Kit.](../../get-started/install.md)
-
-## Hybrid smart account
-
-A [Hybrid smart account](../../concepts/smart-accounts.md#hybrid-smart-account) supports both an externally owned account (EOA) owner and any number of passkey (WebAuthn) signers.
-
-This example uses `toMetaMaskSmartAccount` and Viem's [Wallet Client](https://viem.sh/docs/clients/wallet)
-to create a Hybrid smart account. The `signer` parameter also accepts Viem's [Local Account](https://viem.sh/docs/accounts/local) and [WebAuthnAccount](https://viem.sh/account-abstraction/accounts/webauthn#webauthn-account).
-
-See the [`toMetaMaskSmartAccount`](../../reference/smart-account.md#tometamasksmartaccount) API reference for more information.
-
-
-
-
-```typescript
-import { publicClient } from './client.ts'
-import { walletClient } from './signer.ts'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-// Some wallets like MetaMask may require you to request access to
-// account addresses using walletClient.requestAddresses() first.
-const [address] = await walletClient.getAddresses()
-
-const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [address, [], [], []],
- deploySalt: '0x',
- signer: { walletClient },
-})
-```
-
-
-
-
-
-```typescript
-import { http, createPublicClient } from 'viem'
-import { sepolia as chain } from 'viem/chains'
-
-const transport = http()
-export const publicClient = createPublicClient({
- transport,
- chain,
-})
-```
-
-
-
-
-
-```typescript
-import { sepolia as chain } from 'viem/chains'
-import { createWalletClient, custom } from 'viem'
-
-export const walletClient = createWalletClient({
- chain,
- transport: custom(window.ethereum!),
-})
-```
-
-
-
-
-## Multisig smart account
-
-A [Multisig smart account](../../concepts/smart-accounts.md#multisig-smart-account) supports multiple EOA signers with a configurable threshold for execution.
-
-This example uses [`toMetaMaskSmartAccount`](../../reference/smart-account.md#tometamasksmartaccount) to create a
-Multisig smart account with a combination of account signers and Wallet Client signers.
-
-
-
-
-```typescript
-import { publicClient } from './client.ts'
-import { account, walletClient } from './signers.ts'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const owners = [account.address, walletClient.address]
-const signer = [{ account }, { walletClient }]
-const threshold = 2n
-
-const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.MultiSig,
- deployParams: [owners, threshold],
- deploySalt: '0x',
- signer,
-})
-```
-
-
-
-
-
-```typescript
-import { http, createPublicClient } from 'viem'
-import { sepolia as chain } from 'viem/chains'
-
-const transport = http()
-export const publicClient = createPublicClient({
- transport,
- chain,
-})
-```
-
-
-
-
-
-```typescript
-import { privateKeyToAccount, generatePrivateKey } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-import { http, createWalletClient } from 'viem'
-
-// This private key will be used to generate the first signer.
-const privateKey = generatePrivateKey()
-export const account = privateKeyToAccount(privateKey)
-
-// This private key will be used to generate the second signer.
-const walletClientPrivateKey = generatePrivateKey()
-const walletClientAccount = privateKeyToAccount(walletClientPrivateKey)
-
-export const walletClient = createWalletClient({
- account: walletClientAccount,
- chain,
- transport: http(),
-})
-```
-
-
-
-
-:::note
-The number of signers must be at least equal to the threshold to generate a valid signature.
-:::
-
-## EIP-7702 smart account
-
-An [EIP-7702 smart account](../../concepts/smart-accounts.md#stateless-7702-smart-account) represents an EOA that has been upgraded
-to support MetaMask Smart Accounts functionality as defined by [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702).
-
-This example uses [`toMetaMaskSmartAccount`](../../reference/smart-account.md#tometamasksmartaccount)
-and Viem's [`privateKeyToAccount`](https://viem.sh/docs/accounts/local/privateKeyToAccount) to
-create an EIP-7702 smart account. This example doesn't handle the upgrade process; see the
-[EIP-7702 quickstart](../../get-started/smart-account-quickstart/eip7702.md) to learn how to upgrade.
-
-:::note Important
-The EIP-7702 implementation only works with Viem's [Local Accounts](https://viem.sh/docs/accounts/local). It doesn't work with a [JSON-RPC Account](https://viem.sh/docs/accounts/jsonRpc) like MetaMask.
-
-See the [Upgrade a MetaMask EOA to a smart account](https://docs.metamask.io/tutorials/upgrade-eoa-to-smart-account/) tutorial.
-:::
-
-
-
-
-```typescript
-import { publicClient } from './client.ts'
-import { account } from './signer.ts'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Stateless7702,
- address: account.address,
- signer: { account },
-})
-```
-
-
-
-
-
-```typescript
-import { http, createPublicClient } from 'viem'
-import { sepolia as chain } from 'viem/chains'
-
-const transport = http()
-export const publicClient = createPublicClient({
- transport,
- chain,
-})
-```
-
-
-
-
-
-```typescript
-import { privateKeyToAccount, generatePrivateKey } from 'viem/accounts'
-
-const privateKey = generatePrivateKey()
-export const account = privateKeyToAccount(privateKey)
-```
-
-
-
-
-## Next steps
-
-- [Configure signers](./signers/index.md) to use a signer that fits your needs.
-- [Deploy the smart account](deploy-smart-account.md) and [send user operations](send-user-operation.md) using [Viem Account Abstraction clients](../configure-toolkit.md).
-- [Create delegations](../delegation/execute-on-smart-accounts-behalf.md) to grant scoped permissions to other accounts.
diff --git a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/send-gasless-transaction.md b/gator_versioned_docs/version-1.1.0/guides/smart-accounts/send-gasless-transaction.md
deleted file mode 100644
index d3f295d0df0..00000000000
--- a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/send-gasless-transaction.md
+++ /dev/null
@@ -1,90 +0,0 @@
----
-description: Learn how to send a gasless transaction
-keywords: [send, gasless transaction, smart account, sponsor, paymaster]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Send a gasless transaction
-
-MetaMask Smart Accounts support gas sponsorship, which simplifies onboarding by abstracting gas fees away from end users.
-You can use any paymaster service provider, such as [Pimlico](https://docs.pimlico.io/references/paymaster) or [ZeroDev](https://docs.zerodev.app/meta-infra/rpcs), or plug in your own custom paymaster.
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../get-started/install.md)
-- [Create a MetaMask smart account.](create-smart-account.md)
-
-## Send a gasless transaction
-
-The following example demonstrates how to use Viem's [Paymaster Client](https://viem.sh/account-abstraction/clients/paymaster) to send gasless transactions.
-You can provide the paymaster client using the paymaster property in the [`sendUserOperation`](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation#paymaster-optional) method, or in the [Bundler Client](https://viem.sh/account-abstraction/clients/bundler#paymaster-optional).
-
-In this example, the paymaster client is passed to the `sendUserOperation` method.
-
-
-
-
-```typescript
-import { bundlerClient, smartAccount, paymasterClient } from './config.ts'
-import { parseEther } from 'viem'
-
-// Appropriate fee per gas must be determined for the specific bundler being used.
-const maxFeePerGas = 1n
-const maxPriorityFeePerGas = 1n
-
-const userOperationHash = await bundlerClient.sendUserOperation({
- account: smartAccount,
- calls: [
- {
- to: '0x1234567890123456789012345678901234567890',
- value: parseEther('0.001'),
- },
- ],
- maxFeePerGas,
- maxPriorityFeePerGas,
- paymaster: paymasterClient,
-})
-```
-
-
-
-
-
-```typescript
-import { createPublicClient, createPaymasterClient, http } from 'viem'
-import { createBundlerClient } from 'viem/account-abstraction'
-import { sepolia as chain } from 'viem/chains'
-import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const privateKey = generatePrivateKey()
-const account = privateKeyToAccount(privateKey)
-
-export const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [account.address, [], [], []],
- deploySalt: '0x',
- signer: { account },
-})
-
-export const bundlerClient = createBundlerClient({
- client: publicClient,
- transport: http('https://api.pimlico.io/v2/11155111/rpc?apikey='),
-})
-
-export const paymasterClient = createPaymasterClient({
- // You can use the paymaster of your choice
- transport: http('https://api.pimlico.io/v2/11155111/rpc?apikey='),
-})
-```
-
-
-
diff --git a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/send-user-operation.md b/gator_versioned_docs/version-1.1.0/guides/smart-accounts/send-user-operation.md
deleted file mode 100644
index 93bf2623dd0..00000000000
--- a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/send-user-operation.md
+++ /dev/null
@@ -1,185 +0,0 @@
----
-description: Learn how to send an ERC-4337 user operation using Viem.
-keywords: [ERC-4337, send, user operation, smart account]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Send a user operation
-
-User operations are the [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) counterpart to traditional blockchain transactions.
-They incorporate significant enhancements that improve user experience and provide greater
-flexibility in account management and transaction execution.
-
-Viem's Account Abstraction API allows a developer to specify an array of `Calls` that will be executed as a user operation via Viem's [`sendUserOperation`](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation) method.
-The MetaMask Smart Accounts Kit encodes and executes the provided calls.
-
-User operations are not directly sent to the network.
-Instead, they are sent to a bundler, which validates, optimizes, and aggregates them before network submission.
-See [Viem's Bundler Client](https://viem.sh/account-abstraction/clients/bundler) for details on how to interact with the bundler.
-
-:::note
-If a user operation is sent from a MetaMask smart account that has not been deployed, the toolkit configures the user operation to automatically deploy the account.
-:::
-
-## Prerequisites
-
-- [Install and set up the Smart Accounts Kit.](../../get-started/install.md)
-- [Create a MetaMask smart account.](create-smart-account.md)
-
-## Send a user operation
-
-The following is a simplified example of sending a user operation using Viem Core SDK. Viem Core SDK offers more granular control for developers who require it.
-
-In the example, a user operation is created with the necessary gas limits.
-
-This user operation is passed to a bundler instance, and the `EntryPoint` address is retrieved from the client.
-
-
-
-
-```typescript
-import { bundlerClient, smartAccount } from './config.ts'
-import { parseEther } from 'viem'
-
-// Appropriate fee per gas must be determined for the specific bundler being used.
-const maxFeePerGas = 1n
-const maxPriorityFeePerGas = 1n
-
-const userOperationHash = await bundlerClient.sendUserOperation({
- account: smartAccount,
- calls: [
- {
- to: '0x1234567890123456789012345678901234567890',
- value: parseEther('0.001'),
- },
- ],
- maxFeePerGas,
- maxPriorityFeePerGas,
-})
-```
-
-
-
-
-
-```typescript
-import { createPublicClient, http } from 'viem'
-import { createBundlerClient } from 'viem/account-abstraction'
-import { sepolia as chain } from 'viem/chains'
-import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-
-const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-const privateKey = generatePrivateKey()
-const account = privateKeyToAccount(privateKey)
-
-export const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [account.address, [], [], []],
- deploySalt: '0x',
- signer: { account },
-})
-
-export const bundlerClient = createBundlerClient({
- client: publicClient,
- transport: http('https://public.pimlico.io/v2/11155111/rpc'),
-})
-```
-
-
-
-
-### Estimate fee per gas
-
-Different bundlers have different ways to estimate `maxFeePerGas` and `maxPriorityFeePerGas`, and can reject requests with insufficient values.
-The following example updates the previous example to estimate the fees.
-
-This example uses constant values, but the [Hello Gator example](https://github.com/MetaMask/hello-gator) uses Pimlico's Alto bundler,
-which fetches user operation gas price using the RPC method [`pimlico_getUserOperationPrice`](https://docs.pimlico.io/infra/bundler/endpoints/pimlico_getUserOperationGasPrice).
-
-:::info Installation required
-
-To estimate the gas fee for Pimlico's bundler, install the [permissionless.js SDK](https://docs.pimlico.io/references/permissionless/).
-
-:::
-
-```typescript title="example.ts"
-// add-next-line
-+ import { createPimlicoClient } from "permissionless/clients/pimlico";
-import { parseEther } from "viem";
-import { bundlerClient, smartAccount } from "./config.ts" // The config.ts is the same as in the previous example.
-
-// remove-start
-- const maxFeePerGas = 1n;
-- const maxPriorityFeePerGas = 1n;
-// remove-end
-
-// add-start
-+ const pimlicoClient = createPimlicoClient({
-+ transport: http("https://api.pimlico.io/v2/11155111/rpc?apikey="), // You can get the API Key from the Pimlico dashboard.
-+ });
-+
-+ const { fast: fee } = await pimlicoClient.getUserOperationGasPrice();
-// add-end
-
-const userOperationHash = await bundlerClient.sendUserOperation({
- account: smartAccount,
- calls: [
- {
- to: "0x1234567890123456789012345678901234567890",
- value: parseEther("1")
- }
- ],
- // remove-start
-- maxFeePerGas,
-- maxPriorityFeePerGas
- // remove-end
- // add-next-line
-+ ...fee
-});
-```
-
-### Wait for the transaction receipt
-
-After submitting the user operation, it's crucial to wait for the receipt to ensure that it has been successfully included in the blockchain. Use the `waitForUserOperationReceipt` method provided by the bundler client.
-
-```typescript title="example.ts"
-import { createPimlicoClient } from "permissionless/clients/pimlico";
-import { bundlerClient, smartAccount } from "./config.ts" // The config.ts is the same as in the previous example.
-
-const pimlicoClient = createPimlicoClient({
- transport: http("https://api.pimlico.io/v2/11155111/rpc?apikey="), // You can get the API Key from the Pimlico dashboard.
-});
-
-const { fast: fee } = await pimlicoClient.getUserOperationGasPrice();
-
-const userOperationHash = await bundlerClient.sendUserOperation({
- account: smartAccount,
- calls: [
- {
- to: "0x1234567890123456789012345678901234567890",
- value: parseEther("1")
- }
- ],
- ...fee
-});
-
-// add-start
-+ const { receipt } = await bundlerClient.waitForUserOperationReceipt({
-+ hash: userOperationHash
-+ });
-+
-+ console.log(receipt.transactionHash);
-// add-end
-```
-
-## Next steps
-
-To sponsor gas for end users, see how to [send a gasless transaction](send-gasless-transaction.md).
diff --git a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/signers/eoa-wallets.md b/gator_versioned_docs/version-1.1.0/guides/smart-accounts/signers/eoa-wallets.md
deleted file mode 100644
index 4b6a8469ab3..00000000000
--- a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/signers/eoa-wallets.md
+++ /dev/null
@@ -1,113 +0,0 @@
----
-description: Learn how to use Externally Owned Account (EOA) with MetaMask Smart Accounts.
-sidebar_label: EOA (e.g. MetaMask)
-keywords: [metamask, smart account, signer, metamask smart account]
----
-
-# Use an EOA with MetaMask Smart Accounts
-
-Externally owned accounts (EOAs) are accounts controlled by a user's private key (paired with a public address) and are typically accessed through wallet apps like MetaMask. MetaMask Smart Accounts is signer-agnostic, so
-you can use an EOA as the signer.
-
-:::info
-This guide supports React and React-based frameworks. For Vue, see [Wagmi docs](https://wagmi.sh/vue/getting-started).
-:::
-
-## Prerequisites
-
-- Install [Node.js](https://nodejs.org/en/blog/release/v18.18.0) v18 or later.
-- Install [Yarn](https://yarnpkg.com/),
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), or another package manager.
-
-## Steps
-
-### 1. Install dependencies
-
-Install the [Smart Accounts Kit](https://www.npmjs.com/package/@metamask/smart-accounts-kit) and other dependencies in your project:
-
-```bash npm2yarn
-npm install @metamask/smart-accounts-kit wagmi @tanstack/react-query viem
-```
-
-### 2. Create the App provider
-
-Once you've created the `AppProvider`, wrap it at the root of your application so
-that the rest of your application has access to the Wagmi's and TanStack's context.
-This will allow every component inside the provider to use the Wagmi hooks.
-
-For the advance configuration, see [Wagmi's createConfig API reference](https://wagmi.sh/react/api/createConfig).
-
-
-
-
-```ts
-import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
-import { ReactNode } from "react";
-import { WagmiProvider } from 'wagmi'
-import { config } from "./config.ts";
-
-const queryClient = new QueryClient();
-
-export function AppProvider({ children }: { children: ReactNode }) {
- return (
-
-
- {children}
-
-
- );
-}
-```
-
-
-
-
-
-```ts
-import { createConfig, http } from 'wagmi'
-import { sepolia } from 'viem/chains'
-
-export const config = createConfig({
- chains: [sepolia],
- transports: {
- [sepolia.id]: http(),
- },
-})
-```
-
-
-
-
-### 3. Create a smart account
-
-Once the user has connected their wallet, use the [Wallet Client](https://viem.sh/docs/clients/wallet) from Wagmi as the signer to create a
-MetaMask smart account.
-
-```ts
-import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
-import { useAccount, usePublicClient, useWalletClient } from 'wagmi'
-
-const { address } = useAccount()
-const publicClient = usePublicClient()
-const { data: walletClient } = useWalletClient()
-
-// Additional check to make sure the EOA wallet is connected
-// and values are available.
-if (!address || !walletClient || !publicClient) {
- // Handle the error case
-}
-
-const smartAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [address, [], [], []],
- deploySalt: '0x',
- signer: { walletClient },
-})
-```
-
-## Next steps
-
-- See how to use [MetaMask Embedded Wallets as a signer](./eoa-wallets.md) to make the user onboarding journey easier.
-- See how to [send a user operation](../send-user-operation.md).
-- To sponsor gas for end users, see how to [send a gasless transaction](../send-gasless-transaction.md).
diff --git a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/signers/index.md b/gator_versioned_docs/version-1.1.0/guides/smart-accounts/signers/index.md
deleted file mode 100644
index a833f88dbb3..00000000000
--- a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/signers/index.md
+++ /dev/null
@@ -1,53 +0,0 @@
----
-description: Learn how to configure signers for MetaMask Smart Accounts.
-keywords:
- [signers, metamask smart accounts, smart account, embedded wallets, web3auth, dynamic, privy]
----
-
-import CardList from "@site/src/components/CardList"
-
-# Configure a signer
-
-When [creating a smart account](../create-smart-account.md), you must specify a signer. The signer owns the smart account and is responsible for
-generating the signatures required to submit user operations. MetaMask Smart Accounts is signer-agnostic, allowing you
-to use any signer you prefer, such as Embedded Wallets, passkeys, EOA wallets, or a custom signer.
-
-MetaMask Smart Accounts has a native integration with [MetaMask Embedded Wallets](/embedded-wallets/), making user onboarding easier. In addition to the native integration, you can use
-third-party wallet providers as Privy, Dynamic, or Para as the signer for your smart account.
-
-See the following guides to learn how to configure different signers:
-
-## Recommended
-
-
-
-## Other signers
-
-
diff --git a/gator_versioned_docs/version-1.1.0/index.mdx b/gator_versioned_docs/version-1.1.0/index.mdx
deleted file mode 100644
index 45a3ae99948..00000000000
--- a/gator_versioned_docs/version-1.1.0/index.mdx
+++ /dev/null
@@ -1,96 +0,0 @@
----
-title: MetaMask Smart Accounts Kit introduction
-sidebar_label: Introduction
-description: High-level overview of MetaMask Smart Accounts Kit.
-keywords: [MetaMask, smart accounts kit, smart accounts]
----
-
-import CardList from '@site/src/components/CardList'
-
-# MetaMask Smart Accounts Kit
-
-The MetaMask Smart Accounts Kit enables developers to create new experiences based on programmable account behavior and granular permission sharing.
-It offers a suite of contracts, libraries, and services designed for maximum composability, allowing developers to build and extend their dapps with ease.
-
-## Build on MetaMask Smart Accounts
-
-The toolkit enables embedding [MetaMask Smart Accounts](concepts/smart-accounts.md) into dapps.
-Smart accounts support programmable account behavior and advanced features like delegated permissions, multi-signature approvals, and gas abstraction.
-
-[Delegation](concepts/delegation/overview.md) is a core feature of smart accounts, enabling secure, rule-based permission sharing.
-Delegation is powered by the [Delegation Framework](https://github.com/metamask/delegation-framework), which defines how permissions are created, shared, and enforced.
-
-
-
-## Request Advanced Permissions (ERC-7715)
-
-The toolkit supports [Advanced Permissions (ERC-7715)](concepts/advanced-permissions.md), which are fine-grained permissions dapps can request from users directly via the MetaMask browser extension.
-Advanced Permissions allow you to perform executions on the behalf of MetaMask users.
-
-
-
-## Partner integrations
-
-The Smart Accounts Kit is integrated with multiple ecosystem partners.
-Check out the following documentation from these partners:
-
-
diff --git a/gator_versioned_docs/version-1.1.0/reference/delegation/caveat-enforcer-client.md b/gator_versioned_docs/version-1.1.0/reference/delegation/caveat-enforcer-client.md
deleted file mode 100644
index 0f824e85492..00000000000
--- a/gator_versioned_docs/version-1.1.0/reference/delegation/caveat-enforcer-client.md
+++ /dev/null
@@ -1,363 +0,0 @@
----
-description: Caveat Enforcer Client API reference.
-sidebar_label: Caveat Enforcer Client
-toc_max_heading_level: 2
-keywords: [delegation state, caveat enforcer client, API, methods, reference]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Caveat Enforcer Client reference
-
-The following API methods are related to `CaveatEnforcerClient` used to [check the delegation state](../../guides/delegation/check-delegation-state.md).
-
-## `createCaveatEnforcerClient`
-
-Create a Viem Client extended with caveat enforcer actions. This client allows you to interact with the caveat enforcers of the
-delegation, and read the required state.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------- | ------------------------------------------------------------------ | -------- | ------------------------------------------------------------------------------------ |
-| `client` | `Client` | Yes | The Viem Client to interact with the caveat enforcer contracts and read their state. |
-| `environment` | [`SmartAccountsEnvironment`](../types.md#smartaccountsenvironment) | Yes | Environment to resolve the smart contracts for the current chain. |
-
-### Example
-
-
-
-
-```typescript
-import { environment, publicClient as client } from './config.ts'
-import { createCaveatEnforcerClient } from '@metamask/smart-accounts-kit'
-
-const caveatEnforcerClient = createCaveatEnforcerClient({
- environment,
- client,
-})
-```
-
-
-
-
-```typescript
-import { sepolia as chain } from 'viem/chains'
-import { createPublicClient, http } from 'viem'
-import { getSmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-
-export const environment = getSmartAccountsEnvironment(chain.id)
-
-export const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-```
-
-
-
-
-## `getErc20PeriodTransferEnforcerAvailableAmount`
-
-Returns the available amount from the ERC-20 period transfer enforcer for the current period.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------ | -------------------------------------- | -------- | ----------------------------------------------------------------------- |
-| `delegation` | [`Delegation`](../types.md#delegation) | Yes | The delegation object for which you want to check the available amount. |
-
-### Example
-
-
-
-
-```typescript
-import { delegation } './config.ts'
-
-// Returns the available amount for current period.
-const { availableAmount } = await caveatEnforcerClient.getErc20PeriodTransferEnforcerAvailableAmount({
- delegation,
-})
-```
-
-
-
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { sepolia as chain } from 'viem/chains'
-import { getSmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-
-const environment = getSmartAccountsEnvironment(chain.id)
-
-// Since current time is in seconds, we need to convert milliseconds to seconds.
-const startDate = Math.floor(Date.now() / 1000)
-
-export const delegation = createDelegation({
- scope: {
- type: ScopeType.Erc20PeriodTransfer,
- tokenAddress: '0xb4aE654Aca577781Ca1c5DE8FbE60c2F423f37da',
- periodAmount: parseUnits('10', 6),
- periodDuration: 86400,
- startDate,
- },
- to: 'DELEGATE_ADDRESS',
- from: 'DELEGATOR_ADDRESS',
- environment,
-})
-```
-
-
-
-
-## `getErc20StreamingEnforcerAvailableAmount`
-
-Returns the available amount from the ERC-20 streaming enforcer.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------ | -------------------------------------- | -------- | ----------------------------------------------------------------------- |
-| `delegation` | [`Delegation`](../types.md#delegation) | Yes | The delegation object for which you want to check the available amount. |
-
-### Example
-
-
-
-
-```typescript
-import { delegation } './config.ts'
-
-// Returns the available amount
-const { availableAmount } = await caveatEnforcerClient.getErc20StreamingEnforcerAvailableAmount({
- delegation,
-})
-```
-
-
-
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { sepolia as chain } from 'viem/chains'
-import { getSmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-import { parseUnits } from 'viem'
-
-const environment = getSmartAccountsEnvironment(chain.id)
-
-// Since current time is in seconds, we need to convert milliseconds to seconds.
-const startTime = Math.floor(Date.now() / 1000)
-
-export const delegation = createDelegation({
- scope: {
- type: ScopeType.Erc20Streaming,
- tokenAddress: '0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92',
- amountPerSecond: parseUnits('0.1', 6),
- initialAmount: parseUnits('1', 6),
- maxAmount: parseUnits('10', 6),
- startTime,
- },
- to: 'DELEGATE_ADDRESS',
- from: 'DELEGATOR_ADDRESS',
- environment,
-})
-```
-
-
-
-
-## `getNativeTokenPeriodTransferEnforcerAvailableAmount`
-
-Returns the available amount from the native token period enforcer for the current period.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------ | -------------------------------------- | -------- | ----------------------------------------------------------------------- |
-| `delegation` | [`Delegation`](../types.md#delegation) | Yes | The delegation object for which you want to check the available amount. |
-
-### Example
-
-
-
-
-```typescript
-import { delegation } './config.ts'
-
-// Returns the available amount for current period.
-const { availableAmount } = await caveatEnforcerClient.getNativeTokenPeriodTransferEnforcerAvailableAmount({
- delegation,
-})
-```
-
-
-
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { sepolia as chain } from 'viem/chains'
-import { parseEther } from 'viem'
-import { getSmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-
-const environment = getSmartAccountsEnvironment(chain.id)
-
-// Since current time is in seconds, we need to convert milliseconds to seconds.
-const startDate = Math.floor(Date.now() / 1000)
-
-export const delegation = createDelegation({
- scope: {
- type: ScopeType.NativeTokenPeriodTransfer,
- periodAmount: parseEther('0.01'),
- periodDuration: 86400,
- startDate,
- },
- to: 'DELEGATE_ADDRESS',
- from: 'DELEGATOR_ADDRESS',
- environment,
-})
-```
-
-
-
-
-## `getNativeTokenStreamingEnforcerAvailableAmount`
-
-Returns the available amount from the native streaming enforcer.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------ | -------------------------------------- | -------- | ----------------------------------------------------------------------- |
-| `delegation` | [`Delegation`](../types.md#delegation) | Yes | The delegation object for which you want to check the available amount. |
-
-### Example
-
-
-
-
-```typescript
-import { delegation } './config.ts'
-
-// Returns the available amount
-const { availableAmount } = await caveatEnforcerClient.getNativeTokenStreamingEnforcerAvailableAmount({
- delegation,
-})
-```
-
-
-
-
-```typescript
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { sepolia as chain } from 'viem/chains'
-import { getSmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-
-const environment = getSmartAccountsEnvironment(chain.id)
-
-// Since current time is in seconds, we need to convert milliseconds to seconds.
-const startTime = Math.floor(Date.now() / 1000)
-
-export const delegation = createDelegation({
- scope: {
- type: ScopeType.NativeTokenStreaming,
- amountPerSecond: parseEther('0.001'),
- initialAmount: parseEther('0.01'),
- maxAmount: parseEther('0.1'),
- startTime,
- },
- to: 'DELEGATE_ADDRESS',
- from: 'DELEGATOR_ADDRESS',
- environment,
-})
-```
-
-
-
-
-## `getMultiTokenPeriodEnforcerAvailableAmount`
-
-Returns the available amount from the multi token period transfer enforcer for the current period. You'll need to
-encode the args for the token index you want to check the available amount.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------ | -------------------------------------- | -------- | ---------------------------------------------------------------------------------------- |
-| `delegation` | [`Delegation`](../types.md#delegation) | Yes | The delegation object with token index for which you want to check the available amount. |
-
-### Example
-
-
-
-
-```typescript
-import { delegation } './config.ts'
-
-// Encode the args for the multiTokenPeriod enforcer.
-const args = encodePacked(['uint256'], [BigInt(0)]);
-
-// Ensure the index is correct when working with multiple enforcers.
-delegation.caveats[0].args = args
-
-// Returns the available amount for the first token in the list.
-const { availableAmount } = await caveatEnforcerClient.getMultiTokenPeriodEnforcerAvailableAmount({
- delegation,
-})
-```
-
-
-
-
-```typescript
-import {
- createDelegation,
- getSmartAccountsEnvironment,
- ROOT_AUTHORITY,
- CaveatType,
-} from '@metamask/smart-accounts-kit'
-import { createCaveatBuilder } from '@metamask/smart-accounts-kit/utils'
-import { sepolia as chain } from 'viem/chains'
-import { parseUnits, parseEther } from 'viem'
-
-const environment = getSmartAccountsEnvironment(chain.id)
-const caveatBuilder = createCaveatBuilder(environment)
-
-// Current time as start date.
-// Since startDate is in seconds, we need to convert milliseconds to seconds.
-const startDate = Math.floor(Date.now() / 1000)
-
-const tokenConfigs = [
- {
- token: '0xb4aE654Aca577781Ca1c5DE8FbE60c2F423f37da',
- // 1 token with 6 decimals.
- periodAmount: parseUnits('1', 6),
- // 1 day in seconds.
- periodDuration: 86400,
- startDate,
- },
- {
- // For native token use zeroAddress
- token: zeroAddress,
- // 0.01 ETH in wei.
- periodAmount: parseEther('0.01'),
- // 1 hour in seconds.
- periodDuration: 3600,
- startDate,
- },
-]
-
-const caveats = caveatBuilder.addCaveat(CaveatType.MultiTokenPeriod, tokenConfigs)
-
-export const delegation: Delegation = {
- delegate: 'DELEGATE_ADDRESS',
- delegator: 'DELEGATOR_ADDRESS',
- authority: ROOT_AUTHORITY,
- caveats: caveats.build(),
- salt: '0x',
-}
-```
-
-
-
diff --git a/gator_versioned_docs/version-1.1.0/reference/delegation/caveats.md b/gator_versioned_docs/version-1.1.0/reference/delegation/caveats.md
deleted file mode 100644
index 019f0ec27b9..00000000000
--- a/gator_versioned_docs/version-1.1.0/reference/delegation/caveats.md
+++ /dev/null
@@ -1,1021 +0,0 @@
----
-description: Caveat enforcers reference.
-sidebar_label: Caveats
-toc_max_heading_level: 2
-keywords: [caveats, caveat enforcers, configuration, smart contracts, reference]
----
-
-# Caveats reference
-
-When [constraining a delegation scope](../../guides/delegation/use-delegation-scopes/constrain-scope.md), you can specify the following caveat types.
-
-You can use either a string literal or the [`CaveatType`](../types.md#caveattype) enum to define the caveat type.
-
-## `allowedCalldata`
-
-Limits the calldata that is executed.
-
-You can use this caveat to enforce function parameters.
-We strongly recommend using this caveat to validate static types and not dynamic types.
-You can validate dynamic types through a series of `allowedCalldata` terms, but this is tedious and error-prone.
-
-Caveat enforcer contract: [`AllowedCalldataEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/AllowedCalldataEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------ | -------- | -------- | --------------------------------------------------------------------------------------------------------------- |
-| `startIndex` | `number` | Yes | The index in the calldata byte array (including the 4-byte method selector) where the expected calldata starts. |
-| `value` | `Hex` | Yes | The expected calldata that must match at the specified index. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const value = encodeAbiParameters(
- [{ type: 'string' }, { type: 'uint256' }],
- ['Hello Gator', 12345n]
-)
-
-const caveats = [
- {
- type: CaveatType.AllowedCalldata,
- startIndex: 4,
- value,
- },
-]
-```
-
-:::note
-This example uses Viem's [`encodeAbiParameters`](https://viem.sh/docs/abi/encodeAbiParameters) utility to encode the parameters as ABI-encoded hex strings.
-:::
-
-## `allowedMethods`
-
-Limits what methods the delegate can call.
-
-Caveat enforcer contract: [`AllowedMethodsEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/AllowedMethodsEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ----------- | ------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `selectors` | `MethodSelector[]` | Yes | The list of method selectors that the delegate is allowed to call. The selector value can be 4-byte hex string, ABI function signature, or ABI function object. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.AllowedMethods,
- selectors: [
- // 4-byte Hex string.
- '0xa9059cbb',
- // ABI function signature.
- 'transfer(address,uint256)',
- // ABI function object.
- {
- name: 'transfer',
- type: 'function',
- inputs: [
- { name: 'recipient', type: 'address' },
- { name: 'amount', type: 'uint256' },
- ],
- outputs: [],
- stateMutability: 'nonpayable',
- },
- ],
- },
-]
-```
-
-:::note
-This example adds the `transfer` function to the allowed methods in three different ways - as the 4-byte function selector, the ABI function signature, and the `ABIFunction` object.
-:::
-
-## `allowedTargets`
-
-Limits what addresses the delegate can call.
-
-Caveat enforcer contract: [`AllowedTargetsEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/AllowedTargetsEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| --------- | ----------- | -------- | ----------------------------------------------------------- |
-| `targets` | `Address[]` | Yes | The list of addresses that the delegate is allowed to call. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.AllowedTargets,
- targets: [
- '0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92',
- '0xB2880E3862f1024cAC05E66095148C0a9251718b',
- ],
- },
-]
-```
-
-## `argsEqualityCheck`
-
-Ensures that the `args` provided when redeeming the delegation are equal to the terms specified on the caveat.
-
-Caveat enforcer contract: [`ArgsEqualityCheckEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/ArgsEqualityCheckEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------ | ----- | -------- | ------------------------------------------------------------------------ |
-| `args` | `Hex` | Yes | The expected args that must match exactly when redeeming the delegation. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.ArgsEqualityCheck,
- args: '0xf2bef872456302645b7c0bb59dcd96ffe6d4a844f311ebf95e7cf439c9393de2',
- },
-]
-```
-
-## `blockNumber`
-
-Specifies a range of blocks through which the delegation will be valid.
-
-Caveat enforcer contract: [`BlockNumberEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/BlockNumberEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ----------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------- |
-| `afterThreshold` | `bigint` | Yes | The block number after which the delegation is valid. Set the value to `0n` to disable this threshold. |
-| `beforeThreshold` | `bigint` | Yes | The block number before which the delegation is valid. Set the value to `0n` to disable this threshold. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.BlockNumber,
- afterThreshold: 19426587n,
- beforeThreshold: 0n,
- },
-]
-```
-
-## `deployed`
-
-Ensures a contract is deployed, and if not, deploys the contract.
-
-Caveat enforcer contract: [`DeployedEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/DeployedEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ----------------- | --------- | -------- | ------------------------------------ |
-| `contractAddress` | `Address` | Yes | The contract address. |
-| `salt` | `Hex` | Yes | The salt to use with the deployment. |
-| `bytecode` | `Hex` | Yes | The bytecode of the contract. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.Deployed,
- contractAddress: '0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92',
- salt: '0x0e3e8e2381fde0e8515ed47ec9caec8ba2bc12603bc2b36133fa3e3fa4d88587',
- bytecode: '0x...', // The deploy bytecode for the contract at 0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92
- },
-]
-```
-
-## `erc1155BalanceChange`
-
-Ensures that the recipient's ERC-1155 token balance has changed within the allowed bounds—either increased by a minimum or decreased by a maximum specified amount.
-
-Caveat enforcer contract: [`ERC1155BalanceChangeEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/ERC1155BalanceChangeEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| -------------- | ------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `tokenAddress` | `Address` | Yes | The ERC-1155 token contract address. |
-| `recipient` | `Address` | Yes | The address on which the checks will be applied. |
-| `tokenId` | `bigint` | Yes | The ID of the ERC-1155 token. |
-| `balance` | `bigint` | Yes | The amount by which the balance must be changed. |
-| `changeType` | `BalanceChangeType` | Yes | The balance change type for the ERC-1155 token. Specifies whether the balance should have increased or decreased. Valid parameters are `BalanceChangeType.Increase` and `BalanceChangeType.Decrease`. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.Erc1155BalanceChange,
- tokenAddress: '0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92',
- recipient: '0x3fF528De37cd95b67845C1c55303e7685c72F319',
- tokenId: 1n,
- balance: 1000000n,
- changeType: BalanceChangeType.Increase,
- },
-]
-```
-
-## `erc20BalanceChange`
-
-Ensures that the recipient's ERC-20 token balance has changed within the allowed bounds—either increased by a minimum or decreased by a maximum specified amount.
-
-Caveat enforcer contract: [`ERC20BalanceChangeEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/ERC20BalanceChangeEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| -------------- | ------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `tokenAddress` | `Address` | Yes | The ERC-20 token contract addres. |
-| `recipient` | `Address` | Yes | The address on which the checks will be applied. |
-| `balance` | `bigint` | Yes | The amount by which the balance must be changed. |
-| `changeType` | `BalanceChangeType` | Yes | The balance change type for the ERC-20 token. Specifies whether the balance should have increased or decreased. Valid parameters are `BalanceChangeType.Increase` and `BalanceChangeType.Decrease`. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.Erc20BalanceChange,
- tokenAddress: '0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92',
- recipient: '0x3fF528De37cd95b67845C1c55303e7685c72F319',
- balance: 1000000n,
- changeType: BalanceChangeType.Increase,
- },
-]
-```
-
-## `erc20PeriodTransfer`
-
-Ensures that ERC-20 token transfers remain within a predefined limit during a
-specified time window. At the start of each new period, the allowed transfer
-amount resets. Any unused transfer allowance from the previous period does not
-carry over and is forfeited.
-
-Caveat enforcer contract: [`ERC20PeriodTransferEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/ERC20PeriodTransferEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ---------------- | --------- | -------- | ---------------------------------------------------------------- |
-| `tokenAddress` | `Address` | Yes | The ERC-20 token contract address as a hex string. |
-| `periodAmount` | `bigint` | Yes | The maximum amount of tokens that can be transferred per period. |
-| `periodDuration` | `number` | Yes | The duration of each period in seconds. |
-| `startDate` | `number` | Yes | The timestamp when the first period begins in seconds. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-// Current time as start date.
-// Since startDate is in seconds, we need to convert milliseconds to seconds.
-const startDate = Math.floor(Date.now() / 1000)
-
-const caveats = [
- {
- type: CaveatType.Erc20PeriodTransfer,
- // Address of the ERC-20 token.
- tokenAddress: '0xb4aE654Aca577781Ca1c5DE8FbE60c2F423f37da',
- // 1 ERC-20 token - 18 decimals, in wei.
- periodAmount: 1000000000000000000n,
- // 1 day in seconds.
- periodDuration: 86400,
- startDate,
- },
-]
-```
-
-## `erc20Streaming`
-
-Enforces a linear streaming transfer limit for ERC-20 tokens. Block token access until the specified start timestamp. At the start timestamp, immediately release the specified initial amount. Afterward, accrue tokens linearly at the specified rate, up to the specified maximum.
-
-Caveat enforcer contract: [`ERC20StreamingEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/ERC20StreamingEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ----------------- | --------- | -------- | --------------------------------------------------------- |
-| `tokenAddress` | `Address` | Yes | The ERC-20 token contract address. |
-| `initialAmount` | `bigint` | Yes | The initial amount that can be transferred at start time. |
-| `maxAmount` | `bigint` | Yes | The maximum total amount that can be unlocked. |
-| `amountPerSecond` | `bigint` | Yes | The rate at which tokens accrue per second. |
-| `startTime` | `number` | Yes | The start timestamp in seconds. |
-
-### Example
-
-```typescript
-import { CaveatType } from "@metamask/smart-accounts-kit";
-
-// Current time as start date.
-// Since startDate is in seconds, we need to convert milliseconds to seconds.
-const startDate = Math.floor(Date.now() / 1000);
-
-const caveats = [{
- type: CaveatType.Erc20Streaming,
- // Address of the ERC-20 token.
- tokenAddress: "0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92",
- // 1 ERC-20 token - 18 decimals, in wei.
- initialAmount: 1000000000000000000n,
- // 10 ERC-20 token - 18 decimals, in wei.
- maxAmount: 10000000000000000000n
- // 0.00001 ERC-20 token - 18 decimals, in wei.
- amountPerSecond: 10000000000000n,
- startDate,
-}];
-```
-
-## `erc20TransferAmount`
-
-Limits the transfer of ERC-20 tokens.
-
-Caveat enforcer contract: [`ERC20TransferAmountEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/ERC20TransferAmountEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| -------------- | --------- | -------- | ----------------------------------------------------------------- |
-| `tokenAddress` | `Address` | Yes | The ERC-20 token contract address. |
-| `maxAmount` | `bigint` | Yes | The maximum amount of tokens that can be transferred by delegate. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.Erc20TransferAmount,
- tokenAddress: '0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92',
- // 1 ERC-20 token - 18 decimals, in wei.
- maxAmount: 1000000000000000000n,
- },
-]
-```
-
-## `erc721BalanceChange`
-
-Ensures that the recipient's ERC-721 token balance has changed within the allowed bounds—either increased by a minimum or decreased by a maximum specified amount.
-
-Caveat enforcer contract: [`ERC721BalanceChangeEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/ERC721BalanceChangeEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| -------------- | ------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `tokenAddress` | `Address` | Yes | The ERC-721 token contract addres. |
-| `recipient` | `Address` | Yes | The address on which the checks will be applied. |
-| `balance` | `bigint` | Yes | The amount by which the balance must be changed. |
-| `changeType` | `BalanceChangeType` | Yes | The balance change type for the ERC-721 token. Specifies whether the balance should have increased or decreased. Valid parameters are `BalanceChangeType.Increase` and `BalanceChangeType.Decrease`. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.Erc721BalanceChange,
- tokenAddress: '0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92',
- recipient: '0x3fF528De37cd95b67845C1c55303e7685c72F319',
- balance: 1000000n,
- changeType: BalanceChangeType.Increase,
- },
-]
-```
-
-## `erc721Transfer`
-
-Restricts the execution to only allow ERC-721 token transfers, specifically the `transferFrom(from, to, tokenId)` function, for a specified token ID and contract.
-
-Caveat enforcer contract: [`ERC721TransferEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/ERC721TransferEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| -------------- | --------- | -------- | ---------------------------------------------------------------- |
-| `tokenAddress` | `Address` | Yes | The ERC-721 token contract address. |
-| `tokenId` | `bigint` | Yes | The ID of the ERC-721 token that can be transferred by delegate. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.Erc721Transfer,
- tokenAddress: '0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92',
- tokenId: 1n,
- },
-]
-```
-
-## `exactCalldata`
-
-Verifies that the transaction calldata matches the expected calldata. For batch transactions,
-see [`exactCalldataBatch`](#exactcalldatabatch).
-
-Caveat enforcer contract: [`ExactCalldataEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/ExactCalldataEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ---------- | ----- | -------- | -------------------------------------------------- |
-| `calldata` | `Hex` | Yes | The calldata that the delegate is allowed to call. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.ExactCalldata,
- calldata: '0x1234567890abcdef',
- },
-]
-```
-
-## `exactCalldataBatch`
-
-Verifies that the provided batch execution calldata matches
-the expected calldata for each individual execution in the batch.
-
-Caveat enforcer contract: [`ExactCalldataBatchEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/ExactCalldataBatchEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------ | ------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
-| `executions` | `ExecutionStruct[]` | Yes | The list of executions that must be matched exactly in the batch. Each execution specifies a target address, value, and calldata. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const executions = [
- {
- target: '0xb4aE654Aca577781Ca1c5DE8FbE60c2F423f37da',
- value: 1000000000000000000n, // 1 ETH
- callData: '0x',
- },
- {
- target: '0xb4aE654Aca577781Ca1c5DE8FbE60c2F423f37da',
- value: 0n,
- callData: '0x',
- },
-]
-
-const caveats = [
- {
- type: CaveatType.ExactCalldataBatch,
- executions,
- },
-]
-```
-
-## `exactExecution`
-
-Verifies that the provided execution matches the expected execution. For batch transactions,
-see [`exactExecutionBatch`](#exactexecutionbatch).
-
-Caveat enforcer contract: [`ExactExecutionEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/ExactExecutionEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ----------- | ----------------- | -------- | ---------------------------------------------------------------------------------------------- |
-| `execution` | `ExecutionStruct` | Yes | The execution that must be matched exactly. Specifies the target address, value, and calldata. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.ExactExecution,
- target: '0xb4aE654Aca577781Ca1c5DE8FbE60c2F423f37da',
- value: 1000000000000000000n,
- callData: '0x',
- },
-]
-```
-
-## `exactExecutionBatch`
-
-Verifies that each execution in the batch matches the expected
-execution parameters—including target, value, and calldata.
-
-Caveat enforcer contract: [`ExactExecutionBatchEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/ExactExecutionBatchEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------ | ------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
-| `executions` | `ExecutionStruct[]` | Yes | The list of executions that must be matched exactly in the batch. Each execution specifies a target address, value, and calldata. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const executions = [
- {
- target: '0xb4aE654Aca577781Ca1c5DE8FbE60c2F423f37da',
- value: 1000000000000000000n, // 1 ETH
- callData: '0x',
- },
- {
- target: '0xb4aE654Aca577781Ca1c5DE8FbE60c2F423f37da',
- value: 0n,
- callData: '0x',
- },
-]
-
-const caveats = [
- {
- type: CaveatType.ExactExecutionBatch,
- executions,
- },
-]
-```
-
-## `id`
-
-Specifies an ID for multiple delegations. Once one of them is redeemed, the other delegations with the same ID are revoked.
-
-Caveat enforcer contract: [`IdEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/IdEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ---- | -------- | -------- | ----------- | -------------------------------------------------------------------------------- |
-| `id` | `bigint` | `number` | Yes | An ID for the delegation. Only one delegation may be redeemed with any given ID. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.Id,
- id: 123456,
- },
-]
-```
-
-## `limitedCalls`
-
-Limits the number of times the delegate can perform executions on the delegator's behalf.
-
-Caveat enforcer contract: [`LimitedCallsEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/LimitedCallsEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------- | -------- | -------- | ------------------------------------------------------------ |
-| `limit` | `number` | Yes | The maximum number of times this delegation may be redeemed. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.LimitedCalls,
- limit: 1,
- },
-]
-```
-
-## `multiTokenPeriod`
-
-Ensures that token transfers for multiple tokens stay within the specified limits for the defined periods.
-At the start of each new period, the allowed transfer amount for each token resets. Any unused transfer allowance from the previous period expires and does not carry over.
-
-When redeeming the delegation, the index of the relevant token configuration must be specified
-as the `args` of this caveat (encoded as `uint256` hex value).
-
-Caveat enforcer contract: [`MultiTokenPeriodEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/MultiTokenPeriodEnforcer.sol)
-
-### Parameters
-
-The list of `TokenPeriodConfig` objects, where each object contains:
-
-| Name | Type | Required | Description |
-| ---------------- | --------- | -------- | ---------------------------------------------------------------- |
-| `token` | `Address` | Yes | The ERC-20 token contract address as a hex string. |
-| `periodAmount` | `bigint` | Yes | The maximum amount of tokens that can be transferred per period. |
-| `periodDuration` | `number` | Yes | The duration of each period in seconds. |
-| `startDate` | `number` | Yes | The timestamp when the first period begins in seconds. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-import { zeroAddress } from 'viem'
-
-// Current time as start date.
-// Since startDate is in seconds, we need to convert milliseconds to seconds.
-const startDate = Math.floor(Date.now() / 1000)
-
-const tokenPeriodConfigs = [
- {
- token: '0xb4aE654Aca577781Ca1c5DE8FbE60c2F423f37da',
- // 1 token with 18 decimals.
- periodAmount: 1000000000000000000n,
- // 1 day in seconds.
- periodDuration: 86400,
- startDate,
- },
- {
- // For native token use zeroAddress
- token: zeroAddress,
- // 0.01 ETH in wei.
- periodAmount: 10000000000000000n,
- // 1 hour in seconds.
- periodDuration: 3600,
- startDate,
- },
-]
-
-const caveats = [
- {
- type: CaveatType.MultiTokenPeriod,
- tokenPeriodConfigs,
- },
-]
-```
-
-## `nativeBalanceChange`
-
-Ensures that the recipient's native token balance has changed within the allowed bounds—either increased by a minimum or decreased by a maximum specified amount.
-
-Caveat enforcer contract: [`NativeBalanceChangeEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/NativeBalanceChangeEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------ | ------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `recipient` | `Address` | Yes | The address on which the checks will be applied. |
-| `balance` | `bigint` | Yes | The amount by which the balance must be changed. |
-| `changeType` | `BalanceChangeType` | Yes | The balance change type for the native token. Specifies whether the balance should have increased or decreased. Valid parameters are `BalanceChangeType.Increase` and `BalanceChangeType.Decrease`. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.NativeBalanceChange,
- recipient: '0x3fF528De37cd95b67845C1c55303e7685c72F319',
- balance: 1000000n,
- changeType: BalanceChangeType.Increase,
- },
-]
-```
-
-## `nativeTokenPayment`
-
-Enforces payment in native token (for example, ETH) for the right to use the delegation.
-A permissions context allowing payment must be provided as the `args` when
-redeeming the delegation.
-
-Caveat enforcer contract: [`NativeTokenPaymentEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/NativeTokenPaymentEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ----------- | --------- | -------- | ----------------------------------------------- |
-| `recipient` | `Address` | Yes | The recipient address who receives the payment. |
-| `amount` | `bigint` | Yes | The amount that must be paid. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.NativeTokenPayment,
- recipient: '0x3fF528De37cd95b67845C1c55303e7685c72F319',
- amount: 1000000n,
- },
-]
-```
-
-## `nativeTokenPeriodTransfer`
-
-Ensures that native token transfers remain within a predefined limit during a
-specified time window. At the start of each new period, the allowed transfer
-amount resets. Any unused transfer allowance from the previous period does not
-carry over and is forfeited.
-
-Caveat enforcer contract: [`NativeTokenPeriodTransferEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/NativeTokenPeriodTransferEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ---------------- | -------- | -------- | ---------------------------------------------------------------- |
-| `periodAmount` | `bigint` | Yes | The maximum amount of tokens that can be transferred per period. |
-| `periodDuration` | `number` | Yes | The duration of each period in seconds. |
-| `startDate` | `number` | Yes | The timestamp when the first period begins in seconds. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-// Current time as start date.
-// Since startDate is in seconds, we need to convert milliseconds to seconds.
-const startDate = Math.floor(Date.now() / 1000)
-
-const caveats = [
- {
- type: CaveatType.NativeTokenPeriodTransfer,
- // 1 ETH in wei.
- periodAmount: 1000000000000000000n,
- // 1 day in seconds.
- periodDuration: 86400,
- startDate,
- },
-]
-```
-
-## `nativeTokenStreaming`
-
-Enforces a linear streaming limit for native tokens (for example, ETH). Nothing is available before the specified start timestamp. At the start timestamp, the specified initial amount becomes immediately available. After that, tokens accrue linearly at the specified rate, capped by the specified maximum.
-
-Caveat enforcer contract: [`NativeTokenStreamingEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/NativeTokenStreamingEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ----------------- | -------- | -------- | --------------------------------------------------------- |
-| `initialAmount` | `bigint` | Yes | The initial amount that can be transferred at start time. |
-| `maxAmount` | `bigint` | Yes | The maximum total amount that can be unlocked. |
-| `amountPerSecond` | `bigint` | Yes | The rate at which tokens accrue per second. |
-| `startTime` | `number` | Yes | The start timestamp in seconds. |
-
-### Example
-
-```typescript
-import { CaveatType } from "@metamask/smart-accounts-kit";
-
-// Current time as start date.
-// Since startDate is in seconds, we need to convert milliseconds to seconds.
-const startDate = Math.floor(Date.now() / 1000);
-
-const caveats = [{
- type: CaveatType.NativeTokenStreaming,
- // 0.01 ETH in wei.
- initialAmount: 10000000000000000,
- // 0.5 ETH in wei.
- maxAmount: 500000000000000000n
- // 0.00001 ETH in wei.
- amountPerSecond: 10000000000000n,
- startDate,
-}];
-```
-
-## `nativeTokenTransferAmount`
-
-Enforces an allowance of native currency (for example, ETH).
-
-Caveat enforcer contract: [`NativeTokenTransferAmountEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/NativeTokenTransferAmountEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ----------- | -------- | -------- | ----------------------------------------------------------------- |
-| `maxAmount` | `bigint` | Yes | The maximum amount of tokens that can be transferred by delegate. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.NativeTokenTransferAmount,
- // 0.00001 ETH in wei.
- maxAmount: 10000000000000000n,
- },
-]
-```
-
-## `nonce`
-
-Adds a nonce to a delegation, and revokes previous delegations by incrementing the current nonce by calling `incrementNonce(address _delegationManager)`.
-
-Caveat enforcer contract: [`NonceEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/NonceEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------- | ----- | -------- | -------------------------------------------------- |
-| `nonce` | `Hex` | Yes | The nonce to allow bulk revocation of delegations. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.Nonce,
- nonce: '0x1',
- },
-]
-```
-
-## `ownershipTransfer`
-
-Restricts the execution to only allow ownership transfers, specifically the `transferOwnership(address _newOwner)` function, for a specified contract.
-
-Caveat enforcer contract: [`OwnershipTransferEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/OwnershipTransferEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ----------------- | --------- | -------- | ---------------------------------------------------------------------- |
-| `contractAddress` | `Address` | Yes | The target contract address for which ownership transfers are allowed. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.OwnershipTransfer,
- contractAddress: '0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92',
- },
-]
-```
-
-## `redeemer`
-
-Limits the addresses that can redeem the delegation.
-This caveat is designed to restrict smart contracts or EOAs lacking delegation support,
-and can be placed anywhere in the delegation chain to restrict the redeemer.
-
-:::note
-Delegator accounts with delegation functionalities can bypass these restrictions by delegating to
-other addresses.
-For example, Alice makes Bob the redeemer.
-This condition is enforced, but if Bob is a delegator he can create a separate delegation to Carol
-that allows her to redeem Alice's delegation through Bob.
-:::
-
-Caveat enforcer contract: [`RedeemerEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/RedeemerEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ----------- | ----------- | -------- | ---------------------------------------------------------------- |
-| `redeemers` | `Address[]` | Yes | The list of addresses that are allowed to redeem the delegation. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.Redeemer,
- redeemers: [
- '0xb4aE654Aca577781Ca1c5DE8FbE60c2F423f37da',
- '0x6be97c23596ECed7170fdFb28e8dA1Ca5cdc54C5',
- ],
- },
-]
-```
-
-## `specificActionERC20TransferBatch`
-
-Ensures validation of a batch consisting of exactly two transactions:
-
-1. The first transaction must call a specific target contract with predefined calldata.
-2. The second transaction must be an ERC-20 token transfer that matches specified
- parameters—including the ERC-20 token contract address, amount, and recipient.
-
-Caveat enforcer contract: [`SpecificActionERC20TransferBatchEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/SpecificActionERC20TransferBatchEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| -------------- | --------- | -------- | --------------------------------------------- |
-| `tokenAddress` | `Address` | Yes | The ERC-20 token contract address. |
-| `recipient` | `Address` | Yes | The address that will receive the tokens. |
-| `amount` | `bigint` | Yes | The amount of tokens to transfer. |
-| `target` | `Address` | Yes | The target address for the first transaction. |
-| `calldata` | `Hex` | Yes | The `calldata` for the first transaction. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.SpecificActionERC20TransferBatch,
- tokenAddress: '0xb4aE654Aca577781Ca1c5DE8FbE60c2F423f37da',
- recipient: '0x027aeAFF3E5C33c4018FDD302c20a1B83aDCD96C',
- // 1 ERC-20 token - 18 decimals, in wei
- amount: 1000000000000000000n,
- target: '0xb49830091403f1Aa990859832767B39c25a8006B',
- calldata: '0x1234567890abcdef',
- },
-]
-```
-
-## `timestamp`
-
-Specifies a range of timestamps through which the delegation will be valid.
-
-Caveat enforcer contract: [`TimestampEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/TimestampEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ----------------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------- |
-| `afterThreshold` | `number` | Yes | The timestamp after which the delegation is valid in seconds. Set the value to `0` to disable this threshold. |
-| `beforeThreshold` | `number` | Yes | The timestamp before which the delegation is valid in seconds. Set the value to `0` to disable this threshold. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-// We need to convert milliseconds to seconds.
-const currentTime = Math.floor(Date.now() / 1000)
-// 1 hour after current time.
-const afterThreshold = currentTime + 3600
-// 1 day after afterThreshold
-const beforeThreshold = afterThreshold + 86400
-
-const caveats = [
- {
- type: CaveatType.Timestamp,
- afterThreshold,
- beforeThreshold,
- },
-]
-```
-
-## `valueLte`
-
-Limits the value of native tokens that the delegate can spend.
-
-Caveat enforcer contract: [`ValueLteEnforcer.sol`](https://github.com/MetaMask/delegation-framework/blob/main/src/enforcers/ValueLteEnforcer.sol)
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ---------- | -------- | -------- | ----------------------------------------------------------------------- |
-| `maxValue` | `bigint` | Yes | The maximum value that may be specified when redeeming this delegation. |
-
-### Example
-
-```typescript
-import { CaveatType } from '@metamask/smart-accounts-kit'
-
-const caveats = [
- {
- type: CaveatType.ValueLte,
- // 0.01 ETH in wei.
- maxValue: 10000000000000000n,
- },
-]
-```
diff --git a/gator_versioned_docs/version-1.1.0/reference/delegation/delegation-scopes.md b/gator_versioned_docs/version-1.1.0/reference/delegation/delegation-scopes.md
deleted file mode 100644
index a5c483e31cb..00000000000
--- a/gator_versioned_docs/version-1.1.0/reference/delegation/delegation-scopes.md
+++ /dev/null
@@ -1,360 +0,0 @@
----
-description: Delegation scopes reference.
-sidebar_label: Delegation scopes
-keywords: [delegation scopes, configuration, reference]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Delegation scopes
-
-When [creating a delegation](../../guides/delegation/execute-on-smart-accounts-behalf.md), you can configure the following scopes to define the delegation's initial authority.
-Learn [how to use delegation scopes](../../guides/delegation/use-delegation-scopes/index.md).
-
-## Spending limit scopes
-
-### ERC-20 periodic scope
-
-Ensures a per-period limit for ERC-20 token transfers.
-At the start of each new period, the allowance resets.
-
-#### Parameters
-
-| Name | Type | Required | Description |
-| ---------------- | --------- | -------- | ---------------------------------------------------------------- |
-| `tokenAddress` | `Address` | Yes | The ERC-20 token contract address as a hex string. |
-| `periodAmount` | `bigint` | Yes | The maximum amount of tokens that can be transferred per period. |
-| `periodDuration` | `number` | Yes | The duration of each period in seconds. |
-| `startDate` | `number` | Yes | The timestamp when the first period begins in seconds. |
-
-#### Example
-
-```typescript
-import { createDelegation, getSmartAccountsEnvironment, ScopeType } from "@metamask/smart-accounts-kit";
-import { sepolia } from "viem/chains";
-import { parseUnits } from "viem";
-
-// Since current time is in seconds, convert milliseconds to seconds.
-const startDate = Math.floor(Date.now() / 1000);
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.Erc20PeriodTransfer,
- tokenAddress: "0xb4aE654Aca577781Ca1c5DE8FbE60c2F423f37da",
- // 10 ERC-20 token with 6 decimals
- periodAmount: parseUnits("10", 6),
- periodDuration: 86400,
- startDate,
- },
- // Address that is granting the delegation
- from: "0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1",
- // Address to which the delegation is being granted
- to: "0x2B2dBd1D5fbeB77C4613B66e9F35dBfE12cB0488",
- // Alternatively you can use environment property of MetaMask smart account.
- environment: getSmartAccountsEnvironment(sepolia.id);
-});
-```
-
-### ERC-20 streaming scope
-
-Ensures a linear streaming transfer limit for ERC-20 tokens.
-Token transfers are blocked until the defined start timestamp.
-At the start, a specified initial amount is released, after which tokens accrue linearly at the configured rate, up to the maximum allowed amount.
-
-#### Parameters
-
-| Name | Type | Required | Description |
-| ----------------- | --------- | -------- | --------------------------------------------------------- |
-| `tokenAddress` | `Address` | Yes | The ERC-20 token contract address. |
-| `initialAmount` | `bigint` | Yes | The initial amount that can be transferred at start time. |
-| `maxAmount` | `bigint` | Yes | The maximum total amount that can be unlocked. |
-| `amountPerSecond` | `bigint` | Yes | The rate at which tokens accrue per second. |
-| `startTime` | `number` | Yes | The start timestamp in seconds. |
-
-#### Example
-
-```typescript
-import { createDelegation, getSmartAccountsEnvironment, ScopeType } from "@metamask/smart-accounts-kit";
-import { sepolia } from "viem/chains";
-import { parseUnits } from "viem";
-
-// Since current time is in seconds, convert milliseconds to seconds.
-const startTime = Math.floor(Date.now() / 1000);
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.Erc20Streaming,
- tokenAddress: "0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92",
- // 0.1 ERC-20 token with 6 decimals
- amountPerSecond: parseUnits("0.1", 6),
- // 1 ERC-20 token with 6 decimals
- initialAmount: parseUnits("1", 6),
- // 10 ERC-20 token with 6 decimals
- maxAmount: parseUnits("10", 6),
- startTime,
- },
- // Address that is granting the delegation
- from: "0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1",
- // Address to which the delegation is being granted
- to: "0x2B2dBd1D5fbeB77C4613B66e9F35dBfE12cB0488",
- // Alternatively you can use environment property of MetaMask smart account.
- environment: getSmartAccountsEnvironment(sepolia.id);
-});
-```
-
-### ERC-20 transfer scope
-
-Ensures that ERC-20 token transfers are limited to a predefined maximum amount.
-This scope is useful for setting simple, fixed transfer limits without any time-based or streaming conditions.
-
-#### Parameters
-
-| Name | Type | Required | Description |
-| -------------- | --------- | -------- | ----------------------------------------------------------------- |
-| `tokenAddress` | `Address` | Yes | The ERC-20 token contract address. |
-| `maxAmount` | `bigint` | Yes | The maximum amount of tokens that can be transferred by delegate. |
-
-#### Example
-
-```typescript
-import { createDelegation, getSmartAccountsEnvironment, ScopeType } from "@metamask/smart-accounts-kit";
-import { sepolia } from "viem/chains";
-import { parseUnits } from "viem";
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.Erc20TransferAmount,
- tokenAddress: "0xc11F3a8E5C7D16b75c9E2F60d26f5321C6Af5E92",
- // 1 ERC-20 token with 6 decimals
- maxAmount: parseUnits("1", 6),
- },
- // Address that is granting the delegation
- from: "0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1",
- // Address to which the delegation is being granted
- to: "0x2B2dBd1D5fbeB77C4613B66e9F35dBfE12cB0488",
- // Alternatively you can use environment property of MetaMask smart account.
- environment: getSmartAccountsEnvironment(sepolia.id);
-});
-```
-
-### ERC-721 scope
-
-Limits the delegation to ERC-721 token (NFT) transfers only.
-
-#### Parameters
-
-| Name | Type | Required | Description |
-| -------------- | --------- | -------- | ---------------------------------------------------------------- |
-| `tokenAddress` | `Address` | Yes | The ERC-721 token contract address. |
-| `tokenId` | `bigint` | Yes | The ID of the ERC-721 token that can be transferred by delegate. |
-
-#### Example
-
-```typescript
-import { createDelegation, getSmartAccountsEnvironment, ScopeType } from "@metamask/smart-accounts-kit";
-import { sepolia } from "viem/chains";
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.Erc721Transfer,
- tokenAddress: "0x3fF528De37cd95b67845C1c55303e7685c72F319",
- tokenId: 1n,
- },
- // Address that is granting the delegation
- from: "0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1",
- // Address to which the delegation is being granted
- to: "0x2B2dBd1D5fbeB77C4613B66e9F35dBfE12cB0488",
- // Alternatively you can use environment property of MetaMask smart account.
- environment: getSmartAccountsEnvironment(sepolia.id);
-});
-```
-
-### Native token periodic scope
-
-Ensures a per-period limit for native token transfers.
-At the start of each new period, the allowance resets.
-
-#### Parameters
-
-| Name | Type | Required | Description |
-| ----------------- | ------------------------------------------------------------------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `periodAmount` | `bigint` | Yes | The maximum amount of tokens that can be transferred per period. |
-| `periodDuration` | `number` | Yes | The duration of each period in seconds. |
-| `startDate` | `number` | Yes | The timestamp when the first period begins in seconds. |
-| `allowedCalldata` | [`AllowedCalldataBuilderConfig`](../types.md#allowedcalldatabuilderconfig)`[]` | No | The list of calldata the delegate is allowed to call. It doesn't support multiple selectors. Each entry in the list represents a portion of calldata corresponding to the same function signature. You can include or exclude specific parameters to define what parts of the calldata are valid. Cannot be used together with `exactCalldata`. |
-| `exactCalldata` | [`ExactCalldataBuilderConfig`](../types.md#exactcalldatabuilderconfig) | No | The calldata the delegate is allowed to call. The default is `0x` to disallow ERC-20 and ERC-721 token transfers. Cannot be used together with `allowedCalldata`. |
-
-#### Example
-
-```typescript
-import { createDelegation, getSmartAccountsEnvironment, ScopeType } from "@metamask/smart-accounts-kit";
-import { sepolia } from "viem/chains";
-import { parseEther } from "viem";
-
-// Since current time is in seconds, convert milliseconds to seconds.
-const startDate = Math.floor(Date.now() / 1000);
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.NativeTokenPeriodTransfer,
- periodAmount: parseEther("0.01"),
- periodDuration: 86400,
- startDate,
- },
- // Address that is granting the delegation.
- from: "0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1",
- // Address to which the delegation is being granted.
- to: "0x2B2dBd1D5fbeB77C4613B66e9F35dBfE12cB0488",
- // Alternatively you can use environment property of MetaMask smart account.
- environment: getSmartAccountsEnvironment(sepolia.id);
-});
-```
-
-### Native token streaming scope
-
-Ensures a linear streaming transfer limit for native tokens.
-Token transfers are blocked until the defined start timestamp.
-At the start, a specified initial amount is released, after which tokens accrue linearly at the configured rate, up to the maximum allowed amount.
-
-#### Parameters
-
-| Name | Type | Required | Description |
-| ----------------- | ------------------------------------------------------------------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `initialAmount` | `bigint` | Yes | The initial amount that can be transferred at start time. |
-| `maxAmount` | `bigint` | Yes | The maximum total amount that can be unlocked. |
-| `amountPerSecond` | `bigint` | Yes | The rate at which tokens accrue per second. |
-| `startTime` | `number` | Yes | The start timestamp in seconds. |
-| `allowedCalldata` | [`AllowedCalldataBuilderConfig`](../types.md#allowedcalldatabuilderconfig)`[]` | No | The list of calldata the delegate is allowed to call. It doesn't support multiple selectors. Each entry in the list represents a portion of calldata corresponding to the same function signature. You can include or exclude specific parameters to define what parts of the calldata are valid. Cannot be used together with `exactCalldata`. |
-| `exactCalldata` | [`ExactCalldataBuilderConfig`](../types.md#exactcalldatabuilderconfig) | No | The calldata the delegate is allowed to call. The default is `0x` to disallow ERC-20 and ERC-721 token transfers. Cannot be used together with `allowedCalldata`. |
-
-#### Example
-
-```typescript
-import { createDelegation, getSmartAccountsEnvironment, ScopeType } from "@metamask/smart-accounts-kit";
-import { sepolia } from "viem/chains";
-import { parseEther } from "viem";
-
-// Since current time is in seconds, convert milliseconds to seconds.
-const startTime = Math.floor(Date.now() / 1000);
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.NativeTokenStreaming,
- amountPerSecond: parseEther("0.0001"),
- initialAmount: parseEther("0.01"),
- maxAmount: parseEther("0.1"),
- startTime,
- },
- // Address that is granting the delegation.
- from: "0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1",
- // Address to which the delegation is being granted.
- to: "0x2B2dBd1D5fbeB77C4613B66e9F35dBfE12cB0488",
- // Alternatively you can use environment property of MetaMask smart account.
- environment: getSmartAccountsEnvironment(sepolia.id);
-});
-```
-
-### Native token transfer scope
-
-Ensures that native token transfers are limited to a predefined maximum amount.
-This scope is useful for setting simple, fixed transfer limits without any time based or streaming conditions.
-
-#### Parameters
-
-| Name | Type | Required | Description |
-| ----------------- | ------------------------------------------------------------------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `maxAmount` | `bigint` | Yes | The maximum amount of tokens that can be transferred by delegate. |
-| `allowedCalldata` | [`AllowedCalldataBuilderConfig`](../types.md#allowedcalldatabuilderconfig)`[]` | No | The list of calldata the delegate is allowed to call. It doesn't support multiple selectors. Each entry in the list represents a portion of calldata corresponding to the same function signature. You can include or exclude specific parameters to define what parts of the calldata are valid. Cannot be used together with `exactCalldata`. |
-| `exactCalldata` | [`ExactCalldataBuilderConfig`](../types.md#exactcalldatabuilderconfig) | No | The calldata the delegate is allowed to call. The default is `0x` to disallow ERC-20 and ERC-721 token transfers. Cannot be used together with `allowedCalldata`. |
-
-#### Example
-
-```typescript
-import { createDelegation, getSmartAccountsEnvironment, ScopeType } from "@metamask/smart-accounts-kit";
-import { sepolia } from "viem/chains";
-import { parseEther } from "viem";
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.NativeTokenTransferAmount,
- // 0.001 ETH in wei format.
- maxAmount: parseEther("0.001"),
- },
- // Address that is granting the delegation.
- from: "0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1",
- // Address to which the delegation is being granted.
- to: "0x2B2dBd1D5fbeB77C4613B66e9F35dBfE12cB0488",
- // Alternatively you can use environment property of MetaMask smart account.
- environment: getSmartAccountsEnvironment(sepolia.id);
-});
-```
-
-## Function call scope
-
-Defines the specific methods, contract addresses, and calldata that are allowed for the delegation.
-
-#### Parameters
-
-| Name | Type | Required | Description |
-| ----------------- | ------------------------------------------------------------------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `targets` | `Address[]` | Yes | The list of addresses that the delegate is allowed to call. |
-| `selectors` | `MethodSelector[]` | Yes | The list of method selectors that the delegate is allowed to call. The selector value can be 4-byte hex string, ABI function signature, or ABI function object. |
-| `allowedCalldata` | [`AllowedCalldataBuilderConfig`](../types.md#allowedcalldatabuilderconfig)`[]` | No | The list of calldata the delegate is allowed to call. It doesn't support multiple selectors. Each entry in the list represents a portion of calldata corresponding to the same function signature. You can include or exclude specific parameters to define what parts of the calldata are valid. Cannot be used together with `exactCalldata`. |
-| `exactCalldata` | [`ExactCalldataBuilderConfig`](../types.md#exactcalldatabuilderconfig) | No | The calldata the delegate is allowed to call. Cannot be used together with `allowedCalldata`. |
-| `valueLte` | [`ValueLteBuilderConfig`](../types.md#valueltebuilderconfig) | No | The maximum native token amount the delegate can transfer. By default, the amount is set to `0`. |
-
-#### Example
-
-This example sets the delegation scope to allow the delegate to call the `approve` function on the USDC token contract:
-
-```typescript
-import { createDelegation, getSmartAccountsEnvironment, ScopeType } from "@metamask/smart-accounts-kit";
-import { sepolia } from "viem/chains";
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.FunctionCall,
- targets: ["0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"], // USDC address on Sepolia.
- selectors: ["approve(address, uint256)"]
- },
- // Address that is granting the delegation.
- from: "0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1",
- // Address to which the delegation is being granted.
- to: "0x2B2dBd1D5fbeB77C4613B66e9F35dBfE12cB0488",
- // Alternatively you can use environment property of MetaMask smart account.
- environment: getSmartAccountsEnvironment(sepolia.id);
-});
-```
-
-## Ownership transfer scope
-
-Restricts a delegation to ownership transfer calls only.
-
-#### Parameters
-
-| Name | Type | Required | Description |
-| ----------------- | --------- | -------- | ---------------------------------------------------------------------- |
-| `contractAddress` | `Address` | Yes | The target contract address for which ownership transfers are allowed. |
-
-#### Example
-
-```typescript
-import { createDelegation, getSmartAccountsEnvironment, ScopeType } from "@metamask/smart-accounts-kit";
-import { sepolia } from "viem/chains";
-
-const contractAddress = "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"
-
-const delegation = createDelegation({
- scope: {
- type: ScopeType.OwnershipTransfer,
- contractAddress,
- },
- // Address that is granting the delegation.
- from: "0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1",
- // Address to which the delegation is being granted.
- to: "0x2B2dBd1D5fbeB77C4613B66e9F35dBfE12cB0488",
- // Alternatively you can use environment property of MetaMask smart account.
- environment: getSmartAccountsEnvironment(sepolia.id);
-});
-```
diff --git a/gator_versioned_docs/version-1.1.0/reference/delegation/index.md b/gator_versioned_docs/version-1.1.0/reference/delegation/index.md
deleted file mode 100644
index e99d30d79f0..00000000000
--- a/gator_versioned_docs/version-1.1.0/reference/delegation/index.md
+++ /dev/null
@@ -1,655 +0,0 @@
----
-description: Delegation-related API methods reference.
-toc_max_heading_level: 2
-keywords: [delegation, API, methods, reference]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Delegation API reference
-
-The following API methods are related to creating and managing [delegations](../../concepts/delegation/overview.md).
-
-## `createCaveatBuilder`
-
-Builds an array of caveats.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------- | ------------------------------------------------------------------ | -------- | ----------------------------------------------------------------- |
-| `environment` | [`SmartAccountsEnvironment`](../types.md#smartaccountsenvironment) | Yes | Environment to resolve the smart contracts for the current chain. |
-| `config` | [`CaveatBuilderConfig`](../types.md#caveatbuilderconfig) | No | Configuration for `CoreCaveatBuilder`. |
-
-### Example
-
-```ts
-import { createCaveatBuilder } from '@metamask/smart-accounts-kit/utils'
-import { getSmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-import { sepolia } from 'viem/chains'
-
-const environment = getSmartAccountsEnvironment(sepolia.id)
-const caveatBuilder = createCaveatBuilder(environment)
-```
-
-### Allow empty caveats
-
-To create an empty caveat collection, set the `CaveatBuilderConfig.allowInsecureUnrestrictedDelegation` to `true`.
-
-```ts title="example.ts"
-import { createCaveatBuilder } from '@metamask/smart-accounts-kit/utils'
-import { getSmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-import { sepolia } from 'viem/chains'
-
-const environment = getSmartAccountsEnvironment(sepolia.id)
-const caveatBuilder = createCaveatBuilder(environment, {
- // add-next-line
- allowInsecureUnrestrictedDelegation: true,
-})
-```
-
-## `createDelegation`
-
-Creates a delegation with a specific delegate.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------------ | ------------------------------------------------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `from` | `Hex` | Yes | The address that is granting the delegation. |
-| `to` | `Hex` | Yes | The address to which the delegation is being granted. |
-| `scope` | `ScopeConfig` | Yes | The scope of the delegation that defines the initial authority. See [delegation scopes](./delegation-scopes.md) for the full list of scope types and their parameters. |
-| `environment` | [`SmartAccountsEnvironment`](../types.md#smartaccountsenvironment) | Yes | The environment used by the toolkit to define contract addresses for interacting with the Delegation Framework contracts. |
-| `caveats` | `Caveats` | No | Caveats that further refine the authority granted by the `scope`. See [caveats reference](./caveats.md) for the full list of caveat types and their parameters. |
-| `parentDelegation` | [`Delegation`](../types.md#delegation) \| `Hex` | No | The parent delegation or its corresponding hex to create a delegation chain. |
-| `salt` | `Hex` | No | The salt for generating the delegation hash. This helps prevent hash collisions when creating identical delegations. |
-
-### Example
-
-```typescript
-import {
- createDelegation,
- getSmartAccountsEnvironment,
- ScopeType,
-} from '@metamask/smart-accounts-kit'
-import { sepolia } from 'viem/chains'
-import { parseEther } from 'viem'
-
-const delegation = createDelegation({
- // Address that is granting the delegation
- from: '0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1',
- // Address to which the delegation is being granted
- to: '0x2B2dBd1D5fbeB77C4613B66e9F35dBfE12cB0488',
- // Alternatively you can use environment property of MetaMask smart account.
- environment: getSmartAccountsEnvironment(sepolia.id),
- scope: {
- type: ScopeType.NativeTokenTransferAmount,
- // 0.001 ETH in wei format.
- maxAmount: parseEther('0.001'),
- },
-})
-```
-
-## `createOpenDelegation`
-
-Creates an open delegation that can be redeemed by any delegate.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------------ | ------------------------------------------------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `from` | `Hex` | Yes | The address that is granting the delegation. |
-| `scope` | `ScopeConfig` | Yes | The scope of the delegation that defines the initial authority. See [delegation scopes](./delegation-scopes.md) for the full list of scope types and their parameters. |
-| `environment` | [`SmartAccountsEnvironment`](../types.md#smartaccountsenvironment) | Yes | The environment used by the toolkit to define contract addresses for interacting with the Delegation Framework contracts. |
-| `caveats` | `Caveats` | No | Caveats that further refine the authority granted by the `scope`. See [caveats reference](./caveats.md) for the full list of caveat types and their parameters. |
-| `parentDelegation` | [`Delegation`](../types.md#delegation) \| `Hex` | No | The parent delegation or its corresponding hex to create a delegation chain. |
-| `salt` | `Hex` | No | The salt for generating the delegation hash. This helps prevent hash collisions when creating identical delegations. |
-
-### Example
-
-```typescript
-import {
- createOpenDelegation,
- getSmartAccountsEnvironment,
- ScopeType,
-} from '@metamask/smart-accounts-kit'
-import { sepolia } from 'viem/chains'
-import { parseEther } from 'viem'
-
-const delegation = createOpenDelegation({
- // Address that is granting the delegation
- from: '0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1',
- // Alternatively you can use environment property of MetaMask smart account.
- environment: getSmartAccountsEnvironment(sepolia.id),
- scope: {
- type: ScopeType.NativeTokenTransferAmount,
- // 0.001 ETH in wei format.
- maxAmount: parseEther('0.001'),
- },
-})
-```
-
-## `createExecution`
-
-Creates an `ExecutionStruct` instance.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ---------- | --------- | -------- | ---------------------------------------------------------------------- |
-| `target` | `Address` | No | Address of the contract or recipient that the call is directed to. |
-| `value` | `bigint` | No | Value of native tokens to send along with the call in wei. |
-| `callData` | `Hex` | No | Encoded function data or payload to be executed on the target address. |
-
-### Example
-
-```ts
-import { createExecution } from '@metamask/smart-accounts-kit'
-import { parseEther } from 'viem'
-
-// Creates an ExecutionStruct to transfer 0.01 ETH to
-// 0xe3C818389583fDD5cAC32f548140fE26BcEaE907 address.
-const execution = createExecution({
- target: '0xe3C818389583fDD5cAC32f548140fE26BcEaE907',
- // 0.01 ETH in wei
- value: parseEther('0.01'),
- callData: '0x',
-})
-```
-
-## `decodeDelegations`
-
-Decodes an ABI-encoded hex string to an array of delegations.
-
-Use `decodeDelegations` when working with a permission context that contains a delegation
-chain, such as the `context` property returned by [`requestExecutionPermissions`](../advanced-permissions/wallet-client.md#requestexecutionpermissions) response.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| --------- | ----- | -------- | ------------------------------------- |
-| `encoded` | `Hex` | Yes | The ABI encoded hex string to decode. |
-
-### Example
-
-```ts
-import { decodeDelegations } from '@metamask/smart-accounts-kit/utils'
-
-const delegations = decodeDelegations('0x7f0db33d..c06aeeac')
-```
-
-## `decodeDelegation`
-
-Decodes an ABI-encoded hex string to a single delegation.
-
-Use `decodeDelegation` when you have a single encoded delegation rather than an encoded delegation chain.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| --------- | ----- | -------- | ------------------------------------- |
-| `encoded` | `Hex` | Yes | The ABI-encoded hex string to decode. |
-
-### Example
-
-```ts
-import { decodeDelegation } from '@metamask/smart-accounts-kit/utils'
-
-const delegation = decodeDelegation('0x7f0db33d..c06aeeac')
-```
-
-## `deploySmartAccountsEnvironment`
-
-Deploys the Delegation Framework contracts to an EVM chain.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------------- | ----------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `walletClient` | `WalletClient` | Yes | [Viem Wallet Client](https://viem.sh/docs/clients/wallet#wallet-client) to deploy the contracts. |
-| `publicClient` | `PublicClient` | Yes | [Viem Public Client](https://viem.sh/docs/clients/public) to interact with the given chain. |
-| `chain` | `Chain` | Yes | [Viem Chain](https://viem.sh/docs/chains/introduction) where you wish to deploy the Delegation Framework contracts. |
-| `deployedContracts` | `{ [contract: string]: Hex }` | No | Allows overriding specific contract addresses when calling the function. For example, if certain contracts have already been deployed on the target chain, their addresses can be provided directly to the function. |
-
-### Example
-
-
-
-
-```ts
-import { deploySmartAccountsEnvironment } from '@metamask/smart-accounts-kit/utils'
-import { walletClient, publicClient } from './config.ts'
-import { sepolia as chain } from 'viem/chains'
-
-const environment = await deploySmartAccountsEnvironment(walletClient, publicClient, chain)
-```
-
-
-
-
-```ts
-import { privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-import { http, createWalletClient, createPublicClient } from 'viem'
-
-// Your deployer wallet private key.
-const privateKey = '0x123..'
-const account = privateKeyToAccount(privateKey)
-
-export const walletClient = createWalletClient({
- account,
- chain,
- transport: http(),
-})
-
-export const publicClient = createPublicClient({
- transport: http(),
- chain,
-})
-```
-
-
-
-
-### Inject deployed contracts
-
-Once the contracts are deployed, you can use them to override the delegator
-environment using `overrideDeployedEnvironment`.
-
-```ts title="example.ts"
-import { walletClient, publicClient } from './config.ts'
-import { sepolia as chain } from 'viem/chains'
-import { SmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-import {
- overrideDeployedEnvironment,
- deploySmartAccountsEnvironment,
-} from '@metamask/smart-accounts-kit/utils'
-
-const environment: SmartAccountsEnvironment = await deploySmartAccountsEnvironment(
- walletClient,
- publicClient,
- chain
-)
-
-// add-start
-overrideDeployedEnvironment(chain.id, '1.3.0', environment)
-// add-end
-```
-
-## `disableDelegation`
-
-Encodes the calldata for disabling a delegation.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------ | -------------------------------------- | -------- | ------------------------------ |
-| `delegation` | [`Delegation`](../types.md#delegation) | Yes | The delegation to be disabled. |
-
-### Example
-
-
-
-
-```ts
-import { DelegationManager } from '@metamask/smart-accounts-kit/contracts'
-import { delegation } from './delegation.ts'
-
-const disableDelegationData = DelegationManager.encode.disableDelegation({
- delegation,
-})
-```
-
-
-
-
-```ts
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { sepolia } from 'viem/chains'
-import { parseEther } from 'viem'
-
-export const delegation = createDelegation({
- from: '0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1',
- to: '0x2B2dBd1D5fbeB77C4613B66e9F35dBfE12cB0488',
- environment: getSmartAccountsEnvironment(sepolia.id),
- scope: {
- type: ScopeType.NativeTokenTransferAmount,
- // 0.001 ETH in wei format.
- maxAmount: parseEther('0.001'),
- },
-})
-```
-
-
-
-
-## `enableDelegation`
-
-Encodes the calldata to enable a disabled delegation.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------ | -------------------------------------- | -------- | ----------------------------- |
-| `delegation` | [`Delegation`](../types.md#delegation) | Yes | The delegation to be enabled. |
-
-### Example
-
-```ts
-import { DelegationManager } from '@metamask/smart-accounts-kit/contracts'
-
-const enableDelegationData = DelegationManager.encode.enableDelegation({
- delegation, // Already disabled delegation.
-})
-```
-
-## `encodeDelegations`
-
-Encodes an array of delegations to an ABI-encoded hex string.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------- | ------------------------------------------ | -------- | ----------------------------------- |
-| `delegations` | [`Delegation`](../types.md#delegation)`[]` | Yes | The delegation array to be encoded. |
-
-### Example
-
-
-
-
-```ts
-import { encodeDelegations } from '@metamask/smart-accounts-kit/utils'
-import { delegation } from './delegation.ts'
-
-const encodedDelegations = encodeDelegations([delegation])
-```
-
-
-
-
-```ts
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { sepolia } from 'viem/chains'
-import { parseEther } from 'viem'
-
-export const delegation = createDelegation({
- from: '0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1',
- to: '0x2B2dBd1D5fbeB77C4613B66e9F35dBfE12cB0488',
- environment: getSmartAccountsEnvironment(sepolia.id),
- scope: {
- type: ScopeType.NativeTokenTransferAmount,
- // 0.001 ETH in wei format.
- maxAmount: parseEther('0.001'),
- },
-})
-```
-
-
-
-
-## `encodeDelegation`
-
-Encodes a single delegation to an ABI-encoded hex string.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------ | -------------------------------------- | -------- | ----------------------------- |
-| `delegation` | [`Delegation`](../types.md#delegation) | Yes | The delegation to be encoded. |
-
-### Example
-
-
-
-
-```ts
-import { encodeDelegation } from '@metamask/smart-accounts-kit/utils'
-import { delegation } from './delegation.ts'
-
-const encodedDelegation = encodeDelegation(delegation)
-```
-
-
-
-
-```ts
-import { createDelegation, ScopeType } from '@metamask/smart-accounts-kit'
-import { sepolia } from 'viem/chains'
-import { parseEther } from 'viem'
-
-export const delegation = createDelegation({
- from: '0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1',
- to: '0x2B2dBd1D5fbeB77C4613B66e9F35dBfE12cB0488',
- environment: getSmartAccountsEnvironment(sepolia.id),
- scope: {
- type: ScopeType.NativeTokenTransferAmount,
- // 0.001 ETH in wei format.
- maxAmount: parseEther('0.001'),
- },
-})
-```
-
-
-
-
-## `hashDelegation`
-
-Returns the delegation hash.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------- | -------------------------------------- | -------- | ------------------------------ |
-| `input` | [`Delegation`](../types.md#delegation) | Yes | The delegation object to hash. |
-
-### Example
-
-
-
-
-```ts
-import { hashDelegation } from '@metamask/smart-accounts-kit/utils'
-import { delegation } from './config.ts'
-
-const delegationHash = hashDelegation(delegation)
-```
-
-
-
-
-```ts
-import {
- getSmartAccountsEnvironment,
- createDelegation,
- ScopeType,
-} from '@metamask/smart-accounts-kit'
-import { parseEther } from 'viem'
-import { sepolia } from 'viem/chains'
-
-const environment = getSmartAccountsEnvironment(sepolia.id)
-
-// The address to which the delegation is granted. It can be an EOA address, or
-// smart account address.
-const delegate = '0x2FcB88EC2359fA635566E66415D31dD381CF5585'
-
-export const delegation = createDelegation({
- to: delegate,
- // Address that is granting the delegation.
- from: '0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1',
- environment,
- scope: {
- type: ScopeType.NativeTokenTransferAmount,
- // 0.001 ETH in wei format.
- maxAmount: parseEther('0.001'),
- },
-})
-```
-
-
-
-
-## `getSmartAccountsEnvironment`
-
-Resolves the `SmartAccountsEnvironment` for a chain.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| --------- | ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |
-| `chainId` | `number` | Yes | The chain ID of the network for which the `SmartAccountsEnvironment` should be resolved. |
-| `version` | `SupportedVersion` | No | Specifies the version of the Delegation Framework contracts to use. If omitted, the latest supported version will be used by default. |
-
-### Example
-
-```ts
-import { getSmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-import { sepolia } from 'viem/chains'
-
-const environment = getSmartAccountsEnvironment(sepolia.id)
-```
-
-## `overrideDeployedEnvironment`
-
-Overrides or adds the `SmartAccountsEnvironment` for a chain and supported version.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------- | ------------------------------------------------------------------ | -------- | ------------------------------------------------------------------------------------------ |
-| `chainId` | `number` | Yes | The chain ID of the network for which the `SmartAccountsEnvironment` should be overridden. |
-| `version` | `SupportedVersion` | Yes | The version of the Delegation Framework contracts to override for the specified chain. |
-| `environment` | [`SmartAccountsEnvironment`](../types.md#smartaccountsenvironment) | Yes | The environment containing contract addresses to override for the given chain and version. |
-
-### Example
-
-
-
-
-```ts
-import { environment } from './environment.ts'
-import { overrideDeployedEnvironment } from '@metamask/smart-accounts-kit/utils'
-import { sepolia } from 'viem/chains'
-
-overrideDeployedEnvironment(sepolia.id, '1.3.0', environment)
-```
-
-
-
-
-```ts
-import { SmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-
-export const environment: SmartAccountsEnvironment = {
- SimpleFactory: '0x124..',
- // ...
- implementations: {
- // ...
- },
-}
-```
-
-
-
-
-## `redeemDelegations`
-
-Encodes calldata for redeeming delegations.
-This method supports batch redemption, allowing multiple delegations to be processed within a single transaction.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------- | ------------------------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `delegations` | [`Delegation`](../types.md#delegation)`[][]` | Yes | A nested collection representing chains of delegations. Each inner collection contains a chain of delegations to be redeemed. |
-| `modes` | [`ExecutionMode`](../types.md#executionmode)`[]` | Yes | A collection specifying the [execution mode](../../concepts/delegation/delegation-manager.md#execution-modes) for each corresponding delegation chain. |
-| `executions` | [`ExecutionStruct`](../types.md#executionstruct)`[][]` | Yes | A nested collection where each inner collection contains a list of `ExecutionStruct` objects associated with a specific delegation chain. |
-
-### Example
-
-This example assumes you have a delegation signed by the delegator.
-
-```ts
-import { createExecution, ExecutionMode } from '@metamask/smart-accounts-kit'
-import { DelegationManager } from '@metamask/smart-accounts-kit/contracts'
-import { zeroAddress } from 'viem'
-
-const data = DelegationManager.encode.redeemDelegations({
- delegations: [[signedDelegation]],
- modes: [ExecutionMode.SingleDefault],
- executions: [[execution]],
-})
-```
-
-## `signDelegation`
-
-Signs the delegation and returns the delegation signature.
-
-### Parameters
-
-| Name | Type | Required | Description |
-| ------------------------------------- | ------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------ |
-| `privateKey` | `Hex` | Yes | The private key to use for signing the delegation. |
-| `delegation` | `Omit<`[`Delegation`](../types.md#delegation)`, "signature">` | Yes | The unsigned delegation object to sign. |
-| `chainId` | `number` | Yes | The chain ID on which the delegation manager is deployed. |
-| `delegationManager` | `0x${string}` | Yes | The address of the Delegation Manager. |
-| `name` | `string` | No | The name of the domain of the Delegation Manager. The default is `DelegationManager`. |
-| `version` | `string` | No | The version of the domain of the Delegation Manager. The default is `1`. |
-| `allowInsecureUnrestrictedDelegation` | `boolean` | No | Whether to allow insecure unrestricted delegation with no caveats. The default is `false`. |
-
-### Example
-
-
-
-
-```ts
-import { signDelegation } from '@metamask/smart-accounts-kit'
-import { privateKey, delegation, delegationManager } from './config.ts'
-import { sepolia } from 'viem/chains'
-
-const signature = signDelegation({
- privateKey,
- delegation,
- chainId: sepolia.id,
- delegationManager,
-})
-```
-
-
-
-
-```ts
-import {
- getSmartAccountsEnvironment,
- createDelegation,
- ScopeType,
-} from '@metamask/smart-accounts-kit'
-import { createWalletClient, parseEther } from 'viem'
-import { privateKeyToAccount } from 'viem/accounts'
-import { sepolia } from 'viem/chains'
-
-const environment = getSmartAccountsEnvironment(sepolia.id)
-export const delegationManager = environment.DelegationManager
-
-export const privateKey = `0x12141..`
-const account = privateKeyToAccount(privateKey)
-
-// The address to which the delegation is granted. It can be an EOA address, or
-// smart account address.
-const delegate = '0x2FcB88EC2359fA635566E66415D31dD381CF5585'
-
-export const delegation = createDelegation({
- to: delegate,
- from: account.address,
- environment,
- scope: {
- type: ScopeType.NativeTokenTransferAmount,
- // 0.001 ETH in wei format.
- maxAmount: parseEther('0.001'),
- },
-})
-```
-
-
-
diff --git a/gator_versioned_docs/version-1.1.0/reference/erc7710/bundler-client.md b/gator_versioned_docs/version-1.1.0/reference/erc7710/bundler-client.md
deleted file mode 100644
index 43c80e43da6..00000000000
--- a/gator_versioned_docs/version-1.1.0/reference/erc7710/bundler-client.md
+++ /dev/null
@@ -1,105 +0,0 @@
----
-description: Bundler Client actions reference.
-sidebar_label: Bundler Client actions
-toc_max_heading_level: 2
-keywords:
- [ERC-7710, Viem, bundler client, actions, reference, advanced permissions, redeem delegation]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Bundler Client actions reference
-
-These actions extend the [Viem Bundler Client](https://viem.sh/account-abstraction/clients/bundler) to support [ERC-7710](https://eips.ethereum.org/EIPS/eip-7710) utilities.
-
-## `sendUserOperationWithDelegation`
-
-Sends a user operation with redeem permissions according to the [ERC-7710](https://eips.ethereum.org/EIPS/eip-7710) specifications.
-
-:::info
-To use `sendUserOperationWithDelegation`, the Viem Bundler Client must be
-extended with `erc7710BundlerActions`.
-:::
-
-### Parameters
-
-See the [Viem `sendUserOperation` parameters](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation).
-This function has the same parameters, except it does not accept `callData`.
-
-Objects in the `calls` array also require the following parameters:
-
-| Name | Type | Required | Description |
-| ------------------- | ------------------- | -------- | ------------------------------------------------------------------------------------------------------------- |
-| `delegationManager` | `Address` | Yes | The address of Delegation Manager. |
-| `permissionContext` | `PermissionContext` | Yes | An encoded delegation chain (`Hex`) or a decoded delegation chain (`Delegation[]`) for redeeming permissions. |
-
-### Example
-
-
-
-
-```ts
-import { sessionAccount, bundlerClient, publicClient } from './client.ts'
-
-// These properties must be extracted from the permission response.
-const permissionContext = permissionsResponse[0].context
-const delegationManager = permissionsResponse[0].signerMeta.delegationManager
-
-// Calls without permissionContext and delegationManager will be executed
-// as a normal user operation.
-const userOperationHash = await bundlerClient.sendUserOperationWithDelegation({
- publicClient,
- account: sessionAccount,
- calls: [
- {
- to: sessionAccount.address,
- data: '0x',
- value: 1n,
- permissionContext,
- delegationManager,
- },
- ],
- // Appropriate values must be used for fee-per-gas.
- maxFeePerGas: 1n,
- maxPriorityFeePerGas: 1n,
-})
-```
-
-
-
-
-```ts
-import { createPublicClient, http, createBundlerClient } from 'viem'
-import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-import { createBundlerClient } from 'viem/account-abstraction'
-import { erc7710BundlerActions } from '@metamask/smart-accounts-kit/actions'
-import { toMetaMaskSmartAccount, Implementation } from '@metamask/smart-accounts-kit'
-
-export const publicClient = createPublicClient({
- chain: chain,
- transport: http(),
-})
-
-// Your session account for requesting and redeeming should be the same.
-const privateKey = '0x...'
-const account = privateKeyToAccount(privateKey)
-
-export const sessionAccount = await toMetaMaskSmartAccount({
- client: publicClient,
- implementation: Implementation.Hybrid,
- deployParams: [account.address, [], [], []],
- deploySalt: '0x',
- signer: { account },
-})
-
-export const bundlerClient = createBundlerClient({
- transport: http(`https://your-bundler-url`),
- // Allows you to use the same Bundler Client as paymaster.
- paymaster: true,
-}).extend(erc7710BundlerActions())
-```
-
-
-
diff --git a/gator_versioned_docs/version-1.1.0/reference/erc7710/wallet-client.md b/gator_versioned_docs/version-1.1.0/reference/erc7710/wallet-client.md
deleted file mode 100644
index 2709ed45355..00000000000
--- a/gator_versioned_docs/version-1.1.0/reference/erc7710/wallet-client.md
+++ /dev/null
@@ -1,83 +0,0 @@
----
-description: Wallet Client actions reference.
-sidebar_label: Wallet Client actions
-toc_max_heading_level: 2
-keywords:
- [ERC-7710, Viem, wallet client, actions, reference, advanced permissions, redeem delegation]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# Wallet Client actions reference
-
-These actions extend the [Viem Wallet Client](https://viem.sh/docs/clients/wallet) to support [ERC-7710](https://eips.ethereum.org/EIPS/eip-7710) utilities.
-
-## `sendTransactionWithDelegation`
-
-Sends a transaction to redeem delegated permissions according to the [ERC-7710](https://eips.ethereum.org/EIPS/eip-7710) specifications.
-
-:::info
-To use `sendTransactionWithDelegation`, the Viem Wallet Client must be
-extended with `erc7710WalletActions`.
-:::
-
-### Parameters
-
-See the [Viem `sendTransaction` parameters](https://viem.sh/docs/actions/wallet/sendTransaction#parameters).
-This function has the same parameters, and it also requires the following parameters:
-
-| Name | Type | Required | Description |
-| ------------------- | ------------------- | -------- | ------------------------------------------------------------------------------------------------------------- |
-| `delegationManager` | `Address` | Yes | The address of the Delegation Manager. |
-| `permissionContext` | `PermissionContext` | Yes | An encoded delegation chain (`Hex`) or a decoded delegation chain (`Delegation[]`) for redeeming delegations. |
-
-### Example
-
-
-
-
-```ts
-import { walletClient, publicClient } from './client.ts'
-
-// These properties must be extracted from the permission response. See
-// `grantPermissions` action to learn how to request permissions.
-const permissionContext = permissionsResponse[0].context
-const delegationManager = permissionsResponse[0].signerMeta.delegationManager
-
-const hash = walletClient.sendTransactionWithDelegation({
- chain,
- to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
- value: 1n,
- permissionContext,
- delegationManager,
-})
-```
-
-
-
-
-```ts
-import { http, createPublicClient, createWalletClient } from 'viem'
-import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'
-import { sepolia as chain } from 'viem/chains'
-import { erc7710WalletActions } from '@metamask/smart-accounts-kit/actions'
-
-export const publicClient = createPublicClient({
- chain,
- transport: http(),
-})
-
-// Your session account for requesting and redeeming should be the same.
-const privateKey = '0x...'
-const account = privateKeyToAccount(privateKey)
-
-const walletClient = createWalletClient({
- account,
- transport: http(),
- chain,
-}).extend(erc7710WalletActions())
-```
-
-
-
diff --git a/gator_versioned_docs/version-1.1.0/troubleshooting/aa21-prefund.md b/gator_versioned_docs/version-1.1.0/troubleshooting/aa21-prefund.md
deleted file mode 100644
index e09ef092bbb..00000000000
--- a/gator_versioned_docs/version-1.1.0/troubleshooting/aa21-prefund.md
+++ /dev/null
@@ -1,98 +0,0 @@
----
-description: How to resolve the AA21 didn't pay prefund error when submitting user operations.
-sidebar_label: AA21 didn't pay prefund
-keywords: [AA21, pay prefund, user operation, troubleshooting]
----
-
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-# AA21 didn't pay prefund
-
-The `EntryPoint` contract reverts with `AA21 didn't pay prefund` when a smart account doesn't
-have enough native token balance to cover the gas cost of the user operation.
-
-Before executing a user operation, the `EntryPoint` requires the sender account to prefund the
-expected gas cost. If the account's balance is lower than the required prefund, the `EntryPoint`
-reverts the operation.
-
-## Solution
-
-### Fund the smart account
-
-Fund the smart account with enough native tokens to cover the required prefund.
-Use Viem's [`estimateUserOperationGas`](https://viem.sh/account-abstraction/actions/bundler/estimateUserOperationGas)
-to get the gas estimates from your bundler, then calculate the required prefund based on the
-`EntryPoint` version.
-
-
-
-
-```typescript
-import { formatEther } from 'viem'
-
-const gasEstimate = await bundlerClient.estimateUserOperationGas({
- account: smartAccount,
- calls: [{ to: '0x...', value: 0n }],
-})
-
-const { maxFeePerGas } = await publicClient.estimateFeesPerGas()
-
-const requiredGas =
- gasEstimate.verificationGasLimit +
- gasEstimate.callGasLimit +
- (gasEstimate.paymasterVerificationGasLimit ?? 0n) +
- (gasEstimate.paymasterPostOpGasLimit ?? 0n) +
- gasEstimate.preVerificationGas
-
-const requiredPrefund = requiredGas * maxFeePerGas
-
-const balance = await publicClient.getBalance({
- address: smartAccount.address,
-})
-
-if (balance < requiredPrefund) {
- console.log(
- `Insufficient balance: account has ${formatEther(balance)} ETH, ` +
- `but needs ${formatEther(requiredPrefund)} ETH`
- )
-}
-```
-
-
-
-
-```typescript
-import { formatEther } from 'viem'
-
-const gasEstimate = await bundlerClient.estimateUserOperationGas({
- account: smartAccount,
- calls: [{ to: '0x...', value: 0n }],
-})
-
-const { maxFeePerGas } = await publicClient.estimateFeesPerGas()
-
-const requiredGas =
- gasEstimate.callGasLimit + gasEstimate.verificationGasLimit + gasEstimate.preVerificationGas
-
-const requiredPrefund = requiredGas * maxFeePerGas
-
-const balance = await publicClient.getBalance({
- address: smartAccount.address,
-})
-
-if (balance < requiredPrefund) {
- console.log(
- `Insufficient balance: account has ${formatEther(balance)} ETH, ` +
- `but needs ${formatEther(requiredPrefund)} ETH`
- )
-}
-```
-
-
-
-
-### Use a paymaster
-
-You can use a paymaster to sponsor the gas fees for the smart account, so the account doesn't
-need to hold native tokens. For more information about configuring a paymaster, see [Send a gasless transaction](../guides/smart-accounts/send-gasless-transaction.md).
diff --git a/gator_versioned_docs/version-1.1.0/troubleshooting/error-codes.md b/gator_versioned_docs/version-1.1.0/troubleshooting/error-codes.md
deleted file mode 100644
index 58637dace23..00000000000
--- a/gator_versioned_docs/version-1.1.0/troubleshooting/error-codes.md
+++ /dev/null
@@ -1,56 +0,0 @@
----
-description: Delegation Framework error codes
-sidebar_label: Error codes
-keywords: [error codes, errors, debug, error references, delegation framework]
----
-
-# Error codes
-
-The following tables describe error codes from the [MetaMask Delegation Framework contracts](https://github.com/metamask/delegation-framework). Use a decoder such as
-[calldata.swiss-knife.xyz](https://calldata.swiss-knife.xyz/decoder) to identify error signatures from raw revert data.
-
-## Delegation Manager error codes
-
-| Error code | Error name | Description |
-| ------------ | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
-| `0xb5863604` | `InvalidDelegate()` | The caller is not the delegate specified in the delegation. [Troubleshoot an invalid delegate.](./invalid-delegate.md) |
-| `0xb9f0f171` | `InvalidDelegator()` | The caller is not the delegator specificed in the delegation. [Troubleshoot an invalid delegator.](./invalid-delegator.md) |
-| `0x05baa052` | `CannotUseADisabledDelegation()` | The delegation has been disabled by the delegator. |
-| `0xded4370e` | `InvalidAuthority()` | The delegation chain authority validation failed. The authority hash of a child delegation does not match the hash of its parent delegation. |
-| `0x1bcaf69f` | `BatchDataLengthMismatch()` | The array lengths do not match in a batch `redeemDelegations` contract call. |
-| `0x005ecddb` | `AlreadyDisabled()` | The delegation has already been disabled. |
-| `0xf2a5f75a` | `AlreadyEnabled()` | The delegation is already enabled. |
-| `0xf645eedf` | `ECDSAInvalidSignature()` | Invalid ECDSA signature format. |
-| `0xfce698f7` | `ECDSAInvalidSignatureLength(uint256)` | The ECDSA signature length is incorrect. |
-| `0xac241e11` | `EmptySignature()` | The signature is empty. |
-| `0xd93c0665` | `EnforcedPause()` | The Delegation Manager contract is paused by the owner. |
-| `0x3db6791c` | `InvalidEOASignature()` | EOA signature verification failed. [Troubleshoot an invalid EOA signature.](./invalid-signature.md) |
-| `0x155ff427` | `InvalidERC1271Signature()` | Smart contract signature (ERC-1271) verification failed. |
-| `0x118cdaa7` | `OwnableUnauthorizedAccount(address)` | An unauthorized account attempted an owner only action. |
-| `0x1e4fbdf7` | `OwnableInvalidOwner(address)` | Invalid owner address in an ownership transfer. |
-| `0xf6b6ef5b` | `InvalidShortString()` | A string parameter is too short. |
-| `0xaa0ea2d8` | `StringTooLong(string)` | A string parameter exceeds the maximum length. |
-
-## Smart account error codes
-
-| Error code | Error name | Description |
-| ------------ | ----------------------------- | --------------------------------------------------------------------------- |
-| `0xd663742a` | `NotEntryPoint()` | The caller is not the EntryPoint contract. |
-| `0x0796d945` | `NotEntryPointOrSelf()` | The caller is neither the EntryPoint contract nor the smart account itself. |
-| `0x1a4b3a04` | `NotDelegationManager()` | The caller is not the DelegationManager contract. |
-| `0xb96fcfe4` | `UnsupportedCallType(bytes1)` | The execution call type is not supported. |
-| `0x1187dc06` | `UnsupportedExecType(bytes1)` | The execution type is not supported. |
-| `0x29c3b7ee` | `NotSelf()` | The caller is not the smart account itself. |
-
-## Caveat enforcer error codes
-
-| Error string | Description |
-| --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `AllowedTargetsEnforcer:target-address-not-allowed` | When redeeming a delegation with an `allowedTargets` caveat, the execution's target address is not in the allowed list. |
-| `AllowedTargetsEnforcer:invalid-terms-length` | When creating a delegation with an `allowedTargets` caveat, the encoded terms length is not a multiple of 20 bytes (Ethereum address). |
-| `ERC20TransferAmountEnforcer:invalid-terms-length` | When creating a delegation with an `erc20TransferAmount` caveat, the encoded terms are not exactly 52 bytes (20 byte Ethereum address + 32 byte amount). |
-| `ERC20TransferAmountEnforcer:invalid-contract` | When redeeming a delegation with an `erc20TransferAmount` caveat, the execution targets a different contract than the allowed token address. |
-| `ERC20TransferAmountEnforcer:invalid-method` | When redeeming a delegation with an `erc20TransferAmount` caveat, the execution calls a function other than `transfer(address,uint256)`. |
-| `ERC20TransferAmountEnforcer:allowance-exceeded` | When redeeming a delegation with an `erc20TransferAmount` caveat, the cumulative transfer amount exceeds the allowed limit. |
-| `CaveatEnforcer:invalid-call-type` | When redeeming a delegation, the execution uses a batch call type, but the caveat enforcer only supports single calls. |
-| `CaveatEnforcer:invalid-execution-type` | When redeeming a delegation, the execution uses a non-default [execution mode](../reference/types.md#executionmode), but the caveat enforcer only supports the default mode. |
diff --git a/gator_versioned_docs/version-1.1.0/troubleshooting/invalid-delegator.md b/gator_versioned_docs/version-1.1.0/troubleshooting/invalid-delegator.md
deleted file mode 100644
index 5a8661adfe2..00000000000
--- a/gator_versioned_docs/version-1.1.0/troubleshooting/invalid-delegator.md
+++ /dev/null
@@ -1,38 +0,0 @@
----
-description: How to resolve the InvalidDelegator error.
-sidebar_label: Invalid delegator
-toc_max_heading_level: 2
-keywords: [InvalidDelegator, error code, delegation, troubleshooting]
----
-
-# Invalid delegator
-
-The Delegation Manager reverts with `InvalidDelegator()` when the caller is not the delegator
-specified in the delegation.
-
-This error is thrown by the `disableDelegation` and `enableDelegation` contract functions. Only the
-account that created the delegation can [disable](../guides/delegation/disable-delegation.md)
-or enable it.
-
-## Solution
-
-Verify that you're sending the transaction from the delegator's account. If the delegator is a smart account, submit a user operation through the smart account.
-
-```typescript
-import { DelegationManager } from '@metamask/smart-accounts-kit/contracts'
-
-// Generate calldata to disable the delegation.
-const disableCalldata = DelegationManager.encode.disableDelegation({
- delegation: signedDelegation, // Signed by delegatorSmartAccount
-})
-
-const userOpHash = await bundlerClient.sendUserOperation({
- account: delegatorSmartAccount,
- calls: [
- {
- to: delegatorSmartAccount.environment.DelegationManager,
- data: disableCalldata,
- },
- ],
-})
-```
diff --git a/gator_versioned_docs/version-1.1.0/troubleshooting/invalid-signature.md b/gator_versioned_docs/version-1.1.0/troubleshooting/invalid-signature.md
deleted file mode 100644
index 0f3f32bfc05..00000000000
--- a/gator_versioned_docs/version-1.1.0/troubleshooting/invalid-signature.md
+++ /dev/null
@@ -1,85 +0,0 @@
----
-description: How to resolve the InvalidEOASignature error when redeeming delegations.
-sidebar_label: Invalid EOA signature
-toc_max_heading_level: 2
-keywords: [InvalidEOASignature, error code, delegation, troubleshooting, invalid EOA signature]
----
-
-# Invalid EOA signature
-
-The Delegation Manager reverts with `InvalidEOASignature()` in the following cases.
-
-## Smart account is not deployed
-
-The [root delegation's](../concepts/delegation/overview.md#root-delegation) delegator must be a
-MetaMask smart account. The Delegation Manager checks the delegator code to determine
-whether it is an externally owned account (EOA) or a smart account.
-
-If the smart account is not deployed yet, its address has no contract code. The Delegation
-Manager treats the address as an EOA and attempts ECDSA signature recovery. Because the
-delegation was signed by the smart account, signature recovery returns a different address,
-and the call reverts.
-
-### Solution
-
-Verify that the smart account used as the delegator is deployed before redeeming the delegation. The
-smart account can be either an ERC-4337 smart account or an EIP-7702 upgraded EOA.
-
-For an ERC-4337 smart account, the first user operation sent from that account deploys it
-automatically. For more information, see [Deploy a smart account](../guides/smart-accounts/deploy-smart-account.md).
-
-For an EIP-7702-upgraded EOA, verify that you submit the authorization to set the account code
-before redeeming the delegation.
-
-```ts
-import { getSmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-import { sepolia as chain } from 'viem/chains'
-
-// Get the EOA account code
-const code = await publicClient.getCode({
- address,
-})
-
-if (code) {
- // According to EIP-7702, the code format is 0xef0100 || address.
- // Remove the first 8 characters (0xef0100) to get the delegator address.
- const delegatorAddress = `0x${code.substring(8)}`
-
- const statelessDelegatorAddress = getSmartAccountsEnvironment(chain.id).implementations
- .EIP7702StatelessDeleGatorImpl
-
- // If the account isn't upgraded to a MetaMask smart account, you can
- // either upgrade programmatically or ask the user to switch to a smart account manually.
- const isAccountUpgraded =
- delegatorAddress.toLowerCase() === statelessDelegatorAddress.toLowerCase()
-}
-```
-
-To upgrade an EOA to a MetaMask smart account, see the [EIP-7702 quickstart](../get-started/smart-account-quickstart/eip7702.md).
-
-## Incorrect signer
-
-The delegation was signed with an account that doesn't correspond to the delegator
-address. When the delegator is an EOA, the Delegation Manager recovers the signer from
-the EIP-712 typed data hash and compares it to the `delegator` field. If they don't
-match, the transaction reverts.
-
-This occurs when redeeming a [delegation chain](../guides/delegation/create-redelegation.md). An
-intermediate or leaf delegation has an EOA as the delegator, but the delegation is signed by an
-account other than the expected delegator.
-
-### Solution
-
-Verify that the private key used to sign the delegation corresponds to the delegator address. For
-more information, see the [`signDelegation`](../reference/delegation/index.md#signdelegation) reference.
-
-## Incorrect chain ID or Delegation Manager
-
-The EIP-712 domain separator used for signing the delegation includes the chain ID and the Delegation Manager contract
-address. If the delegation was signed on a different chain or against a different
-Delegation Manager, the recovered address won't match.
-
-### Solution
-
-Verify that the chain ID and Delegation Manager contract address you use when signing match the
-chain and contract where you redeem the delegation.
diff --git a/gator_versioned_docs/version-1.2.0/changelog/1.0.0.md b/gator_versioned_docs/version-1.2.0/changelog/1.0.0.md
deleted file mode 100644
index 9410743c68f..00000000000
--- a/gator_versioned_docs/version-1.2.0/changelog/1.0.0.md
+++ /dev/null
@@ -1,195 +0,0 @@
----
-sidebar_label: 1.0.0
-description: MetaMask Smart Accounts Kit v1.0.0 changelog
----
-
-# What's new in v1.0.0?
-
-:::info First stable release
-
-This is the first stable release of MetaMask Smart Accounts Kit. From v1.0.0 onward, breaking changes will be released only in major version bumps, as per the [semantic versioning specification](https://semver.org/#spec-item-4).
-
-:::
-
-## Breaking changes
-
-### ⚠️ `sendTransactionWithDelegation`
-
-- The `permissionsContext` parameter has been renamed to `permissionContext` (singular).
-- `permissionContext` now accepts `PermissionContext` which represents encoded delegation chain (`Hex`) or a decoded delegation chain (`Delegation[]`) for redeeming delegations.
-
-```ts
-await walletClient.sendTransactionWithDelegation({
-// remove-next-line
-- permissionsContext: "0x...",
-// add-next-line
-+ permissionContext: "0x...",
- delegationManager: "0x..,
- // ...
-});
-```
-
-### ⚠️ `sendUserOperationWithDelegation`
-
-- The `permissionsContext` parameter has been renamed to `permissionContext` (singular).
-- `permissionContext` now accepts `PermissionContext` which represents encoded delegation chain (`Hex`) or a decoded delegation chain (`Delegation[]`) for redeeming delegations.
-- The `accountMetadata` parameter has been replaced with `dependencies`.
-
-```ts
-await bundlerClient.sendUserOperationWithDelegation({
- // remove-next-line
-- accountMetadata: {
- // add-next-line
-+ dependencies: {
- factory: "0x..",
- factoryData: "0x..."
- },
- // ...
- calls: [
- {
- to: sessionAccount.address,
- data: "0x",
- value: 1n,
- // remove-next-line
-- permissionsContext: "0x..",
- // add-next-line
-+ permissionContext: "0x..",
- delegationManager: "0x..",
- },
- ],
- // ...
-});
-```
-
-### ⚠️ `getDelegationHashOffchain`
-
-The function has been renamed to `hashDelegation` for improved clarity.
-
-```typescript
-// remove-next-line
-- import { getDelegationHashOffchain } from "@metamask/smart-accounts-kit";
-// add-next-line
-+ import { hashDelegation } from "@metamask/smart-accounts-kit/utils";
-
-// remove-next-line
-- const delegationHash = getDelegationHashOffchain(delegation);
-// add-next-line
-+ const delegationHash = hashDelegation(delegation);
-```
-
-### ⚠️ `requestExecutionPermissions`
-
-- The action now accepts `isAdjustmentAllowed` inside each permission object as per new ERC-7715 specification.
-- The action now accepts `to` instead of `signer` for the session account.
-- The action now returns developer friendly types, `chainId` as `number` and token amounts as `bigint`.
-- `expiry` is now an optional parameter.
-
-```ts
-await walletClient.requestExecutionPermissions([{
- chainId: chain.id,
- expiry,
- // The requested permissions will be granted to the
- // session account.
- // add-next-line
-+ to: sessionAccount.address,
- // remove-start
-- signer: {
-- type: "account",
-- data: {
-- address: sessionAccount.address,
-- },
-- },
- // remove-end
- // remove-next-line
-- isAdjustmentAllowed: true,
- permission: {
- type: "erc20-token-periodic",
- data: {
- // ...
- },
- // add-next-line
-+ isAdjustmentAllowed: true,
- },
-}]);
-```
-
-### ⚠️ `encodePermissionContexts`
-
-The utility function has been removed. See [`encodeDelegations`](../reference/delegation/index.md#encodedelegations) to encode the delegations.
-
-### ⚠️ `decodePermissionContexts`
-
-The utility function has been removed. See [`decodeDelegations`](../reference/delegation/index.md#decodedelegations) to decode the delegations.
-
-### ⚠️ `redeemDelegations`
-
-The `redeemDelegations` function and `Redemption` type have been removed. Use the [`DelegationManager.encode.redeemDelegations`](../reference/delegation/index.md#redeemdelegations) encoding utility.
-
-## Enhancements
-
-- New ERC-7715 Wallet Client actions have been added to [get the supported permission](../guides/advanced-permissions/get-supported-permissions.md), and [get granted permissions](../guides/advanced-permissions/get-granted-permissions.md) from a wallet.
-- The `signer` parameter in `toMetaMaskSmartAccount` is now optional. If omitted, non-signing operations still work, but signing operations such as `signUserOperation`, `signDelegation`, `signMessage`, and `signTypedData` throw an error.
-- Added [`encodeDelegation`](../reference/delegation/index.md#encodedelegation) and [`decodeDelegation`](../reference/delegation/index.md#decodedelegation) utilities for encoding and decoding single delegation.
-- Allow scope type to be specified either as [ScopeType enum](../reference/types.md#scopetype) or string literal.
-- Allow caveat type to be specified either as [CaveatType enum](../reference/types.md#caveattype) or string literal.
-- Added support for Tempo Mainnet and Tempo Moderato Testnet.
-- The `webauthn-p256` dependency has been replaced with the `ox` p256 module. This doesn't impact developer facing APIs.
-- Improved `@metamask/delegation-abis` tree-shakability.
-
-## Fixes
-
-- Fixed `signDelegation` to correctly await the signer and return the signed signature.
-- The `delegation.salt` and `caveat.args` now default to `0x00` instead of `0x`. This prevents
- `Cannot convert 0x to a BigInt` errors when encoding delegations directly with Viem.
-
-## Contract addresses
-
-The following are the contract addresses for the
-[Delegation Framework version 1.3.0](https://github.com/MetaMask/delegation-framework/blob/v1.3.0/documents/Deployments.md),
-as used by this version of the toolkit.
-
-### Delegation Framework
-
-| Contract | Address |
-| --------------------- | -------------------------------------------- |
-| EntryPoint | `0x0000000071727De22E5E9d8BAf0edAc6f37da032` |
-| SimpleFactory | `0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c` |
-| DelegationManager | `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3` |
-| MultiSigDeleGatorImpl | `0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7` |
-| HybridDeleGatorImpl | `0x48dBe696A4D990079e039489bA2053B36E8FFEC4` |
-
-### Caveat enforcers
-
-| Enforcer | Address |
-| ---------------------------------------- | -------------------------------------------- |
-| AllowedCalldataEnforcer | `0xc2b0d624c1c4319760C96503BA27C347F3260f55` |
-| AllowedMethodsEnforcer | `0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5` |
-| AllowedTargetsEnforcer | `0x7F20f61b1f09b08D970938F6fa563634d65c4EeB` |
-| ArgsEqualityCheckEnforcer | `0x44B8C6ae3C304213c3e298495e12497Ed3E56E41` |
-| BlockNumberEnforcer | `0x5d9818dF0AE3f66e9c3D0c5029DAF99d1823ca6c` |
-| DeployedEnforcer | `0x24ff2AA430D53a8CD6788018E902E098083dcCd2` |
-| ERC20BalanceChangeEnforcer | `0xcdF6aB796408598Cea671d79506d7D48E97a5437` |
-| ERC20TransferAmountEnforcer | `0xf100b0819427117EcF76Ed94B358B1A5b5C6D2Fc` |
-| ERC20PeriodTransferEnforcer | `0x474e3Ae7E169e940607cC624Da8A15Eb120139aB` |
-| ERC20StreamingEnforcer | `0x56c97aE02f233B29fa03502Ecc0457266d9be00e` |
-| ERC721BalanceChangeEnforcer | `0x8aFdf96eDBbe7e1eD3f5Cd89C7E084841e12A09e` |
-| ERC721TransferEnforcer | `0x3790e6B7233f779b09DA74C72b6e94813925b9aF` |
-| ERC1155BalanceChangeEnforcer | `0x63c322732695cAFbbD488Fc6937A0A7B66fC001A` |
-| ExactCalldataBatchEnforcer | `0x982FD5C86BBF425d7d1451f974192d4525113DfD` |
-| ExactCalldataEnforcer | `0x99F2e9bF15ce5eC84685604836F71aB835DBBdED` |
-| ExactExecutionBatchEnforcer | `0x1e141e455d08721Dd5BCDA1BaA6Ea5633Afd5017` |
-| ExactExecutionEnforcer | `0x146713078D39eCC1F5338309c28405ccf85Abfbb` |
-| IdEnforcer | `0xC8B5D93463c893401094cc70e66A206fb5987997` |
-| LimitedCallsEnforcer | `0x04658B29F6b82ed55274221a06Fc97D318E25416` |
-| MultiTokenPeriodEnforcer | `0xFB2f1a9BD76d3701B730E5d69C3219D42D80eBb7` |
-| NonceEnforcer | `0xDE4f2FAC4B3D87A1d9953Ca5FC09FCa7F366254f` |
-| NativeBalanceChangeEnforcer | `0xbD7B277507723490Cd50b12EaaFe87C616be6880` |
-| NativeTokenPaymentEnforcer | `0x4803a326ddED6dDBc60e659e5ed12d85c7582811` |
-| NativeTokenTransferAmountEnforcer | `0xF71af580b9c3078fbc2BBF16FbB8EEd82b330320` |
-| NativeTokenStreamingEnforcer | `0xD10b97905a320b13a0608f7E9cC506b56747df19` |
-| NativeTokenPeriodTransferEnforcer | `0x9BC0FAf4Aca5AE429F4c06aEEaC517520CB16BD9` |
-| OwnershipTransferEnforcer | `0x7EEf9734E7092032B5C56310Eb9BbD1f4A524681` |
-| RedeemerEnforcer | `0xE144b0b2618071B4E56f746313528a669c7E65c5` |
-| SpecificActionERC20TransferBatchEnforcer | `0x00e0251aaA263dfE3B3541B758A82D1CBA1c3B6D` |
-| TimestampEnforcer | `0x1046bb45C8d673d4ea75321280DB34899413c069` |
-| ValueLteEnforcer | `0x92Bf12322527cAA612fd31a0e810472BBB106A8F` |
diff --git a/gator_versioned_docs/version-1.5.0/changelog/1.0.0.md b/gator_versioned_docs/version-1.5.0/changelog/1.0.0.md
deleted file mode 100644
index 9410743c68f..00000000000
--- a/gator_versioned_docs/version-1.5.0/changelog/1.0.0.md
+++ /dev/null
@@ -1,195 +0,0 @@
----
-sidebar_label: 1.0.0
-description: MetaMask Smart Accounts Kit v1.0.0 changelog
----
-
-# What's new in v1.0.0?
-
-:::info First stable release
-
-This is the first stable release of MetaMask Smart Accounts Kit. From v1.0.0 onward, breaking changes will be released only in major version bumps, as per the [semantic versioning specification](https://semver.org/#spec-item-4).
-
-:::
-
-## Breaking changes
-
-### ⚠️ `sendTransactionWithDelegation`
-
-- The `permissionsContext` parameter has been renamed to `permissionContext` (singular).
-- `permissionContext` now accepts `PermissionContext` which represents encoded delegation chain (`Hex`) or a decoded delegation chain (`Delegation[]`) for redeeming delegations.
-
-```ts
-await walletClient.sendTransactionWithDelegation({
-// remove-next-line
-- permissionsContext: "0x...",
-// add-next-line
-+ permissionContext: "0x...",
- delegationManager: "0x..,
- // ...
-});
-```
-
-### ⚠️ `sendUserOperationWithDelegation`
-
-- The `permissionsContext` parameter has been renamed to `permissionContext` (singular).
-- `permissionContext` now accepts `PermissionContext` which represents encoded delegation chain (`Hex`) or a decoded delegation chain (`Delegation[]`) for redeeming delegations.
-- The `accountMetadata` parameter has been replaced with `dependencies`.
-
-```ts
-await bundlerClient.sendUserOperationWithDelegation({
- // remove-next-line
-- accountMetadata: {
- // add-next-line
-+ dependencies: {
- factory: "0x..",
- factoryData: "0x..."
- },
- // ...
- calls: [
- {
- to: sessionAccount.address,
- data: "0x",
- value: 1n,
- // remove-next-line
-- permissionsContext: "0x..",
- // add-next-line
-+ permissionContext: "0x..",
- delegationManager: "0x..",
- },
- ],
- // ...
-});
-```
-
-### ⚠️ `getDelegationHashOffchain`
-
-The function has been renamed to `hashDelegation` for improved clarity.
-
-```typescript
-// remove-next-line
-- import { getDelegationHashOffchain } from "@metamask/smart-accounts-kit";
-// add-next-line
-+ import { hashDelegation } from "@metamask/smart-accounts-kit/utils";
-
-// remove-next-line
-- const delegationHash = getDelegationHashOffchain(delegation);
-// add-next-line
-+ const delegationHash = hashDelegation(delegation);
-```
-
-### ⚠️ `requestExecutionPermissions`
-
-- The action now accepts `isAdjustmentAllowed` inside each permission object as per new ERC-7715 specification.
-- The action now accepts `to` instead of `signer` for the session account.
-- The action now returns developer friendly types, `chainId` as `number` and token amounts as `bigint`.
-- `expiry` is now an optional parameter.
-
-```ts
-await walletClient.requestExecutionPermissions([{
- chainId: chain.id,
- expiry,
- // The requested permissions will be granted to the
- // session account.
- // add-next-line
-+ to: sessionAccount.address,
- // remove-start
-- signer: {
-- type: "account",
-- data: {
-- address: sessionAccount.address,
-- },
-- },
- // remove-end
- // remove-next-line
-- isAdjustmentAllowed: true,
- permission: {
- type: "erc20-token-periodic",
- data: {
- // ...
- },
- // add-next-line
-+ isAdjustmentAllowed: true,
- },
-}]);
-```
-
-### ⚠️ `encodePermissionContexts`
-
-The utility function has been removed. See [`encodeDelegations`](../reference/delegation/index.md#encodedelegations) to encode the delegations.
-
-### ⚠️ `decodePermissionContexts`
-
-The utility function has been removed. See [`decodeDelegations`](../reference/delegation/index.md#decodedelegations) to decode the delegations.
-
-### ⚠️ `redeemDelegations`
-
-The `redeemDelegations` function and `Redemption` type have been removed. Use the [`DelegationManager.encode.redeemDelegations`](../reference/delegation/index.md#redeemdelegations) encoding utility.
-
-## Enhancements
-
-- New ERC-7715 Wallet Client actions have been added to [get the supported permission](../guides/advanced-permissions/get-supported-permissions.md), and [get granted permissions](../guides/advanced-permissions/get-granted-permissions.md) from a wallet.
-- The `signer` parameter in `toMetaMaskSmartAccount` is now optional. If omitted, non-signing operations still work, but signing operations such as `signUserOperation`, `signDelegation`, `signMessage`, and `signTypedData` throw an error.
-- Added [`encodeDelegation`](../reference/delegation/index.md#encodedelegation) and [`decodeDelegation`](../reference/delegation/index.md#decodedelegation) utilities for encoding and decoding single delegation.
-- Allow scope type to be specified either as [ScopeType enum](../reference/types.md#scopetype) or string literal.
-- Allow caveat type to be specified either as [CaveatType enum](../reference/types.md#caveattype) or string literal.
-- Added support for Tempo Mainnet and Tempo Moderato Testnet.
-- The `webauthn-p256` dependency has been replaced with the `ox` p256 module. This doesn't impact developer facing APIs.
-- Improved `@metamask/delegation-abis` tree-shakability.
-
-## Fixes
-
-- Fixed `signDelegation` to correctly await the signer and return the signed signature.
-- The `delegation.salt` and `caveat.args` now default to `0x00` instead of `0x`. This prevents
- `Cannot convert 0x to a BigInt` errors when encoding delegations directly with Viem.
-
-## Contract addresses
-
-The following are the contract addresses for the
-[Delegation Framework version 1.3.0](https://github.com/MetaMask/delegation-framework/blob/v1.3.0/documents/Deployments.md),
-as used by this version of the toolkit.
-
-### Delegation Framework
-
-| Contract | Address |
-| --------------------- | -------------------------------------------- |
-| EntryPoint | `0x0000000071727De22E5E9d8BAf0edAc6f37da032` |
-| SimpleFactory | `0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c` |
-| DelegationManager | `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3` |
-| MultiSigDeleGatorImpl | `0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7` |
-| HybridDeleGatorImpl | `0x48dBe696A4D990079e039489bA2053B36E8FFEC4` |
-
-### Caveat enforcers
-
-| Enforcer | Address |
-| ---------------------------------------- | -------------------------------------------- |
-| AllowedCalldataEnforcer | `0xc2b0d624c1c4319760C96503BA27C347F3260f55` |
-| AllowedMethodsEnforcer | `0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5` |
-| AllowedTargetsEnforcer | `0x7F20f61b1f09b08D970938F6fa563634d65c4EeB` |
-| ArgsEqualityCheckEnforcer | `0x44B8C6ae3C304213c3e298495e12497Ed3E56E41` |
-| BlockNumberEnforcer | `0x5d9818dF0AE3f66e9c3D0c5029DAF99d1823ca6c` |
-| DeployedEnforcer | `0x24ff2AA430D53a8CD6788018E902E098083dcCd2` |
-| ERC20BalanceChangeEnforcer | `0xcdF6aB796408598Cea671d79506d7D48E97a5437` |
-| ERC20TransferAmountEnforcer | `0xf100b0819427117EcF76Ed94B358B1A5b5C6D2Fc` |
-| ERC20PeriodTransferEnforcer | `0x474e3Ae7E169e940607cC624Da8A15Eb120139aB` |
-| ERC20StreamingEnforcer | `0x56c97aE02f233B29fa03502Ecc0457266d9be00e` |
-| ERC721BalanceChangeEnforcer | `0x8aFdf96eDBbe7e1eD3f5Cd89C7E084841e12A09e` |
-| ERC721TransferEnforcer | `0x3790e6B7233f779b09DA74C72b6e94813925b9aF` |
-| ERC1155BalanceChangeEnforcer | `0x63c322732695cAFbbD488Fc6937A0A7B66fC001A` |
-| ExactCalldataBatchEnforcer | `0x982FD5C86BBF425d7d1451f974192d4525113DfD` |
-| ExactCalldataEnforcer | `0x99F2e9bF15ce5eC84685604836F71aB835DBBdED` |
-| ExactExecutionBatchEnforcer | `0x1e141e455d08721Dd5BCDA1BaA6Ea5633Afd5017` |
-| ExactExecutionEnforcer | `0x146713078D39eCC1F5338309c28405ccf85Abfbb` |
-| IdEnforcer | `0xC8B5D93463c893401094cc70e66A206fb5987997` |
-| LimitedCallsEnforcer | `0x04658B29F6b82ed55274221a06Fc97D318E25416` |
-| MultiTokenPeriodEnforcer | `0xFB2f1a9BD76d3701B730E5d69C3219D42D80eBb7` |
-| NonceEnforcer | `0xDE4f2FAC4B3D87A1d9953Ca5FC09FCa7F366254f` |
-| NativeBalanceChangeEnforcer | `0xbD7B277507723490Cd50b12EaaFe87C616be6880` |
-| NativeTokenPaymentEnforcer | `0x4803a326ddED6dDBc60e659e5ed12d85c7582811` |
-| NativeTokenTransferAmountEnforcer | `0xF71af580b9c3078fbc2BBF16FbB8EEd82b330320` |
-| NativeTokenStreamingEnforcer | `0xD10b97905a320b13a0608f7E9cC506b56747df19` |
-| NativeTokenPeriodTransferEnforcer | `0x9BC0FAf4Aca5AE429F4c06aEEaC517520CB16BD9` |
-| OwnershipTransferEnforcer | `0x7EEf9734E7092032B5C56310Eb9BbD1f4A524681` |
-| RedeemerEnforcer | `0xE144b0b2618071B4E56f746313528a669c7E65c5` |
-| SpecificActionERC20TransferBatchEnforcer | `0x00e0251aaA263dfE3B3541B758A82D1CBA1c3B6D` |
-| TimestampEnforcer | `0x1046bb45C8d673d4ea75321280DB34899413c069` |
-| ValueLteEnforcer | `0x92Bf12322527cAA612fd31a0e810472BBB106A8F` |
diff --git a/gator_versioned_docs/version-1.6.0/changelog/1.0.0.md b/gator_versioned_docs/version-1.6.0/changelog/1.0.0.md
deleted file mode 100644
index 9410743c68f..00000000000
--- a/gator_versioned_docs/version-1.6.0/changelog/1.0.0.md
+++ /dev/null
@@ -1,195 +0,0 @@
----
-sidebar_label: 1.0.0
-description: MetaMask Smart Accounts Kit v1.0.0 changelog
----
-
-# What's new in v1.0.0?
-
-:::info First stable release
-
-This is the first stable release of MetaMask Smart Accounts Kit. From v1.0.0 onward, breaking changes will be released only in major version bumps, as per the [semantic versioning specification](https://semver.org/#spec-item-4).
-
-:::
-
-## Breaking changes
-
-### ⚠️ `sendTransactionWithDelegation`
-
-- The `permissionsContext` parameter has been renamed to `permissionContext` (singular).
-- `permissionContext` now accepts `PermissionContext` which represents encoded delegation chain (`Hex`) or a decoded delegation chain (`Delegation[]`) for redeeming delegations.
-
-```ts
-await walletClient.sendTransactionWithDelegation({
-// remove-next-line
-- permissionsContext: "0x...",
-// add-next-line
-+ permissionContext: "0x...",
- delegationManager: "0x..,
- // ...
-});
-```
-
-### ⚠️ `sendUserOperationWithDelegation`
-
-- The `permissionsContext` parameter has been renamed to `permissionContext` (singular).
-- `permissionContext` now accepts `PermissionContext` which represents encoded delegation chain (`Hex`) or a decoded delegation chain (`Delegation[]`) for redeeming delegations.
-- The `accountMetadata` parameter has been replaced with `dependencies`.
-
-```ts
-await bundlerClient.sendUserOperationWithDelegation({
- // remove-next-line
-- accountMetadata: {
- // add-next-line
-+ dependencies: {
- factory: "0x..",
- factoryData: "0x..."
- },
- // ...
- calls: [
- {
- to: sessionAccount.address,
- data: "0x",
- value: 1n,
- // remove-next-line
-- permissionsContext: "0x..",
- // add-next-line
-+ permissionContext: "0x..",
- delegationManager: "0x..",
- },
- ],
- // ...
-});
-```
-
-### ⚠️ `getDelegationHashOffchain`
-
-The function has been renamed to `hashDelegation` for improved clarity.
-
-```typescript
-// remove-next-line
-- import { getDelegationHashOffchain } from "@metamask/smart-accounts-kit";
-// add-next-line
-+ import { hashDelegation } from "@metamask/smart-accounts-kit/utils";
-
-// remove-next-line
-- const delegationHash = getDelegationHashOffchain(delegation);
-// add-next-line
-+ const delegationHash = hashDelegation(delegation);
-```
-
-### ⚠️ `requestExecutionPermissions`
-
-- The action now accepts `isAdjustmentAllowed` inside each permission object as per new ERC-7715 specification.
-- The action now accepts `to` instead of `signer` for the session account.
-- The action now returns developer friendly types, `chainId` as `number` and token amounts as `bigint`.
-- `expiry` is now an optional parameter.
-
-```ts
-await walletClient.requestExecutionPermissions([{
- chainId: chain.id,
- expiry,
- // The requested permissions will be granted to the
- // session account.
- // add-next-line
-+ to: sessionAccount.address,
- // remove-start
-- signer: {
-- type: "account",
-- data: {
-- address: sessionAccount.address,
-- },
-- },
- // remove-end
- // remove-next-line
-- isAdjustmentAllowed: true,
- permission: {
- type: "erc20-token-periodic",
- data: {
- // ...
- },
- // add-next-line
-+ isAdjustmentAllowed: true,
- },
-}]);
-```
-
-### ⚠️ `encodePermissionContexts`
-
-The utility function has been removed. See [`encodeDelegations`](../reference/delegation/index.md#encodedelegations) to encode the delegations.
-
-### ⚠️ `decodePermissionContexts`
-
-The utility function has been removed. See [`decodeDelegations`](../reference/delegation/index.md#decodedelegations) to decode the delegations.
-
-### ⚠️ `redeemDelegations`
-
-The `redeemDelegations` function and `Redemption` type have been removed. Use the [`DelegationManager.encode.redeemDelegations`](../reference/delegation/index.md#redeemdelegations) encoding utility.
-
-## Enhancements
-
-- New ERC-7715 Wallet Client actions have been added to [get the supported permission](../guides/advanced-permissions/get-supported-permissions.md), and [get granted permissions](../guides/advanced-permissions/get-granted-permissions.md) from a wallet.
-- The `signer` parameter in `toMetaMaskSmartAccount` is now optional. If omitted, non-signing operations still work, but signing operations such as `signUserOperation`, `signDelegation`, `signMessage`, and `signTypedData` throw an error.
-- Added [`encodeDelegation`](../reference/delegation/index.md#encodedelegation) and [`decodeDelegation`](../reference/delegation/index.md#decodedelegation) utilities for encoding and decoding single delegation.
-- Allow scope type to be specified either as [ScopeType enum](../reference/types.md#scopetype) or string literal.
-- Allow caveat type to be specified either as [CaveatType enum](../reference/types.md#caveattype) or string literal.
-- Added support for Tempo Mainnet and Tempo Moderato Testnet.
-- The `webauthn-p256` dependency has been replaced with the `ox` p256 module. This doesn't impact developer facing APIs.
-- Improved `@metamask/delegation-abis` tree-shakability.
-
-## Fixes
-
-- Fixed `signDelegation` to correctly await the signer and return the signed signature.
-- The `delegation.salt` and `caveat.args` now default to `0x00` instead of `0x`. This prevents
- `Cannot convert 0x to a BigInt` errors when encoding delegations directly with Viem.
-
-## Contract addresses
-
-The following are the contract addresses for the
-[Delegation Framework version 1.3.0](https://github.com/MetaMask/delegation-framework/blob/v1.3.0/documents/Deployments.md),
-as used by this version of the toolkit.
-
-### Delegation Framework
-
-| Contract | Address |
-| --------------------- | -------------------------------------------- |
-| EntryPoint | `0x0000000071727De22E5E9d8BAf0edAc6f37da032` |
-| SimpleFactory | `0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c` |
-| DelegationManager | `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3` |
-| MultiSigDeleGatorImpl | `0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7` |
-| HybridDeleGatorImpl | `0x48dBe696A4D990079e039489bA2053B36E8FFEC4` |
-
-### Caveat enforcers
-
-| Enforcer | Address |
-| ---------------------------------------- | -------------------------------------------- |
-| AllowedCalldataEnforcer | `0xc2b0d624c1c4319760C96503BA27C347F3260f55` |
-| AllowedMethodsEnforcer | `0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5` |
-| AllowedTargetsEnforcer | `0x7F20f61b1f09b08D970938F6fa563634d65c4EeB` |
-| ArgsEqualityCheckEnforcer | `0x44B8C6ae3C304213c3e298495e12497Ed3E56E41` |
-| BlockNumberEnforcer | `0x5d9818dF0AE3f66e9c3D0c5029DAF99d1823ca6c` |
-| DeployedEnforcer | `0x24ff2AA430D53a8CD6788018E902E098083dcCd2` |
-| ERC20BalanceChangeEnforcer | `0xcdF6aB796408598Cea671d79506d7D48E97a5437` |
-| ERC20TransferAmountEnforcer | `0xf100b0819427117EcF76Ed94B358B1A5b5C6D2Fc` |
-| ERC20PeriodTransferEnforcer | `0x474e3Ae7E169e940607cC624Da8A15Eb120139aB` |
-| ERC20StreamingEnforcer | `0x56c97aE02f233B29fa03502Ecc0457266d9be00e` |
-| ERC721BalanceChangeEnforcer | `0x8aFdf96eDBbe7e1eD3f5Cd89C7E084841e12A09e` |
-| ERC721TransferEnforcer | `0x3790e6B7233f779b09DA74C72b6e94813925b9aF` |
-| ERC1155BalanceChangeEnforcer | `0x63c322732695cAFbbD488Fc6937A0A7B66fC001A` |
-| ExactCalldataBatchEnforcer | `0x982FD5C86BBF425d7d1451f974192d4525113DfD` |
-| ExactCalldataEnforcer | `0x99F2e9bF15ce5eC84685604836F71aB835DBBdED` |
-| ExactExecutionBatchEnforcer | `0x1e141e455d08721Dd5BCDA1BaA6Ea5633Afd5017` |
-| ExactExecutionEnforcer | `0x146713078D39eCC1F5338309c28405ccf85Abfbb` |
-| IdEnforcer | `0xC8B5D93463c893401094cc70e66A206fb5987997` |
-| LimitedCallsEnforcer | `0x04658B29F6b82ed55274221a06Fc97D318E25416` |
-| MultiTokenPeriodEnforcer | `0xFB2f1a9BD76d3701B730E5d69C3219D42D80eBb7` |
-| NonceEnforcer | `0xDE4f2FAC4B3D87A1d9953Ca5FC09FCa7F366254f` |
-| NativeBalanceChangeEnforcer | `0xbD7B277507723490Cd50b12EaaFe87C616be6880` |
-| NativeTokenPaymentEnforcer | `0x4803a326ddED6dDBc60e659e5ed12d85c7582811` |
-| NativeTokenTransferAmountEnforcer | `0xF71af580b9c3078fbc2BBF16FbB8EEd82b330320` |
-| NativeTokenStreamingEnforcer | `0xD10b97905a320b13a0608f7E9cC506b56747df19` |
-| NativeTokenPeriodTransferEnforcer | `0x9BC0FAf4Aca5AE429F4c06aEEaC517520CB16BD9` |
-| OwnershipTransferEnforcer | `0x7EEf9734E7092032B5C56310Eb9BbD1f4A524681` |
-| RedeemerEnforcer | `0xE144b0b2618071B4E56f746313528a669c7E65c5` |
-| SpecificActionERC20TransferBatchEnforcer | `0x00e0251aaA263dfE3B3541B758A82D1CBA1c3B6D` |
-| TimestampEnforcer | `0x1046bb45C8d673d4ea75321280DB34899413c069` |
-| ValueLteEnforcer | `0x92Bf12322527cAA612fd31a0e810472BBB106A8F` |
diff --git a/gator_versioned_docs/version-1.0.0/assets/erc7715-request.png b/gator_versioned_docs/version-1.7.0/assets/erc7715-request.png
similarity index 100%
rename from gator_versioned_docs/version-1.0.0/assets/erc7715-request.png
rename to gator_versioned_docs/version-1.7.0/assets/erc7715-request.png
diff --git a/gator_versioned_docs/version-1.0.0/assets/scaffold-eth-7715.png b/gator_versioned_docs/version-1.7.0/assets/scaffold-eth-7715.png
similarity index 100%
rename from gator_versioned_docs/version-1.0.0/assets/scaffold-eth-7715.png
rename to gator_versioned_docs/version-1.7.0/assets/scaffold-eth-7715.png
diff --git a/gator_versioned_docs/version-1.0.0/assets/scaffold-eth-smart-accounts.png b/gator_versioned_docs/version-1.7.0/assets/scaffold-eth-smart-accounts.png
similarity index 100%
rename from gator_versioned_docs/version-1.0.0/assets/scaffold-eth-smart-accounts.png
rename to gator_versioned_docs/version-1.7.0/assets/scaffold-eth-smart-accounts.png
diff --git a/gator_versioned_docs/version-1.5.0/changelog/1.1.0.md b/gator_versioned_docs/version-1.7.0/changelog/1.2.0.md
similarity index 86%
rename from gator_versioned_docs/version-1.5.0/changelog/1.1.0.md
rename to gator_versioned_docs/version-1.7.0/changelog/1.2.0.md
index 4a6c4398882..1e9f185840c 100644
--- a/gator_versioned_docs/version-1.5.0/changelog/1.1.0.md
+++ b/gator_versioned_docs/version-1.7.0/changelog/1.2.0.md
@@ -1,16 +1,24 @@
---
-sidebar_label: 1.1.0
-description: MetaMask Smart Accounts Kit v1.1.0 changelog
+sidebar_label: 1.2.0
+description: MetaMask Smart Accounts Kit v1.2.0 changelog
---
-# What's new in v1.1.0?
+# What's new in v1.2.0?
+
+:::info Analytics
+
+From this version onwards, Smart Accounts Kit collects anonymous usage metrics.
+
+See the [analytics documentation](https://github.com/MetaMask/smart-accounts-kit/tree/main/packages/smart-accounts-kit#analytics)
+to learn what Smart Accounts Kit collects and how to opt out.
+
+:::
## Enhancements
-- `toMetaMaskSmartAccount` accepts a new `nonceKeyManager` parameter for managing custom nonces. If provided, it enables
- support for parallel execution.
-- `getNonce` accepts a new `key` parameter to retrieve the nonce for a specified key.
-- Smart Accounts Kit now supports Mantle.
+- A new `decodeCaveat` utility decodes a caveat's encoded `terms`.
+ See the [API reference](../reference/delegation/index.md#decodecaveat) to learn more.
+- Smart Accounts Kit now supports Katana.
See [supported networks](../get-started/supported-networks.md) for more details.
## Contract addresses
diff --git a/gator_versioned_docs/version-1.2.0/changelog/1.1.0.md b/gator_versioned_docs/version-1.7.0/changelog/1.5.0.md
similarity index 84%
rename from gator_versioned_docs/version-1.2.0/changelog/1.1.0.md
rename to gator_versioned_docs/version-1.7.0/changelog/1.5.0.md
index 114ea1e6e5d..9a0361bf79a 100644
--- a/gator_versioned_docs/version-1.2.0/changelog/1.1.0.md
+++ b/gator_versioned_docs/version-1.7.0/changelog/1.5.0.md
@@ -1,19 +1,20 @@
---
-sidebar_label: 1.1.0
-description: MetaMask Smart Accounts Kit v1.1.0 changelog
+sidebar_label: 1.5.0
+description: MetaMask Smart Accounts Kit v1.5.0 changelog
---
-# What's new in v1.1.0?
+# What's new in v1.5.0?
## Enhancements
-- `toMetaMaskSmartAccount` accepts a new `nonceKeyManager` parameter for managing custom nonces. If provided, it enables
- support for parallel execution.
-- `getNonce` accepts a new `key` parameter to retrieve the nonce for a specified key.
-- Smart Accounts Kit now supports Mantle.
- See [supported networks](../get-started/supported-networks.md) for more details.
+- You can now use new ERC-7710 wallet client actions to create a redelegation and open redelegation from a delegation chain.
+ See the [API reference](../reference/erc7710/wallet-client.md) to learn more.
+- You can now use `permissionContext` in `createDelegation` to redelegate from an encoded delegation chain.
+ See the [API reference](../reference/delegation/index.md#createdelegation).
+- You can now use `permissionContext` in `createOpenDelegation` to redelegate from an encoded delegation chain.
+ See the [API reference](../reference/delegation/index.md#createopendelegation).
-### Contract addresses
+## Contract addresses
The following are the contract addresses for the
[Delegation Framework version 1.3.0](https://github.com/MetaMask/delegation-framework/blob/v1.3.0/documents/Deployments.md),
diff --git a/gator_versioned_docs/version-1.1.0/changelog/1.1.0.md b/gator_versioned_docs/version-1.7.0/changelog/1.6.0.md
similarity index 73%
rename from gator_versioned_docs/version-1.1.0/changelog/1.1.0.md
rename to gator_versioned_docs/version-1.7.0/changelog/1.6.0.md
index 114ea1e6e5d..337b60dfdf4 100644
--- a/gator_versioned_docs/version-1.1.0/changelog/1.1.0.md
+++ b/gator_versioned_docs/version-1.7.0/changelog/1.6.0.md
@@ -1,19 +1,28 @@
---
-sidebar_label: 1.1.0
-description: MetaMask Smart Accounts Kit v1.1.0 changelog
+sidebar_label: 1.6.0
+description: MetaMask Smart Accounts Kit v1.6.0 changelog
---
-# What's new in v1.1.0?
+# What's new in v1.6.0?
## Enhancements
-- `toMetaMaskSmartAccount` accepts a new `nonceKeyManager` parameter for managing custom nonces. If provided, it enables
- support for parallel execution.
-- `getNonce` accepts a new `key` parameter to retrieve the nonce for a specified key.
-- Smart Accounts Kit now supports Mantle.
- See [supported networks](../get-started/supported-networks.md) for more details.
+- You can now use the experimental `createx402DelegationProvider` to create a delegation provider for use
+ with `x402Erc7710Client`.
+ See the [API reference](../reference/x402.md#createx402delegationprovider) to learn more.
+- You can now use the `generateSalt` utility to generate a random 32-byte hex salt for creating
+ delegations, helping prevent hash collisions when creating identical delegations.
+ See the [API reference](../reference/delegation/index.md#generatesalt) to learn more.
+- You can now use the ERC-7715 `token-approval-revocation` permission type to revoke token approvals.
+ See the [API reference](../reference/advanced-permissions/permissions.md#token-approval-revocation-permission) to learn more.
+- You can now use the `approvalRevocation` caveat enforcer to constrain delegation
+ scopes to token approval revocations.
+ See the [API reference](../reference/delegation/caveats.md#approvalrevocation) to learn more.
+- You can now use two new methods to decode error data. See the
+ [`decodeRevertData`](../reference/delegation/index.md#decoderevertdata) and
+ [`decodeRevertReason`](../reference/delegation/index.md#decoderevertreason) API references to learn more.
-### Contract addresses
+## Contract addresses
The following are the contract addresses for the
[Delegation Framework version 1.3.0](https://github.com/MetaMask/delegation-framework/blob/v1.3.0/documents/Deployments.md),
@@ -33,6 +42,7 @@ as used by this version of the toolkit.
| Enforcer | Address |
| ---------------------------------------- | -------------------------------------------- |
+| ApprovalRevocationEnforcer | `0xe264F1f09A19505a1ca1a86D5b01E8bFdb64324A` |
| AllowedCalldataEnforcer | `0xc2b0d624c1c4319760C96503BA27C347F3260f55` |
| AllowedMethodsEnforcer | `0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5` |
| AllowedTargetsEnforcer | `0x7F20f61b1f09b08D970938F6fa563634d65c4EeB` |
diff --git a/gator_versioned_docs/version-1.6.0/changelog/1.1.0.md b/gator_versioned_docs/version-1.7.0/changelog/1.7.0.md
similarity index 85%
rename from gator_versioned_docs/version-1.6.0/changelog/1.1.0.md
rename to gator_versioned_docs/version-1.7.0/changelog/1.7.0.md
index 4a6c4398882..79c78551097 100644
--- a/gator_versioned_docs/version-1.6.0/changelog/1.1.0.md
+++ b/gator_versioned_docs/version-1.7.0/changelog/1.7.0.md
@@ -1,17 +1,17 @@
---
-sidebar_label: 1.1.0
-description: MetaMask Smart Accounts Kit v1.1.0 changelog
+sidebar_label: 1.7.0
+description: MetaMask Smart Accounts Kit v1.7.0 changelog
---
-# What's new in v1.1.0?
+# What's new in v1.7.0?
## Enhancements
-- `toMetaMaskSmartAccount` accepts a new `nonceKeyManager` parameter for managing custom nonces. If provided, it enables
- support for parallel execution.
-- `getNonce` accepts a new `key` parameter to retrieve the nonce for a specified key.
-- Smart Accounts Kit now supports Mantle.
- See [supported networks](../get-started/supported-networks.md) for more details.
+- You can now use the `METAMASK_FACILITATOR_ADDRESSES` and `METAMASK_FACILITATOR_ADDRESSES_DEV`
+ constants to constrain delegation redemption to MetaMask facilitator signers.
+- The experimental `createx402DelegationProvider` now resolves redeemers as the intersection of
+ `redeemers.addresses` and the server's `facilitatorAddresses` when both are provided.
+ See the [API reference](../reference/x402.md#createx402delegationprovider) to learn more.
## Contract addresses
@@ -33,6 +33,7 @@ as used by this version of the toolkit.
| Enforcer | Address |
| ---------------------------------------- | -------------------------------------------- |
+| ApprovalRevocationEnforcer | `0xe264F1f09A19505a1ca1a86D5b01E8bFdb64324A` |
| AllowedCalldataEnforcer | `0xc2b0d624c1c4319760C96503BA27C347F3260f55` |
| AllowedMethodsEnforcer | `0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5` |
| AllowedTargetsEnforcer | `0x7F20f61b1f09b08D970938F6fa563634d65c4EeB` |
diff --git a/gator_versioned_docs/version-1.0.0/concepts/advanced-permissions.md b/gator_versioned_docs/version-1.7.0/concepts/advanced-permissions.md
similarity index 90%
rename from gator_versioned_docs/version-1.0.0/concepts/advanced-permissions.md
rename to gator_versioned_docs/version-1.7.0/concepts/advanced-permissions.md
index 12ae2d3305a..b2571959543 100644
--- a/gator_versioned_docs/version-1.0.0/concepts/advanced-permissions.md
+++ b/gator_versioned_docs/version-1.7.0/concepts/advanced-permissions.md
@@ -13,14 +13,16 @@ Advanced Permissions eliminate the need for users to approve every transaction,
It also enables dapps to execute transactions for users without an active wallet connection.
:::note
-This feature requires [MetaMask Flask 13.5.0](/snaps/get-started/install-flask) or later.
+This feature requires [MetaMask](https://metamask.io/download) v13.23.0 or later.
+See [supported Advanced Permissions](../get-started/supported-advanced-permissions.md) for the
+minimum version required for each permission type.
:::
## ERC-7715 technical overview
-[ERC-7715](https://eips.ethereum.org/EIPS/eip-7715) defines a JSON-RPC method `wallet_grantPermissions`.
+[ERC-7715](https://eips.ethereum.org/EIPS/eip-7715) defines a JSON-RPC method `wallet_requestExecutionPermissions`.
Dapps can use this method to request a wallet to grant the dapp permission to execute transactions on a user's behalf.
-`wallet_grantPermissions` requires a `signer` parameter, which identifies the entity requesting or managing the permission.
+`wallet_requestExecutionPermissions` requires a `signer` parameter, which identifies the entity requesting or managing the permission.
Common signer implementations include wallet signers, single key and multisig signers, and account signers.
The 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.
diff --git a/gator_versioned_docs/version-1.0.0/concepts/delegation/caveat-enforcers.md b/gator_versioned_docs/version-1.7.0/concepts/delegation/caveat-enforcers.md
similarity index 99%
rename from gator_versioned_docs/version-1.0.0/concepts/delegation/caveat-enforcers.md
rename to gator_versioned_docs/version-1.7.0/concepts/delegation/caveat-enforcers.md
index a393d3d401c..d9d7bbd4a12 100644
--- a/gator_versioned_docs/version-1.0.0/concepts/delegation/caveat-enforcers.md
+++ b/gator_versioned_docs/version-1.7.0/concepts/delegation/caveat-enforcers.md
@@ -19,7 +19,8 @@ the delegation evaluates whether the execution meets its defined criteria.
We strongly recommend using caveat enforcers.
- Caveat enforcers safeguard the execution process but do not guarantee a final state post-redemption.
Always consider the full impact of combined caveat enforcers.
- :::
+
+:::
## Hooks
diff --git a/gator_versioned_docs/version-1.0.0/concepts/delegation/delegation-manager.md b/gator_versioned_docs/version-1.7.0/concepts/delegation/delegation-manager.md
similarity index 100%
rename from gator_versioned_docs/version-1.0.0/concepts/delegation/delegation-manager.md
rename to gator_versioned_docs/version-1.7.0/concepts/delegation/delegation-manager.md
diff --git a/gator_versioned_docs/version-1.0.0/concepts/delegation/delegation-scopes.md b/gator_versioned_docs/version-1.7.0/concepts/delegation/delegation-scopes.md
similarity index 100%
rename from gator_versioned_docs/version-1.0.0/concepts/delegation/delegation-scopes.md
rename to gator_versioned_docs/version-1.7.0/concepts/delegation/delegation-scopes.md
diff --git a/gator_versioned_docs/version-1.0.0/concepts/delegation/overview.md b/gator_versioned_docs/version-1.7.0/concepts/delegation/overview.md
similarity index 100%
rename from gator_versioned_docs/version-1.0.0/concepts/delegation/overview.md
rename to gator_versioned_docs/version-1.7.0/concepts/delegation/overview.md
diff --git a/gator_versioned_docs/version-1.1.0/concepts/smart-accounts.md b/gator_versioned_docs/version-1.7.0/concepts/smart-accounts.md
similarity index 98%
rename from gator_versioned_docs/version-1.1.0/concepts/smart-accounts.md
rename to gator_versioned_docs/version-1.7.0/concepts/smart-accounts.md
index 3bc48237cc9..22731c5837b 100644
--- a/gator_versioned_docs/version-1.1.0/concepts/smart-accounts.md
+++ b/gator_versioned_docs/version-1.7.0/concepts/smart-accounts.md
@@ -5,7 +5,7 @@ keywords: [MetaMask, smart accounts, account abstraction, ERC-4337]
# MetaMask Smart Accounts
-The Smart Accounts Kit enables you to create and manage _MetaMask Smart Accounts_.
+The Smart Accounts Kit enables you to create and manage MetaMask Smart Accounts.
MetaMask Smart Accounts are [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) smart contract accounts
that support programmable account behavior and advanced features such as multi-signature approvals,
automated transaction batching, and custom security policies.
diff --git a/gator_versioned_docs/version-1.0.0/get-started/install.md b/gator_versioned_docs/version-1.7.0/get-started/install.md
similarity index 84%
rename from gator_versioned_docs/version-1.0.0/get-started/install.md
rename to gator_versioned_docs/version-1.7.0/get-started/install.md
index 056832b48e1..70b410e0dfc 100644
--- a/gator_versioned_docs/version-1.0.0/get-started/install.md
+++ b/gator_versioned_docs/version-1.7.0/get-started/install.md
@@ -6,10 +6,11 @@ keywords: [install, MetaMask, delegation, smart accounts kit, smart, accounts]
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Install and set up the Smart Accounts Kit
-This page provides instructions to install and set up the Smart Accounts Kit, enabling you to create and interact with [MetaMask Smart Accounts](../concepts/smart-accounts.md) into your dapp.
+This page provides instructions to install and set up the Smart Accounts Kit in your dapp, enabling you to create and interact with MetaMask Smart Accounts.
## Prerequisites
@@ -32,7 +33,7 @@ npm install @metamask/smart-accounts-kit
### 2. (Optional) Install the contracts
-If you plan to extend the Delegation Framework smart contracts (for example, to
+If you plan to extend the smart contracts (for example, to
[create a custom caveat enforcer](/tutorials/create-custom-caveat-enforcer)), install
the contract package using Foundry's command-line tool, Forge:
diff --git a/gator_versioned_docs/version-1.1.0/get-started/smart-account-quickstart/eip7702.md b/gator_versioned_docs/version-1.7.0/get-started/smart-account-quickstart/eip7702.md
similarity index 64%
rename from gator_versioned_docs/version-1.1.0/get-started/smart-account-quickstart/eip7702.md
rename to gator_versioned_docs/version-1.7.0/get-started/smart-account-quickstart/eip7702.md
index 560e7499ae9..0433b224c0e 100644
--- a/gator_versioned_docs/version-1.1.0/get-started/smart-account-quickstart/eip7702.md
+++ b/gator_versioned_docs/version-1.7.0/get-started/smart-account-quickstart/eip7702.md
@@ -4,11 +4,17 @@ sidebar_label: EIP-7702 quickstart
keywords: [quickstart, EIP-7702, externally owned account, EOA, smart account]
---
+import GlossaryTerm from '@theme/GlossaryTerm';
+
# EIP-7702 quickstart
-This quickstart demonstrates how to upgrade your externally owned account (EOA) to support MetaMask Smart Accounts
-functionality using an [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) transaction. This enables your EOA to leverage the benefits of account
-abstraction, such as batch transactions, gas sponsorship, and [delegation capabilities](../../concepts/delegation/overview.md).
+This quickstart demonstrates how to upgrade your EOA to support
+functionality using an [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) transaction.
+This enables your EOA to leverage the benefits of account abstraction, such as batch transactions, gas sponsorship, and delegation.
+
+:::note
+This guide is for embedded wallets. To upgrade a MetaMask account, you can [use MetaMask Connect to upgrade to a smart account](/tutorials/upgrade-eoa-to-smart-account).
+:::
## Prerequisites
@@ -29,7 +35,7 @@ npm install @metamask/smart-accounts-kit
### 2. Set up a Public Client
-Set up a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function.
+Set up a Public Client using Viem's [`createPublicClient`](https://viem.sh/docs/clients/public) function.
This client will let the EOA query the account state and interact with the blockchain network.
```typescript
@@ -44,8 +50,8 @@ const publicClient = createPublicClient({
### 3. Set up a Bundler Client
-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.
+Set up a Bundler Client using Viem's [`createBundlerClient`](https://viem.sh/account-abstraction/clients/bundler) function.
+This lets you use the bundler service to estimate gas for user operations and submit transactions to the network.
```typescript
import { createBundlerClient } from 'viem/account-abstraction'
@@ -58,8 +64,8 @@ const bundlerClient = createBundlerClient({
### 4. Set up a Wallet Client
-Set up [Viem Wallet Client](https://viem.sh/docs/clients/wallet) using Viem's `createWalletClient` function.
-This lets you sign and submit EIP-7702 authorization.
+Set up a Wallet Client using Viem's [`createWalletClient`](https://viem.sh/docs/clients/wallet) function.
+This lets you sign and submit [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) authorizations.
```typescript
import { createWalletClient, http } from 'viem'
@@ -77,13 +83,13 @@ export const walletClient = createWalletClient({
### 5. Authorize a 7702 delegation
-Create an authorization to map the contract code to an EOA, and sign it
+Create an authorization to map the contract code to an EOA, and sign it
using Viem's [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) action. The `signAuthorization` action
does not support JSON-RPC accounts.
-This example uses [`EIP7702StatelessDeleGator`](https://github.com/MetaMask/delegation-framework/blob/main/src/EIP7702/EIP7702StatelessDeleGator.sol) as the EIP-7702 delegator contract.
+This example uses [`EIP7702StatelessDeleGator`](https://github.com/MetaMask/delegation-framework/blob/main/src/EIP7702/EIP7702StatelessDeleGator.sol) as the [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) delegator contract.
It follows a stateless design, as it does not store signer data in the contract's state. This approach
-provides a lightweight and secure way to upgrade an EOA to a smart account.
+provides a lightweight and secure way to upgrade an EOA to a .
```typescript
import {
@@ -105,7 +111,7 @@ const authorization = await walletClient.signAuthorization({
### 6. Submit the authorization
-Once you have signed an authorization, you can send an EIP-7702 transaction to set the EOA code.
+Once you have signed an authorization, you can send an [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) transaction to set the EOA code.
Since the authorization cannot be sent by itself, you can include it alongside a dummy transaction.
```ts
@@ -120,8 +126,8 @@ const hash = await walletClient.sendTransaction({
### 7. Create a MetaMask smart account
-Create a smart account instance for the EOA and start
-leveraging the benefits of account abstraction.
+Create a smart account instance for the EOA and start
+leveraging the benefits of account abstraction.
```ts
import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
@@ -139,7 +145,7 @@ const smartAccount = await toMetaMaskSmartAccount({
### 8. Send a user operation
-Send a user operation through the upgraded EOA, using Viem's [`sendUserOperation`](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation) method.
+Send a user operation through the upgraded EOA, using Viem's [`sendUserOperation`](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation) method.
```ts
import { parseEther } from 'viem'
@@ -165,4 +171,3 @@ const userOperationHash = await bundlerClient.sendUserOperation({
- To grant specific permissions to other accounts from your smart account, [create a delegation](../../guides/delegation/execute-on-smart-accounts-behalf.md).
- To quickly bootstrap a MetaMask Smart Accounts project, [use the CLI](../use-the-cli.md).
-- You can also [use MetaMask Connect to upgrade a MetaMask account to a smart account](/tutorials/upgrade-eoa-to-smart-account).
diff --git a/gator_versioned_docs/version-1.1.0/get-started/smart-account-quickstart/index.md b/gator_versioned_docs/version-1.7.0/get-started/smart-account-quickstart/index.md
similarity index 67%
rename from gator_versioned_docs/version-1.1.0/get-started/smart-account-quickstart/index.md
rename to gator_versioned_docs/version-1.7.0/get-started/smart-account-quickstart/index.md
index 2d22d8c36c9..3b07f1d26ea 100644
--- a/gator_versioned_docs/version-1.1.0/get-started/smart-account-quickstart/index.md
+++ b/gator_versioned_docs/version-1.7.0/get-started/smart-account-quickstart/index.md
@@ -4,9 +4,11 @@ sidebar_label: Smart account quickstart
keywords: [quickstart, smart accounts, user operation]
---
+import GlossaryTerm from '@theme/GlossaryTerm';
+
# MetaMask Smart Accounts quickstart
-You can get started quickly with [MetaMask Smart Accounts](../../concepts/smart-accounts.md) by creating your first smart account and sending a user operation.
+You can get started quickly with [MetaMask Smart Accounts](../../concepts/smart-accounts.md) by creating your first smart account and sending a user operation.
## Prerequisites
@@ -26,7 +28,8 @@ npm install @metamask/smart-accounts-kit
### 2. Set up a Public Client
-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 the blockchain network.
+Set up a Public Client using Viem's [`createPublicClient`](https://viem.sh/docs/clients/public) function.
+This client will let the smart account query the signer's account state and interact with the blockchain network.
```typescript
import { createPublicClient, http } from 'viem'
@@ -40,7 +43,8 @@ const publicClient = createPublicClient({
### 3. Set up a Bundler Client
-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.
+Set up a Bundler Client using Viem's [`createBundlerClient`](https://viem.sh/account-abstraction/clients/bundler) function.
+This lets you use the bundler service to estimate gas for user operations and submit transactions to the network.
```typescript
import { createBundlerClient } from 'viem/account-abstraction'
@@ -53,10 +57,10 @@ const bundlerClient = createBundlerClient({
### 4. Create a MetaMask smart account
-[Create a MetaMask smart account](../../guides/smart-accounts/create-smart-account.md) to send the first user operation.
+Create a to send the first user operation.
This example configures a Hybrid smart account,
-which is a flexible smart account implementation that supports both an externally owned account (EOA) owner and any number of passkey (WebAuthn) signers:
+which is a flexible smart account implementation that supports both an EOA owner and any number of passkey (WebAuthn) signers:
```typescript
import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
@@ -73,11 +77,11 @@ const smartAccount = await toMetaMaskSmartAccount({
})
```
-### 5. Send a user operation
+See [Create a MetaMask smart account](../../guides/smart-accounts/create-smart-account.md) to learn how to configure different smart account types.
-Send a user operation using Viem's [`sendUserOperation`](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation) method.
+### 5. Send a user operation
-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.
+Send a user operation using Viem's [`sendUserOperation`](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation) method.
The smart account will remain counterfactual until the first user operation. If the smart account is not
deployed, it will be automatically deployed upon the sending first user operation.
@@ -102,6 +106,8 @@ const userOperationHash = await bundlerClient.sendUserOperation({
})
```
+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.
+
## Next steps
- To grant specific permissions to other accounts from your smart account, [create a delegation](../../guides/delegation/execute-on-smart-accounts-behalf.md).
diff --git a/gator_versioned_docs/version-1.7.0/get-started/supported-advanced-permissions.md b/gator_versioned_docs/version-1.7.0/get-started/supported-advanced-permissions.md
new file mode 100644
index 00000000000..277029fa993
--- /dev/null
+++ b/gator_versioned_docs/version-1.7.0/get-started/supported-advanced-permissions.md
@@ -0,0 +1,23 @@
+---
+title: Supported Advanced Permissions
+description: Supported Advanced Permissions for Smart Accounts Kit, MetaMask Flask, and MetaMask.
+keywords: [MetaMask, smart accounts kit, supported advanced permissions, erc-7715, 7715]
+---
+
+import GlossaryTerm from '@theme/GlossaryTerm';
+
+The following table displays the types supported by
+the Smart Accounts Kit, [MetaMask Flask](/snaps/get-started/install-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`](mailto:hellogators@consensys.net).
+
+| Permission type | Smart Accounts Kit | MetaMask Flask | MetaMask |
+| --------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ------------------- | ----------- |
+| [ERC-20 allowance](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-allowance-permission) | >= v1.4.0 | >= v13.32.1-flask.0 | >= v13.32.1 |
+| [ERC-20 periodic](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-periodic-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
+| [ERC-20 stream](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-stream-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
+| [Native token allowance](../guides/advanced-permissions/use-permissions/native-token.md#native-token-allowance-permission) | >= v1.4.0 | >= v13.32.1-flask.0 | >= v13.32.1 |
+| [Native token periodic](../guides/advanced-permissions/use-permissions/native-token.md#native-token-periodic-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
+| [Native token stream](../guides/advanced-permissions/use-permissions/native-token.md#native-token-stream-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
+| [Token approval revocation](../guides/advanced-permissions/use-permissions/approval-revocation.md#token-approval-revocation-permission) | >= v1.6.0 | - | - |
diff --git a/gator_versioned_docs/version-1.1.0/get-started/supported-networks.md b/gator_versioned_docs/version-1.7.0/get-started/supported-networks.md
similarity index 81%
rename from gator_versioned_docs/version-1.1.0/get-started/supported-networks.md
rename to gator_versioned_docs/version-1.7.0/get-started/supported-networks.md
index 34880dda4a6..06cb6d663af 100644
--- a/gator_versioned_docs/version-1.1.0/get-started/supported-networks.md
+++ b/gator_versioned_docs/version-1.7.0/get-started/supported-networks.md
@@ -7,67 +7,69 @@ keywords: [MetaMask, smart accounts kit, supported networks, mainnet, testnet]
The following tables display the networks supported by each version of the Smart Accounts Kit.
-If you don't see the network you're looking for, you can request support by emailing hellogators@consensys.net.
+If you don't see the network you're looking for, you can request support by emailing [`hellogators@consensys.net`](mailto:hellogators@consensys.net).
## MetaMask Smart Accounts
### Mainnet networks
-| Network Name | v0.2.0 | v0.3.0 | v1.0.0 | v1.1.0 |
+| Network Name | v1.2.0 | v1.5.0 | v1.6.0 | v1.7.0 |
| ------------------- | ------ | ------ | ------ | ------ |
| Arbitrum Nova | ✅ | ✅ | ✅ | ✅ |
| Arbitrum One | ✅ | ✅ | ✅ | ✅ |
| Base | ✅ | ✅ | ✅ | ✅ |
| Berachain | ✅ | ✅ | ✅ | ✅ |
| Binance Smart Chain | ✅ | ✅ | ✅ | ✅ |
-| Celo | ❌ | ❌ | ✅ | ✅ |
-| Citrea | ❌ | ❌ | ✅ | ✅ |
+| Celo | ✅ | ✅ | ✅ | ✅ |
+| Citrea | ✅ | ✅ | ✅ | ✅ |
| Ethereum | ✅ | ✅ | ✅ | ✅ |
| Gnosis Chain | ✅ | ✅ | ✅ | ✅ |
| Ink | ✅ | ✅ | ✅ | ✅ |
+| Katana | ✅ | ✅ | ✅ | ✅ |
| Linea | ✅ | ✅ | ✅ | ✅ |
-| Mantle | ❌ | ❌ | ❌ | ✅ |
-| MegaETH | ❌ | ❌ | ✅ | ✅ |
+| Mantle | ✅ | ✅ | ✅ | ✅ |
+| MegaETH | ✅ | ✅ | ✅ | ✅ |
| Monad | ✅ | ✅ | ✅ | ✅ |
| Optimism | ✅ | ✅ | ✅ | ✅ |
| Polygon | ✅ | ✅ | ✅ | ✅ |
-| Ronin | ❌ | ❌ | ✅ | ✅ |
+| Ronin | ✅ | ✅ | ✅ | ✅ |
| Sei | ✅ | ✅ | ✅ | ✅ |
| Sonic | ✅ | ✅ | ✅ | ✅ |
-| Tempo | ❌ | ❌ | ✅ | ✅ |
+| Tempo | ✅ | ✅ | ✅ | ✅ |
| Unichain | ✅ | ✅ | ✅ | ✅ |
### Testnet networks
-| Network Name | v0.2.0 | v0.3.0 | v1.0.0 | v1.1.0 |
+| Network Name | v1.2.0 | v1.5.0 | v1.6.0 | v1.7.0 |
| ------------------- | ------ | ------ | ------ | ------ |
| Arbitrum Sepolia | ✅ | ✅ | ✅ | ✅ |
| Base Sepolia | ✅ | ✅ | ✅ | ✅ |
| Berachain Bepolia | ✅ | ✅ | ✅ | ✅ |
| Binance Smart Chain | ✅ | ✅ | ✅ | ✅ |
-| Celo Alfajores | ❌ | ❌ | ✅ | ✅ |
+| Celo Alfajores | ✅ | ✅ | ✅ | ✅ |
| Citrea | ✅ | ✅ | ✅ | ✅ |
| Ethereum Sepolia | ✅ | ✅ | ✅ | ✅ |
| Gnosis Chiado | ✅ | ✅ | ✅ | ✅ |
| Hoodi | ✅ | ✅ | ✅ | ✅ |
| Ink Sepolia | ✅ | ✅ | ✅ | ✅ |
+| Bokuto | ✅ | ✅ | ✅ | ✅ |
| Linea Sepolia | ✅ | ✅ | ✅ | ✅ |
-| Mantle Sepolia | ❌ | ❌ | ❌ | ✅ |
+| Mantle Sepolia | ✅ | ✅ | ✅ | ✅ |
| MegaETH | ✅ | ✅ | ✅ | ✅ |
| Monad | ✅ | ✅ | ✅ | ✅ |
| Optimism Sepolia | ✅ | ✅ | ✅ | ✅ |
| Polygon Amoy | ✅ | ✅ | ✅ | ✅ |
-| Ronin Saigon | ❌ | ❌ | ✅ | ✅ |
+| Ronin Saigon | ✅ | ✅ | ✅ | ✅ |
| Sei | ✅ | ✅ | ✅ | ✅ |
| Sonic | ✅ | ✅ | ✅ | ✅ |
-| Tempo Moderato | ❌ | ❌ | ✅ | ✅ |
+| Tempo Moderato | ✅ | ✅ | ✅ | ✅ |
| Unichain Sepolia | ✅ | ✅ | ✅ | ✅ |
## Advanced Permissions (ERC-7715)
### Mainnet networks
-| Network Name | v0.2.0 | v0.3.0 | v1.0.0 | v1.1.0 |
+| Network Name | v1.2.0 | v1.5.0 | v1.6.0 | v1.7.0 |
| ------------------- | ------ | ------ | ------ | ------ |
| Arbitrum Nova | ✅ | ✅ | ✅ | ✅ |
| Arbitrum One | ✅ | ✅ | ✅ | ✅ |
@@ -87,7 +89,7 @@ If you don't see the network you're looking for, you can request support by emai
### Testnet networks
-| Network Name | v0.2.0 | v0.3.0 | v1.0.0 | v1.1.0 |
+| Network Name | v1.2.0 | v1.5.0 | v1.6.0 | v1.7.0 |
| ------------------- | ------ | ------ | ------ | ------ |
| Arbitrum Sepolia | ✅ | ✅ | ✅ | ✅ |
| Base Sepolia | ✅ | ✅ | ✅ | ✅ |
diff --git a/gator_versioned_docs/version-1.1.0/get-started/use-scaffold-eth/advanced-permissions.md b/gator_versioned_docs/version-1.7.0/get-started/use-scaffold-eth/advanced-permissions.md
similarity index 89%
rename from gator_versioned_docs/version-1.1.0/get-started/use-scaffold-eth/advanced-permissions.md
rename to gator_versioned_docs/version-1.7.0/get-started/use-scaffold-eth/advanced-permissions.md
index 27d6f83e3be..03ec33087d7 100644
--- a/gator_versioned_docs/version-1.1.0/get-started/use-scaffold-eth/advanced-permissions.md
+++ b/gator_versioned_docs/version-1.7.0/get-started/use-scaffold-eth/advanced-permissions.md
@@ -4,6 +4,8 @@ sidebar_label: Advanced Permissions (ERC-7715)
keywords: [scaffold-eth, delegation, advanced permissions, erc7715, 7715, template]
---
+import GlossaryTerm from '@theme/GlossaryTerm';
+
# Use Advanced Permissions with Scaffold-ETH 2
Use the [Advanced Permissions (ERC-7715) extension](https://github.com/MetaMask/erc-7715-extension) for [Scaffold-ETH 2](https://docs.scaffoldeth.io/) to bootstrap a project in
@@ -25,7 +27,7 @@ Run the following command to install the Smart Accounts Kit extension:
npx create-eth@latest -e metamask/erc-7715-extension your-project-name
```
-### 2. Set up enviroment variables
+### 2. Set up environment variables
Navigate into the project's `nextjs` package, and create a `.env.local` file. Once created, update the
`NEXT_PUBLIC_PIMLICO_API_KEY` environment variable with your Pimlico API Key.
@@ -46,8 +48,8 @@ yarn start
### 4. Complete the Advanced Permissions lifecycle
Navigate to the **Advanced Permissions (ERC-7715)** page in your Scaffold-ETH
-frontend at http://localhost:3000/erc-7715-permissions, and follow the steps to request an advanced
-permission, and execute a transaction on the user's behalf.
+frontend at http://localhost:3000/erc-7715-permissions, and follow the steps to request an advanced
+permission, and execute a transaction on the user's behalf.
You can view the completed transaction on Etherscan.
diff --git a/gator_versioned_docs/version-1.0.0/get-started/use-scaffold-eth/smart-accounts.md b/gator_versioned_docs/version-1.7.0/get-started/use-scaffold-eth/smart-accounts.md
similarity index 78%
rename from gator_versioned_docs/version-1.0.0/get-started/use-scaffold-eth/smart-accounts.md
rename to gator_versioned_docs/version-1.7.0/get-started/use-scaffold-eth/smart-accounts.md
index 8a491b7e080..568d63a0082 100644
--- a/gator_versioned_docs/version-1.0.0/get-started/use-scaffold-eth/smart-accounts.md
+++ b/gator_versioned_docs/version-1.7.0/get-started/use-scaffold-eth/smart-accounts.md
@@ -4,11 +4,13 @@ sidebar_label: MetaMask Smart Accounts
keywords: [scaffold-eth, delegation, smart accounts, template]
---
+import GlossaryTerm from '@theme/GlossaryTerm';
+
# Use MetaMask Smart Accounts with Scaffold-ETH 2
Use the [MetaMask Smart Accounts extension](https://github.com/metamask/gator-extension) for [Scaffold-ETH 2](https://docs.scaffoldeth.io/) to bootstrap a project in
-under two minutes. This extension helps you quickly generate the boilerplate code to create an embedded smart account, and complete
-the delegation lifecycle (create, sign, and redeem a delegation).
+under two minutes. This extension helps you quickly generate the boilerplate code to create an embedded smart account, and complete
+the delegation lifecycle (create, sign, and redeem a delegation).
## Prerequisites
@@ -27,7 +29,7 @@ Run the following command to install the Smart Accounts Kit extension:
npx create-eth@latest -e metamask/gator-extension your-project-name
```
-### 2. Set up enviroment variables
+### 2. Set up environment variables
Navigate into the project's `nextjs` package, and create a `.env.local` file. Once created, update the
`NEXT_PUBLIC_PIMLICO_API_KEY` environment variable with your Pimlico API Key.
@@ -48,8 +50,9 @@ yarn start
### 4. Complete the delegation lifecycle
Navigate to the **MetaMask Smart Accounts & Delegation** page in your Scaffold-ETH
-frontend at http://localhost:3000/delegations, and follow the steps to deploy a delegator
-account, create a delegate wallet, create a delegation, and redeem a delegation.
+frontend at http://localhost:3000/delegations, and follow the steps to deploy a delegator
+account, create a delegate wallet,
+and create and redeem a delegation.
You can view the completed transaction on Etherscan.
diff --git a/gator_versioned_docs/version-1.7.0/get-started/use-skills.md b/gator_versioned_docs/version-1.7.0/get-started/use-skills.md
new file mode 100644
index 00000000000..b5472c1dbf1
--- /dev/null
+++ b/gator_versioned_docs/version-1.7.0/get-started/use-skills.md
@@ -0,0 +1,59 @@
+---
+sidebar_label: Use skills
+description: Use MetaMask Smart Accounts Kit skills with agent frameworks to build dapps
+toc_max_heading_level: 2
+keywords:
+ [skill, delegation, smart accounts, ai, metamask smart accounts kit, agent framework, x402]
+---
+
+import GlossaryTerm from '@theme/GlossaryTerm';
+
+# Use skills
+
+Use skills to give your agent framework context on the MetaMask Smart Accounts Kit.
+Skills guide your agent through smart account creation, delegations, (ERC-7715), and [x402](../guides/x402/overview.md)
+payments.
+
+Skills are available through the open-source [`MetaMask/skills`](https://github.com/MetaMask/skills)
+repository.
+
+## Smart Accounts Kit
+
+This skill gives your agent context on the Smart Accounts Kit and how to integrate its
+capabilities into your dapp, including smart account creation, delegations, and Advanced
+Permissions.
+
+```bash
+npx skills add MetaMask/smart-accounts-kit
+```
+
+### Key capabilities
+
+| Capability | Description |
+| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Smart accounts | Integrate MetaMask Smart Accounts to support batch transactions, multi-sig signatures, and gas sponsorship. |
+| Delegation | Integrate delegations to execute transactions on behalf of a smart account. |
+| Advanced Permissions | Integrate Advanced Permissions to execute transactions on behalf of a MetaMask user. |
+
+## x402 Payments
+
+This skill helps your agent implement [x402 HTTP-based payments](../guides/x402/overview.md) using
+the Smart Accounts Kit, enabling both buyer and seller flows with delegations and Advanced
+Permissions.
+
+```bash
+npx skills add MetaMask/skills/domains/web3-tools/skills/x402-payments
+```
+
+### Key capabilities
+
+| Capability | Description |
+| ---------- | --------------------------------------------------------------------------- |
+| Seller | Set up x402 payment endpoints that accept HTTP 402-based payments. |
+| Buyer | Pay for x402-protected resources using delegations or Advanced Permissions. |
+
+## Next steps
+
+- [Install the Smart Accounts Kit](./install.md)
+- [Create your first smart account](./smart-account-quickstart/index.md)
+- [Learn about x402 payments](../guides/x402/overview.md)
diff --git a/gator_versioned_docs/version-1.0.0/get-started/use-the-cli.md b/gator_versioned_docs/version-1.7.0/get-started/use-the-cli.md
similarity index 66%
rename from gator_versioned_docs/version-1.0.0/get-started/use-the-cli.md
rename to gator_versioned_docs/version-1.7.0/get-started/use-the-cli.md
index 62e79151e85..9cfca3407ed 100644
--- a/gator_versioned_docs/version-1.0.0/get-started/use-the-cli.md
+++ b/gator_versioned_docs/version-1.7.0/get-started/use-the-cli.md
@@ -1,9 +1,11 @@
---
-description: Get started with the MetaMask Smart Accounts Kit using the `@metamask/create-gator-app` CLI.
+description: Get started with the MetaMask Smart Accounts Kit using the CLI.
sidebar_label: Use the CLI
keywords: [CLI, delegation, smart accounts, template]
---
+import GlossaryTerm from '@theme/GlossaryTerm';
+
# Use the Smart Accounts Kit CLI
Use the `@metamask/create-gator-app` interactive CLI to bootstrap a project with the Smart Accounts Kit in under two minutes.
@@ -25,6 +27,7 @@ Upon installation, you'll be asked the following prompts:
? Pick a framework: (Use arrow keys)
❯ nextjs
vite-react
+ node
? Pick a template: (Use arrow keys)
❯ MetaMask Smart Accounts Starter
MetaMask Smart Accounts & Delegation Starter
@@ -44,19 +47,19 @@ See the following section to learn more about available CLI configurations.
The CLI provides the following options to display CLI details, and further customize the template configuration.
-| Option | Description |
-| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `-v` or `--version` | Check the current version of the `@metamask/create-gator-app` CLI. |
-| `-h` or `--help` | Display the available options. |
-| `--skip-install` | Skip the installation of dependencies. |
-| `--add-web3auth` | Add [MetaMask Embedded Wallets (previously Web3Auth)](/embedded-wallets) as a signer for the delegator account.
Supported templates:
- MetaMask Smart Accounts Starter
- MetaMask Smart Accounts & Delegation Starter |
+| Option | Description |
+| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `-v` or `--version` | Check the current version of the `@metamask/create-gator-app` CLI. |
+| `-h` or `--help` | Display the available options. |
+| `--skip-install` | Skip the installation of dependencies. |
+| `--add-web3auth` | Add [MetaMask Embedded Wallets (previously Web3Auth)](/embedded-wallets) as a signer for the delegator account.
Supported templates:
- MetaMask Smart Accounts Starter
- MetaMask Smart Accounts & Delegation Starter |
## Examples
### MetaMask Embedded Wallets configuration
-To create a project that uses [MetaMask Embedded Wallets](/embedded-wallets) as the signer for your delegator
-account, use the `--add-web3auth` option with `@metamask/create-gator-app`:
+To create a project that uses [MetaMask Embedded Wallets](/embedded-wallets) as the signer for your
+delegator account, use the `--add-web3auth` option with `@metamask/create-gator-app`:
```bash
npx @metamask/create-gator-app --add-web3auth
@@ -72,9 +75,10 @@ You'll be prompted to provide additional Web3Auth configuration details:
## Supported templates
-| Template | Next.js | Vite React |
-| ------------------------------------------------ | ------- | ---------- |
-| MetaMask Smart Accounts Starter | ✅ | ✅ |
-| MetaMask Smart Accounts & Delegation Starter | ✅ | ✅ |
-| Farcaster Mini App Delegation Starter | ✅ | |
-| Advanced Permissions (ERC-7715) Starter | ✅ | |
+| Template | Next.js | Vite React | Node.js |
+| ------------------------------------------------ | ------- | ---------- | ------- |
+| MetaMask Smart Accounts Starter | ✅ | ✅ | ❌ |
+| MetaMask Smart Accounts & Delegation Starter | ✅ | ✅ | ❌ |
+| Farcaster Mini App Delegation Starter | ✅ | ❌ | ❌ |
+| Advanced Permissions (ERC-7715) Starter | ✅ | ❌ | ❌ |
+| x402 Server | ❌ | ❌ | ✅ |
diff --git a/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/create-redelegation.md b/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/create-redelegation.md
new file mode 100644
index 00000000000..9c58bc89b61
--- /dev/null
+++ b/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/create-redelegation.md
@@ -0,0 +1,168 @@
+---
+description: Learn how to create a redelegation for Advanced Permissions.
+sidebar_label: Create a redelegation
+keywords: [advanced permissions, caveat, delegation scope, redelegation, delegation]
+---
+
+import Tabs from "@theme/Tabs";
+import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
+
+# Create a redelegation
+
+Redelegation is a core feature that sets apart from other permission sharing frameworks.
+It allows a session account (delegate) to create a delegation chain, passing on the same or reduced level of authority
+from the MetaMask account (delegator).
+
+For example, if a dapp is granted permission to spend 10 USDC on a user's behalf, it can
+further delegate that permission to specific agents, such as allowing a Swap agent to spend
+up to 5 USDC. This creates a permission sharing chain in which the root permissions are
+shared with additional parties.
+
+## Prerequisites
+
+- [Install and set up the Smart Accounts Kit.](../../get-started/install.md)
+- [Learn about Advanced Permissions.](../../concepts/advanced-permissions.md)
+- [Learn how to request Advanced Permissions.](execute-on-metamask-users-behalf.md)
+
+## Request Advanced Permissions
+
+Request Advanced Permissions from the user with the Wallet Client's [`requestExecutionPermissions`](../../reference/advanced-permissions/wallet-client.md#requestexecutionpermissions) action.
+
+This example uses the [ERC-20 periodic permission](./use-permissions/erc20-token.md#erc-20-periodic-permission), allowing the
+user to grant dapp the ability to spend 10 USDC on their behalf.
+
+
+
+
+```typescript
+import { sepolia as chain } from 'viem/chains'
+import { sessionAccount, walletClient, tokenAddress } from './config.ts'
+import { parseUnits } from 'viem'
+
+// Since current time is in seconds, we need to convert milliseconds to seconds.
+const currentTime = Math.floor(Date.now() / 1000)
+// 1 week from now.
+const expiry = currentTime + 604800
+
+const grantedPermissions = await walletClient.requestExecutionPermissions([
+ {
+ chainId: chain.id,
+ expiry,
+ // The requested permissions will granted to the
+ // session account.
+ to: sessionAccount.address,
+ permission: {
+ type: 'erc20-token-periodic',
+ data: {
+ tokenAddress,
+ // 10 USDC in wei format. Since USDC has 6 decimals, 10 * 10^6
+ periodAmount: parseUnits('10', 6),
+ // 1 day in seconds
+ periodDuration: 86400,
+ justification: 'Permission to transfer 10 USDC every day',
+ },
+ isAdjustmentAllowed: true,
+ },
+ },
+])
+```
+
+
+
+
+
+```ts
+import { createWalletClient, custom, createPublicClient, http } from 'viem'
+import { privateKeyToAccount } from 'viem/accounts'
+import { toMetaMaskSmartAccount, Implementation } from '@metamask/smart-accounts-kit'
+import { erc7715ProviderActions, erc7710WalletActions } from '@metamask/smart-accounts-kit/actions'
+import { sepolia as chain } from 'viem/chains'
+
+// USDC address on Ethereum Sepolia.
+export const tokenAddress = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
+
+const publicClient = createPublicClient({
+ chain,
+ transport: http(),
+})
+
+const privateKey = '0x...'
+const account = privateKeyToAccount(privateKey)
+
+export const sessionAccount = createWalletClient({
+ account,
+ chain,
+ transport: http(),
+}).extend(erc7710WalletActions())
+
+export const walletClient = createWalletClient({
+ transport: custom(window.ethereum),
+}).extend(erc7715ProviderActions())
+```
+
+
+
+
+## Create a redelegation
+
+Create a [redelegation](../../concepts/delegation/overview.md#redelegation) from dapp to a Swap agent.
+
+To create a redelegation, provide the granted permission context as the `permissionContext` argument when calling [`redelegatePermissionContext`](../../reference/erc7710/wallet-client.md#redelegatepermissioncontext).
+In the previous step, `sessionAccount` was extended with `erc7710WalletActions`.
+
+When you create a redelegation, apply the toolkit's [caveats](../../reference/delegation/caveats.md)
+to narrow the Swap agent's authority. In this example, we'll use [`erc20TransferAmount`](../../reference/delegation/caveats.md#erc20transferamount)
+enforcer, allowing your dapp to delegate the Swap agent only the ability to spend 5 USDC on the user's behalf.
+
+:::note
+When creating a redelegation, you can only narrow the scope of the original authority, not expand it.
+:::
+
+
+
+
+```typescript
+import { sessionAccount, agentAccount, tokenAddress } from './config.ts'
+import {
+ createDelegation,
+ ScopeType,
+ getSmartAccountsEnvironment,
+ Caveats,
+ CaveatType,
+} from '@metamask/smart-accounts-kit'
+import { parseUnits } from 'viem'
+import { sepolia as chain } from 'viem/chains'
+
+const caveats: Caveats = [
+ {
+ type: CaveatType.Erc20TransferAmount,
+ tokenAddress,
+ // USDC has 6 decimal places.
+ maxAmount: parseUnits('5', 6),
+ },
+]
+
+const environment = getSmartAccountsEnvironment(chain.id)
+
+const { permissionContext: signedPermissionContext } =
+ await sessionAccount.redelegatePermissionContext({
+ to: agentAccount.address,
+ environment,
+ permissionContext: grantedPermissions[0].context,
+ caveats,
+ })
+```
+
+
+
+
+```typescript
+// Update the existing config to create a smart account for a Swap agent.
+
+const agentPrivateKey = '0x...'
+export const agentAccount = privateKeyToAccount(agentPrivateKey)
+```
+
+
+
diff --git a/gator_versioned_docs/version-1.1.0/guides/advanced-permissions/execute-on-metamask-users-behalf.md b/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/execute-on-metamask-users-behalf.md
similarity index 70%
rename from gator_versioned_docs/version-1.1.0/guides/advanced-permissions/execute-on-metamask-users-behalf.md
rename to gator_versioned_docs/version-1.7.0/guides/advanced-permissions/execute-on-metamask-users-behalf.md
index 335acda6d9f..b3924cb94ba 100644
--- a/gator_versioned_docs/version-1.1.0/guides/advanced-permissions/execute-on-metamask-users-behalf.md
+++ b/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/execute-on-metamask-users-behalf.md
@@ -17,6 +17,7 @@ keywords:
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Perform executions on a MetaMask user's behalf
@@ -30,16 +31,17 @@ In this guide, you'll request an ERC-20 periodic transfer permission from a Meta
## Prerequisites
- [Install and set up the Smart Accounts Kit.](../../get-started/install.md)
-- [Install MetaMask Flask 13.5.0 or later.](/snaps/get-started/install-flask)
+- [Install MetaMask v13.23.0 or later](https://metamask.io/download)
## Steps
### 1. Set up a Wallet Client
-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.
+Set up a Wallet Client using Viem's [`createWalletClient`](https://viem.sh/docs/clients/wallet) function. This client will
+help you interact with MetaMask.
-Then, extend the Wallet Client functionality using `erc7715ProviderActions`. These actions enable you to request Advanced Permissions from the user.
+Then, extend the Wallet Client functionality using `erc7715ProviderActions`.
+These actions enable you to request from the user.
```typescript
import { createWalletClient, custom } from 'viem'
@@ -52,7 +54,7 @@ const walletClient = createWalletClient({
### 2. Set up a Public Client
-Set up a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function.
+Set up a Public Client using Viem's [`createPublicClient`](https://viem.sh/docs/clients/public) function.
This client will help you query the account state and interact with the blockchain network.
```typescript
@@ -67,8 +69,9 @@ const publicClient = createPublicClient({
### 3. Set up a session account
-Set up a session account which can either be a smart account or an externally owned account (EOA)
-to request Advanced Permissions. The requested permissions are granted to the session account, which
+Set up a session account, which can be either a smart account or an
+EOA,
+to request . The requested permissions are granted to the session account, which
is responsible for executing transactions on behalf of the user.
@@ -104,51 +107,7 @@ const sessionAccount = privateKeyToAccount('0x...')
-### 4. Check the EOA account code
-
-With MetaMask Flask 13.9.0 or later, Advanced Permissions support automatically upgrading a user's
-account to a [MetaMask smart account](../../concepts/smart-accounts.md). On earlier versions, upgrade
-the user to a smart account before requesting Advanced Permissions.
-
-If the user has not yet been upgraded, you can handle the upgrade [programmatically](/metamask-connect/evm/guides/send-transactions/batch-transactions) or ask the
-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).
-
-:::info Why is a Smart Account upgrade is required?
-MetaMask's Advanced Permissions (ERC-7715) implementation requires the user to be upgraded to a MetaMask
-Smart Account because, under the hood, you're requesting a signature for an [ERC-7710 delegation](../../concepts/delegation/overview.md).
-ERC-7710 delegation is one of the core features supported only by MetaMask Smart Accounts.
-:::
-
-```typescript
-import { getSmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
-import { sepolia as chain } from 'viem/chains'
-
-const addresses = await walletClient.requestAddresses()
-const address = addresses[0]
-
-// Get the EOA account code
-const code = await publicClient.getCode({
- address,
-})
-
-if (code) {
- // The address to which EOA has delegated. According to EIP-7702, 0xef0100 || address
- // represents the delegation.
- //
- // You need to remove the first 8 characters (0xef0100) to get the delegator address.
- const delegatorAddress = `0x${code.substring(8)}`
-
- const statelessDelegatorAddress = getSmartAccountsEnvironment(chain.id).implementations
- .EIP7702StatelessDeleGatorImpl
-
- // If account is not upgraded to MetaMask smart account, you can
- // either upgrade programmatically or ask the user to switch to a smart account manually.
- const isAccountUpgraded =
- delegatorAddress.toLowerCase() === statelessDelegatorAddress.toLowerCase()
-}
-```
-
-### 5. Request Advanced Permissions
+### 4. Request Advanced Permissions
Request Advanced Permissions from the user with the Wallet Client's `requestExecutionPermissions` action.
In this example, you'll request an
@@ -191,16 +150,16 @@ const grantedPermissions = await walletClient.requestExecutionPermissions([
])
```
-### 6. Set up a Viem client
+### 5. Set up a Viem client
Set up a Viem client depending on your session account type.
-For a smart account, 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
+For a smart account, set up a Bundler Client using Viem's [`createBundlerClient`](https://viem.sh/account-abstraction/clients/bundler) function.
+This lets you use the bundler service
to estimate gas for user operations and submit transactions to the network.
-For an EOA, set up a [Viem Wallet Client](https://viem.sh/docs/clients/wallet)
-using Viem's `createWalletClient` function. This lets you send transactions directly to the network.
+For an EOA, set up a Wallet Client using Viem's [`createWalletClient`](https://viem.sh/docs/clients/wallet) function.
+This lets you send transactions directly to the network.
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.
@@ -237,7 +196,7 @@ const sessionAccountWalletClient = createWalletClient({
-### 7. Redeem Advanced Permissions
+### 6. Redeem Advanced Permissions
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.
@@ -255,7 +214,7 @@ import { calldata } from './config.ts'
// These properties must be extracted from the permission response.
const permissionContext = grantedPermissions[0].context
-const delegationManager = grantedPermissions[0].signerMeta.delegationManager
+const delegationManager = grantedPermissions[0].delegationManager
// USDC address on Ethereum Sepolia.
const tokenAddress = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
@@ -287,7 +246,7 @@ import { calldata } from './config.ts'
// These properties must be extracted from the permission response.
const permissionContext = grantedPermissions[0].context
-const delegationManager = grantedPermissions[0].signerMeta.delegationManager
+const delegationManager = grantedPermissions[0].delegationManager
// USDC address on Ethereum Sepolia.
const tokenAddress = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
diff --git a/gator_versioned_docs/version-1.1.0/guides/advanced-permissions/get-granted-permissions.md b/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/get-granted-permissions.md
similarity index 92%
rename from gator_versioned_docs/version-1.1.0/guides/advanced-permissions/get-granted-permissions.md
rename to gator_versioned_docs/version-1.7.0/guides/advanced-permissions/get-granted-permissions.md
index f8821e99b51..ff473d73974 100644
--- a/gator_versioned_docs/version-1.1.0/guides/advanced-permissions/get-granted-permissions.md
+++ b/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/get-granted-permissions.md
@@ -6,11 +6,12 @@ keywords: [advanced permissions, granted execution permissions, erc-7715, 7715]
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Get granted permissions
[ERC-7715](https://eip.tools/eip/7715) defines an RPC method that returns the granted execution permissions
-for a wallet. Use the method to get the granted Advanced Permissions for a wallet.
+for a wallet. Use the method to get the granted for a wallet.
## Prerequisites
diff --git a/gator_versioned_docs/version-1.1.0/guides/advanced-permissions/get-supported-permissions.md b/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/get-supported-permissions.md
similarity index 91%
rename from gator_versioned_docs/version-1.1.0/guides/advanced-permissions/get-supported-permissions.md
rename to gator_versioned_docs/version-1.7.0/guides/advanced-permissions/get-supported-permissions.md
index b8cb9af514d..6c62bf2c61d 100644
--- a/gator_versioned_docs/version-1.1.0/guides/advanced-permissions/get-supported-permissions.md
+++ b/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/get-supported-permissions.md
@@ -6,11 +6,12 @@ keywords: [advanced permissions, supported execution permissions, erc-7715, 7715
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Get supported permissions
[ERC-7715](https://eip.tools/eip/7715) defines an RPC method that returns the execution permissions
-a wallet supports. Use the method to verify the available Advanced Permissions types and
+a wallet supports. Use the method to verify the available types and
rules before sending requests.
## Prerequisites
diff --git a/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/use-permissions/approval-revocation.md b/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/use-permissions/approval-revocation.md
new file mode 100644
index 00000000000..2ae1b7c41c4
--- /dev/null
+++ b/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/use-permissions/approval-revocation.md
@@ -0,0 +1,80 @@
+---
+description: Learn how to use the token approval revocation permission with Advanced Permissions (ERC-7715).
+keywords: [permissions, revocation, approval, 7715, erc-7715, erc20, erc721, permit2]
+---
+
+import Tabs from "@theme/Tabs";
+import TabItem from "@theme/TabItem";
+
+# Use approval revocation permission
+
+[Advanced Permissions (ERC-7715)](../../../concepts/advanced-permissions.md) supports the token approval
+revocation permission type that allows you to request permission to revoke existing token approvals
+on behalf of the user.
+
+## Prerequisites
+
+- [Install and set up the Smart Accounts Kit.](../../../get-started/install.md)
+- [Configure the Smart Accounts Kit.](../../configure-toolkit.md)
+- [Create a session account.](../execute-on-metamask-users-behalf.md#3-set-up-a-session-account)
+
+## Token approval revocation permission
+
+This permission type enables revoking existing token approvals on behalf of the user.
+
+For example, a user signs an ERC-7715 permission that lets a dapp revoke any ERC-20 token
+allowances periodically, or during an ongoing exploit.
+
+See the [token approval revocation permission API reference](../../../reference/advanced-permissions/permissions.md#token-approval-revocation-permission) for more information.
+
+
+
+
+```typescript
+import { sepolia as chain } from 'viem/chains'
+import { walletClient } from './client.ts'
+
+// Since current time is in seconds, convert milliseconds to seconds.
+const currentTime = Math.floor(Date.now() / 1000)
+
+// 30 days from now.
+const expiry = currentTime + 60 * 60 * 24 * 30
+
+const grantedPermissions = await walletClient.requestExecutionPermissions([
+ {
+ chainId: chain.id,
+ expiry,
+ // The requested permissions will be granted to the
+ // session account.
+ to: sessionAccount.address,
+ permission: {
+ type: 'token-approval-revocation',
+ data: {
+ erc20Approve: true,
+ erc721Approve: false,
+ erc721SetApprovalForAll: false,
+ permit2Approve: true,
+ permit2Lockdown: false,
+ permit2InvalidateNonces: false,
+ justification: 'Permission to revoke ERC-20 token approvals',
+ },
+ isAdjustmentAllowed: false,
+ },
+ },
+])
+```
+
+
+
+
+```typescript
+import { createWalletClient, custom } from 'viem'
+import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
+
+export const walletClient = createWalletClient({
+ transport: custom(window.ethereum),
+}).extend(erc7715ProviderActions())
+```
+
+
+
diff --git a/gator_versioned_docs/version-1.1.0/guides/advanced-permissions/use-permissions/erc20-token.md b/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/use-permissions/erc20-token.md
similarity index 81%
rename from gator_versioned_docs/version-1.1.0/guides/advanced-permissions/use-permissions/erc20-token.md
rename to gator_versioned_docs/version-1.7.0/guides/advanced-permissions/use-permissions/erc20-token.md
index a272d0ba54b..efc34146e80 100644
--- a/gator_versioned_docs/version-1.1.0/guides/advanced-permissions/use-permissions/erc20-token.md
+++ b/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/use-permissions/erc20-token.md
@@ -1,6 +1,6 @@
---
description: Learn how to use the ERC-20 token permissions with Advanced Permissions (ERC-7715).
-keywords: [permissions, spending limit, restrict, 7715, erc-7715, erc20-permissions, revocation]
+keywords: [permissions, spending limit, restrict, 7715, erc-7715, erc20-permissions]
---
import Tabs from "@theme/Tabs";
@@ -9,7 +9,7 @@ import TabItem from "@theme/TabItem";
# Use ERC-20 token permissions
[Advanced Permissions (ERC-7715)](../../../concepts/advanced-permissions.md) supports ERC-20 token permission types that allow you to request fine-grained
-permissions for ERC-20 token transfers with time-based (periodic), streaming, or revocation conditions, depending on your use case.
+permissions for ERC-20 token transfers with periodic, fixed allowance, or streaming conditions, depending on your use case.
## Prerequisites
@@ -17,14 +17,15 @@ permissions for ERC-20 token transfers with time-based (periodic), streaming, or
- [Configure the Smart Accounts Kit.](../../configure-toolkit.md)
- [Create a session account.](../execute-on-metamask-users-behalf.md#3-set-up-a-session-account)
-## ERC-20 periodic permission
+## ERC-20 allowance permission
-This permission type ensures a per-period limit for ERC-20 token transfers. At the start of each new period, the allowance resets.
+This permission type ensures a fixed ERC-20 token allowance.
+It allows transfers up to a maximum total amount and doesn't reset by period.
-For example, a user signs an ERC-7715 permission that lets a dapp spend up to 10 USDC on their behalf each day. The dapp can transfer a total of
-10 USDC per day; the limit resets at the beginning of the next day.
+For example, a user signs an ERC-7715 permission that lets your dapp spend up to 50 USDC in total.
+After the dapp transfers 50 USDC, no additional transfers are allowed under this permission.
-See the [ERC-20 periodic permission API reference](../../../reference/advanced-permissions/permissions.md#erc-20-periodic-permission) for more information.
+See the [ERC-20 allowance permission API reference](../../../reference/advanced-permissions/permissions.md#erc-20-allowance-permission) for more information.
@@ -46,18 +47,17 @@ const grantedPermissions = await walletClient.requestExecutionPermissions([
{
chainId: chain.id,
expiry,
- // The requested permissions will granted to the
+ // The requested permissions will be granted to the
// session account.
to: sessionAccount.address,
permission: {
- type: 'erc20-token-periodic',
+ type: 'erc20-token-allowance',
data: {
tokenAddress,
- // 10 USDC in WEI format. Since USDC has 6 decimals, 10 * 10^6.
- periodAmount: parseUnits('10', 6),
- // 1 day in seconds.
- periodDuration: 86400,
- justification: 'Permission to transfer 10 USDC every day',
+ // 50 USDC in WEI format. Since USDC has 6 decimals, 50 * 10^6.
+ allowanceAmount: parseUnits('50', 6),
+ startTime: currentTime,
+ justification: 'Permission to transfer up to 50 USDC in total',
},
isAdjustmentAllowed: true,
},
@@ -80,16 +80,14 @@ export const walletClient = createWalletClient({
-## ERC-20 stream permission
+## ERC-20 periodic permission
-This permission type ensures a linear streaming transfer limit for ERC-20 tokens. Token transfers are blocked until the
-defined start timestamp. At the start, a specified initial amount is released, after which tokens accrue linearly at the
-configured rate, up to the maximum allowed amount.
+This permission type ensures a per-period limit for ERC-20 token transfers. At the start of each new period, the allowance resets.
-For example, a user signs an ERC-7715 permission that allows a dapp to spend 0.1 USDC per second, starting with an initial amount
-of 1 USDC, up to a maximum of 2 USDC.
+For example, a user signs an ERC-7715 permission that lets a dapp spend up to 10 USDC on their behalf each day. The dapp can transfer a total of
+10 USDC per day; the limit resets at the beginning of the next day.
-See the [ERC-20 stream permission API reference](../../../reference/advanced-permissions/permissions.md#erc-20-stream-permission) for more information.
+See the [ERC-20 periodic permission API reference](../../../reference/advanced-permissions/permissions.md#erc-20-periodic-permission) for more information.
@@ -111,21 +109,18 @@ const grantedPermissions = await walletClient.requestExecutionPermissions([
{
chainId: chain.id,
expiry,
- // The requested permissions will granted to the
+ // The requested permissions will be granted to the
// session account.
to: sessionAccount.address,
permission: {
- type: 'erc20-token-stream',
+ type: 'erc20-token-periodic',
data: {
tokenAddress,
- // 0.1 USDC in WEI format. Since USDC has 6 decimals, 0.1 * 10^6.
- amountPerSecond: parseUnits('0.1', 6),
- // 1 USDC in WEI format. Since USDC has 6 decimals, 1 * 10^6.
- initialAmount: parseUnits('1', 6),
- // 2 USDC in WEI format. Since USDC has 6 decimals, 2 * 10^6.
- maxAmount: parseUnits('2', 6),
- startTime: currentTime,
- justification: 'Permission to use 0.1 USDC per second',
+ // 10 USDC in WEI format. Since USDC has 6 decimals, 10 * 10^6.
+ periodAmount: parseUnits('10', 6),
+ // 1 day in seconds.
+ periodDuration: 86400,
+ justification: 'Permission to transfer 10 USDC every day',
},
isAdjustmentAllowed: true,
},
@@ -138,6 +133,7 @@ const grantedPermissions = await walletClient.requestExecutionPermissions([
```typescript
import { createWalletClient, custom } from 'viem'
+import { privateKeyToAccount } from 'viem/accounts'
import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
export const walletClient = createWalletClient({
@@ -148,20 +144,23 @@ export const walletClient = createWalletClient({
-## ERC-20 revocation permission
+## ERC-20 stream permission
-This permission type enables revoking an existing ERC-20 token allowance on behalf of the user.
+This permission type ensures a linear streaming transfer limit for ERC-20 tokens. Token transfers are blocked until the
+defined start timestamp. At the start, a specified initial amount is released, after which tokens accrue linearly at the
+configured rate, up to the maximum allowed amount.
-For example, a user signs an ERC-7715 permission that lets a dapp revoke any ERC-20 token allowances
-periodically, or during an ongoing exploit.
+For example, a user signs an ERC-7715 permission that allows a dapp to spend 0.1 USDC per second, starting with an initial amount
+of 1 USDC, up to a maximum of 2 USDC.
-See the [ERC-20 revocation permission API reference](../../../reference/advanced-permissions/permissions.md#erc-20-revocation-permission) for more information.
+See the [ERC-20 stream permission API reference](../../../reference/advanced-permissions/permissions.md#erc-20-stream-permission) for more information.
```typescript
import { sepolia as chain } from 'viem/chains'
+import { parseUnits } from 'viem'
import { walletClient } from './client.ts'
// Since current time is in seconds, convert milliseconds to seconds.
@@ -169,17 +168,28 @@ const currentTime = Math.floor(Date.now() / 1000)
// 1 week from now.
const expiry = currentTime + 604800
+// USDC address on Ethereum Sepolia.
+const tokenAddress = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
+
const grantedPermissions = await walletClient.requestExecutionPermissions([
{
chainId: chain.id,
expiry,
- // The requested permissions will granted to the
+ // The requested permissions will be granted to the
// session account.
to: sessionAccount.address,
permission: {
- type: 'erc20-token-revocation',
+ type: 'erc20-token-stream',
data: {
- justification: 'Permission to revoke ERC-20 token allowances',
+ tokenAddress,
+ // 0.1 USDC in WEI format. Since USDC has 6 decimals, 0.1 * 10^6.
+ amountPerSecond: parseUnits('0.1', 6),
+ // 1 USDC in WEI format. Since USDC has 6 decimals, 1 * 10^6.
+ initialAmount: parseUnits('1', 6),
+ // 2 USDC in WEI format. Since USDC has 6 decimals, 2 * 10^6.
+ maxAmount: parseUnits('2', 6),
+ startTime: currentTime,
+ justification: 'Permission to use 0.1 USDC per second',
},
isAdjustmentAllowed: true,
},
diff --git a/gator_versioned_docs/version-1.1.0/guides/advanced-permissions/use-permissions/native-token.md b/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/use-permissions/native-token.md
similarity index 69%
rename from gator_versioned_docs/version-1.1.0/guides/advanced-permissions/use-permissions/native-token.md
rename to gator_versioned_docs/version-1.7.0/guides/advanced-permissions/use-permissions/native-token.md
index 5460a15e17c..ee1c184dbb5 100644
--- a/gator_versioned_docs/version-1.1.0/guides/advanced-permissions/use-permissions/native-token.md
+++ b/gator_versioned_docs/version-1.7.0/guides/advanced-permissions/use-permissions/native-token.md
@@ -18,7 +18,7 @@ import TabItem from "@theme/TabItem";
# Use native token permissions
[Advanced Permissions (ERC-7715)](../../../concepts/advanced-permissions.md) supports native token permission types that allow you to request fine-grained
-permissions for native token transfers with time-based (periodic) or streaming conditions, depending on your use case.
+permissions for native token transfers with periodic, fixed-allowance, or streaming conditions, depending on your use case.
## Prerequisites
@@ -26,6 +26,65 @@ permissions for native token transfers with time-based (periodic) or streaming c
- [Configure the Smart Accounts Kit.](../../configure-toolkit.md)
- [Create a session account.](../execute-on-metamask-users-behalf.md#3-set-up-a-session-account)
+## Native token allowance permission
+
+This permission type ensures a fixed native token allowance.
+It allows transfers up to a maximum total amount and doesn't reset by period.
+
+For example, a user signs an ERC-7715 permission that lets your dapp spend up to 0.05 ETH in total.
+After the dapp transfers 0.05 ETH, no additional transfers are allowed under this permission.
+
+See the [native token allowance permission API reference](../../../reference/advanced-permissions/permissions.md#native-token-allowance-permission) for more information.
+
+
+
+
+```typescript
+import { sepolia as chain } from 'viem/chains'
+import { parseEther } from 'viem'
+import { walletClient } from './client.ts'
+
+// Since current time is in seconds, convert milliseconds to seconds.
+const currentTime = Math.floor(Date.now() / 1000)
+// 1 week from now.
+const expiry = currentTime + 604800
+
+const grantedPermissions = await walletClient.requestExecutionPermissions([
+ {
+ chainId: chain.id,
+ expiry,
+ // The requested permissions will be granted to the
+ // session account.
+ to: sessionAccount.address,
+ permission: {
+ type: 'native-token-allowance',
+ data: {
+ // 0.05 ETH in wei format.
+ allowanceAmount: parseEther('0.05'),
+ startTime: currentTime,
+ justification: 'Permission to transfer up to 0.05 ETH in total',
+ },
+ isAdjustmentAllowed: true,
+ },
+ },
+])
+```
+
+
+
+
+```typescript
+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 periodic permission
This permission type ensures a per-period limit for native token transfers. At the start of each new period, the allowance resets.
@@ -52,7 +111,7 @@ const grantedPermissions = await walletClient.requestExecutionPermissions([
{
chainId: chain.id,
expiry,
- // The requested permissions will granted to the
+ // The requested permissions will be granted to the
// session account.
to: sessionAccount.address,
permission: {
@@ -114,7 +173,7 @@ const grantedPermissions = await walletClient.requestExecutionPermissions([
{
chainId: chain.id,
expiry,
- // The requested permissions will granted to the
+ // The requested permissions will be granted to the
// session account.
to: sessionAccount.address,
permission: {
diff --git a/gator_versioned_docs/version-1.0.0/guides/configure-toolkit.md b/gator_versioned_docs/version-1.7.0/guides/configure-toolkit.md
similarity index 89%
rename from gator_versioned_docs/version-1.0.0/guides/configure-toolkit.md
rename to gator_versioned_docs/version-1.7.0/guides/configure-toolkit.md
index 1f37d479e7d..0a5302bf176 100644
--- a/gator_versioned_docs/version-1.0.0/guides/configure-toolkit.md
+++ b/gator_versioned_docs/version-1.7.0/guides/configure-toolkit.md
@@ -6,11 +6,13 @@ keywords: [configure, smart accounts kit, bundler, paymaster, smart accounts env
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Configure the Smart Accounts Kit
-The Smart Accounts Kit is highly configurable, providing support for custom [bundlers and paymasters](#configure-the-bundler).
-You can also configure the [toolkit environment](#optional-configure-the-toolkit-environment) to interact with the [Delegation Framework](../concepts/delegation/overview.md#delegation-framework).
+The Smart Accounts Kit is highly configurable, providing support for custom bundlers and paymasters.
+You can also configure the toolkit environment to interact with the
+.
## Prerequisites
@@ -18,7 +20,7 @@ You can also configure the [toolkit environment](#optional-configure-the-toolkit
## Configure the bundler
-The toolkit uses Viem's Account Abstraction API to configure custom bundlers and paymasters.
+The toolkit uses Viem's Account Abstraction API to configure custom bundlers and paymasters.
This provides a robust and flexible foundation for creating and managing [MetaMask Smart Accounts](../concepts/smart-accounts.md).
See Viem's [account abstraction documentation](https://viem.sh/account-abstraction) for more information on the API's features, methods, and best practices.
@@ -49,7 +51,7 @@ Replace the bundler and paymaster URLs with your bundler and paymaster endpoints
For example, you can use endpoints from [Pimlico](https://docs.pimlico.io/references/bundler), [Infura](https://docs.infura.io/), or [ZeroDev](https://docs.zerodev.app/meta-infra/intro).
:::note
-Providing a paymaster is optional when configuring your bundler client. However, if you choose not to use a paymaster, the smart contract account must have enough funds to pay gas fees.
+Providing a paymaster is optional when configuring your bundler client. However, if you choose not to use a paymaster, the smart account must have enough funds to pay gas fees.
:::
## (Optional) Configure the toolkit environment
@@ -63,7 +65,7 @@ It serves several key purposes:
### Resolve the environment
-When you create a [MetaMask smart account](../concepts/smart-accounts.md), the toolkit automatically
+When you create a , the toolkit automatically
resolves the environment based on the version it requires and the chain configured.
If no environment is found for the specified chain, it throws an error.
@@ -115,8 +117,8 @@ See the changelog of the toolkit version you are using (in the left sidebar) for
:::
Alternatively, you can use the [`getSmartAccountsEnvironment`](../reference/delegation/index.md#getsmartaccountsenvironment) function to resolve the environment.
-This function is especially useful if your delegator is not a smart account when
-creating a [redelegation](../concepts/delegation/overview.md#delegation-types).
+This function is especially useful if your delegator is not a smart account when
+creating a redelegation.
```typescript
import { getSmartAccountsEnvironment, SmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
@@ -128,7 +130,7 @@ const environment: SmartAccountsEnvironment = getSmartAccountsEnvironment(sepoli
### Deploy a custom environment
-You can deploy the contracts using any method, but the toolkit provides a convenient [`deploySmartAccountsEnvironment`](../reference/delegation/index.md#deploysmartaccountsenvironment) function. This function simplifies deploying the Delegation Framework contracts to your desired EVM chain.
+You can deploy the contracts using any method, but the toolkit provides a convenient [`deploySmartAccountsEnvironment`](../reference/delegation/index.md#deploysmartaccountsenvironment) function. This function simplifies deploying the contracts to your desired EVM chain.
This function requires a Viem [Public Client](https://viem.sh/docs/clients/public), [Wallet Client](https://viem.sh/docs/clients/wallet), and [Chain](https://viem.sh/docs/glossary/types#chain)
to deploy the contracts and resolve the `SmartAccountsEnvironment`.
@@ -260,6 +262,6 @@ overrideDeployedEnvironment(
```
:::note
-Make sure to specify the Delegation Framework version required by the toolkit.
+Make sure to specify the version required by the toolkit.
See the changelog of the toolkit version you are using (in the left sidebar) for its required Framework version.
:::
diff --git a/gator_versioned_docs/version-1.0.0/guides/delegation/check-delegation-state.md b/gator_versioned_docs/version-1.7.0/guides/delegation/check-delegation-state.md
similarity index 94%
rename from gator_versioned_docs/version-1.0.0/guides/delegation/check-delegation-state.md
rename to gator_versioned_docs/version-1.7.0/guides/delegation/check-delegation-state.md
index 8642d9b5cd0..dc5fff8a041 100644
--- a/gator_versioned_docs/version-1.0.0/guides/delegation/check-delegation-state.md
+++ b/gator_versioned_docs/version-1.7.0/guides/delegation/check-delegation-state.md
@@ -7,6 +7,7 @@ keywords: [delegation, state, caveat enforcer, delegation scope]
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Check the delegation state
@@ -27,7 +28,7 @@ Use the `CaveatEnforcerClient` to check the available balances for specific scop
## Create a `CaveatEnforcerClient`
To check the delegation state, create a [`CaveatEnforcerClient`](../../reference/delegation/caveat-enforcer-client.md).
-This client allows you to interact with the caveat enforcers of the delegation, and read the required state.
+This client allows you to interact with the caveat enforcers of the delegation, and read the required state.
diff --git a/gator_versioned_docs/version-1.0.0/guides/delegation/create-redelegation.md b/gator_versioned_docs/version-1.7.0/guides/delegation/create-redelegation.md
similarity index 89%
rename from gator_versioned_docs/version-1.0.0/guides/delegation/create-redelegation.md
rename to gator_versioned_docs/version-1.7.0/guides/delegation/create-redelegation.md
index 5001df971a5..616146a2ca2 100644
--- a/gator_versioned_docs/version-1.0.0/guides/delegation/create-redelegation.md
+++ b/gator_versioned_docs/version-1.7.0/guides/delegation/create-redelegation.md
@@ -7,16 +7,17 @@ keywords: [delegation, state, caveat enforcer, delegation scope, redelegation]
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Create a redelegation
Redelegation is a core feature that sets delegations apart from other permission sharing frameworks.
-It allows a delegate to create a delegation chain, passing on the same or reduced level of authority
-from the root delegator.
+It allows a delegate to create a delegation chain, passing on the same or reduced level of authority
+from the root delegator.
For example, if Alice grants Bob permission to spend 10 USDC on her behalf, Bob can further grant Carol
permission to spend up to 5 USDC on Alice's behalf-that is, Bob can redelegate. This creates a delegation
-chain where the root permissions are reshared with additional parties.
+chain where the root permissions are re-shared with additional parties.
## Prerequisites
@@ -27,7 +28,7 @@ chain where the root permissions are reshared with additional parties.
Create a [root delegation](../../concepts/delegation/overview.md#root-delegation) from Alice to Bob.
-This example uses the [`erc20TransferAmount`](use-delegation-scopes/spending-limit.md#erc-20-transfer-scope) scope, allowing
+This example uses the [`erc20TransferAmount`](use-delegation-scopes/spending-limit.md#erc-20-transfer-scope) scope, allowing
Alice to delegate to Bob the ability to spend 10 USDC on her behalf.
@@ -94,8 +95,8 @@ export const bobSmartAccount = await toMetaMaskSmartAccount({
Create a [redelegation](../../concepts/delegation/overview.md#redelegation) from Bob to Carol. When creating a redelegation, you can only narrow the scope of the original authority, not expand it.
-To create a redelegation, provide the signed delegation as the `parentDelegation` argument when calling [createDelegation](../../reference/delegation/index.md#createdelegation).
-This example uses the [`erc20TransferAmount`](use-delegation-scopes/spending-limit.md#erc-20-transfer-scope) scope, allowing
+To create a redelegation, provide the signed delegation as the `parentDelegation` argument when calling [`createDelegation`](../../reference/delegation/index.md#createdelegation).
+This example uses the [`erc20TransferAmount`](use-delegation-scopes/spending-limit.md#erc-20-transfer-scope) scope, allowing
Bob to delegate to Carol the ability to spend 5 USDC on Alice's behalf.
diff --git a/gator_versioned_docs/version-1.1.0/guides/delegation/disable-delegation.md b/gator_versioned_docs/version-1.7.0/guides/delegation/disable-delegation.md
similarity index 96%
rename from gator_versioned_docs/version-1.1.0/guides/delegation/disable-delegation.md
rename to gator_versioned_docs/version-1.7.0/guides/delegation/disable-delegation.md
index 55939ad2403..fca67204dce 100644
--- a/gator_versioned_docs/version-1.1.0/guides/delegation/disable-delegation.md
+++ b/gator_versioned_docs/version-1.7.0/guides/delegation/disable-delegation.md
@@ -7,6 +7,7 @@ keywords: [delegation, disable, revoke]
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Disable a delegation
@@ -28,7 +29,7 @@ delegation, the transaction will revert, preventing him from spending Alice's US
To disable a delegation, you can use the [`disableDelegation`](../../reference/delegation/index.md#disabledelegation) utility function from the
toolkit to generate calldata. Once the calldata is prepared, you can send it to the
-Delegation Manager to disable the delegation.
+ to disable the delegation.
diff --git a/gator_versioned_docs/version-1.0.0/guides/delegation/execute-on-smart-accounts-behalf.md b/gator_versioned_docs/version-1.7.0/guides/delegation/execute-on-smart-accounts-behalf.md
similarity index 80%
rename from gator_versioned_docs/version-1.0.0/guides/delegation/execute-on-smart-accounts-behalf.md
rename to gator_versioned_docs/version-1.7.0/guides/delegation/execute-on-smart-accounts-behalf.md
index 3024bc4c7c7..aab174cc104 100644
--- a/gator_versioned_docs/version-1.0.0/guides/delegation/execute-on-smart-accounts-behalf.md
+++ b/gator_versioned_docs/version-1.7.0/guides/delegation/execute-on-smart-accounts-behalf.md
@@ -6,6 +6,7 @@ keywords: [execution, smart account, create, redeem, delegation, delegator, dele
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Perform executions on a smart account's behalf
@@ -20,10 +21,10 @@ You'll complete the delegation lifecycle (create, sign, and redeem a delegation)
## Steps
-### 1. Create a Public Client
+### 1. Set up a Public Client
-Create a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function.
-You will configure Alice's account (the delegator) and the Bundler Client with the Public Client, which you can use to query the signer's account state and interact with smart contracts.
+Set up a Public Client using Viem's [`createPublicClient`](https://viem.sh/docs/clients/public) function.
+You will configure Alice's account (the delegator) and the Bundler Client with the Public Client, which you can use to query the signer's account state and interact with smart contracts.
```typescript
import { createPublicClient, http } from 'viem'
@@ -35,10 +36,10 @@ const publicClient = createPublicClient({
})
```
-### 2. Create a Bundler Client
+### 2. Set up a Bundler Client
-Create a [Viem Bundler Client](https://viem.sh/account-abstraction/clients/bundler) using Viem's `createBundlerClient` function.
-You can use the bundler service to estimate gas for user operations and submit transactions to the network.
+Set up a Bundler Client using Viem's [`createBundlerClient`](https://viem.sh/account-abstraction/clients/bundler) function.
+You can use the bundler service to estimate gas for user operations and submit transactions to the network.
```typescript
import { createBundlerClient } from 'viem/account-abstraction'
@@ -51,11 +52,11 @@ const bundlerClient = createBundlerClient({
### 3. Create a delegator account
-Create an account to represent Alice, the delegator who will create a delegation.
-The delegator must be a MetaMask smart account; use the toolkit's [`toMetaMaskSmartAccount`](../../reference/smart-account.md#tometamasksmartaccount) method to create the delegator account.
+Create an account to represent Alice, the delegator who will create a delegation.
+The delegator must be a ; use the toolkit's [`toMetaMaskSmartAccount`](../../reference/smart-account.md#tometamasksmartaccount) method to create the delegator account.
-A Hybrid smart account is a flexible smart account implementation that supports both an externally owned account (EOA) owner and any number of P256 (passkey) signers.
-This examples configures a [Hybrid smart account](../smart-accounts/create-smart-account.md#hybrid-smart-account) with an Account signer:
+This example configures a Hybrid smart account,
+which is a flexible smart account implementation that supports both an EOA owner and any number of passkey (WebAuthn) signers:
```typescript
import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
@@ -78,7 +79,7 @@ See [how to configure other smart account types](../smart-accounts/create-smart-
### 4. Create a delegate account
-Create an account to represent Bob, the delegate who will receive the delegation. The delegate can be a smart account or an externally owned account (EOA):
+Create an account to represent Bob, the delegate who will receive the delegation. The delegate can be a smart account or an EOA:
@@ -177,7 +178,7 @@ Bob can now redeem the delegation. The redeem transaction is sent to the `Delega
To prepare the calldata for the redeem transaction, use the [`redeemDelegations`](../../reference/delegation/index.md#redeemdelegations) method from `DelegationManager`.
Since Bob is redeeming a single delegation chain, use the [`SingleDefault`](../../concepts/delegation/delegation-manager.md#execution-modes) execution mode.
-Bob can redeem the delegation by submitting a user operation if his account is a smart account, or a regular transaction if his account is an EOA. In this example, Bob transfers 1 USDC from Alice’s account to his own.
+Bob can redeem the delegation by submitting a user operation if his account is a smart account, or a regular transaction if his account is an EOA. In this example, Bob transfers 1 USDC from Alice's account to his own.
diff --git a/gator_versioned_docs/version-1.1.0/guides/delegation/use-delegation-scopes/constrain-scope.md b/gator_versioned_docs/version-1.7.0/guides/delegation/use-delegation-scopes/constrain-scope.md
similarity index 97%
rename from gator_versioned_docs/version-1.1.0/guides/delegation/use-delegation-scopes/constrain-scope.md
rename to gator_versioned_docs/version-1.7.0/guides/delegation/use-delegation-scopes/constrain-scope.md
index b6b6e7bbeef..9077ae1a447 100644
--- a/gator_versioned_docs/version-1.1.0/guides/delegation/use-delegation-scopes/constrain-scope.md
+++ b/gator_versioned_docs/version-1.7.0/guides/delegation/use-delegation-scopes/constrain-scope.md
@@ -7,6 +7,7 @@ keywords: [constrain, restrict, scope, caveat, caveat enforcer]
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Constrain a delegation scope
diff --git a/gator_versioned_docs/version-1.1.0/guides/delegation/use-delegation-scopes/function-call.md b/gator_versioned_docs/version-1.7.0/guides/delegation/use-delegation-scopes/function-call.md
similarity index 90%
rename from gator_versioned_docs/version-1.1.0/guides/delegation/use-delegation-scopes/function-call.md
rename to gator_versioned_docs/version-1.7.0/guides/delegation/use-delegation-scopes/function-call.md
index 499d38973e0..7e63910c311 100644
--- a/gator_versioned_docs/version-1.1.0/guides/delegation/use-delegation-scopes/function-call.md
+++ b/gator_versioned_docs/version-1.7.0/guides/delegation/use-delegation-scopes/function-call.md
@@ -5,10 +5,11 @@ keywords: [delegation scope, function call, restrict, delegation]
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Use the function call scope
-The function call scope defines the specific methods, contract addresses, and calldata that are allowed for the delegation.
+The function call scope defines the specific methods, contract addresses, and calldata that are allowed for the delegation.
For example, Alice delegates to Bob the ability to call the `approve` function on the USDC contract, with the approval amount set to `0`.
## Prerequisites
@@ -22,7 +23,7 @@ For example, Alice delegates to Bob the ability to call the `approve` function o
This scope requires `targets`, which specifies the permitted contract addresses, and `selectors`, which specifies the allowed methods.
-Internally, this scope uses the [`allowedTargets`](../../../reference/delegation/caveats.md#allowedtargets), [`allowedMethods`](../../../reference/delegation/caveats.md#allowedmethods), and [`valueLte`](../../../reference/delegation/caveats.md#valuelte) caveat enforcers, and
+Internally, this scope uses the [`allowedTargets`](../../../reference/delegation/caveats.md#allowedtargets), [`allowedMethods`](../../../reference/delegation/caveats.md#allowedmethods), and [`valueLte`](../../../reference/delegation/caveats.md#valuelte) caveat enforcers, and
optionally uses the [`allowedCalldata`](../../../reference/delegation/caveats.md#allowedcalldata) or [`exactCalldata`](../../../reference/delegation/caveats.md#exactcalldata) caveat enforcers when those parameters are specified.
See the [function call scope reference](../../../reference/delegation/delegation-scopes.md#function-call-scope) for more details.
@@ -49,7 +50,7 @@ const delegation = createDelegation({
### Define allowed calldata
You can further restrict the scope by defining the `allowedCalldata`. For example, you can set
-`allowedCalldata` so the delegate is only permitted to call the `approve` function on the
+`allowedCalldata` so the delegate is only permitted to call the `approve` function on the
USDC token contract with an allowance value of `0`. This effectively limits the delegate to
revoking ERC-20 approvals.
@@ -91,7 +92,7 @@ const delegation = createDelegation({
### Define exact calldata
You can define the `exactCalldata` instead of the `allowedCalldata`. For example, you can
-set `exactCalldata` so the delegate is permitted to call only the `approve` function on the USDC token
+set `exactCalldata` so the delegate is permitted to call only the `approve` function on the USDC token
contract, with a specific spender address and an allowance value of 0. This effectively limits the delegate to
revoking ERC-20 approvals for a specific spender.
diff --git a/gator_versioned_docs/version-1.0.0/guides/delegation/use-delegation-scopes/index.md b/gator_versioned_docs/version-1.7.0/guides/delegation/use-delegation-scopes/index.md
similarity index 100%
rename from gator_versioned_docs/version-1.0.0/guides/delegation/use-delegation-scopes/index.md
rename to gator_versioned_docs/version-1.7.0/guides/delegation/use-delegation-scopes/index.md
diff --git a/gator_versioned_docs/version-1.0.0/guides/delegation/use-delegation-scopes/ownership-transfer.md b/gator_versioned_docs/version-1.7.0/guides/delegation/use-delegation-scopes/ownership-transfer.md
similarity index 90%
rename from gator_versioned_docs/version-1.0.0/guides/delegation/use-delegation-scopes/ownership-transfer.md
rename to gator_versioned_docs/version-1.7.0/guides/delegation/use-delegation-scopes/ownership-transfer.md
index a2381eba6b9..d04b0543073 100644
--- a/gator_versioned_docs/version-1.0.0/guides/delegation/use-delegation-scopes/ownership-transfer.md
+++ b/gator_versioned_docs/version-1.7.0/guides/delegation/use-delegation-scopes/ownership-transfer.md
@@ -3,6 +3,8 @@ description: Learn how to use the ownership transfer scope for a delegation.
keywords: [delegation scope, ownership transfer, restrict, delegation]
---
+import GlossaryTerm from '@theme/GlossaryTerm';
+
# Use the ownership transfer scope
The ownership transfer scope restricts a delegation to ownership transfer calls only.
@@ -19,7 +21,7 @@ For example, Alice has deployed a smart contract, and she delegates to Bob the a
This scope requires a `contractAddress`, which represents the address of the deployed contract.
-Internally, this scope uses the [`ownershipTransfer`](../../../reference/delegation/caveats.md#ownershiptransfer) caveat enforcer.
+Internally, this scope uses the [`ownershipTransfer`](../../../reference/delegation/caveats.md#ownershiptransfer) caveat enforcer.
See the [ownership transfer scope reference](../../../reference/delegation/delegation-scopes.md#ownership-transfer-scope) for more details.
```typescript
diff --git a/gator_versioned_docs/version-1.1.0/guides/delegation/use-delegation-scopes/spending-limit.md b/gator_versioned_docs/version-1.7.0/guides/delegation/use-delegation-scopes/spending-limit.md
similarity index 91%
rename from gator_versioned_docs/version-1.1.0/guides/delegation/use-delegation-scopes/spending-limit.md
rename to gator_versioned_docs/version-1.7.0/guides/delegation/use-delegation-scopes/spending-limit.md
index 4412368d47b..600eb75b08c 100644
--- a/gator_versioned_docs/version-1.1.0/guides/delegation/use-delegation-scopes/spending-limit.md
+++ b/gator_versioned_docs/version-1.7.0/guides/delegation/use-delegation-scopes/spending-limit.md
@@ -3,9 +3,11 @@ description: Learn how to use the spending limit scopes for a delegation.
keywords: [delegation scope, spending limit, restrict, delegation]
---
+import GlossaryTerm from '@theme/GlossaryTerm';
+
# Use spending limit scopes
-Spending limit scopes define how much a delegate can spend in native, ERC-20, or ERC-721 tokens.
+Spending limit scopes define how much a delegate can spend in native, ERC-20, or ERC-721 tokens.
You can set transfer limits with or without time-based (periodic) or streaming conditions, depending on your use case.
## Prerequisites
@@ -25,7 +27,7 @@ Bob can transfer a total of 10 USDC per day; the limit resets at the beginning o
When this scope is applied, the toolkit automatically disallows native token transfers (sets the native token transfer limit to `0`).
-Internally, this scope uses the [`erc20PeriodTransfer`](../../../reference/delegation/caveats.md#erc20periodtransfer) and [`valueLte`](../../../reference/delegation/caveats.md#valuelte) caveat enforcers.
+Internally, this scope uses the [`erc20PeriodTransfer`](../../../reference/delegation/caveats.md#erc20periodtransfer) and [`valueLte`](../../../reference/delegation/caveats.md#valuelte) caveat enforcers.
See the [ERC-20 periodic scope reference](../../../reference/delegation/delegation-scopes.md#erc-20-periodic-scope) for more details.
```typescript
@@ -59,7 +61,7 @@ For example, Alice creates a delegation that allows Bob to spend 0.1 USDC per se
When this scope is applied, the toolkit automatically disallows native token transfers (sets the native token transfer limit to `0`).
-Internally, this scope uses the [`erc20Streaming`](../../../reference/delegation/caveats.md#erc20streaming) and [`valueLte`](../../../reference/delegation/caveats.md#valuelte) caveat enforcers.
+Internally, this scope uses the [`erc20Streaming`](../../../reference/delegation/caveats.md#erc20streaming) and [`valueLte`](../../../reference/delegation/caveats.md#valuelte) caveat enforcers.
See the [ERC-20 streaming scope reference](../../../reference/delegation/delegation-scopes.md#erc-20-streaming-scope) for more details.
```typescript
@@ -94,7 +96,7 @@ Bob may use the 10 USDC in a single transaction or make multiple transactions, a
When this scope is applied, the toolkit automatically disallows native token transfers (sets the native token transfer limit to `0`).
-Internally, this scope uses the [`erc20TransferAmount`](../../../reference/delegation/caveats.md#erc20transferamount) and [`valueLte`](../../../reference/delegation/caveats.md#valuelte) caveat enforcers.
+Internally, this scope uses the [`erc20TransferAmount`](../../../reference/delegation/caveats.md#erc20transferamount) and [`valueLte`](../../../reference/delegation/caveats.md#valuelte) caveat enforcers.
See the [ERC-20 transfer scope reference](../../../reference/delegation/delegation-scopes.md#erc-20-transfer-scope) for more details.
```typescript
@@ -119,7 +121,7 @@ const delegation = createDelegation({
This scope limits the delegation to ERC-721 token transfers only.
For example, Alice creates a delegation that allows Bob to transfer an NFT she owns on her behalf.
-Internally, this scope uses the [`erc721Transfer`](../../../reference/delegation/caveats.md#erc721transfer) caveat enforcer.
+Internally, this scope uses the [`erc721Transfer`](../../../reference/delegation/caveats.md#erc721transfer) caveat enforcer.
See the [ERC-721 scope reference](../../../reference/delegation/delegation-scopes.md#erc-721-scope) for more details.
```typescript
@@ -149,7 +151,7 @@ When this scope is applied, the toolkit disallows ERC-20 and ERC-721 token trans
You can optionally configure `exactCalldata` to restrict transactions to a specific operation, or configure
`allowedCalldata` to allow transactions that match certain patterns or ranges.
-Internally, this scope uses the [`nativeTokenPeriodTransfer`](../../../reference/delegation/caveats.md#nativetokenperiodtransfer) caveat enforcer, and
+Internally, this scope uses the [`nativeTokenPeriodTransfer`](../../../reference/delegation/caveats.md#nativetokenperiodtransfer) caveat enforcer, and
optionally uses the [`allowedCalldata`](../../../reference/delegation/caveats.md#allowedcalldata) or [`exactCalldata`](../../../reference/delegation/caveats.md#exactcalldata) caveat enforcers when those parameters are specified.
See the [native token periodic scope reference](../../../reference/delegation/delegation-scopes.md#native-token-periodic-scope) for more details.
@@ -184,7 +186,7 @@ When this scope is applied, the toolkit disallows ERC-20 and ERC-721 token trans
You can optionally configure `exactCalldata` to restrict transactions to a specific operation, or configure
`allowedCalldata` to allow transactions that match certain patterns or ranges.
-Internally, this scope uses the [`nativeTokenStreaming`](../../../reference/delegation/caveats.md#nativetokenstreaming) caveat enforcer, and
+Internally, this scope uses the [`nativeTokenStreaming`](../../../reference/delegation/caveats.md#nativetokenstreaming) caveat enforcer, and
optionally uses the [`allowedCalldata`](../../../reference/delegation/caveats.md#allowedcalldata) or [`exactCalldata`](../../../reference/delegation/caveats.md#exactcalldata) caveat enforcers when those parameters are specified.
See the [native token streaming scope reference](../../../reference/delegation/delegation-scopes.md#native-token-streaming-scope) for more details.
@@ -220,7 +222,7 @@ When this scope is applied, the toolkit disallows ERC-20 and ERC-721 token trans
You can optionally configure `exactCalldata` to restrict transactions to a specific operation, or configure
`allowedCalldata` to allow transactions that match certain patterns or ranges.
-Internally, this scope uses the [`nativeTokenTransferAmount`](../../../reference/delegation/caveats.md#nativetokentransferamount) caveat enforcer, and
+Internally, this scope uses the [`nativeTokenTransferAmount`](../../../reference/delegation/caveats.md#nativetokentransferamount) caveat enforcer, and
optionally uses the [`allowedCalldata`](../../../reference/delegation/caveats.md#allowedcalldata) or [`exactCalldata`](../../../reference/delegation/caveats.md#exactcalldata) caveat enforcers when those parameters are specified.
See the [native token transfer scope reference](../../../reference/delegation/delegation-scopes.md#native-token-transfer-scope) for more details.
diff --git a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/create-smart-account.md b/gator_versioned_docs/version-1.7.0/guides/smart-accounts/create-smart-account.md
similarity index 87%
rename from gator_versioned_docs/version-1.0.0/guides/smart-accounts/create-smart-account.md
rename to gator_versioned_docs/version-1.7.0/guides/smart-accounts/create-smart-account.md
index 5f79d6b8364..587fa3084cf 100644
--- a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/create-smart-account.md
+++ b/gator_versioned_docs/version-1.7.0/guides/smart-accounts/create-smart-account.md
@@ -5,6 +5,7 @@ keywords: [create, smart account, signer, hybrid, multisig, 7702]
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Create a smart account
@@ -18,7 +19,7 @@ to create different types of smart accounts with different signature schemes.
## Hybrid smart account
-A [Hybrid smart account](../../concepts/smart-accounts.md#hybrid-smart-account) supports both an externally owned account (EOA) owner and any number of passkey (WebAuthn) signers.
+A [Hybrid smart account](../../concepts/smart-accounts.md#hybrid-smart-account) supports both an EOA owner and any number of passkey (WebAuthn) signers.
This example uses `toMetaMaskSmartAccount` and Viem's [Wallet Client](https://viem.sh/docs/clients/wallet)
to create a Hybrid smart account. The `signer` parameter also accepts Viem's [Local Account](https://viem.sh/docs/accounts/local) and [WebAuthnAccount](https://viem.sh/account-abstraction/accounts/webauthn#webauthn-account).
@@ -80,7 +81,7 @@ export const walletClient = createWalletClient({
## Multisig smart account
-A [Multisig smart account](../../concepts/smart-accounts.md#multisig-smart-account) supports multiple EOA signers with a configurable threshold for execution.
+A [Multisig smart account](../../concepts/smart-accounts.md#multisig-smart-account) supports multiple EOA signers with a configurable threshold for execution.
This example uses [`toMetaMaskSmartAccount`](../../reference/smart-account.md#tometamasksmartaccount) to create a
Multisig smart account with a combination of account signers and Wallet Client signers.
@@ -154,8 +155,8 @@ The number of signers must be at least equal to the threshold to generate a vali
## EIP-7702 smart account
-An [EIP-7702 smart account](../../concepts/smart-accounts.md#stateless-7702-smart-account) represents an EOA that has been upgraded
-to support MetaMask Smart Accounts functionality as defined by [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702).
+An [EIP-7702 smart account](../../concepts/smart-accounts.md#stateless-7702-smart-account) represents an EOA that has been upgraded
+to support MetaMask Smart Accounts functionality as defined by [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702).
This example uses [`toMetaMaskSmartAccount`](../../reference/smart-account.md#tometamasksmartaccount)
and Viem's [`privateKeyToAccount`](https://viem.sh/docs/accounts/local/privateKeyToAccount) to
@@ -215,6 +216,6 @@ export const account = privateKeyToAccount(privateKey)
## Next steps
-- [Configure signers](./signers/index.md) to use a signer that fits your needs.
+- [Configure signers](./signers/index.mdx) to use a signer that fits your needs.
- [Deploy the smart account](deploy-smart-account.md) and [send user operations](send-user-operation.md) using [Viem Account Abstraction clients](../configure-toolkit.md).
- [Create delegations](../delegation/execute-on-smart-accounts-behalf.md) to grant scoped permissions to other accounts.
diff --git a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/deploy-smart-account.md b/gator_versioned_docs/version-1.7.0/guides/smart-accounts/deploy-smart-account.md
similarity index 89%
rename from gator_versioned_docs/version-1.1.0/guides/smart-accounts/deploy-smart-account.md
rename to gator_versioned_docs/version-1.7.0/guides/smart-accounts/deploy-smart-account.md
index 27b94623bca..610d4f3fa3b 100644
--- a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/deploy-smart-account.md
+++ b/gator_versioned_docs/version-1.7.0/guides/smart-accounts/deploy-smart-account.md
@@ -5,11 +5,12 @@ keywords: [deploy, smart account, user operation]
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Deploy a smart account
-You can deploy MetaMask Smart Accounts in two different ways. You can either deploy a smart account automatically when sending
-the first user operation, or manually deploy the account.
+You can deploy [MetaMask Smart Accounts](../../concepts/smart-accounts.md) in two different ways. You can either deploy a smart account automatically when sending
+the first user operation, or manually deploy the account.
## Prerequisites
@@ -90,7 +91,7 @@ method from the smart account to retrieve the `factory` and `factoryData`. This
The `factory` represents the contract address responsible for deploying the smart account, while `factoryData` contains the
calldata that will be executed by the `factory` to deploy the smart account.
-The relay account can be either an externally owned account (EOA) or another smart account. This example uses an EOA.
+The relay account can be either an EOA or another smart account. This example uses an EOA.
diff --git a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/generate-multisig-signature.md b/gator_versioned_docs/version-1.7.0/guides/smart-accounts/generate-multisig-signature.md
similarity index 92%
rename from gator_versioned_docs/version-1.1.0/guides/smart-accounts/generate-multisig-signature.md
rename to gator_versioned_docs/version-1.7.0/guides/smart-accounts/generate-multisig-signature.md
index dbdd9372251..88dd5c59b8f 100644
--- a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/generate-multisig-signature.md
+++ b/gator_versioned_docs/version-1.7.0/guides/smart-accounts/generate-multisig-signature.md
@@ -5,12 +5,13 @@ keywords: [generate, multsig, signature, smart account]
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Generate a multisig signature
The Smart Accounts Kit supports [Multisig smart accounts](../../concepts/smart-accounts.md#multisig-smart-account),
-allowing you to add multiple externally owned accounts (EOA)
-signers with a configurable execution threshold. When the threshold
+allowing you to add multiple EOA
+signers with a configurable execution threshold. When the threshold
is greater than 1, you can collect signatures from the required signers
and use the [`aggregateSignature`](../../reference/smart-account.md#aggregatesignature) function to combine them
into a single aggregated signature.
diff --git a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/send-gasless-transaction.md b/gator_versioned_docs/version-1.7.0/guides/smart-accounts/send-gasless-transaction.md
similarity index 85%
rename from gator_versioned_docs/version-1.0.0/guides/smart-accounts/send-gasless-transaction.md
rename to gator_versioned_docs/version-1.7.0/guides/smart-accounts/send-gasless-transaction.md
index d3f295d0df0..70c11ce916b 100644
--- a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/send-gasless-transaction.md
+++ b/gator_versioned_docs/version-1.7.0/guides/smart-accounts/send-gasless-transaction.md
@@ -5,11 +5,12 @@ keywords: [send, gasless transaction, smart account, sponsor, paymaster]
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Send a gasless transaction
-MetaMask Smart Accounts support gas sponsorship, which simplifies onboarding by abstracting gas fees away from end users.
-You can use any paymaster service provider, such as [Pimlico](https://docs.pimlico.io/references/paymaster) or [ZeroDev](https://docs.zerodev.app/meta-infra/rpcs), or plug in your own custom paymaster.
+[MetaMask Smart Accounts](../../concepts/smart-accounts.md) support gas sponsorship, which simplifies onboarding by abstracting gas fees away from end users.
+You can use any paymaster service provider, such as [Pimlico](https://docs.pimlico.io/references/paymaster) or [ZeroDev](https://docs.zerodev.app/meta-infra/rpcs), or plug in your own custom paymaster.
## Prerequisites
diff --git a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/send-user-operation.md b/gator_versioned_docs/version-1.7.0/guides/smart-accounts/send-user-operation.md
similarity index 92%
rename from gator_versioned_docs/version-1.0.0/guides/smart-accounts/send-user-operation.md
rename to gator_versioned_docs/version-1.7.0/guides/smart-accounts/send-user-operation.md
index 93bf2623dd0..024e7e36989 100644
--- a/gator_versioned_docs/version-1.0.0/guides/smart-accounts/send-user-operation.md
+++ b/gator_versioned_docs/version-1.7.0/guides/smart-accounts/send-user-operation.md
@@ -5,6 +5,7 @@ keywords: [ERC-4337, send, user operation, smart account]
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# Send a user operation
@@ -13,7 +14,7 @@ They incorporate significant enhancements that improve user experience and provi
flexibility in account management and transaction execution.
Viem's Account Abstraction API allows a developer to specify an array of `Calls` that will be executed as a user operation via Viem's [`sendUserOperation`](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation) method.
-The MetaMask Smart Accounts Kit encodes and executes the provided calls.
+The Smart Accounts Kit encodes and executes the provided calls.
User operations are not directly sent to the network.
Instead, they are sent to a bundler, which validates, optimizes, and aggregates them before network submission.
@@ -30,11 +31,11 @@ If a user operation is sent from a MetaMask smart account that has not been depl
## Send a user operation
-The following is a simplified example of sending a user operation using Viem Core SDK. Viem Core SDK offers more granular control for developers who require it.
+The following is a simplified example of sending a user operation using Viem Core SDK. Viem Core SDK offers more granular control for developers who require it.
In the example, a user operation is created with the necessary gas limits.
-This user operation is passed to a bundler instance, and the `EntryPoint` address is retrieved from the client.
+This user operation is passed to a bundler instance, and the `EntryPoint` address is retrieved from the client.
diff --git a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/signers/dynamic.md b/gator_versioned_docs/version-1.7.0/guides/smart-accounts/signers/dynamic.md
similarity index 91%
rename from gator_versioned_docs/version-1.1.0/guides/smart-accounts/signers/dynamic.md
rename to gator_versioned_docs/version-1.7.0/guides/smart-accounts/signers/dynamic.md
index 650b42be98b..fc5a54156b2 100644
--- a/gator_versioned_docs/version-1.1.0/guides/smart-accounts/signers/dynamic.md
+++ b/gator_versioned_docs/version-1.7.0/guides/smart-accounts/signers/dynamic.md
@@ -4,11 +4,13 @@ sidebar_label: Dynamic
keywords: [dynamic, smart account, signer, metamask smart account]
---
+import GlossaryTerm from '@theme/GlossaryTerm';
+
# Use Dynamic with MetaMask Smart Accounts
-[Dynamic](https://www.dynamic.xyz/) is an embedded wallet solution that enables seamless social login and passkey based
+[Dynamic](https://www.dynamic.xyz/) is an embedded wallet solution that enables seamless social sign-in and passkey based
wallets, making user onboarding easier. MetaMask Smart Accounts is a signer-agnostic implementation
-that allows you to use Dynamic's EOA wallet as a signer for MetaMask Smart Accounts.
+that allows you to use Dynamic's EOA wallet as a signer for smart accounts.
+
+
+### Account abstraction
+
+A conceptual model for programmable onchain accounts, including flexible validation logic, custom signature schemes, and gas abstraction. ERC-4337 defines a mechanism for account abstraction.
+
+### Advanced Permissions
+
+Fine-grained, wallet execution permissions that dapps can request from MetaMask extension users. Based on ERC-7715.
+
+### Bundler
+
+An ERC-4337 component that manages the alternate mempool: it collects user operations from smart accounts, packages them, and submits them to the network.
+
+### Caveat
+
+A restriction attached to a delegation that limits how delegated authority can be used.
+
+### Caveat enforcer
+
+A smart contract that enforces delegation rules by validating caveat conditions during redemption hooks.
+
+### Delegate account
+
+The account that receives delegated authority and can redeem a delegation under its constraints.
+
+### Delegation
+
+The ability for a MetaMask smart account to authorize another account to perform specific executions on its behalf.
+
+### Delegation Framework
+
+A set of audited smart contracts that handle smart account creation, the delegation lifecycle, and caveat enforcement.
+
+### Delegation Manager
+
+The ERC-7710 component that validates and redeems delegations, including signature checks and caveat enforcer hooks.
+
+### Delegation scope
+
+A predefined authority pattern representing a caveat or group of caveats, which sets the initial actions a delegate is allowed to perform. You can combine scopes with additional caveats.
+
+### Delegator account
+
+The account that creates and signs a delegation to grant limited authority to another account.
+
+### EIP-7702 smart account
+
+A stateless MetaMask smart account implementation that represents an upgraded EOA.
+
+### Externally owned account (EOA)
+
+A private-key-controlled account with no built-in programmable execution logic.
+
+### Hybrid smart account
+
+A smart account implementation that supports both an EOA owner and passkey signers.
+
+### MetaMask smart account
+
+A smart contract account created using the Smart Accounts Kit that supports programmable behavior, flexible signing options, and ERC-7710 delegations.
+
+### Multisig smart account
+
+A smart account implementation that requires multiple signers to generate a valid signature.
+
+### Open delegation
+
+A delegation that leaves the delegate unspecified, allowing any account to redeem it.
+
+### Open redelegation
+
+A redelegation with no specific delegate, allowing any account to redeem inherited permissions.
+
+### Passkey
+
+A cryptographic key that can be used to sign transactions instead of a private key.
+
+### Paymaster
+
+A service that pays for user operations on behalf of a smart account.
+
+### Redelegation
+
+A delegation that passes on authority granted by a previous delegation.
+
+### Root delegation
+
+The first delegation in a chain, where an account delegates its own authority directly.
+
+### Signer
+
+An account that can sign transactions for a smart account.
+
+### User operation
+
+A pseudo-transaction object defined by ERC-4337 that describes what a smart account should execute. User operations are submitted to the alternate mempool managed by bundlers.
diff --git a/gator_versioned_docs/version-1.1.0/reference/smart-account.md b/gator_versioned_docs/version-1.7.0/reference/smart-account.md
similarity index 87%
rename from gator_versioned_docs/version-1.1.0/reference/smart-account.md
rename to gator_versioned_docs/version-1.7.0/reference/smart-account.md
index 1c231e8dfed..3e1d6724d40 100644
--- a/gator_versioned_docs/version-1.1.0/reference/smart-account.md
+++ b/gator_versioned_docs/version-1.7.0/reference/smart-account.md
@@ -7,6 +7,7 @@ keywords: [smart accounts, API, methods, reference]
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# MetaMask Smart Accounts API reference
@@ -270,6 +271,94 @@ export const smartAccount = await toMetaMaskSmartAccount({
+## `isDeployed`
+
+Checks whether the MetaMask smart account has been deployed on the current chain.
+
+### Example
+
+
+
+
+```ts
+import { smartAccount } from './config.ts'
+
+const isDeployed = await smartAccount.isDeployed()
+```
+
+
+
+
+```ts
+import { createPublicClient, http } from 'viem'
+import { sepolia as chain } from 'viem/chains'
+import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
+
+const publicClient = createPublicClient({
+ chain,
+ transport: http(),
+})
+
+export const smartAccount = await toMetaMaskSmartAccount({
+ client: publicClient,
+ implementation: Implementation.Hybrid,
+ address: '',
+})
+```
+
+
+
+
+## `isValid7702Implementation`
+
+Checks whether an EOA has
+been upgraded to MetaMask smart account using [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702).
+
+### Parameters
+
+| Name | Type | Required | Description |
+| ---------------- | ----------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------- |
+| `client` | `Client` | Yes | Viem Client used to read the account's bytecode. |
+| `accountAddress` | `Address` | Yes | The address to check for an EIP-7702 delegation. |
+| `environment` | [`SmartAccountsEnvironment`](./types.md#smartaccountsenvironment) | Yes | Environment to resolve `EIP7702StatelessDeleGatorImpl` smart account address for the current chain. |
+
+### Example
+
+
+
+
+```ts
+import { isValid7702Implementation } from '@metamask/smart-accounts-kit/actions'
+import { publicClient, environment, accountAddress } from './config.ts'
+
+const isUpgraded = await isValid7702Implementation({
+ client: publicClient,
+ accountAddress,
+ environment,
+})
+```
+
+
+
+
+```ts
+import { createPublicClient, http } from 'viem'
+import { sepolia as chain } from 'viem/chains'
+import { getSmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
+
+export const publicClient = createPublicClient({
+ chain,
+ transport: http(),
+})
+
+export const environment = getSmartAccountsEnvironment(chain.id)
+
+export const accountAddress = '0x7E48cA6b7fe6F3d57fdd0448B03b839958416fC1'
+```
+
+
+
+
## `signDelegation`
Signs the delegation and returns the delegation signature.
@@ -457,7 +546,7 @@ export const smartAccount = await toMetaMaskSmartAccount({
## `signUserOperation`
-Signs a user operation with the `MetaMaskSmartAccount` signer. The Delegation
+Signs a user operation with the `MetaMaskSmartAccount` signer. The Delegation
Toolkit uses Viem under the hood to provide this functionality.
### Parameters
@@ -522,7 +611,7 @@ Creates a `MetaMaskSmartAccount` instance.
| Name | Type | Required | Description |
| ----------------- | ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client` | `Client` | Yes | Viem Client to retrieve smart account data. |
-| `implementation` | `TImplementation` | Yes | Implementation type for the smart account. Can be Hybrid, Multisig, or Stateless7702. |
+| `implementation` | `TImplementation` | Yes | Implementation type for the smart account. Can be `Hybrid`, `Multisig`, or `Stateless7702`. |
| `signer` | `SignerConfigByImplementation ` | No | Signer for the smart account. Can be a Viem Account, Viem Wallet Client, or a WebAuthn Account. WebAuthn accounts are only supported for Hybrid implementations. If omitted, non-signing operations still work, but signing operations such as `signUserOperation`, `signDelegation`, `signMessage`, and `signTypedData` will throw an error. |
| `environment` | [`SmartAccountsEnvironment`](./types.md#smartaccountsenvironment) | No | Environment to resolve the smart contracts. |
| `deployParams` | `DeployParams` | Required if `address` is not provided | The parameters that will be used to deploy the smart account and generate its deterministic address. |
diff --git a/gator_versioned_docs/version-1.1.0/reference/types.md b/gator_versioned_docs/version-1.7.0/reference/types.md
similarity index 58%
rename from gator_versioned_docs/version-1.1.0/reference/types.md
rename to gator_versioned_docs/version-1.7.0/reference/types.md
index 37dfa7f70cf..c7986ead3d1 100644
--- a/gator_versioned_docs/version-1.1.0/reference/types.md
+++ b/gator_versioned_docs/version-1.7.0/reference/types.md
@@ -4,6 +4,8 @@ sidebar_label: Types
keywords: [types, delegation, smart accounts, reference, enums]
---
+import GlossaryTerm from '@theme/GlossaryTerm';
+
# Types
This page documents the TypeScript [enums](#enums) and [types](#types-1) used in Smart Accounts Kit APIs.
@@ -16,6 +18,7 @@ Enum representing the [caveat](delegation/caveats.md) type.
| Value | String |
| --------------------------------------------- | ------------------------------------ |
+| `CaveatType.ApprovalRevocation` | `"approvalRevocation"` |
| `CaveatType.AllowedCalldata` | `"allowedCalldata"` |
| `CaveatType.AllowedMethods` | `"allowedMethods"` |
| `CaveatType.AllowedTargets` | `"allowedTargets"` |
@@ -114,36 +117,61 @@ Defines an expected calldata segment for a single function signature.
Represents a restriction or condition applied to a delegation.
-| Name | Type | Required | Description |
-| ---------- | ----- | -------- | -------------------------------------------------------------------------- |
-| `enforcer` | `Hex` | Yes | The contract address of the enforcer. |
-| `terms` | `Hex` | Yes | The terms of the caveat encoded as hex data. |
-| `args` | `Hex` | Yes | Additional arguments required by the caveat enforcer, encoded as hex data. |
+| Name | Type | Required | Description |
+| ---------- | ----- | -------- | ------------------------------------------------------------------------------------------------ |
+| `enforcer` | `Hex` | Yes | The contract address of the caveat enforcer. |
+| `terms` | `Hex` | Yes | The terms of the caveat encoded as hex data. |
+| `args` | `Hex` | Yes | Additional arguments required by the caveat enforcer, encoded as hex data. |
### `CaveatBuilderConfig`
Optional configuration for [`createCaveatBuilder`](delegation/index.md#createcaveatbuilder).
-| Name | Type | Required | Description |
-| ------------------------------------- | --------- | -------- | ---------------------------------------------------------------------------------- |
-| `allowInsecureUnrestrictedDelegation` | `boolean` | No | Whether to allow unrestricted delegations with no caveats. The default is `false`. |
+| Name | Type | Required | Description |
+| ------------------------------------- | --------- | -------- | ----------------------------------------------------------------------------------------------------------------------------- |
+| `allowInsecureUnrestrictedDelegation` | `boolean` | No | Whether to allow unrestricted delegations with no caveats. The default is `false`. |
### `Delegation`
-Represents a delegation that grants permissions from a delegator to a delegate.
+Represents a delegation that grants permissions from a delegator to a delegate.
+
+| Name | Type | Required | Description |
+| ----------- | ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
+| `delegate` | `Hex` | Yes | The address to which the delegation is being granted. |
+| `delegator` | `Hex` | Yes | The address that is granting the delegation. |
+| `authority` | `Hex` | Yes | The parent delegation hash, or `ROOT_AUTHORITY` for creating root delegations. |
+| `caveats` | [`Caveat`](#caveat)`[]` | Yes | An array of [caveats](delegation/caveats.md) that constrain the delegation. |
+| `salt` | `Hex` | Yes | The salt for generating the delegation hash. This helps prevent hash collisions when creating identical delegations. |
+| `signature` | `Hex` | Yes | The signature to validate the delegation. |
+
+### `DelegationStruct`
+
+The onchain representation of a [`Delegation`](#delegation), used when ABI-encoding or interacting
+directly with the contracts.
+It has the same fields as `Delegation`, except `salt` is a `bigint` instead of a `Hex` string.
+
+| Name | Type | Required | Description |
+| ----------- | ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
+| `delegate` | `Hex` | Yes | The address to which the delegation is being granted. |
+| `delegator` | `Hex` | Yes | The address that is granting the delegation. |
+| `authority` | `Hex` | Yes | The parent delegation hash, or `ROOT_AUTHORITY` for creating root delegations. |
+| `caveats` | [`Caveat`](#caveat)`[]` | Yes | An array of [caveats](delegation/caveats.md) that constrain the delegation. |
+| `salt` | `bigint` | Yes | The salt for generating the delegation hash. This helps prevent hash collisions when creating identical delegations. |
+| `signature` | `Hex` | Yes | The signature to validate the delegation. |
-| Name | Type | Required | Description |
-| ----------- | ----------------------- | -------- | -------------------------------------------------------------------------------------------------------------------- |
-| `delegate` | `Hex` | Yes | The address to which the delegation is being granted. |
-| `delegator` | `Hex` | Yes | The address that is granting the delegation. |
-| `authority` | `Hex` | Yes | The parent delegation hash, or `ROOT_AUTHORITY` for creating root delegations. |
-| `caveats` | [`Caveat`](#caveat)`[]` | Yes | An array of [caveats](delegation/caveats.md) that constrain the delegation. |
-| `salt` | `Hex` | Yes | The salt for generating the delegation hash. This helps prevent hash collisions when creating identical delegations. |
-| `signature` | `Hex` | Yes | The signature to validate the delegation. |
+### `DecodedRevertReason`
+
+Represents a decoded revert reason from a error. Returned by [`decodeRevertData`](delegation/index.md#decoderevertdata) and [`decodeRevertReason`](delegation/index.md#decoderevertreason).
+
+| Name | Type | Required | Description |
+| ----------- | -------- | -------- | ---------------------------------- |
+| `errorName` | `string` | Yes | The name of the decoded error. |
+| `message` | `string` | Yes | The decoded revert reason message. |
+| `rawData` | `Hex` | Yes | The raw ABI-encoded revert data. |
### `ExactCalldataBuilderConfig`
-Defines the exact calldata the delegate is allowed to call.
+Defines the exact calldata the delegate is allowed to call.
| Name | Type | Required | Description |
| ---------- | ----- | -------- | --------------------------------------------------- |
@@ -151,7 +179,7 @@ Defines the exact calldata the delegate is allowed to call.
### `ExecutionStruct`
-Represents a single execution to perform on behalf of a delegator.
+Represents a single execution to perform on behalf of a delegator.
| Name | Type | Required | Description |
| ---------- | --------- | -------- | ------------------------------------------------------------------ |
@@ -169,7 +197,7 @@ The return type of [`getSupportedExecutionPermissions`](advanced-permissions/wal
### `PartialSignature`
-Represents a single signer's contribution to a multisig aggregated signature.
+Represents a single signer's contribution to a multisig aggregated signature.
| Name | Type | Required | Description |
| ----------- | --------------- | -------- | ------------------------------------------------------------------------------------- |
@@ -177,20 +205,29 @@ Represents a single signer's contribution to a multisig aggregated signature.
| `signature` | `Hex` | Yes | The signer's signature over the user operation. |
| `type` | `SignatureType` | Yes | The signature type to represent signature algorithm. Only supported value is `ECDSA`. |
+### `RedelegatePermissionContextReturnType`
+
+Return type of [`redelegatePermissionContext`](erc7710/wallet-client.md#redelegatepermissioncontext) and [`redelegatePermissionContextOpen`](erc7710/wallet-client.md#redelegatepermissioncontextopen).
+
+| Name | Type | Description |
+| ------------------- | --------------------------- | --------------------------------------------------------------- |
+| `delegation` | [`Delegation`](#delegation) | The signed redelegation object. |
+| `permissionContext` | `Hex` | ABI-encoded delegation chain with the new delegation prepended. |
+
### `PermissionResponse`
-Represents a granted Advanced Permission.
+Represents a granted Advanced Permission.
-| Name | Type | Required | Description |
-| ------------------- | ------------------------------------------ | -------- | ------------------------------------------------------------------------------------ |
-| `chainId` | `number` | Yes | The chain ID for which the permission was granted. |
-| `from` | `Address` | Yes | The account address that granted the permission. |
-| `to` | `Hex` | Yes | The account address that received the permission. |
-| `permission` | `PermissionTypes` | Yes | The granted [permission](advanced-permissions/permissions.md) details. |
-| `rules` | `Record[]` | No | The rules applied to the permission. For example, permission expiry. |
-| `context` | `Hex` | Yes | The permission context (encoded delegation list) used when redeeming the permission. |
-| `dependencies` | `{ factory: Address, factoryData: Hex }[]` | Yes | Factory dependencies for account deployment. |
-| `delegationManager` | `Address` | Yes | The address of the Delegation Manager contract for the permission. |
+| Name | Type | Required | Description |
+| ------------------- | ------------------------------------------ | -------- | ------------------------------------------------------------------------------------------ |
+| `chainId` | `number` | Yes | The chain ID for which the permission was granted. |
+| `from` | `Address` | Yes | The account address that granted the permission. |
+| `to` | `Hex` | Yes | The account address that received the permission. |
+| `permission` | `PermissionTypes` | Yes | The granted [permission](advanced-permissions/permissions.md) details. |
+| `rules` | `Record[]` | No | The rules applied to the permission. For example, permission expiry. |
+| `context` | `Hex` | Yes | The permission context (encoded delegation list) used when redeeming the permission. |
+| `dependencies` | `{ factory: Address, factoryData: Hex }[]` | Yes | Factory dependencies for account deployment. |
+| `delegationManager` | `Address` | Yes | The address of the contract for the permission. |
### `RequestExecutionPermissionsReturnType`
@@ -198,27 +235,60 @@ The return type of [`requestExecutionPermissions`](advanced-permissions/wallet-c
### `SmartAccountsEnvironment`
-An object containing the contract addresses required to interact with the Delegation Framework on a specific chain.
+An object containing the contract addresses required to interact with the on a specific chain.
-| Name | Type | Required | Description |
-| ------------------- | --------------------- | -------- | --------------------------------------------------------------------------------- |
-| `DelegationManager` | `Hex` | Yes | The address of the Delegation Manager contract. |
-| `EntryPoint` | `Hex` | Yes | The address of the ERC-4337 EntryPoint contract. |
-| `SimpleFactory` | `Hex` | Yes | The address of the factory contract for deploying MetaMask smart accounts. |
-| `implementations` | `Record` | Yes | A map of MetaMask smart account implementation types to their deployed addresses. |
-| `caveatEnforcers` | `Record` | Yes | A map of caveat enforcer types to their deployed addresses. |
+| Name | Type | Required | Description |
+| ------------------- | --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |
+| `DelegationManager` | `Hex` | Yes | The address of the contract. |
+| `EntryPoint` | `Hex` | Yes | The address of the ERC-4337 EntryPoint contract. |
+| `SimpleFactory` | `Hex` | Yes | The address of the factory contract for deploying MetaMask Smart Accounts. |
+| `implementations` | `Record` | Yes | A map of MetaMask smart account implementation types to their deployed addresses. |
+| `caveatEnforcers` | `Record` | Yes | A map of caveat enforcer types to their deployed addresses. |
### `SupportedPermissionInfo`
-Describes a supported Advanced Permission type. Used in [`GetSupportedExecutionPermissionsResult`](#getsupportedexecutionpermissionsresult).
+Describes a supported Advanced Permission type. Used in [`GetSupportedExecutionPermissionsResult`](#getsupportedexecutionpermissionsresult).
| Name | Type | Required | Description |
| ----------- | ---------- | -------- | --------------------------------------------------------------------------- |
| `chainIds` | `number[]` | Yes | The chain IDs on which the permission type is supported. |
| `ruleTypes` | `string[]` | Yes | The rule types supported for the permission type (for example, `"expiry"`). |
+### `MaybeDeferred`
+
+Represents a value that can be provided directly or derived at runtime from [`PaymentRequirements`](#paymentrequirements).
+
+```ts
+type MaybeDeferred =
+ | TResult
+ | ((requirements: PaymentRequirements) => Promise | TResult)
+```
+
+### `PaymentRequirements`
+
+Represents the payment requirements returned by an x402 server. [`createx402DelegationProvider`](x402.md#createx402delegationprovider) uses these values to scope and construct the delegation.
+
+| Name | Type | Required | Description |
+| ------------------- | ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------- |
+| `scheme` | `string` | Yes | The payment scheme identifier. |
+| `network` | `string` | Yes | The [CAIP](https://namespaces.chainagnostic.org/eip155/caip2) network identifier. For example, `eip155:8453`. |
+| `asset` | `string` | Yes | The token contract address for the payment asset. |
+| `amount` | `string` | Yes | The payment amount in the token's smallest unit. |
+| `payTo` | `string` | Yes | The recipient address for the payment. |
+| `maxTimeoutSeconds` | `number` | Yes | The maximum time in seconds before the payment expires. |
+| `extra` | `Record` | No | Additional context for x402, such as the asset transfer method. |
+
+### `RedeemersConfig`
+
+Configuration for the redeemer constraint used in [`createx402DelegationProvider`](x402.md#createx402delegationprovider).
+
+| Name | Type | Required | Description |
+| ------------------ | ---------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------- |
+| `requireRedeemers` | `boolean` | Yes | Whether at least one redeemer constraint must exist. |
+| `addresses` | [`MaybeDeferred`](#maybedeferred)`` | No | The addresses that are allowed to redeem the delegation. |
+
### `ValueLteBuilderConfig`
-| Name | Type | Required | Description |
-| ---------- | -------- | -------- | ------------------------------------------------------------------- |
-| `maxValue` | `bigint` | Yes | The maximum native token amount the delegate can transfer per call. |
+| Name | Type | Required | Description |
+| ---------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
+| `maxValue` | `bigint` | Yes | The maximum native token amount the delegate can transfer per call. |
diff --git a/gator_versioned_docs/version-1.7.0/reference/x402.md b/gator_versioned_docs/version-1.7.0/reference/x402.md
new file mode 100644
index 00000000000..9bc5b560f99
--- /dev/null
+++ b/gator_versioned_docs/version-1.7.0/reference/x402.md
@@ -0,0 +1,94 @@
+---
+description: Smart Accounts Kit x402 API methods reference.
+sidebar_label: x402
+toc_max_heading_level: 2
+keywords: [x402, delegation provider, experimental, API, methods, reference]
+---
+
+import GlossaryTerm from '@theme/GlossaryTerm';
+import Tabs from "@theme/Tabs";
+import TabItem from "@theme/TabItem";
+
+# x402 API reference
+
+The following API methods are related to x402 to create payments using delegation.
+
+## `createx402DelegationProvider`
+
+Creates a delegation provider function to be used with `x402Erc7710Client`.
+
+The provider creates an open delegation, signs it, and returns an ABI-encoded delegation
+chain as a hex string. The provider internally appends redeemer, payee, and expiry caveats when the
+existing caveats, or the root delegation doesn't have it.
+
+When both `redeemers.addresses` and `facilitatorAddresses` from the server's payment requirements
+are provided, the provider resolves redeemers as the intersection of the two lists.
+If only one is provided, that list is used. An error is thrown if the resolved list is empty.
+
+### Parameters
+
+| Name | Type | Required | Description |
+| ------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `account` | [`MaybeDeferred`](./types.md#maybedeferred)
`` | Yes | The Viem Account that signs the delegation. |
+| `environment` | [`MaybeDeferred`](./types.md#maybedeferred)
`<`[`SmartAccountsEnvironment`](./types.md#smartaccountsenvironment)`>` | No | Environment to resolve the smart contracts for the current chain. If omitted, resolved automatically from the chain ID in the payment requirements. |
+| `from` | [`MaybeDeferred`](./types.md#maybedeferred)
`` | No | The address that is granting the delegation. The default is `account`. |
+| `salt` | [`MaybeDeferred`](./types.md#maybedeferred)
`` | No | The salt for generating the delegation hash. The default is a random 32-byte value. |
+| `caveats` | [`MaybeDeferred`](./types.md#maybedeferred)
`` | No | Caveats that further refine the authority granted by the delegation. [`redeemer`](./delegation/caveats.md#redeemer), [`allowedTargets`](./delegation/caveats.md#allowedtargets), and [`timestamp`](./delegation/caveats.md#timestamp) caveats are auto-appended if not already present. |
+| `parentPermissionContext` | [`MaybeDeferred`](./types.md#maybedeferred)
`` | No | Parent chain as `Hex` or as decoded [`Delegation`](./types.md#delegation) values (leaf first). Use this when creating a redelegation. |
+| `expirySeconds` | [`MaybeDeferred`](./types.md#maybedeferred)
`` | No | Relative expiry in seconds. Adds a timestamp caveat if no tighter constraint exists. |
+| `redeemers` | [`MaybeDeferred`](./types.md#maybedeferred)
`<`[`RedeemersConfig`](./types.md#redeemersconfig)`>` | No | Constrains the addresses that are allowed to redeem the delegation. Use this to restrict redemption to specific facilitators. |
+
+### Example
+
+
+
+
+```ts
+import { privateKeyToAccount } from 'viem/accounts'
+import { createx402DelegationProvider } from '@metamask/smart-accounts-kit/experimental'
+import { x402Erc7710Client } from '@metamask/x402'
+
+const account = privateKeyToAccount(privateKey)
+
+const erc7710Client = new x402Erc7710Client({
+ delegationProvider: createx402DelegationProvider({
+ account,
+ }),
+})
+```
+
+
+
+
+```ts
+import { createx402DelegationProvider } from '@metamask/smart-accounts-kit/experimental'
+
+const parentPermissionContext = '0x...' // Previously stored/issued permission context.
+
+const delegationProvider = createx402DelegationProvider({
+ account,
+ parentPermissionContext,
+})
+```
+
+
+
+
+## `parseEip155ChainId`
+
+Parses an [EIP-155 CAIP](https://namespaces.chainagnostic.org/eip155/caip2) network identifier into a numeric chain ID.
+
+### Parameters
+
+| Name | Type | Required | Description |
+| --------- | -------- | -------- | --------------------------------------------------------- |
+| `network` | `string` | Yes | EIP-155 CAIP network identifier. For example, `eip155:1`. |
+
+### Example
+
+```ts
+import { parseEip155ChainId } from '@metamask/smart-accounts-kit/experimental'
+
+// Returns 137
+const chainId = parseEip155ChainId('eip155:137')
+```
diff --git a/gator_versioned_docs/version-1.0.0/troubleshooting/aa21-prefund.md b/gator_versioned_docs/version-1.7.0/troubleshooting/aa21-prefund.md
similarity index 83%
rename from gator_versioned_docs/version-1.0.0/troubleshooting/aa21-prefund.md
rename to gator_versioned_docs/version-1.7.0/troubleshooting/aa21-prefund.md
index e09ef092bbb..e3c23b91fb0 100644
--- a/gator_versioned_docs/version-1.0.0/troubleshooting/aa21-prefund.md
+++ b/gator_versioned_docs/version-1.7.0/troubleshooting/aa21-prefund.md
@@ -6,11 +6,12 @@ keywords: [AA21, pay prefund, user operation, troubleshooting]
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import GlossaryTerm from '@theme/GlossaryTerm';
# AA21 didn't pay prefund
-The `EntryPoint` contract reverts with `AA21 didn't pay prefund` when a smart account doesn't
-have enough native token balance to cover the gas cost of the user operation.
+The `EntryPoint` contract reverts with `AA21 didn't pay prefund` when a smart account doesn't
+have enough native token balance to cover the gas cost of the user operation.
Before executing a user operation, the `EntryPoint` requires the sender account to prefund the
expected gas cost. If the account's balance is lower than the required prefund, the `EntryPoint`
@@ -22,7 +23,7 @@ reverts the operation.
Fund the smart account with enough native tokens to cover the required prefund.
Use Viem's [`estimateUserOperationGas`](https://viem.sh/account-abstraction/actions/bundler/estimateUserOperationGas)
-to get the gas estimates from your bundler, then calculate the required prefund based on the
+to get the gas estimates from your bundler, then calculate the required prefund based on the
`EntryPoint` version.
@@ -94,5 +95,5 @@ if (balance < requiredPrefund) {
### Use a paymaster
-You can use a paymaster to sponsor the gas fees for the smart account, so the account doesn't
+You can use a paymaster to sponsor the gas fees for the smart account, so the account doesn't
need to hold native tokens. For more information about configuring a paymaster, see [Send a gasless transaction](../guides/smart-accounts/send-gasless-transaction.md).
diff --git a/gator_versioned_docs/version-1.1.0/troubleshooting/allowance-exceeded.md b/gator_versioned_docs/version-1.7.0/troubleshooting/allowance-exceeded.md
similarity index 100%
rename from gator_versioned_docs/version-1.1.0/troubleshooting/allowance-exceeded.md
rename to gator_versioned_docs/version-1.7.0/troubleshooting/allowance-exceeded.md
diff --git a/gator_versioned_docs/version-1.0.0/troubleshooting/error-codes.md b/gator_versioned_docs/version-1.7.0/troubleshooting/error-codes.md
similarity index 83%
rename from gator_versioned_docs/version-1.0.0/troubleshooting/error-codes.md
rename to gator_versioned_docs/version-1.7.0/troubleshooting/error-codes.md
index 58637dace23..48683db9cad 100644
--- a/gator_versioned_docs/version-1.0.0/troubleshooting/error-codes.md
+++ b/gator_versioned_docs/version-1.7.0/troubleshooting/error-codes.md
@@ -4,6 +4,8 @@ sidebar_label: Error codes
keywords: [error codes, errors, debug, error references, delegation framework]
---
+import GlossaryTerm from '@theme/GlossaryTerm';
+
# Error codes
The following tables describe error codes from the [MetaMask Delegation Framework contracts](https://github.com/metamask/delegation-framework). Use a decoder such as
@@ -11,25 +13,25 @@ The following tables describe error codes from the [MetaMask Delegation Framewor
## Delegation Manager error codes
-| Error code | Error name | Description |
-| ------------ | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
-| `0xb5863604` | `InvalidDelegate()` | The caller is not the delegate specified in the delegation. [Troubleshoot an invalid delegate.](./invalid-delegate.md) |
-| `0xb9f0f171` | `InvalidDelegator()` | The caller is not the delegator specificed in the delegation. [Troubleshoot an invalid delegator.](./invalid-delegator.md) |
-| `0x05baa052` | `CannotUseADisabledDelegation()` | The delegation has been disabled by the delegator. |
-| `0xded4370e` | `InvalidAuthority()` | The delegation chain authority validation failed. The authority hash of a child delegation does not match the hash of its parent delegation. |
-| `0x1bcaf69f` | `BatchDataLengthMismatch()` | The array lengths do not match in a batch `redeemDelegations` contract call. |
-| `0x005ecddb` | `AlreadyDisabled()` | The delegation has already been disabled. |
-| `0xf2a5f75a` | `AlreadyEnabled()` | The delegation is already enabled. |
-| `0xf645eedf` | `ECDSAInvalidSignature()` | Invalid ECDSA signature format. |
-| `0xfce698f7` | `ECDSAInvalidSignatureLength(uint256)` | The ECDSA signature length is incorrect. |
-| `0xac241e11` | `EmptySignature()` | The signature is empty. |
-| `0xd93c0665` | `EnforcedPause()` | The Delegation Manager contract is paused by the owner. |
-| `0x3db6791c` | `InvalidEOASignature()` | EOA signature verification failed. [Troubleshoot an invalid EOA signature.](./invalid-signature.md) |
-| `0x155ff427` | `InvalidERC1271Signature()` | Smart contract signature (ERC-1271) verification failed. |
-| `0x118cdaa7` | `OwnableUnauthorizedAccount(address)` | An unauthorized account attempted an owner only action. |
-| `0x1e4fbdf7` | `OwnableInvalidOwner(address)` | Invalid owner address in an ownership transfer. |
-| `0xf6b6ef5b` | `InvalidShortString()` | A string parameter is too short. |
-| `0xaa0ea2d8` | `StringTooLong(string)` | A string parameter exceeds the maximum length. |
+| Error code | Error name | Description |
+| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `0xb5863604` | `InvalidDelegate()` | The caller is not the delegate specified in the delegation. [Troubleshoot an invalid delegate.](./invalid-delegate.md) |
+| `0xb9f0f171` | `InvalidDelegator()` | The caller is not the delegator specified in the delegation. [Troubleshoot an invalid delegator.](./invalid-delegator.md) |
+| `0x05baa052` | `CannotUseADisabledDelegation()` | The delegation has been disabled by the delegator. |
+| `0xded4370e` | `InvalidAuthority()` | The delegation chain authority validation failed. The authority hash of a child delegation does not match the hash of its parent delegation. |
+| `0x1bcaf69f` | `BatchDataLengthMismatch()` | The array lengths do not match in a batch `redeemDelegations` contract call. |
+| `0x005ecddb` | `AlreadyDisabled()` | The delegation has already been disabled. |
+| `0xf2a5f75a` | `AlreadyEnabled()` | The delegation is already enabled. |
+| `0xf645eedf` | `ECDSAInvalidSignature()` | Invalid ECDSA signature format. |
+| `0xfce698f7` | `ECDSAInvalidSignatureLength(uint256)` | The ECDSA signature length is incorrect. |
+| `0xac241e11` | `EmptySignature()` | The signature is empty. |
+| `0xd93c0665` | `EnforcedPause()` | The contract is paused by the owner. |
+| `0x3db6791c` | `InvalidEOASignature()` | EOA signature verification failed. [Troubleshoot an invalid EOA signature.](./invalid-signature.md) |
+| `0x155ff427` | `InvalidERC1271Signature()` | Smart contract signature (ERC-1271) verification failed. |
+| `0x118cdaa7` | `OwnableUnauthorizedAccount(address)` | An unauthorized account attempted an owner only action. |
+| `0x1e4fbdf7` | `OwnableInvalidOwner(address)` | Invalid owner address in an ownership transfer. |
+| `0xf6b6ef5b` | `InvalidShortString()` | A string parameter is too short. |
+| `0xaa0ea2d8` | `StringTooLong(string)` | A string parameter exceeds the maximum length. |
## Smart account error codes
@@ -37,7 +39,7 @@ The following tables describe error codes from the [MetaMask Delegation Framewor
| ------------ | ----------------------------- | --------------------------------------------------------------------------- |
| `0xd663742a` | `NotEntryPoint()` | The caller is not the EntryPoint contract. |
| `0x0796d945` | `NotEntryPointOrSelf()` | The caller is neither the EntryPoint contract nor the smart account itself. |
-| `0x1a4b3a04` | `NotDelegationManager()` | The caller is not the DelegationManager contract. |
+| `0x1a4b3a04` | `NotDelegationManager()` | The caller is not the contract. |
| `0xb96fcfe4` | `UnsupportedCallType(bytes1)` | The execution call type is not supported. |
| `0x1187dc06` | `UnsupportedExecType(bytes1)` | The execution type is not supported. |
| `0x29c3b7ee` | `NotSelf()` | The caller is not the smart account itself. |
diff --git a/gator_versioned_docs/version-1.1.0/troubleshooting/invalid-delegate.md b/gator_versioned_docs/version-1.7.0/troubleshooting/invalid-delegate.md
similarity index 72%
rename from gator_versioned_docs/version-1.1.0/troubleshooting/invalid-delegate.md
rename to gator_versioned_docs/version-1.7.0/troubleshooting/invalid-delegate.md
index 2ef00244bfd..225169e6f42 100644
--- a/gator_versioned_docs/version-1.1.0/troubleshooting/invalid-delegate.md
+++ b/gator_versioned_docs/version-1.7.0/troubleshooting/invalid-delegate.md
@@ -5,26 +5,28 @@ toc_max_heading_level: 2
keywords: [InvalidDelegate, error code, delegation, troubleshooting]
---
+import GlossaryTerm from '@theme/GlossaryTerm';
+
# Invalid delegate
-The Delegation Manager reverts with `InvalidDelegate()` in the following two cases.
+The reverts with `InvalidDelegate()` in the following two cases.
## Account is not the delegate
-The account redeeming the delegation is not the delegate specified in the delegation.
+The account redeeming the delegation is not the delegate specified in the delegation.
The Delegation Manager checks that `msg.sender` matches the `delegate` field of
the delegation, unless it's an [open delegation](../reference/delegation/index.md#createopendelegation).
### Solution
Verify that the account redeeming the delegation matches the address in the
-delegation's `to` field. If the delegate is a smart account, send the user operation
+delegation's `to` field. If the delegate is a smart account, send the user operation
from that smart account.
## Broken redelegation chain
-When Delegation Manager validates a [redelegation chain](../guides/delegation/create-redelegation.md), each child delegation's `delegator`
-must match the parent delegation's `delegate`. If any link in the chain fails this check, the
+When Delegation Manager validates a [redelegation chain](../guides/delegation/create-redelegation.md), each child delegation's `delegator`
+must match the parent delegation's `delegate`. If any link in the chain fails this check, the
authority is invalid.
### Solution
diff --git a/gator_versioned_docs/version-1.0.0/troubleshooting/invalid-delegator.md b/gator_versioned_docs/version-1.7.0/troubleshooting/invalid-delegator.md
similarity index 73%
rename from gator_versioned_docs/version-1.0.0/troubleshooting/invalid-delegator.md
rename to gator_versioned_docs/version-1.7.0/troubleshooting/invalid-delegator.md
index 5a8661adfe2..ec3ab5cfac5 100644
--- a/gator_versioned_docs/version-1.0.0/troubleshooting/invalid-delegator.md
+++ b/gator_versioned_docs/version-1.7.0/troubleshooting/invalid-delegator.md
@@ -5,9 +5,11 @@ toc_max_heading_level: 2
keywords: [InvalidDelegator, error code, delegation, troubleshooting]
---
+import GlossaryTerm from '@theme/GlossaryTerm';
+
# Invalid delegator
-The Delegation Manager reverts with `InvalidDelegator()` when the caller is not the delegator
+The reverts with `InvalidDelegator()` when the caller is not the delegator
specified in the delegation.
This error is thrown by the `disableDelegation` and `enableDelegation` contract functions. Only the
@@ -16,7 +18,7 @@ or enable it.
## Solution
-Verify that you're sending the transaction from the delegator's account. If the delegator is a smart account, submit a user operation through the smart account.
+Verify that you're sending the transaction from the delegator's account. If the delegator is a smart account, submit a user operation through the smart account.
```typescript
import { DelegationManager } from '@metamask/smart-accounts-kit/contracts'
diff --git a/gator_versioned_docs/version-1.0.0/troubleshooting/invalid-signature.md b/gator_versioned_docs/version-1.7.0/troubleshooting/invalid-signature.md
similarity index 88%
rename from gator_versioned_docs/version-1.0.0/troubleshooting/invalid-signature.md
rename to gator_versioned_docs/version-1.7.0/troubleshooting/invalid-signature.md
index 0f3f32bfc05..24e85ed2f92 100644
--- a/gator_versioned_docs/version-1.0.0/troubleshooting/invalid-signature.md
+++ b/gator_versioned_docs/version-1.7.0/troubleshooting/invalid-signature.md
@@ -5,15 +5,17 @@ toc_max_heading_level: 2
keywords: [InvalidEOASignature, error code, delegation, troubleshooting, invalid EOA signature]
---
+import GlossaryTerm from '@theme/GlossaryTerm';
+
# Invalid EOA signature
-The Delegation Manager reverts with `InvalidEOASignature()` in the following cases.
+The reverts with `InvalidEOASignature()` in the following cases.
## Smart account is not deployed
-The [root delegation's](../concepts/delegation/overview.md#root-delegation) delegator must be a
-MetaMask smart account. The Delegation Manager checks the delegator code to determine
-whether it is an externally owned account (EOA) or a smart account.
+The [root delegation's](../concepts/delegation/overview.md#root-delegation) delegator must be a
+. The Delegation Manager checks the delegator code to determine
+whether it is an EOA or a smart account.
If the smart account is not deployed yet, its address has no contract code. The Delegation
Manager treats the address as an EOA and attempts ECDSA signature recovery. Because the
diff --git a/gator_versioned_docs/version-1.1.0/troubleshooting/user-operation-reverted.md b/gator_versioned_docs/version-1.7.0/troubleshooting/user-operation-reverted.md
similarity index 95%
rename from gator_versioned_docs/version-1.1.0/troubleshooting/user-operation-reverted.md
rename to gator_versioned_docs/version-1.7.0/troubleshooting/user-operation-reverted.md
index 133bdb0c2cd..5f4a5dc5a9c 100644
--- a/gator_versioned_docs/version-1.1.0/troubleshooting/user-operation-reverted.md
+++ b/gator_versioned_docs/version-1.7.0/troubleshooting/user-operation-reverted.md
@@ -5,9 +5,11 @@ toc_max_heading_level: 2
keywords: [user operation, reverted, reason 0x, empty revert, execution, troubleshooting]
---
+import GlossaryTerm from '@theme/GlossaryTerm';
+
# User operation reverted
-A user operation reverts with reason `0x` when validation succeeds, but execution fails without a
+A user operation reverts with reason `0x` when validation succeeds, but execution fails without a
revert reason. This differs from AA-coded `EntryPoint` contract errors such as `AA23`, `AA25`,
or `AA21`.
diff --git a/gator_versioned_sidebars/version-1.1.0-sidebars.json b/gator_versioned_sidebars/version-1.1.0-sidebars.json
deleted file mode 100644
index 23527099f86..00000000000
--- a/gator_versioned_sidebars/version-1.1.0-sidebars.json
+++ /dev/null
@@ -1,240 +0,0 @@
-{
- "gatorSidebar": [
- {
- "type": "doc",
- "label": "Introduction",
- "id": "index"
- },
- {
- "type": "category",
- "label": "Get started",
- "collapsed": false,
- "items": [
- "get-started/install",
- {
- "type": "category",
- "label": "Smart account quickstart",
- "collapsed": true,
- "link": {
- "type": "doc",
- "id": "get-started/smart-account-quickstart/index"
- },
- "items": ["get-started/smart-account-quickstart/eip7702"]
- },
- "get-started/use-the-cli",
- "get-started/use-with-openclaw",
- {
- "type": "category",
- "label": "Use Scaffold-ETH 2",
- "collapsed": true,
- "items": [
- "get-started/use-scaffold-eth/smart-accounts",
- "get-started/use-scaffold-eth/advanced-permissions"
- ]
- },
- {
- "type": "link",
- "label": "LLM context",
- "href": "https://docs.metamask.io/llms-smart-accounts-kit-full.txt"
- },
- "get-started/supported-networks",
- "get-started/supported-advanced-permissions"
- ]
- },
- {
- "type": "category",
- "label": "Guides",
- "collapsed": false,
- "items": [
- "guides/configure-toolkit",
- {
- "type": "category",
- "label": "MetaMask Smart Accounts",
- "collapsed": true,
- "items": [
- "guides/smart-accounts/create-smart-account",
- "guides/smart-accounts/deploy-smart-account",
- "guides/smart-accounts/send-user-operation",
- "guides/smart-accounts/send-gasless-transaction",
- "guides/smart-accounts/generate-multisig-signature",
- {
- "type": "category",
- "label": "Configure signers",
- "link": {
- "type": "doc",
- "id": "guides/smart-accounts/signers/index"
- },
- "collapsed": true,
- "items": [
- "guides/smart-accounts/signers/dynamic",
- "guides/smart-accounts/signers/embedded-wallets",
- "guides/smart-accounts/signers/eoa-wallets",
- "guides/smart-accounts/signers/passkey",
- "guides/smart-accounts/signers/privy"
- ]
- }
- ]
- },
- {
- "type": "category",
- "label": "Delegation",
- "collapsed": true,
- "key": "delegation-guides",
- "items": [
- "guides/delegation/execute-on-smart-accounts-behalf",
- {
- "type": "category",
- "label": "Use delegation scopes",
- "collapsed": true,
- "link": {
- "type": "doc",
- "id": "guides/delegation/use-delegation-scopes/index"
- },
- "items": [
- "guides/delegation/use-delegation-scopes/spending-limit",
- "guides/delegation/use-delegation-scopes/function-call",
- "guides/delegation/use-delegation-scopes/ownership-transfer",
- "guides/delegation/use-delegation-scopes/constrain-scope"
- ]
- },
- "guides/delegation/create-redelegation",
- "guides/delegation/check-delegation-state",
- "guides/delegation/disable-delegation"
- ]
- },
- {
- "type": "category",
- "label": "Advanced Permissions (ERC-7715)",
- "collapsed": true,
- "key": "advanced-permissions-guides",
- "items": [
- "guides/advanced-permissions/execute-on-metamask-users-behalf",
- {
- "type": "category",
- "label": "Use permissions",
- "collapsed": true,
- "items": [
- "guides/advanced-permissions/use-permissions/erc20-token",
- "guides/advanced-permissions/use-permissions/native-token"
- ]
- },
- "guides/advanced-permissions/get-supported-permissions",
- "guides/advanced-permissions/get-granted-permissions",
- "guides/advanced-permissions/create-redelegation"
- ]
- }
- ]
- },
- {
- "type": "category",
- "label": "Concepts",
- "collapsed": true,
- "items": [
- "concepts/smart-accounts",
- {
- "type": "category",
- "label": "Delegation",
- "collapsed": true,
- "key": "delegation-concepts",
- "link": {
- "type": "doc",
- "id": "concepts/delegation/overview"
- },
- "items": [
- "concepts/delegation/delegation-scopes",
- "concepts/delegation/delegation-manager",
- "concepts/delegation/caveat-enforcers"
- ]
- },
- "concepts/advanced-permissions"
- ]
- },
- {
- "type": "category",
- "label": "Tutorials",
- "collapsed": true,
- "items": [
- {
- "type": "link",
- "label": "Use an ERC-20 paymaster",
- "href": "/tutorials/use-erc20-paymaster"
- },
- {
- "type": "link",
- "label": "Use a passkey as a backup signer",
- "href": "/tutorials/use-passkey-as-backup-signer"
- },
- {
- "type": "link",
- "label": "Create a custom caveat enforcer",
- "href": "/tutorials/create-custom-caveat-enforcer"
- },
- {
- "type": "link",
- "label": "Create a social invite link",
- "href": "/tutorials/create-invite-link"
- }
- ]
- },
- {
- "type": "category",
- "label": "Reference",
- "collapsed": true,
- "items": [
- "reference/smart-account",
- "reference/types",
- {
- "type": "category",
- "label": "Delegation",
- "collapsed": true,
- "link": {
- "type": "doc",
- "id": "reference/delegation/index"
- },
- "key": "delegation-reference",
- "items": [
- "reference/delegation/delegation-scopes",
- "reference/delegation/caveats",
- "reference/delegation/caveat-enforcer-client"
- ]
- },
- {
- "type": "category",
- "label": "Advanced Permissions (ERC-7715)",
- "collapsed": true,
- "key": "advanced-permissions-reference",
- "items": [
- "reference/advanced-permissions/permissions",
- "reference/advanced-permissions/wallet-client"
- ]
- },
- {
- "type": "category",
- "label": "ERC-7710",
- "collapsed": true,
- "items": ["reference/erc7710/wallet-client", "reference/erc7710/bundler-client"]
- }
- ]
- },
- {
- "type": "category",
- "label": "Troubleshooting",
- "collapsed": true,
- "items": [
- "troubleshooting/aa21-prefund",
- "troubleshooting/allowance-exceeded",
- "troubleshooting/error-codes",
- "troubleshooting/invalid-delegate",
- "troubleshooting/invalid-delegator",
- "troubleshooting/invalid-signature",
- "troubleshooting/user-operation-reverted"
- ]
- },
- {
- "type": "category",
- "label": "Changelog",
- "collapsed": false,
- "items": ["changelog/1.1.0", "changelog/1.0.0"]
- }
- ]
-}
diff --git a/gator_versioned_sidebars/version-1.2.0-sidebars.json b/gator_versioned_sidebars/version-1.2.0-sidebars.json
index dfe16c710d8..27724d1835d 100644
--- a/gator_versioned_sidebars/version-1.2.0-sidebars.json
+++ b/gator_versioned_sidebars/version-1.2.0-sidebars.json
@@ -239,7 +239,7 @@
"type": "category",
"label": "Changelog",
"collapsed": false,
- "items": ["changelog/1.2.0", "changelog/1.1.0", "changelog/1.0.0"]
+ "items": ["changelog/1.2.0"]
}
]
}
diff --git a/gator_versioned_sidebars/version-1.5.0-sidebars.json b/gator_versioned_sidebars/version-1.5.0-sidebars.json
index fe09ccc15f0..fa67aadfedf 100644
--- a/gator_versioned_sidebars/version-1.5.0-sidebars.json
+++ b/gator_versioned_sidebars/version-1.5.0-sidebars.json
@@ -247,7 +247,7 @@
"type": "category",
"label": "Changelog",
"collapsed": false,
- "items": ["changelog/1.5.0", "changelog/1.2.0", "changelog/1.1.0", "changelog/1.0.0"]
+ "items": ["changelog/1.5.0", "changelog/1.2.0"]
}
]
}
diff --git a/gator_versioned_sidebars/version-1.6.0-sidebars.json b/gator_versioned_sidebars/version-1.6.0-sidebars.json
index 187fc4591d4..d4bc99b003d 100644
--- a/gator_versioned_sidebars/version-1.6.0-sidebars.json
+++ b/gator_versioned_sidebars/version-1.6.0-sidebars.json
@@ -250,13 +250,7 @@
"type": "category",
"label": "Changelog",
"collapsed": false,
- "items": [
- "changelog/1.6.0",
- "changelog/1.5.0",
- "changelog/1.2.0",
- "changelog/1.1.0",
- "changelog/1.0.0"
- ]
+ "items": ["changelog/1.6.0", "changelog/1.5.0", "changelog/1.2.0"]
}
]
}
diff --git a/gator_versioned_sidebars/version-1.0.0-sidebars.json b/gator_versioned_sidebars/version-1.7.0-sidebars.json
similarity index 84%
rename from gator_versioned_sidebars/version-1.0.0-sidebars.json
rename to gator_versioned_sidebars/version-1.7.0-sidebars.json
index dab908778bf..f4c60ab2963 100644
--- a/gator_versioned_sidebars/version-1.0.0-sidebars.json
+++ b/gator_versioned_sidebars/version-1.7.0-sidebars.json
@@ -22,7 +22,7 @@
"items": ["get-started/smart-account-quickstart/eip7702"]
},
"get-started/use-the-cli",
- "get-started/use-with-openclaw",
+ "get-started/use-skills",
{
"type": "category",
"label": "Use Scaffold-ETH 2",
@@ -32,11 +32,6 @@
"get-started/use-scaffold-eth/advanced-permissions"
]
},
- {
- "type": "link",
- "label": "LLM context",
- "href": "https://docs.metamask.io/llms-smart-accounts-kit-full.txt"
- },
"get-started/supported-networks",
"get-started/supported-advanced-permissions"
]
@@ -66,8 +61,8 @@
},
"collapsed": true,
"items": [
- "guides/smart-accounts/signers/dynamic",
"guides/smart-accounts/signers/embedded-wallets",
+ "guides/smart-accounts/signers/dynamic",
"guides/smart-accounts/signers/eoa-wallets",
"guides/smart-accounts/signers/passkey",
"guides/smart-accounts/signers/privy"
@@ -109,19 +104,35 @@
"key": "advanced-permissions-guides",
"items": [
"guides/advanced-permissions/execute-on-metamask-users-behalf",
+ "guides/advanced-permissions/get-supported-permissions",
{
"type": "category",
"label": "Use permissions",
"collapsed": true,
"items": [
"guides/advanced-permissions/use-permissions/erc20-token",
- "guides/advanced-permissions/use-permissions/native-token"
+ "guides/advanced-permissions/use-permissions/native-token",
+ "guides/advanced-permissions/use-permissions/approval-revocation"
]
},
- "guides/advanced-permissions/get-supported-permissions",
"guides/advanced-permissions/get-granted-permissions",
"guides/advanced-permissions/create-redelegation"
]
+ },
+ {
+ "type": "category",
+ "label": "x402",
+ "collapsed": true,
+ "key": "x402-guides",
+ "items": [
+ "guides/x402/overview",
+ "guides/x402/seller",
+ {
+ "type": "category",
+ "label": "Buyer",
+ "items": ["guides/x402/buyer/delegations", "guides/x402/buyer/recurring-payments"]
+ }
+ ]
}
]
},
@@ -136,14 +147,11 @@
"label": "Delegation",
"collapsed": true,
"key": "delegation-concepts",
- "link": {
- "type": "doc",
- "id": "concepts/delegation/overview"
- },
"items": [
- "concepts/delegation/delegation-scopes",
+ "concepts/delegation/overview",
"concepts/delegation/delegation-manager",
- "concepts/delegation/caveat-enforcers"
+ "concepts/delegation/caveat-enforcers",
+ "concepts/delegation/delegation-scopes"
]
},
"concepts/advanced-permissions"
@@ -182,7 +190,6 @@
"collapsed": true,
"items": [
"reference/smart-account",
- "reference/types",
{
"type": "category",
"label": "Delegation",
@@ -205,6 +212,7 @@
"key": "advanced-permissions-reference",
"items": [
"reference/advanced-permissions/permissions",
+ "reference/advanced-permissions/rules",
"reference/advanced-permissions/wallet-client"
]
},
@@ -212,7 +220,15 @@
"type": "category",
"label": "ERC-7710",
"collapsed": true,
- "items": ["reference/erc7710/wallet-client", "reference/erc7710/bundler-client"]
+ "key": "erc-7710-reference",
+ "items": ["reference/erc7710/bundler-client", "reference/erc7710/wallet-client"]
+ },
+ "reference/x402",
+ "reference/types",
+ {
+ "type": "doc",
+ "id": "reference/glossary",
+ "label": "Glossary"
}
]
},
@@ -223,18 +239,18 @@
"items": [
"troubleshooting/aa21-prefund",
"troubleshooting/allowance-exceeded",
- "troubleshooting/error-codes",
"troubleshooting/invalid-delegate",
"troubleshooting/invalid-delegator",
"troubleshooting/invalid-signature",
- "troubleshooting/user-operation-reverted"
+ "troubleshooting/user-operation-reverted",
+ "troubleshooting/error-codes"
]
},
{
"type": "category",
"label": "Changelog",
"collapsed": false,
- "items": ["changelog/1.0.0"]
+ "items": ["changelog/1.7.0", "changelog/1.6.0", "changelog/1.5.0", "changelog/1.2.0"]
}
]
}
diff --git a/gator_versions.json b/gator_versions.json
index a13bf8b93f2..46b296f7bd6 100644
--- a/gator_versions.json
+++ b/gator_versions.json
@@ -1 +1 @@
-["1.6.0", "1.5.0", "1.2.0", "1.1.0", "1.0.0"]
+["1.7.0", "1.6.0", "1.5.0", "1.2.0"]
diff --git a/smart-accounts-kit/get-started/supported-networks.md b/smart-accounts-kit/get-started/supported-networks.md
index 7a9d307b917..06cb6d663af 100644
--- a/smart-accounts-kit/get-started/supported-networks.md
+++ b/smart-accounts-kit/get-started/supported-networks.md
@@ -13,63 +13,63 @@ If you don't see the network you're looking for, you can request support by emai
### Mainnet networks
-| Network Name | v0.3.0 | v1.0.0 | v1.1.0 | v1.2.0 |
+| Network Name | v1.2.0 | v1.5.0 | v1.6.0 | v1.7.0 |
| ------------------- | ------ | ------ | ------ | ------ |
| Arbitrum Nova | ✅ | ✅ | ✅ | ✅ |
| Arbitrum One | ✅ | ✅ | ✅ | ✅ |
| Base | ✅ | ✅ | ✅ | ✅ |
| Berachain | ✅ | ✅ | ✅ | ✅ |
| Binance Smart Chain | ✅ | ✅ | ✅ | ✅ |
-| Celo | ❌ | ✅ | ✅ | ✅ |
-| Citrea | ❌ | ✅ | ✅ | ✅ |
+| Celo | ✅ | ✅ | ✅ | ✅ |
+| Citrea | ✅ | ✅ | ✅ | ✅ |
| Ethereum | ✅ | ✅ | ✅ | ✅ |
| Gnosis Chain | ✅ | ✅ | ✅ | ✅ |
| Ink | ✅ | ✅ | ✅ | ✅ |
-| Katana | ❌ | ❌ | ❌ | ✅ |
+| Katana | ✅ | ✅ | ✅ | ✅ |
| Linea | ✅ | ✅ | ✅ | ✅ |
-| Mantle | ❌ | ❌ | ✅ | ✅ |
-| MegaETH | ❌ | ✅ | ✅ | ✅ |
+| Mantle | ✅ | ✅ | ✅ | ✅ |
+| MegaETH | ✅ | ✅ | ✅ | ✅ |
| Monad | ✅ | ✅ | ✅ | ✅ |
| Optimism | ✅ | ✅ | ✅ | ✅ |
| Polygon | ✅ | ✅ | ✅ | ✅ |
-| Ronin | ❌ | ✅ | ✅ | ✅ |
+| Ronin | ✅ | ✅ | ✅ | ✅ |
| Sei | ✅ | ✅ | ✅ | ✅ |
| Sonic | ✅ | ✅ | ✅ | ✅ |
-| Tempo | ❌ | ✅ | ✅ | ✅ |
+| Tempo | ✅ | ✅ | ✅ | ✅ |
| Unichain | ✅ | ✅ | ✅ | ✅ |
### Testnet networks
-| Network Name | v0.3.0 | v1.0.0 | v1.1.0 | v1.2.0 |
+| Network Name | v1.2.0 | v1.5.0 | v1.6.0 | v1.7.0 |
| ------------------- | ------ | ------ | ------ | ------ |
| Arbitrum Sepolia | ✅ | ✅ | ✅ | ✅ |
| Base Sepolia | ✅ | ✅ | ✅ | ✅ |
| Berachain Bepolia | ✅ | ✅ | ✅ | ✅ |
| Binance Smart Chain | ✅ | ✅ | ✅ | ✅ |
-| Celo Alfajores | ❌ | ✅ | ✅ | ✅ |
+| Celo Alfajores | ✅ | ✅ | ✅ | ✅ |
| Citrea | ✅ | ✅ | ✅ | ✅ |
| Ethereum Sepolia | ✅ | ✅ | ✅ | ✅ |
| Gnosis Chiado | ✅ | ✅ | ✅ | ✅ |
| Hoodi | ✅ | ✅ | ✅ | ✅ |
| Ink Sepolia | ✅ | ✅ | ✅ | ✅ |
-| Bokuto | ❌ | ❌ | ❌ | ✅ |
+| Bokuto | ✅ | ✅ | ✅ | ✅ |
| Linea Sepolia | ✅ | ✅ | ✅ | ✅ |
-| Mantle Sepolia | ❌ | ❌ | ✅ | ✅ |
+| Mantle Sepolia | ✅ | ✅ | ✅ | ✅ |
| MegaETH | ✅ | ✅ | ✅ | ✅ |
| Monad | ✅ | ✅ | ✅ | ✅ |
| Optimism Sepolia | ✅ | ✅ | ✅ | ✅ |
| Polygon Amoy | ✅ | ✅ | ✅ | ✅ |
-| Ronin Saigon | ❌ | ✅ | ✅ | ✅ |
+| Ronin Saigon | ✅ | ✅ | ✅ | ✅ |
| Sei | ✅ | ✅ | ✅ | ✅ |
| Sonic | ✅ | ✅ | ✅ | ✅ |
-| Tempo Moderato | ❌ | ✅ | ✅ | ✅ |
+| Tempo Moderato | ✅ | ✅ | ✅ | ✅ |
| Unichain Sepolia | ✅ | ✅ | ✅ | ✅ |
## Advanced Permissions (ERC-7715)
### Mainnet networks
-| Network Name | v0.3.0 | v1.0.0 | v1.1.0 | v1.2.0 |
+| Network Name | v1.2.0 | v1.5.0 | v1.6.0 | v1.7.0 |
| ------------------- | ------ | ------ | ------ | ------ |
| Arbitrum Nova | ✅ | ✅ | ✅ | ✅ |
| Arbitrum One | ✅ | ✅ | ✅ | ✅ |
@@ -89,7 +89,7 @@ If you don't see the network you're looking for, you can request support by emai
### Testnet networks
-| Network Name | v0.3.0 | v1.0.0 | v1.1.0 | v1.2.0 |
+| Network Name | v1.2.0 | v1.5.0 | v1.6.0 | v1.7.0 |
| ------------------- | ------ | ------ | ------ | ------ |
| Arbitrum Sepolia | ✅ | ✅ | ✅ | ✅ |
| Base Sepolia | ✅ | ✅ | ✅ | ✅ |
diff --git a/smart-accounts-kit/reference/x402.md b/smart-accounts-kit/reference/x402.md
index 86ee062b62e..9bc5b560f99 100644
--- a/smart-accounts-kit/reference/x402.md
+++ b/smart-accounts-kit/reference/x402.md
@@ -15,12 +15,16 @@ The following API methods are related to x402 to create payments using open delegation, signs it, and returns an ABI-encoded delegation
+The provider creates an open delegation, signs it, and returns an ABI-encoded delegation
chain as a hex string. The provider internally appends redeemer, payee, and expiry caveats when the
existing caveats, or the root delegation doesn't have it.
+When both `redeemers.addresses` and `facilitatorAddresses` from the server's payment requirements
+are provided, the provider resolves redeemers as the intersection of the two lists.
+If only one is provided, that list is used. An error is thrown if the resolved list is empty.
+
### Parameters
| Name | Type | Required | Description |