Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion delegation-toolkit/concepts/delegation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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*.
Expand Down
19 changes: 9 additions & 10 deletions delegation-toolkit/concepts/smart-accounts.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
---
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.
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.
Comment thread
alexandratran marked this conversation as resolved.
Outdated

Smart accounts are referenced in the toolkit as `MetaMaskSmartAccount`.
Comment thread
alexandratran marked this conversation as resolved.
Outdated

## 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).

Expand All @@ -38,7 +37,7 @@ ERC-4337 introduces the following concepts:

## 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.

Expand All @@ -65,7 +64,7 @@ This type is referenced in the toolkit as `Implementation.Stateless7702`.

## 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
ownership and security settings.
Expand All @@ -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 MetaMask smart account that allows users to grant permission to other smart accounts or EOAs
Comment thread
alexandratran marked this conversation as resolved.
to perform specific executions on their behalf, under defined rules and restrictions.
Learn more about [delegation](delegation.md).
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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
[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
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ 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).
You'll need a session account to request the permission, which can be either a MetaMask smart account or an externally owned account (EOA).
Comment thread
alexandratran marked this conversation as resolved.
Outdated
This example uses a smart account:

<Tabs>
Expand Down
2 changes: 1 addition & 1 deletion delegation-toolkit/get-started/eip7702-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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).

Expand Down
6 changes: 3 additions & 3 deletions delegation-toolkit/get-started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [MetaMask Smart Accounts](../concepts/smart-accounts.md) into your dapp.

## Prerequisites

Expand Down Expand Up @@ -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.
Comment thread
alexandratran marked this conversation as resolved.
Outdated
Check out the [quickstart](quickstart.md) to walk through a simple example.
2 changes: 1 addition & 1 deletion delegation-toolkit/how-to/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion delegation-toolkit/how-to/create-delegation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
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.
Comment thread
alexandratran marked this conversation as resolved.
Outdated
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.

## Prerequisites

- [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

Expand Down Expand Up @@ -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 });
Expand Down Expand Up @@ -318,7 +318,7 @@ The number of signers in the signatories must be at least equal to the threshold

## 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:
Expand Down
8 changes: 4 additions & 4 deletions delegation-toolkit/how-to/create-smart-account/index.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -18,7 +18,7 @@ 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.

Expand Down
10 changes: 5 additions & 5 deletions delegation-toolkit/how-to/redeem-delegation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -25,12 +25,12 @@ The function supports batch redemption, allowing multiple delegations to be proc

## 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.

<Tabs>
<TabItem value="example.ts">
Expand Down Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions delegation-toolkit/how-to/send-user-operation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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

Expand Down
30 changes: 11 additions & 19 deletions delegation-toolkit/index.md
Original file line number Diff line number Diff line change
@@ -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 MetaMask 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.
Comment thread
AyushBherwani1998 marked this conversation as resolved.
Outdated
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 MetaMask Smart Accounts — no browser extension, mobile
app, or seed phrase required.

- **New web3 experiences.** Unlock new experiences such as peer-to-peer social
Expand All @@ -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.",
}
]}
/>
Expand Down
8 changes: 4 additions & 4 deletions delegation-toolkit/reference/api/smart-account.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
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
---

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`

Expand Down
6 changes: 6 additions & 0 deletions docs/whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 Accounts 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
Expand Down
4 changes: 2 additions & 2 deletions gator_versioned_docs/version-0.12.0/changelog/0.12.0.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/components/NavDropdown/EmbedMetaMask.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</span>
<div>
<h2>Delegation Toolkit</h2>
<p>Embed MetaMask smart accounts into your dapp, enabling new user experiences.</p>
<p>Embed MetaMask Smart Accounts into your dapp, enabling new user experiences.</p>
</div>
</a>
</li>
Expand Down
Loading
Loading