From bef9cd0c7832ad30b559177cde630dcf1f23b85a Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Wed, 2 Jul 2025 12:32:25 -0700 Subject: [PATCH 1/7] "MetaMask Smart Accounts" rebranding --- delegation-toolkit/concepts/delegation.md | 2 +- delegation-toolkit/concepts/environment.md | 4 +- delegation-toolkit/concepts/smart-accounts.md | 49 +++++++++---------- .../erc-7710-redeem-delegations.md | 12 ++--- .../erc-7715-request-permissions.md | 4 +- .../get-started/eip7702-quickstart.md | 10 ++-- delegation-toolkit/get-started/install.md | 6 +-- delegation-toolkit/how-to/configure.md | 2 +- .../how-to/create-delegation/index.md | 6 +-- .../configure-accounts-signers.md | 38 +++++++------- .../how-to/create-smart-account/index.md | 14 +++--- .../how-to/generate-multisig-signature.md | 6 +-- .../how-to/redeem-delegation.md | 12 ++--- .../how-to/send-user-operation.md | 4 +- delegation-toolkit/index.md | 30 +++++------- .../reference/api/delegation.md | 2 +- .../api/experimental-actions/wallet-client.md | 2 +- .../reference/api/smart-account.md | 22 ++++----- docs/whats-new.md | 6 +++ src/components/NavDropdown/EmbedMetaMask.html | 2 +- src/components/ProductBanner/index.tsx | 2 +- src/pages/index.tsx | 6 +-- .../send-batch-transactions.md | 12 ++--- 23 files changed, 125 insertions(+), 128 deletions(-) diff --git a/delegation-toolkit/concepts/delegation.md b/delegation-toolkit/concepts/delegation.md index e7176eff491..3a8186bda4a 100644 --- a/delegation-toolkit/concepts/delegation.md +++ b/delegation-toolkit/concepts/delegation.md @@ -5,7 +5,7 @@ sidebar_position: 2 # Delegation -*Delegation* is the ability for a [smart account](smart-accounts.md) to grant permission to another smart account +*Delegation* is the ability for a [Smart Account](smart-accounts.md) to grant permission to another Smart Account or externally owned account (EOA) to perform specific executions on their behalf, under defined rules and restrictions. The account that grants the permission is called the *delegator account*, while the account that receives the permission is called the *delegate account*. diff --git a/delegation-toolkit/concepts/environment.md b/delegation-toolkit/concepts/environment.md index f835c8a2fe7..017852cb100 100644 --- a/delegation-toolkit/concepts/environment.md +++ b/delegation-toolkit/concepts/environment.md @@ -18,7 +18,7 @@ The delegator environment serves several key purposes: ## Resolve the delegator environment -When you create a [MetaMask smart account](smart-accounts.md), the Delegation Toolkit automatically +When you create a [MetaMask Smart Account](smart-accounts.md), the Delegation 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. @@ -70,7 +70,7 @@ See the changelog of the toolkit version you are using (in the left sidebar) for ::: Alternatively, you can use the [`getDelegatorEnvironment`](../reference/api/delegation.md#getdelegatorenvironment) function to resolve the environment. -This function is especially useful if your delegator is not a smart account when +This function is especially useful if your delegator is not a Smart Account when [creating a redelegation](../how-to/create-delegation/index.md#create-a-redelegation). ```typescript diff --git a/delegation-toolkit/concepts/smart-accounts.md b/delegation-toolkit/concepts/smart-accounts.md index 396e68ca41c..e2405521fdc 100644 --- a/delegation-toolkit/concepts/smart-accounts.md +++ b/delegation-toolkit/concepts/smart-accounts.md @@ -1,30 +1,29 @@ --- -description: Learn about MetaMask smart accounts. +description: Learn about MetaMask Smart Accounts. sidebar_position: 1 --- -# Smart accounts +# MetaMask Smart Accounts -The MetaMask Delegation Toolkit enables you to create and manage MetaMask *smart accounts*. -Smart accounts are [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) smart contract accounts +The MetaMask Delegation Toolkit enables you to create and manage MetaMask Smart Accounts. +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. +Unlike traditional wallets, which rely on private keys for every transaction, MetaMask Smart Accounts use smart contracts to govern account logic. -Smart accounts are referenced in the toolkit as `MetaMaskSmartAccount`. +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 accounts containing arbitrary verification logic. +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. + 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, @@ -34,42 +33,42 @@ ERC-4337 introduces the following concepts: 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. + into Smart Accounts to facilitate gas abstraction. -## Smart account implementation types +## Smart Account implementation types -The MetaMask Delegation Toolkit supports three types of smart accounts, each offering unique features and use cases. +The MetaMask Delegation Toolkit supports three types of Smart Accounts, each offering unique features and use cases. See [Configure accounts and signers](../how-to/create-smart-account/configure-accounts-signers.md) to learn how to use these different account types. -### Hybrid smart account +### Hybrid Smart Account -The Hybrid smart account is a flexible implementation that supports both an externally owned account (EOA) "owner" and any number of P256 (passkey) signers. -You can configure any of these signers as the signatory, and use them to sign any data, including user operations, on behalf of the smart account. +The Hybrid Smart Account is a flexible implementation that supports both an externally owned account (EOA) "owner" and any number of P256 (passkey) signers. +You can configure any of these signers as the signatory, 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 +### Multisig Smart Account -The Multisig smart account is an implementation that supports multiple signers with a configurable threshold for valid signatures, allowing for enhanced security and flexibility in account management. +The Multisig Smart Account is an implementation that supports multiple signers with a configurable threshold for valid signatures, allowing for enhanced security and flexibility in account management. The signatory must have at least as many signers include as the threshold is configured for the account. This type is referenced in the toolkit as `Implementation.Multisig`. -### Stateless 7702 smart account +### 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. +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 +## Smart Account flow -The MetaMask smart account flow is as follows: +The MetaMask Smart Account flow is as follows: -1. **Account setup** - A user creates a smart account by deploying a smart contract, and initializing it with +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: + 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. @@ -91,6 +90,6 @@ The MetaMask smart account flow is as follows: ## Delegator accounts -Delegator accounts are a type of smart account that allows users to grant permission to other smart accounts or EOAs +Delegator accounts are a type of 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.md). diff --git a/delegation-toolkit/experimental/erc-7710-redeem-delegations.md b/delegation-toolkit/experimental/erc-7710-redeem-delegations.md index 4426092bce7..155762738c8 100644 --- a/delegation-toolkit/experimental/erc-7710-redeem-delegations.md +++ b/delegation-toolkit/experimental/erc-7710-redeem-delegations.md @@ -12,8 +12,8 @@ import TabItem from "@theme/TabItem"; This is an experimental feature and may change in future releases. ::: -[ERC-7710](https://eip.tools/eip/7710) introduces a standard way for smart accounts to delegate capabilities to other -smart accounts or externally owned accounts (EOAs). +[ERC-7710](https://eip.tools/eip/7710) introduces a standard way for Smart Accounts to delegate capabilities to other +Smart Accounts or externally owned accounts (EOAs). The MetaMask Delegation Toolkit provides two experimental functions, `erc7710BundlerActions()` and `erc7710WalletActions()`, that let a caller redeem delegations granted by MetaMask's permissions system. @@ -57,7 +57,7 @@ const permissionsResponse = [{ const permissionsContext = permissionsResponse[0].context; const delegationManager = permissionsResponse[0].signerMeta.delegationManager; -// accountMeta is only present when the smart account is not deployed. +// accountMeta is only present when the Smart Account is not deployed. const accountMetadata = permissionsResponse[0].accountMeta; ``` @@ -80,11 +80,11 @@ If you redeem delegations in any other way, it is your responsibility to validat ## Redeem the permission -Redeem a delegation with a [smart account](#redeem-with-a-smart-account) or an [externally owned account (EOA)](#redeem-with-an-eoa). +Redeem a delegation with a [Smart Account](#redeem-with-a-smart-account) or an [externally owned account (EOA)](#redeem-with-an-eoa). -### Redeem with a smart account +### Redeem with a Smart Account -To redeem a delegation with a smart account, create a [`MetaMaskSmartAccount`](../how-to/create-smart-account/index.md#create-a-metamasksmartaccount) +To redeem a delegation with a Smart Account, create a [`MetaMaskSmartAccount`](../how-to/create-smart-account/index.md#create-a-metamasksmartaccount) and a [Viem Bundler Client](https://viem.sh/account-abstraction/clients/bundler). After setting up your Bundler Client, you can extend its functionality with `erc7710BundlerActions` actions to support ERC-7710. Once extended, use [`sendUserOperationWithDelegation`](../reference/api/experimental-actions/bundler-client.md#senduseroperationwithdelegation) to redeem the permission. diff --git a/delegation-toolkit/experimental/erc-7715-request-permissions.md b/delegation-toolkit/experimental/erc-7715-request-permissions.md index a740cee3d22..0fde8591598 100644 --- a/delegation-toolkit/experimental/erc-7715-request-permissions.md +++ b/delegation-toolkit/experimental/erc-7715-request-permissions.md @@ -21,8 +21,8 @@ The MetaMask Delegation Toolkit provides the experimental actions for ERC-7715 t ## Request permissions To request permissions, extend your [Viem Wallet Client](https://viem.sh/docs/clients/wallet) with `erc7715ProviderActions` actions. -You'll need a session account to request the permission, which can be either a smart account or an externally owned account (EOA). -This example uses a smart account: +You'll need a session account to request the permission, which can be either a Smart Account or an externally owned account (EOA). +This example uses a Smart Account: diff --git a/delegation-toolkit/get-started/eip7702-quickstart.md b/delegation-toolkit/get-started/eip7702-quickstart.md index afbea286448..6298bef7b25 100644 --- a/delegation-toolkit/get-started/eip7702-quickstart.md +++ b/delegation-toolkit/get-started/eip7702-quickstart.md @@ -1,12 +1,12 @@ --- -description: Upgrade an externally owned account (EOA) to a smart account +description: Upgrade an externally owned account (EOA) to a Smart Account sidebar_position: 3 sidebar_label: EIP-7702 quickstart --- # EIP-7702 quickstart -This page demonstrates how to upgrade your externally owned account (EOA) to support MetaMask smart account +This page demonstrates how to upgrade your externally owned account (EOA) to support MetaMask Smart Account 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 [ERC-7710 delegation capabilities](./../concepts/delegation.md). @@ -73,7 +73,7 @@ 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. +provides a lightweight and secure way to upgrade an EOA to a Smart Account. ```typescript import { @@ -108,9 +108,9 @@ const hash = await walletClient.sendTransaction({ }); ``` -### 6. Create a MetaMask smart account +### 6. Create a MetaMask Smart Account -Create a smart account instance for the EOA and start +Create a Smart Account instance for the EOA and start leveraging the benefits of account abstraction. ```ts diff --git a/delegation-toolkit/get-started/install.md b/delegation-toolkit/get-started/install.md index 41fde2e67a2..25f84fa5695 100644 --- a/delegation-toolkit/get-started/install.md +++ b/delegation-toolkit/get-started/install.md @@ -9,7 +9,7 @@ import TabItem from "@theme/TabItem"; # Install and set up the Delegation Toolkit -This page provides instructions to install and set up the MetaMask Delegation Toolkit. +This page provides instructions to install and set up the MetaMask Delegation Toolkit, enabling you to integrate [Smart Accounts](../concepts/smart-accounts.md) into your dapp. ## Prerequisites @@ -44,5 +44,5 @@ Add `@metamask/delegation-framework/=lib/metamask/delegation-framework/` in your ### 3. Get started -You're now ready to start using the MetaMask Delegation Toolkit. -Check out the [Delegation Toolkit quickstart](quickstart.md) to walk through a simple example. +You're now ready to start using the Delegation Toolkit and MetaMask Smart Accounts. +Check out the [quickstart](quickstart.md) to walk through a simple example. diff --git a/delegation-toolkit/how-to/configure.md b/delegation-toolkit/how-to/configure.md index 9b2dc2910ff..2711627e9ea 100644 --- a/delegation-toolkit/how-to/configure.md +++ b/delegation-toolkit/how-to/configure.md @@ -6,7 +6,7 @@ sidebar_label: Configure the toolkit # Configure the Delegation Toolkit -The MetaMask Delegation Toolkit enables you to easily integrate [smart accounts](../concepts/smart-accounts.md) into your dapp, +The MetaMask Delegation Toolkit enables you to easily integrate [Smart Accounts](../concepts/smart-accounts.md) into your dapp, enabling a more flexible, secure, and frictionless experience for your users. The toolkit is highly configurable, allowing you to tailor it to your project's specific needs. It includes support for custom signers, multiple signatory schemes, custom paymasters and bundlers, and more. diff --git a/delegation-toolkit/how-to/create-delegation/index.md b/delegation-toolkit/how-to/create-delegation/index.md index 9d90e97caa7..32d1775879f 100644 --- a/delegation-toolkit/how-to/create-delegation/index.md +++ b/delegation-toolkit/how-to/create-delegation/index.md @@ -28,7 +28,7 @@ Learn how to [restrict a delegation](./restrict-delegation.md) using caveat enfo - [Install and set up the Delegation Toolkit.](../../get-started/install.md) - [Configure the Delegation Toolkit.](../configure.md) -- [Create a smart account.](../create-smart-account/index.md) +- [Create a Smart Account.](../create-smart-account/index.md) ## Create a root delegation @@ -44,7 +44,7 @@ import { createDelegation } from "@metamask/delegation-toolkit"; import { delegatorSmartAccount } from "./config.ts"; // The address to which the delegation is granted. It can be an EOA address, or -// smart account address. +// Smart Account address. const delegate = "0x2FcB88EC2359fA635566E66415D31dD381CF5585"; const delegation = createDelegation({ @@ -298,7 +298,7 @@ import { createDelegation } from "@metamask/delegation-toolkit"; import { delegatorSmartAccount } from "./config.ts"; // The address to which the delegation is granted. It can be an EOA address, or -// smart account address. +// Smart Account address. const delegate = "0x2FcB88EC2359fA635566E66415D31dD381CF5585"; const delegation = createDelegation({ diff --git a/delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md b/delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md index 88fa20f88a4..0d6f25bb107 100644 --- a/delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md +++ b/delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md @@ -7,9 +7,9 @@ sidebar_position: 1 import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -# Configure smart accounts and signers +# Configure Smart Accounts and signers -The MetaMask Delegation Toolkit supports different [smart account types](../../concepts/smart-accounts.md#smart-account-implementation-types), +The MetaMask Delegation Toolkit supports different [Smart Account types](../../concepts/smart-accounts.md#smart-account-implementation-types), each with its own configuration and support for different signing mechanisms. You can create flexible and secure delegator accounts tailored to your specific needs. @@ -17,27 +17,27 @@ You can create flexible and secure delegator accounts tailored to your specific - [Install and set up the Delegation Toolkit.](../../get-started/install.md) - [Configure the Delegation Toolkit.](../configure.md) -- [Create a smart account.](index.md) +- [Create a Smart Account.](index.md) -## Configure a Hybrid smart account +## Configure a Hybrid Smart Account -The [Hybrid smart account](../../concepts/smart-accounts.md#hybrid-smart-account) supports both an EOA "owner" and any number of P256 (passkey) signers. +The [Hybrid Smart Account](../../concepts/smart-accounts.md#hybrid-smart-account) supports both an EOA "owner" and any number of P256 (passkey) signers. -To configure a Hybrid smart account, provide the following parameters: +To configure a Hybrid Smart Account, provide the following parameters: - `owner`: The owner's account address as a hex string. The owner can be the zero address, indicating that there is no owner configured. - `p256KeyIds`: An array of key identifiers for P256 signers as hex strings. - `p256XValues`: An array of public key x-values for P256 signers as `bigint`s. - `p256YValues`: An array of public key y-values for P256 signers as `bigint`s. -- `signatory`: A signer that will sign on behalf of the smart account. +- `signatory`: A signer that will sign on behalf of the Smart Account. :::note You can set all `p256` parameters to empty arrays to configure no WebAuthn signer. However, we recommend configuring at least one signer for account recoverability. ::: -For a Hybrid smart account, you can configure the following types of signatories: +For a Hybrid Smart Account, you can configure the following types of signatories: ### Configure an account signatory @@ -232,19 +232,19 @@ export const webAuthnAccount = toWebAuthnAccount({ credential }); -## Configure a Multisig smart account +## Configure a Multisig Smart Account -The [Multisig smart account](../../concepts/smart-accounts.md#multisig-smart-account) supports multiple EOA signers with a configurable threshold for execution. +The [Multisig Smart Account](../../concepts/smart-accounts.md#multisig-smart-account) supports multiple EOA signers with a configurable threshold for execution. -To configure a Multisig smart account, provide the following parameters: +To configure a Multisig Smart Account, provide the following parameters: - `signers`: An array of EOA signer addresses as hex strings. - `threshold`: The number of signers required to execute a transaction, as a `bigint`. -- `signatory`: A signer that will sign on behalf of the smart account. +- `signatory`: A signer that will sign on behalf of the Smart Account. ### Configure signatories -For a Multisig smart account, you can use a combination of account signatories and Wallet Client signatories. +For a Multisig Smart Account, you can use a combination of account signatories and Wallet Client signatories. For example: @@ -316,17 +316,17 @@ export const walletClient = createWalletClient({ The number of signers in the signatories must be at least equal to the threshold for valid signature generation. ::: -## Configure a Stateless 7702 smart account +## Configure a Stateless 7702 Smart Account -The [Stateless 7702 smart account](../../concepts/smart-accounts.md#stateless-7702-smart-account) represents an EOA that has been upgraded to support smart account +The [Stateless 7702 Smart Account](../../concepts/smart-accounts.md#stateless-7702-smart-account) represents an EOA that has been upgraded to support Smart Account functionality as defined by [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702). This implementation does not handle the upgrade process; see the [EIP-7702 quickstart](./../../get-started/eip7702-quickstart.md) to learn how to upgrade. -To configure a Stateless 7702 smart account, provide the following parameters: +To configure a Stateless 7702 Smart Account, provide the following parameters: -- `address`: The address of the EOA that has been upgraded to a smart account. -- `signatory`: A signer that will sign on behalf of the smart account. +- `address`: The address of the EOA that has been upgraded to a Smart Account. +- `signatory`: A signer that will sign on behalf of the Smart Account. -For a Stateless 7702 smart account, you can configure the following types of signatories: +For a Stateless 7702 Smart Account, you can configure the following types of signatories: ### Configure an account signatory diff --git a/delegation-toolkit/how-to/create-smart-account/index.md b/delegation-toolkit/how-to/create-smart-account/index.md index 1a6934956f3..b7b090493e4 100644 --- a/delegation-toolkit/how-to/create-smart-account/index.md +++ b/delegation-toolkit/how-to/create-smart-account/index.md @@ -6,10 +6,10 @@ sidebar_position: 2 import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -# Create a smart account +# Create a Smart Account The MetaMask Delegation Toolkit is embedded, meaning that the end user can instantly interact with a dapp without wallet authorization, confirmations, or corporate logos. -Enable users to create a [smart account](../../concepts/smart-accounts.md) directly in your dapp. +Enable users to create a [Smart Account](../../concepts/smart-accounts.md) directly in your dapp. ## Prerequisites @@ -18,12 +18,12 @@ Enable users to create a [smart account](../../concepts/smart-accounts.md) direc ## Create a `MetaMaskSmartAccount` -The following is an example of creating a smart account using Viem Core SDK. +The following is an example of creating a Smart Account using Viem Core SDK. Viem Core SDK provides low-level interfaces to offer flexibility and control over the smart account creation lifecycle. In the example, the Viem [`privateKeyToAccount`](https://viem.sh/docs/accounts/privateKey.html) -function creates an externally owned account as the owner of the smart account. +function creates an externally owned account as the owner of the Smart Account. @@ -71,12 +71,12 @@ export const owner = privateKeyToAccount(privateKey); This example creates the `MetaMaskSmartAccount`, which can perform several functions: -- In conjunction with [Viem Account Abstraction clients](../configure.md), deploy the smart account +- In conjunction with [Viem Account Abstraction clients](../configure.md), deploy the Smart Account and [send user operations](../send-user-operation.md). - [Sign delegations](../create-delegation/index.md) that can be used to grant specific rights and permissions to other accounts. Smart accounts that sign delegations are called *delegator accounts*. :::note -The example above uses a Hybrid smart account, which is configurable to have an EOA "owner" and any number of P256 (passkey) signers. -You can also [configure other smart account types](configure-accounts-signers.md). +The example above uses a Hybrid Smart Account, which is configurable to have an EOA "owner" and any number of P256 (passkey) signers. +You can also [configure other Smart Account types](configure-accounts-signers.md). ::: diff --git a/delegation-toolkit/how-to/generate-multisig-signature.md b/delegation-toolkit/how-to/generate-multisig-signature.md index 73fc72022c3..3f97ee51777 100644 --- a/delegation-toolkit/how-to/generate-multisig-signature.md +++ b/delegation-toolkit/how-to/generate-multisig-signature.md @@ -8,7 +8,7 @@ import TabItem from "@theme/TabItem"; # Generate a multisig signature -The MetaMask Delegation Toolkit supports [Multisig smart accounts](../concepts/smart-accounts.md#multisig-smart-account), +The MetaMask Delegation Toolkit supports [Multisig Smart Accounts](../concepts/smart-accounts.md#multisig-smart-account), allowing you to add multiple externally owned account (EOA) signers with a configurable execution threshold. When the threshold is greater than 1, you can collect signatures from the required signers @@ -19,11 +19,11 @@ into a single aggregated signature. - [Install and set up the Delegation Toolkit.](../get-started/install.md) - [Configure the Delegation Toolkit.](configure.md) -- [Create a Multisig smart account.](create-smart-account/configure-accounts-signers.md#configure-a-multisig-smart-account) +- [Create a Multisig Smart Account.](create-smart-account/configure-accounts-signers.md#configure-a-multisig-smart-account) ## Generate a multisig signature -The following example configures a Multisig smart account with two different signers: Alice +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. diff --git a/delegation-toolkit/how-to/redeem-delegation.md b/delegation-toolkit/how-to/redeem-delegation.md index 5682c2adcba..1495f40f187 100644 --- a/delegation-toolkit/how-to/redeem-delegation.md +++ b/delegation-toolkit/how-to/redeem-delegation.md @@ -10,7 +10,7 @@ import TabItem from "@theme/TabItem"; # Redeem a delegation A delegate can redeem a delegation by submitting either a user operation or a regular transaction, -depending on whether the delegate is a smart account or externally owned account (EOA). +depending on whether the delegate is a Smart Account or externally owned account (EOA). The redeem transaction is sent to the `DelegationManager` contract, which validates the delegation and executes actions on the delegator's behalf. To prepare the calldata for the redeem transaction, use the [`redeemDelegation`](../reference/api/delegation.md#redeemdelegation) utility function. @@ -20,17 +20,17 @@ The function supports batch redemption, allowing multiple delegations to be proc - [Install and set up the Delegation Toolkit.](../get-started/install.md) - [Configure the Delegation Toolkit.](configure.md) -- [Create a delegator smart account.](create-smart-account/index.md) +- [Create a delegator Smart Account.](create-smart-account/index.md) - [Create a delegation.](create-delegation/index.md) ## Redeem a delegation -Redeem a delegation with a [smart account](#redeem-with-a-smart-account) or an [externally owned account (EOA)](#redeem-with-an-eoa). +Redeem a delegation with a [Smart Account](#redeem-with-a-smart-account) or an [externally owned account (EOA)](#redeem-with-an-eoa). -### Redeem with a smart account +### Redeem with a Smart Account The following example demonstrates how to submit a user operation to redeem a delegation. -It assumes you have a delegation signed by the delegator, and that the delegate is a smart account. +It assumes you have a delegation signed by the delegator, and that the delegate is a Smart Account. @@ -199,7 +199,7 @@ export const delegateWalletClient = createWalletClient({ You can redeem multiple delegations in a single user operation, each delegation independent of the others. Each element in the `delegationsArray` must have a corresponding element in the `executionsArray` and `modes`. -The following example assumes you already have multiple signed delegations and that the delegate is a smart account. +The following example assumes you already have multiple signed delegations and that the delegate is a Smart Account. The preparation of the calldata is the same when [using an EOA as the delegate](#redeem-with-an-eoa); the primary difference is that an EOA submits a regular transaction instead of a user operation. diff --git a/delegation-toolkit/how-to/send-user-operation.md b/delegation-toolkit/how-to/send-user-operation.md index 343580b956e..2aab044f210 100644 --- a/delegation-toolkit/how-to/send-user-operation.md +++ b/delegation-toolkit/how-to/send-user-operation.md @@ -20,14 +20,14 @@ Instead, they are sent to a bundler, which validates, optimizes, and aggregates 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 smart contract account that has not been deployed, the toolkit configures the user operation to automatically deploy the account. +If a user operation is sent from a Smart Account that has not been deployed, the toolkit configures the user operation to automatically deploy the account. ::: ## Prerequisites - [Install and set up the Delegation Toolkit.](../get-started/install.md) - [Configure the Delegation Toolkit.](configure.md) -- [Create a smart account.](create-smart-account/index.md) +- [Create a Smart Account.](create-smart-account/index.md) ## Send a user operation diff --git a/delegation-toolkit/index.md b/delegation-toolkit/index.md index 257fd9bde56..dd7a91601bf 100644 --- a/delegation-toolkit/index.md +++ b/delegation-toolkit/index.md @@ -1,37 +1,29 @@ --- title: Delegation Toolkit introduction sidebar_label: Introduction -description: High-level overview of the Delegation Toolkit, its benefits, and where to start in the documentation. +description: High-level overview of MetaMask Smart Accounts and the Delegation Toolkit. sidebar_position: 1 --- import CardList from "@site/src/components/CardList" -# Embed smart accounts using the Delegation Toolkit +# Embed Smart Accounts using the Delegation Toolkit -The MetaMask Delegation Toolkit is a [Viem](https://viem.sh/)-based collection of tools for integrating -embedded smart contract wallets, known as [MetaMask smart accounts](concepts/smart-accounts.md), -into dapps. Developers can create and manage MetaMask smart accounts that delegate specific -permissions, such as spending limits or time-based access, to other accounts. +The MetaMask Delegation Toolkit is a [Viem](https://viem.sh/)-based collection of tools for 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. -At the core of the toolkit is the [Delegation Framework](concepts/delegation.md#delegation-framework), a -set of open-source, audited smart contracts that manage the delegation lifecycle. - -Permissions are enforced through [caveats](concepts/caveat-enforcers.md), which are rule-based -constraints that define the conditions of a delegation. The toolkit includes -[built-in caveat enforcers](reference/caveats.md) for common -use cases. It also supports [custom caveat enforcers](how-to/create-delegation/create-custom-caveat-enforcer.md) -for advanced scenarios. +The toolkit's [Delegation Framework](concepts/delegation.md#delegation-framework) extends MetaMask Smart Accounts with secure, rule-based permission sharing. +Use [caveat enforcers](concepts/caveat-enforcers.md) to define exactly how, when, and by whom a Smart Account can be used, enabling use cases like spending limits and time-based access. ## Why use the toolkit? -The toolkit enables developers to create frictionless new experiences based on granular permission -sharing and trust. The toolkit offers a suite of contracts, libraries, and services designed for +The toolkit enables developers to create frictionless new experiences based on programmable account behavior and granular permission +sharing. The toolkit offers a suite of contracts, libraries, and services designed for maximum composability, allowing developers to build and extend their dapps with ease. The toolkit enables: -- **Instant user onboarding.** Provide frictionless onboarding with no browser extension, mobile +- **Instant user onboarding.** Instantly onboard users with embedded Smart Accounts — no browser extension, mobile app, or seed phrase required. - **New web3 experiences.** Unlock new experiences such as peer-to-peer social @@ -54,8 +46,8 @@ Check out the following guides to get started with the MetaMask Delegation Toolk }, { href: "get-started/quickstart", - title: "Delegation quickstart", - description: "Create a delegator account and complete the delegation lifecycle.", + title: "Quickstart", + description: "Create a MetaMask Smart Account and send a user operation.", } ]} /> diff --git a/delegation-toolkit/reference/api/delegation.md b/delegation-toolkit/reference/api/delegation.md index 75a57640294..9fef34e024b 100644 --- a/delegation-toolkit/reference/api/delegation.md +++ b/delegation-toolkit/reference/api/delegation.md @@ -404,7 +404,7 @@ export const walletClient = createWalletClient({ }); // The address to which the delegation is granted. It can be an EOA address, or -// smart account address. +// Smart Account address. const delegate = "0x2FcB88EC2359fA635566E66415D31dD381CF5585"; export const delegation = createDelegation({ diff --git a/delegation-toolkit/reference/api/experimental-actions/wallet-client.md b/delegation-toolkit/reference/api/experimental-actions/wallet-client.md index 4a9efdde672..520dc82b955 100644 --- a/delegation-toolkit/reference/api/experimental-actions/wallet-client.md +++ b/delegation-toolkit/reference/api/experimental-actions/wallet-client.md @@ -44,7 +44,7 @@ const expiry = Math.floor(Date.now() / 1000 + 604_800); // 1 week from now. const currentTime = Math.floor(Date.now() / 1000); // now // Address of the wallet that will manage the session. It can -// be either a smart account or an externally owned account (EOA) +// be either a Smart Account or an externally owned account (EOA) const sessionAccount = "0x1431.."; const grantedPermissions = await walletClient.grantPermissions([{ diff --git a/delegation-toolkit/reference/api/smart-account.md b/delegation-toolkit/reference/api/smart-account.md index 52471c35766..557e8c15c7a 100644 --- a/delegation-toolkit/reference/api/smart-account.md +++ b/delegation-toolkit/reference/api/smart-account.md @@ -1,6 +1,6 @@ --- -description: Smart account-related API methods reference. -sidebar_label: Smart account +description: Smart Account-related API methods reference. +sidebar_label: Smart Account sidebar_position: 2 toc_max_heading_level: 2 --- @@ -8,9 +8,9 @@ toc_max_heading_level: 2 import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -# Smart account API reference +# Smart Account API reference -The following API methods are related to creating, managing, and signing with [smart accounts](../../concepts/smart-accounts.md). +The following API methods are related to creating, managing, and signing with [Smart Accounts](../../concepts/smart-accounts.md). ## `aggregateSignature` @@ -137,7 +137,7 @@ import { createDelegation } from "@metamask/delegation-toolkit"; import { delegatorSmartAccount } from "./config.ts"; // The address to which the delegation is granted. It can be an EOA address, or -// smart account address. +// Smart Account address. const delegate = "0x2FcB88EC2359fA635566E66415D31dD381CF5585"; const delegation = createDelegation({ @@ -371,13 +371,13 @@ 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. | -| `signatory` | `SignatoryConfigByImplementation ` | Yes | Signers for the smart account. Can be a Viem Account, Viem Wallet Client, or a WebAuthnAccount. Web3AuthnAccounts are only supported for Hybrid implementations. | +| `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. | +| `signatory` | `SignatoryConfigByImplementation ` | Yes | Signers for the Smart Account. Can be a Viem Account, Viem Wallet Client, or a WebAuthnAccount. Web3AuthnAccounts are only supported for Hybrid implementations. | | `environment` | `DeleGatorEnvironment` | 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. | +| `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 example diff --git a/docs/whats-new.md b/docs/whats-new.md index f7a719899ed..80aabddb3a9 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -9,6 +9,12 @@ The latest major MetaMask documentation updates are listed by the month they wer For a comprehensive list of recent product changes, visit the "Release Notes" section at the bottom of the [MetaMask developer page](https://metamask.io/developer/). + +## July 2025 + +- Added a [MetaMask Smart Account quickstart](/delegation-toolkit/development/quickstart). + ([#2132](https://github.com/MetaMask/metamask-docs/pull/2132)) + ## June 2025 - Updated the [docs homepage](/), added descriptive dropdowns the top navigation bar, and diff --git a/src/components/NavDropdown/EmbedMetaMask.html b/src/components/NavDropdown/EmbedMetaMask.html index 9fa69d0253b..a3115126a66 100644 --- a/src/components/NavDropdown/EmbedMetaMask.html +++ b/src/components/NavDropdown/EmbedMetaMask.html @@ -10,7 +10,7 @@

Delegation Toolkit

-

Embed MetaMask smart accounts into your dapp, enabling new user experiences.

+

Embed MetaMask Smart Accounts into your dapp, enabling new user experiences.

diff --git a/src/components/ProductBanner/index.tsx b/src/components/ProductBanner/index.tsx index 999f7c9bdd2..cb0026714cd 100644 --- a/src/components/ProductBanner/index.tsx +++ b/src/components/ProductBanner/index.tsx @@ -20,7 +20,7 @@ const PRODUCT_CONFIGS: Record = { }, '/delegation-toolkit/': { name: 'Delegation Toolkit documentation', - description: 'Embed MetaMask smart accounts into your dapp, enabling new user experiences.', + description: 'Embed MetaMask Smart Accounts into your dapp, enabling new user experiences.', }, '/snaps/': { name: 'Snaps documentation', diff --git a/src/pages/index.tsx b/src/pages/index.tsx index c097b46a7a8..69f5dd47cfb 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -19,7 +19,7 @@ export default function Home(): JSX.Element { icon: 'arrow-right', }} /> - + Date: Thu, 3 Jul 2025 13:32:13 -0700 Subject: [PATCH 2/7] follow new rebrand guidelines --- delegation-toolkit/concepts/delegation.md | 2 +- delegation-toolkit/concepts/environment.md | 4 +- delegation-toolkit/concepts/smart-accounts.md | 40 +++++++++--------- .../erc-7710-redeem-delegations.md | 12 +++--- .../erc-7715-request-permissions.md | 4 +- .../get-started/eip7702-quickstart.md | 10 ++--- delegation-toolkit/get-started/install.md | 2 +- delegation-toolkit/how-to/configure.md | 2 +- .../how-to/create-delegation/index.md | 6 +-- .../configure-accounts-signers.md | 42 +++++++++---------- .../how-to/create-smart-account/index.md | 16 +++---- .../how-to/generate-multisig-signature.md | 6 +-- .../how-to/redeem-delegation.md | 12 +++--- .../how-to/send-user-operation.md | 4 +- delegation-toolkit/index.md | 10 ++--- .../reference/api/delegation.md | 2 +- .../api/experimental-actions/wallet-client.md | 2 +- .../reference/api/smart-account.md | 22 +++++----- docs/whats-new.md | 2 +- src/pages/index.tsx | 4 +- .../send-batch-transactions.md | 10 ++--- 21 files changed, 107 insertions(+), 107 deletions(-) diff --git a/delegation-toolkit/concepts/delegation.md b/delegation-toolkit/concepts/delegation.md index 3a8186bda4a..71e8cd9b6a6 100644 --- a/delegation-toolkit/concepts/delegation.md +++ b/delegation-toolkit/concepts/delegation.md @@ -5,7 +5,7 @@ sidebar_position: 2 # Delegation -*Delegation* is the ability for a [Smart Account](smart-accounts.md) to grant permission to another Smart Account +*Delegation* is the ability for a [MetaMask smart account](smart-accounts.md) to grant permission to another smart account or externally owned account (EOA) to perform specific executions on their behalf, under defined rules and restrictions. The account that grants the permission is called the *delegator account*, while the account that receives the permission is called the *delegate account*. diff --git a/delegation-toolkit/concepts/environment.md b/delegation-toolkit/concepts/environment.md index 017852cb100..f835c8a2fe7 100644 --- a/delegation-toolkit/concepts/environment.md +++ b/delegation-toolkit/concepts/environment.md @@ -18,7 +18,7 @@ The delegator environment serves several key purposes: ## Resolve the delegator environment -When you create a [MetaMask Smart Account](smart-accounts.md), the Delegation Toolkit automatically +When you create a [MetaMask smart account](smart-accounts.md), the Delegation 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. @@ -70,7 +70,7 @@ See the changelog of the toolkit version you are using (in the left sidebar) for ::: Alternatively, you can use the [`getDelegatorEnvironment`](../reference/api/delegation.md#getdelegatorenvironment) function to resolve the environment. -This function is especially useful if your delegator is not a Smart Account when +This function is especially useful if your delegator is not a smart account when [creating a redelegation](../how-to/create-delegation/index.md#create-a-redelegation). ```typescript diff --git a/delegation-toolkit/concepts/smart-accounts.md b/delegation-toolkit/concepts/smart-accounts.md index e2405521fdc..3cfc7bad7fc 100644 --- a/delegation-toolkit/concepts/smart-accounts.md +++ b/delegation-toolkit/concepts/smart-accounts.md @@ -6,12 +6,12 @@ sidebar_position: 1 # MetaMask Smart Accounts The MetaMask Delegation Toolkit enables you to create and manage MetaMask Smart Accounts. -Smart Accounts are [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) smart contract 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. +Unlike traditional wallets, which rely on private keys for every transaction, smart accounts use smart contracts to govern account logic. -Smart Accounts are referenced in the toolkit as `MetaMaskSmartAccount`. +Smart accounts are referenced in the toolkit as `MetaMaskSmartAccount`. ## Account abstraction (ERC-4337) @@ -23,7 +23,7 @@ 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. + 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, @@ -33,42 +33,42 @@ ERC-4337 introduces the following concepts: 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. + into smart accounts to facilitate gas abstraction. -## Smart Account implementation types +## Smart account implementation types -The MetaMask Delegation Toolkit supports three types of Smart Accounts, each offering unique features and use cases. +The MetaMask Delegation Toolkit supports three types of MetaMask Smart Accounts, each offering unique features and use cases. See [Configure accounts and signers](../how-to/create-smart-account/configure-accounts-signers.md) to learn how to use these different account types. -### Hybrid Smart Account +### Hybrid smart account -The Hybrid Smart Account is a flexible implementation that supports both an externally owned account (EOA) "owner" and any number of P256 (passkey) signers. -You can configure any of these signers as the signatory, and use them to sign any data, including user operations, on behalf of the Smart Account. +The Hybrid smart account is a flexible implementation that supports both an externally owned account (EOA) "owner" and any number of P256 (passkey) signers. +You can configure any of these signers as the signatory, 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 +### Multisig smart account -The Multisig Smart Account is an implementation that supports multiple signers with a configurable threshold for valid signatures, allowing for enhanced security and flexibility in account management. +The Multisig smart account is an implementation that supports multiple signers with a configurable threshold for valid signatures, allowing for enhanced security and flexibility in account management. The signatory must have at least as many signers include as the threshold is configured for the account. This type is referenced in the toolkit as `Implementation.Multisig`. -### Stateless 7702 Smart Account +### 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. +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 +## Smart account flow -The MetaMask Smart Account flow is as follows: +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 +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: + 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. @@ -90,6 +90,6 @@ The MetaMask Smart Account flow is as follows: ## Delegator accounts -Delegator accounts are a type of Smart Account that allows users to grant permission to other Smart Accounts or EOAs +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.md). diff --git a/delegation-toolkit/experimental/erc-7710-redeem-delegations.md b/delegation-toolkit/experimental/erc-7710-redeem-delegations.md index 155762738c8..1747929db51 100644 --- a/delegation-toolkit/experimental/erc-7710-redeem-delegations.md +++ b/delegation-toolkit/experimental/erc-7710-redeem-delegations.md @@ -12,8 +12,8 @@ import TabItem from "@theme/TabItem"; This is an experimental feature and may change in future releases. ::: -[ERC-7710](https://eip.tools/eip/7710) introduces a standard way for Smart Accounts to delegate capabilities to other -Smart Accounts or externally owned accounts (EOAs). +[ERC-7710](https://eip.tools/eip/7710) introduces a standard way for MetaMask Smart Accounts to delegate capabilities to other +smart accounts or externally owned accounts (EOAs). The MetaMask Delegation Toolkit provides two experimental functions, `erc7710BundlerActions()` and `erc7710WalletActions()`, that let a caller redeem delegations granted by MetaMask's permissions system. @@ -57,7 +57,7 @@ const permissionsResponse = [{ const permissionsContext = permissionsResponse[0].context; const delegationManager = permissionsResponse[0].signerMeta.delegationManager; -// accountMeta is only present when the Smart Account is not deployed. +// accountMeta is only present when the smart account is not deployed. const accountMetadata = permissionsResponse[0].accountMeta; ``` @@ -80,11 +80,11 @@ If you redeem delegations in any other way, it is your responsibility to validat ## Redeem the permission -Redeem a delegation with a [Smart Account](#redeem-with-a-smart-account) or an [externally owned account (EOA)](#redeem-with-an-eoa). +Redeem a delegation with a [MetaMask smart account](#redeem-with-a-metamask-smart-account) or an [externally owned account (EOA)](#redeem-with-an-eoa). -### Redeem with a Smart Account +### Redeem with a MetaMask smart account -To redeem a delegation with a Smart Account, create a [`MetaMaskSmartAccount`](../how-to/create-smart-account/index.md#create-a-metamasksmartaccount) +To redeem a delegation with a MetaMask smart account, create a [`MetaMaskSmartAccount`](../how-to/create-smart-account/index.md#create-a-metamasksmartaccount) and a [Viem Bundler Client](https://viem.sh/account-abstraction/clients/bundler). After setting up your Bundler Client, you can extend its functionality with `erc7710BundlerActions` actions to support ERC-7710. Once extended, use [`sendUserOperationWithDelegation`](../reference/api/experimental-actions/bundler-client.md#senduseroperationwithdelegation) to redeem the permission. diff --git a/delegation-toolkit/experimental/erc-7715-request-permissions.md b/delegation-toolkit/experimental/erc-7715-request-permissions.md index 0fde8591598..047f68bddba 100644 --- a/delegation-toolkit/experimental/erc-7715-request-permissions.md +++ b/delegation-toolkit/experimental/erc-7715-request-permissions.md @@ -21,8 +21,8 @@ The MetaMask Delegation Toolkit provides the experimental actions for ERC-7715 t ## Request permissions To request permissions, extend your [Viem Wallet Client](https://viem.sh/docs/clients/wallet) with `erc7715ProviderActions` actions. -You'll need a session account to request the permission, which can be either a Smart Account or an externally owned account (EOA). -This example uses a Smart Account: +You'll need a session account to request the permission, which can be either a MetaMask smart account or an externally owned account (EOA). +This example uses a smart account: diff --git a/delegation-toolkit/get-started/eip7702-quickstart.md b/delegation-toolkit/get-started/eip7702-quickstart.md index 6298bef7b25..d52448fb0ef 100644 --- a/delegation-toolkit/get-started/eip7702-quickstart.md +++ b/delegation-toolkit/get-started/eip7702-quickstart.md @@ -1,12 +1,12 @@ --- -description: Upgrade an externally owned account (EOA) to a Smart Account +description: Upgrade an externally owned account (EOA) to a smart account sidebar_position: 3 sidebar_label: EIP-7702 quickstart --- # EIP-7702 quickstart -This page demonstrates how to upgrade your externally owned account (EOA) to support MetaMask Smart Account +This page 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 [ERC-7710 delegation capabilities](./../concepts/delegation.md). @@ -73,7 +73,7 @@ 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. +provides a lightweight and secure way to upgrade an EOA to a smart account. ```typescript import { @@ -108,9 +108,9 @@ const hash = await walletClient.sendTransaction({ }); ``` -### 6. Create a MetaMask Smart Account +### 6. Create a MetaMask smart account -Create a Smart Account instance for the EOA and start +Create a smart account instance for the EOA and start leveraging the benefits of account abstraction. ```ts diff --git a/delegation-toolkit/get-started/install.md b/delegation-toolkit/get-started/install.md index 25f84fa5695..3abee918ffb 100644 --- a/delegation-toolkit/get-started/install.md +++ b/delegation-toolkit/get-started/install.md @@ -9,7 +9,7 @@ import TabItem from "@theme/TabItem"; # Install and set up the Delegation Toolkit -This page provides instructions to install and set up the MetaMask Delegation Toolkit, enabling you to integrate [Smart Accounts](../concepts/smart-accounts.md) into your dapp. +This page provides instructions to install and set up the MetaMask Delegation Toolkit, enabling you to integrate [MetaMask Smart Accounts](../concepts/smart-accounts.md) into your dapp. ## Prerequisites diff --git a/delegation-toolkit/how-to/configure.md b/delegation-toolkit/how-to/configure.md index 2711627e9ea..0f834ef97d8 100644 --- a/delegation-toolkit/how-to/configure.md +++ b/delegation-toolkit/how-to/configure.md @@ -6,7 +6,7 @@ sidebar_label: Configure the toolkit # Configure the Delegation Toolkit -The MetaMask Delegation Toolkit enables you to easily integrate [Smart Accounts](../concepts/smart-accounts.md) into your dapp, +The MetaMask Delegation Toolkit enables you to easily integrate [MetaMask Smart Accounts](../concepts/smart-accounts.md) into your dapp, enabling a more flexible, secure, and frictionless experience for your users. The toolkit is highly configurable, allowing you to tailor it to your project's specific needs. It includes support for custom signers, multiple signatory schemes, custom paymasters and bundlers, and more. diff --git a/delegation-toolkit/how-to/create-delegation/index.md b/delegation-toolkit/how-to/create-delegation/index.md index 32d1775879f..1a0efc36d98 100644 --- a/delegation-toolkit/how-to/create-delegation/index.md +++ b/delegation-toolkit/how-to/create-delegation/index.md @@ -28,7 +28,7 @@ Learn how to [restrict a delegation](./restrict-delegation.md) using caveat enfo - [Install and set up the Delegation Toolkit.](../../get-started/install.md) - [Configure the Delegation Toolkit.](../configure.md) -- [Create a Smart Account.](../create-smart-account/index.md) +- [Create a MetaMask smart account.](../create-smart-account/index.md) ## Create a root delegation @@ -44,7 +44,7 @@ import { createDelegation } from "@metamask/delegation-toolkit"; import { delegatorSmartAccount } from "./config.ts"; // The address to which the delegation is granted. It can be an EOA address, or -// Smart Account address. +// smart account address. const delegate = "0x2FcB88EC2359fA635566E66415D31dD381CF5585"; const delegation = createDelegation({ @@ -298,7 +298,7 @@ import { createDelegation } from "@metamask/delegation-toolkit"; import { delegatorSmartAccount } from "./config.ts"; // The address to which the delegation is granted. It can be an EOA address, or -// Smart Account address. +// smart account address. const delegate = "0x2FcB88EC2359fA635566E66415D31dD381CF5585"; const delegation = createDelegation({ diff --git a/delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md b/delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md index 0d6f25bb107..dcda7d72b05 100644 --- a/delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md +++ b/delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md @@ -1,15 +1,15 @@ --- sidebar_label: Configure accounts and signers -description: Learn how to configure different types of delegator accounts and signers using Viem. +description: Learn how to configure different types of smart accounts and signers using Viem. sidebar_position: 1 --- import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -# Configure Smart Accounts and signers +# Configure MetaMask Smart Accounts and signers -The MetaMask Delegation Toolkit supports different [Smart Account types](../../concepts/smart-accounts.md#smart-account-implementation-types), +The MetaMask Delegation Toolkit supports different [MetaMask smart account types](../../concepts/smart-accounts.md#smart-account-implementation-types), each with its own configuration and support for different signing mechanisms. You can create flexible and secure delegator accounts tailored to your specific needs. @@ -17,27 +17,27 @@ You can create flexible and secure delegator accounts tailored to your specific - [Install and set up the Delegation Toolkit.](../../get-started/install.md) - [Configure the Delegation Toolkit.](../configure.md) -- [Create a Smart Account.](index.md) +- [Create a MetaMask smart account.](index.md) -## Configure a Hybrid Smart Account +## Configure a Hybrid smart account -The [Hybrid Smart Account](../../concepts/smart-accounts.md#hybrid-smart-account) supports both an EOA "owner" and any number of P256 (passkey) signers. +The [Hybrid smart account](../../concepts/smart-accounts.md#hybrid-smart-account) supports both an EOA "owner" and any number of P256 (passkey) signers. -To configure a Hybrid Smart Account, provide the following parameters: +To configure a Hybrid smart account, provide the following parameters: - `owner`: The owner's account address as a hex string. The owner can be the zero address, indicating that there is no owner configured. - `p256KeyIds`: An array of key identifiers for P256 signers as hex strings. - `p256XValues`: An array of public key x-values for P256 signers as `bigint`s. - `p256YValues`: An array of public key y-values for P256 signers as `bigint`s. -- `signatory`: A signer that will sign on behalf of the Smart Account. +- `signatory`: A signer that will sign on behalf of the smart account. :::note You can set all `p256` parameters to empty arrays to configure no WebAuthn signer. However, we recommend configuring at least one signer for account recoverability. ::: -For a Hybrid Smart Account, you can configure the following types of signatories: +For a Hybrid smart account, you can configure the following types of signatories: ### Configure an account signatory @@ -222,7 +222,7 @@ import { } from "viem/account-abstraction"; export const credential = await createWebAuthnCredential({ - name: "MetaMask Smart Account", + name: "MetaMask smart account", }); export const webAuthnAccount = toWebAuthnAccount({ credential }); @@ -232,19 +232,19 @@ export const webAuthnAccount = toWebAuthnAccount({ credential }); -## Configure a Multisig Smart Account +## Configure a Multisig smart account -The [Multisig Smart Account](../../concepts/smart-accounts.md#multisig-smart-account) supports multiple EOA signers with a configurable threshold for execution. +The [Multisig smart account](../../concepts/smart-accounts.md#multisig-smart-account) supports multiple EOA signers with a configurable threshold for execution. -To configure a Multisig Smart Account, provide the following parameters: +To configure a Multisig smart account, provide the following parameters: - `signers`: An array of EOA signer addresses as hex strings. - `threshold`: The number of signers required to execute a transaction, as a `bigint`. -- `signatory`: A signer that will sign on behalf of the Smart Account. +- `signatory`: A signer that will sign on behalf of the smart account. ### Configure signatories -For a Multisig Smart Account, you can use a combination of account signatories and Wallet Client signatories. +For a Multisig smart account, you can use a combination of account signatories and Wallet Client signatories. For example: @@ -316,17 +316,17 @@ export const walletClient = createWalletClient({ The number of signers in the signatories must be at least equal to the threshold for valid signature generation. ::: -## Configure a Stateless 7702 Smart Account +## Configure a Stateless 7702 smart account -The [Stateless 7702 Smart Account](../../concepts/smart-accounts.md#stateless-7702-smart-account) represents an EOA that has been upgraded to support Smart Account +The [Stateless 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 implementation does not handle the upgrade process; see the [EIP-7702 quickstart](./../../get-started/eip7702-quickstart.md) to learn how to upgrade. -To configure a Stateless 7702 Smart Account, provide the following parameters: +To configure a Stateless 7702 smart account, provide the following parameters: -- `address`: The address of the EOA that has been upgraded to a Smart Account. -- `signatory`: A signer that will sign on behalf of the Smart Account. +- `address`: The address of the EOA that has been upgraded to a smart account. +- `signatory`: A signer that will sign on behalf of the smart account. -For a Stateless 7702 Smart Account, you can configure the following types of signatories: +For a Stateless 7702 smart account, you can configure the following types of signatories: ### Configure an account signatory diff --git a/delegation-toolkit/how-to/create-smart-account/index.md b/delegation-toolkit/how-to/create-smart-account/index.md index b7b090493e4..1145bb0d96d 100644 --- a/delegation-toolkit/how-to/create-smart-account/index.md +++ b/delegation-toolkit/how-to/create-smart-account/index.md @@ -1,15 +1,15 @@ --- -description: Learn how to create a delegator account using Viem. +description: Learn how to create a MetaMask smart account using Viem. sidebar_position: 2 --- import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -# Create a Smart Account +# Create a MetaMask smart account The MetaMask Delegation Toolkit is embedded, meaning that the end user can instantly interact with a dapp without wallet authorization, confirmations, or corporate logos. -Enable users to create a [Smart Account](../../concepts/smart-accounts.md) directly in your dapp. +Enable users to create a [MetaMask smart account](../../concepts/smart-accounts.md) directly in your dapp. ## Prerequisites @@ -18,12 +18,12 @@ Enable users to create a [Smart Account](../../concepts/smart-accounts.md) direc ## Create a `MetaMaskSmartAccount` -The following is an example of creating a Smart Account using Viem Core SDK. +The following is an example of creating a MetaMask smart account using Viem Core SDK. Viem Core SDK provides low-level interfaces to offer flexibility and control over the smart account creation lifecycle. In the example, the Viem [`privateKeyToAccount`](https://viem.sh/docs/accounts/privateKey.html) -function creates an externally owned account as the owner of the Smart Account. +function creates an externally owned account as the owner of the smart account. @@ -71,12 +71,12 @@ export const owner = privateKeyToAccount(privateKey); This example creates the `MetaMaskSmartAccount`, which can perform several functions: -- In conjunction with [Viem Account Abstraction clients](../configure.md), deploy the Smart Account +- In conjunction with [Viem Account Abstraction clients](../configure.md), deploy the smart account and [send user operations](../send-user-operation.md). - [Sign delegations](../create-delegation/index.md) that can be used to grant specific rights and permissions to other accounts. Smart accounts that sign delegations are called *delegator accounts*. :::note -The example above uses a Hybrid Smart Account, which is configurable to have an EOA "owner" and any number of P256 (passkey) signers. -You can also [configure other Smart Account types](configure-accounts-signers.md). +The example above uses a Hybrid smart account, which is configurable to have an EOA "owner" and any number of P256 (passkey) signers. +You can also [configure other smart account types](configure-accounts-signers.md). ::: diff --git a/delegation-toolkit/how-to/generate-multisig-signature.md b/delegation-toolkit/how-to/generate-multisig-signature.md index 3f97ee51777..73fc72022c3 100644 --- a/delegation-toolkit/how-to/generate-multisig-signature.md +++ b/delegation-toolkit/how-to/generate-multisig-signature.md @@ -8,7 +8,7 @@ import TabItem from "@theme/TabItem"; # Generate a multisig signature -The MetaMask Delegation Toolkit supports [Multisig Smart Accounts](../concepts/smart-accounts.md#multisig-smart-account), +The MetaMask Delegation Toolkit supports [Multisig smart accounts](../concepts/smart-accounts.md#multisig-smart-account), allowing you to add multiple externally owned account (EOA) signers with a configurable execution threshold. When the threshold is greater than 1, you can collect signatures from the required signers @@ -19,11 +19,11 @@ into a single aggregated signature. - [Install and set up the Delegation Toolkit.](../get-started/install.md) - [Configure the Delegation Toolkit.](configure.md) -- [Create a Multisig Smart Account.](create-smart-account/configure-accounts-signers.md#configure-a-multisig-smart-account) +- [Create a Multisig smart account.](create-smart-account/configure-accounts-signers.md#configure-a-multisig-smart-account) ## Generate a multisig signature -The following example configures a Multisig Smart Account with two different signers: Alice +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. diff --git a/delegation-toolkit/how-to/redeem-delegation.md b/delegation-toolkit/how-to/redeem-delegation.md index 1495f40f187..5f2509c93f0 100644 --- a/delegation-toolkit/how-to/redeem-delegation.md +++ b/delegation-toolkit/how-to/redeem-delegation.md @@ -10,7 +10,7 @@ import TabItem from "@theme/TabItem"; # Redeem a delegation A delegate can redeem a delegation by submitting either a user operation or a regular transaction, -depending on whether the delegate is a Smart Account or externally owned account (EOA). +depending on whether the delegate is a MetaMask smart account or externally owned account (EOA). The redeem transaction is sent to the `DelegationManager` contract, which validates the delegation and executes actions on the delegator's behalf. To prepare the calldata for the redeem transaction, use the [`redeemDelegation`](../reference/api/delegation.md#redeemdelegation) utility function. @@ -20,17 +20,17 @@ The function supports batch redemption, allowing multiple delegations to be proc - [Install and set up the Delegation Toolkit.](../get-started/install.md) - [Configure the Delegation Toolkit.](configure.md) -- [Create a delegator Smart Account.](create-smart-account/index.md) +- [Create a delegator smart account.](create-smart-account/index.md) - [Create a delegation.](create-delegation/index.md) ## Redeem a delegation -Redeem a delegation with a [Smart Account](#redeem-with-a-smart-account) or an [externally owned account (EOA)](#redeem-with-an-eoa). +Redeem a delegation with a [MetaMask smart account](#redeem-with-a-metamask-smart-account) or an [externally owned account (EOA)](#redeem-with-an-eoa). -### Redeem with a Smart Account +### Redeem with a MetaMask smart account The following example demonstrates how to submit a user operation to redeem a delegation. -It assumes you have a delegation signed by the delegator, and that the delegate is a Smart Account. +It assumes you have a delegation signed by the delegator, and that the delegate is a MetaMask smart account. @@ -199,7 +199,7 @@ export const delegateWalletClient = createWalletClient({ You can redeem multiple delegations in a single user operation, each delegation independent of the others. Each element in the `delegationsArray` must have a corresponding element in the `executionsArray` and `modes`. -The following example assumes you already have multiple signed delegations and that the delegate is a Smart Account. +The following example assumes you already have multiple signed delegations and that the delegate is a MetaMask smart account. The preparation of the calldata is the same when [using an EOA as the delegate](#redeem-with-an-eoa); the primary difference is that an EOA submits a regular transaction instead of a user operation. diff --git a/delegation-toolkit/how-to/send-user-operation.md b/delegation-toolkit/how-to/send-user-operation.md index 2aab044f210..ca958579579 100644 --- a/delegation-toolkit/how-to/send-user-operation.md +++ b/delegation-toolkit/how-to/send-user-operation.md @@ -20,14 +20,14 @@ Instead, they are sent to a bundler, which validates, optimizes, and aggregates 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 Smart Account that has not been deployed, the toolkit configures the user operation to automatically deploy the account. +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 Delegation Toolkit.](../get-started/install.md) - [Configure the Delegation Toolkit.](configure.md) -- [Create a Smart Account.](create-smart-account/index.md) +- [Create a MetaMask smart account.](create-smart-account/index.md) ## Send a user operation diff --git a/delegation-toolkit/index.md b/delegation-toolkit/index.md index dd7a91601bf..e35e8dfaf0a 100644 --- a/delegation-toolkit/index.md +++ b/delegation-toolkit/index.md @@ -7,13 +7,13 @@ sidebar_position: 1 import CardList from "@site/src/components/CardList" -# Embed Smart Accounts using the Delegation Toolkit +# Embed MetaMask Smart Accounts using the Delegation Toolkit The MetaMask Delegation Toolkit is a [Viem](https://viem.sh/)-based collection of tools for 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. +Smart accounts support programmable account behavior and advanced features like delegated permissions, multi-signature approvals, and gas abstraction. The toolkit's [Delegation Framework](concepts/delegation.md#delegation-framework) extends MetaMask Smart Accounts with secure, rule-based permission sharing. -Use [caveat enforcers](concepts/caveat-enforcers.md) to define exactly how, when, and by whom a Smart Account can be used, enabling use cases like spending limits and time-based access. +Use [caveat enforcers](concepts/caveat-enforcers.md) to define exactly how, when, and by whom a smart account can be used, enabling use cases like spending limits and time-based access. ## Why use the toolkit? @@ -23,7 +23,7 @@ maximum composability, allowing developers to build and extend their dapps with The toolkit enables: -- **Instant user onboarding.** Instantly onboard users with embedded Smart Accounts — no browser extension, mobile +- **Instant user onboarding.** Instantly onboard users with embedded MetaMask Smart Accounts — no browser extension, mobile app, or seed phrase required. - **New web3 experiences.** Unlock new experiences such as peer-to-peer social @@ -47,7 +47,7 @@ Check out the following guides to get started with the MetaMask Delegation Toolk { href: "get-started/quickstart", title: "Quickstart", - description: "Create a MetaMask Smart Account and send a user operation.", + description: "Create a MetaMask smart account and send a user operation.", } ]} /> diff --git a/delegation-toolkit/reference/api/delegation.md b/delegation-toolkit/reference/api/delegation.md index 9fef34e024b..75a57640294 100644 --- a/delegation-toolkit/reference/api/delegation.md +++ b/delegation-toolkit/reference/api/delegation.md @@ -404,7 +404,7 @@ export const walletClient = createWalletClient({ }); // The address to which the delegation is granted. It can be an EOA address, or -// Smart Account address. +// smart account address. const delegate = "0x2FcB88EC2359fA635566E66415D31dD381CF5585"; export const delegation = createDelegation({ diff --git a/delegation-toolkit/reference/api/experimental-actions/wallet-client.md b/delegation-toolkit/reference/api/experimental-actions/wallet-client.md index 520dc82b955..4a9efdde672 100644 --- a/delegation-toolkit/reference/api/experimental-actions/wallet-client.md +++ b/delegation-toolkit/reference/api/experimental-actions/wallet-client.md @@ -44,7 +44,7 @@ const expiry = Math.floor(Date.now() / 1000 + 604_800); // 1 week from now. const currentTime = Math.floor(Date.now() / 1000); // now // Address of the wallet that will manage the session. It can -// be either a Smart Account or an externally owned account (EOA) +// be either a smart account or an externally owned account (EOA) const sessionAccount = "0x1431.."; const grantedPermissions = await walletClient.grantPermissions([{ diff --git a/delegation-toolkit/reference/api/smart-account.md b/delegation-toolkit/reference/api/smart-account.md index 557e8c15c7a..30940f55336 100644 --- a/delegation-toolkit/reference/api/smart-account.md +++ b/delegation-toolkit/reference/api/smart-account.md @@ -1,6 +1,6 @@ --- -description: Smart Account-related API methods reference. -sidebar_label: Smart Account +description: MetaMask Smart Accounts-related API methods reference. +sidebar_label: MetaMask Smart Accounts sidebar_position: 2 toc_max_heading_level: 2 --- @@ -8,9 +8,9 @@ toc_max_heading_level: 2 import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -# Smart Account API reference +# MetaMask Smart Accounts API reference -The following API methods are related to creating, managing, and signing with [Smart Accounts](../../concepts/smart-accounts.md). +The following API methods are related to creating, managing, and signing with [MetaMask Smart Accounts](../../concepts/smart-accounts.md). ## `aggregateSignature` @@ -137,7 +137,7 @@ import { createDelegation } from "@metamask/delegation-toolkit"; import { delegatorSmartAccount } from "./config.ts"; // The address to which the delegation is granted. It can be an EOA address, or -// Smart Account address. +// smart account address. const delegate = "0x2FcB88EC2359fA635566E66415D31dD381CF5585"; const delegation = createDelegation({ @@ -371,13 +371,13 @@ 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. | -| `signatory` | `SignatoryConfigByImplementation ` | Yes | Signers for the Smart Account. Can be a Viem Account, Viem Wallet Client, or a WebAuthnAccount. Web3AuthnAccounts are only supported for Hybrid implementations. | +| `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. | +| `signatory` | `SignatoryConfigByImplementation ` | Yes | Signers for the smart account. Can be a Viem Account, Viem Wallet Client, or a WebAuthnAccount. Web3AuthnAccounts are only supported for Hybrid implementations. | | `environment` | `DeleGatorEnvironment` | 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. | +| `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 example diff --git a/docs/whats-new.md b/docs/whats-new.md index 80aabddb3a9..4d872847da4 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -12,7 +12,7 @@ of the [MetaMask developer page](https://metamask.io/developer/). ## July 2025 -- Added a [MetaMask Smart Account quickstart](/delegation-toolkit/development/quickstart). +- Added a [MetaMask Smart Accounts quickstart](/delegation-toolkit/development/quickstart). ([#2132](https://github.com/MetaMask/metamask-docs/pull/2132)) ## June 2025 diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 69f5dd47cfb..0570b0e8229 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -19,7 +19,7 @@ export default function Home(): JSX.Element { icon: 'arrow-right', }} /> - + Date: Thu, 3 Jul 2025 13:57:24 -0700 Subject: [PATCH 3/7] fix changelog title --- gator_versioned_docs/version-0.12.0/changelog/0.12.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gator_versioned_docs/version-0.12.0/changelog/0.12.0.md b/gator_versioned_docs/version-0.12.0/changelog/0.12.0.md index c1bb62a7ebb..2ad67845af3 100644 --- a/gator_versioned_docs/version-0.12.0/changelog/0.12.0.md +++ b/gator_versioned_docs/version-0.12.0/changelog/0.12.0.md @@ -1,10 +1,10 @@ --- sidebar_label: 0.12.0 sidebar_position: 1 -description: MetaMask Delegation Toolkit v0.11.0 changelog +description: MetaMask Delegation Toolkit v0.12.0 changelog --- -# What's new in v0.11.0? +# What's new in v0.12.0? :::warning Breaking changes From 218c6d8183139284432902363071772ea828355a Mon Sep 17 00:00:00 2001 From: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> Date: Fri, 4 Jul 2025 10:56:46 -0700 Subject: [PATCH 4/7] Apply suggestions from code review Co-authored-by: hannahwy0922 --- delegation-toolkit/concepts/smart-accounts.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/delegation-toolkit/concepts/smart-accounts.md b/delegation-toolkit/concepts/smart-accounts.md index 3cfc7bad7fc..dbb47225d4b 100644 --- a/delegation-toolkit/concepts/smart-accounts.md +++ b/delegation-toolkit/concepts/smart-accounts.md @@ -9,9 +9,9 @@ The MetaMask Delegation Toolkit enables you to create and manage MetaMask Smart 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, smart accounts use smart contracts to govern account logic. +Unlike traditional wallets, which rely on private keys for every transaction, MetaMask Smart Accounts use smart contracts to govern account logic. -Smart accounts are referenced in the toolkit as `MetaMaskSmartAccount`. +MetaMask Smart Accounts are referenced in the toolkit as `MetaMaskSmartAccount`. ## Account abstraction (ERC-4337) From 820200fce013aa1a93a337d32f0175307c1780a4 Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Fri, 4 Jul 2025 11:03:09 -0700 Subject: [PATCH 5/7] minor edit --- .../experimental/erc-7715-request-permissions.md | 4 ++-- docs/whats-new.md | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/delegation-toolkit/experimental/erc-7715-request-permissions.md b/delegation-toolkit/experimental/erc-7715-request-permissions.md index 047f68bddba..5002ca73d90 100644 --- a/delegation-toolkit/experimental/erc-7715-request-permissions.md +++ b/delegation-toolkit/experimental/erc-7715-request-permissions.md @@ -21,8 +21,8 @@ The MetaMask Delegation Toolkit provides the experimental actions for ERC-7715 t ## Request permissions To request permissions, extend your [Viem Wallet Client](https://viem.sh/docs/clients/wallet) with `erc7715ProviderActions` actions. -You'll need a session account to request the permission, which can be either a MetaMask smart account or an externally owned account (EOA). -This example uses a smart account: +You'll need a session account to request the permission, which can be either a smart account or an externally owned account (EOA). +This example uses a MetaMask smart account: diff --git a/docs/whats-new.md b/docs/whats-new.md index 4d872847da4..6db29175dd4 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -9,7 +9,6 @@ The latest major MetaMask documentation updates are listed by the month they wer For a comprehensive list of recent product changes, visit the "Release Notes" section at the bottom of the [MetaMask developer page](https://metamask.io/developer/). - ## July 2025 - Added a [MetaMask Smart Accounts quickstart](/delegation-toolkit/development/quickstart). From 815b01db7a3089d2830f20b8387a83e02527bb45 Mon Sep 17 00:00:00 2001 From: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> Date: Tue, 8 Jul 2025 10:38:46 -0700 Subject: [PATCH 6/7] Apply suggestions from code review Co-authored-by: Ayush Bherwani --- delegation-toolkit/get-started/install.md | 2 +- .../how-to/create-smart-account/configure-accounts-signers.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/delegation-toolkit/get-started/install.md b/delegation-toolkit/get-started/install.md index 3abee918ffb..cdfbe899e99 100644 --- a/delegation-toolkit/get-started/install.md +++ b/delegation-toolkit/get-started/install.md @@ -44,5 +44,5 @@ Add `@metamask/delegation-framework/=lib/metamask/delegation-framework/` in your ### 3. Get started -You're now ready to start using the Delegation Toolkit and MetaMask Smart Accounts. +You're now ready to start using MetaMask Smart Accounts. Check out the [quickstart](quickstart.md) to walk through a simple example. diff --git a/delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md b/delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md index dcda7d72b05..ae60d23bd1f 100644 --- a/delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md +++ b/delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md @@ -1,6 +1,6 @@ --- sidebar_label: Configure accounts and signers -description: Learn how to configure different types of smart accounts and signers using Viem. +description: Learn how to configure different types of MetaMask Smart Accounts and signers using Viem. sidebar_position: 1 --- From a6f4d7e6864db8dd36d262c18d75c4f7814de95e Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Tue, 8 Jul 2025 10:42:34 -0700 Subject: [PATCH 7/7] update delegations paragraph --- delegation-toolkit/index.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/delegation-toolkit/index.md b/delegation-toolkit/index.md index e35e8dfaf0a..a02e16ecf22 100644 --- a/delegation-toolkit/index.md +++ b/delegation-toolkit/index.md @@ -12,8 +12,9 @@ import CardList from "@site/src/components/CardList" The MetaMask Delegation Toolkit is a [Viem](https://viem.sh/)-based collection of tools for 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. -The toolkit's [Delegation Framework](concepts/delegation.md#delegation-framework) extends MetaMask Smart Accounts with secure, rule-based permission sharing. -Use [caveat enforcers](concepts/caveat-enforcers.md) to define exactly how, when, and by whom a smart account can be used, enabling use cases like spending limits and time-based access. +[Delegations](concepts/delegation.md) are a core feature of MetaMask Smart Accounts, enabling secure, rule-based permission sharing. +These delegations are powered by the toolkit's Delegation Framework, which defines how +permissions are created, shared, and enforced. ## Why use the toolkit?