Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .linkspector.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dirs:
- ./delegation-toolkit
- ./smart-accounts-kit
- ./developer-tools
- ./embedded-wallets
- ./sdk
Expand All @@ -24,7 +24,7 @@ ignorePatterns:
- pattern: '^http(s)?://metamask.io'
- pattern: '^http(s)?://rivet.cloud'
- pattern: '^/img/'
- pattern: '^/delegation-toolkit/'
- pattern: '^/smart-accounts-kit/'
- pattern: '^/developer-tools/'
- pattern: '^/embedded-wallets/'
- pattern: '^/sdk/'
Expand Down
10 changes: 5 additions & 5 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ const config = {
'@docusaurus/plugin-content-docs',
{
id: 'gator',
path: 'delegation-toolkit',
routeBasePath: 'delegation-toolkit',
path: 'smart-accounts-kit',
routeBasePath: 'smart-accounts-kit',
editUrl: 'https://github.com/MetaMask/metamask-docs/edit/main/',
sidebarPath: require.resolve('./gator-sidebar.js'),
breadcrumbs: false,
Expand Down Expand Up @@ -453,8 +453,8 @@ const config = {
to: '/wallet',
},
{
label: 'Delegation Toolkit',
to: '/delegation-toolkit',
label: 'Smart Accounts Kit',
to: '/smart-accounts-kit',
},
{
label: 'Embedded Wallets',
Expand Down Expand Up @@ -490,7 +490,7 @@ const config = {
href: 'https://github.com/MetaMask/metamask-sdk/',
},
{
label: 'Delegation Toolkit GitHub',
label: 'Smart Accounts Kit GitHub',
href: 'https://github.com/MetaMask/smart-accounts-kit',
},
{
Expand Down
2 changes: 1 addition & 1 deletion embedded-wallets/features/smart-accounts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Create and manage smart accounts for your users with just a single toggle on the

## Getting Started

Our native smart accounts powered by [MetaMask Smart Accounts kit](/delegation-toolkit) simplify setup, enabling you to create and manage smart accounts effortlessly with popular libraries like Viem, Ethers, and Wagmi —no need for third-party packages to achieve ERC-4337 compatibility.
Our native smart accounts powered by [MetaMask Smart Accounts kit](/smart-accounts-kit) simplify setup, enabling you to create and manage smart accounts effortlessly with popular libraries like Viem, Ethers, and Wagmi —no need for third-party packages to achieve ERC-4337 compatibility.

We are working closely with different partners in the account abstraction ecosystem and will provide support for evolving standards like EIP-7702, ERC-7579 (Modular Accounts), and ERC-7555 (account discovery) as they get finalized.

Expand Down
6 changes: 3 additions & 3 deletions gator_versioned_docs/version-0.12.0/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ Check out the following sections to get started with the MetaMask Delegation Too
<CardList
items={[
{
href: "/delegation-toolkit/0.12.0/get-started",
href: "/smart-accounts-kit/0.12.0/get-started",
title: "🏁 Get started",
description: "If you're ready to get started building, install the Toolkit and follow a quickstart.",
},
{
href: "/delegation-toolkit/0.12.0/how-to",
href: "/smart-accounts-kit/0.12.0/how-to",
title: "🛠️ How-to guides",
description: "To complete specific tasks with the Delegation Toolkit, follow the how-to guides.",
},
{
href: "/delegation-toolkit/0.12.0/concepts",
href: "/smart-accounts-kit/0.12.0/concepts",
title: "💭 Concepts",
description: "If you're new to the Delegation Toolkit, learn about some key concepts.",
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Dapps can use this method to request a wallet to grant the dapp permission to ex
`wallet_grantPermissions` requires a `signer` parameter, which identifies the entity requesting or managing the permission.
Common signer implementations include wallet signers, single key and multisig signers, and account signers.

Smart Accounts Kit supports multiple signer types. The documentation uses [an account signer](../guides/advanced-permissions/execute-on-metamask-users-behalf.md) as a common implementation example.
The Smart Accounts Kit supports multiple signer types. The documentation uses [an account signer](../guides/advanced-permissions/execute-on-metamask-users-behalf.md) as a common implementation example.
When you use an account signer, a session account is created solely to request and redeem Advanced Permissions, and doesn't contain tokens.
The session account can be granted with permissions and redeem them as specified in [ERC-7710](https://eips.ethereum.org/EIPS/eip-7710).
The session account can be a smart account or an externally owned account (EOA).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ npm install @metamask/smart-accounts-kit
### 2. Set up a Public Client

Set up a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function.
This client will let the EOA query the account state and interact with blockchain network.
This client will let the EOA query the account state and interact with the blockchain network.

```typescript
import { createPublicClient, http } from "viem";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ npm install @metamask/smart-accounts-kit

### 2. Set up a Public Client

Set up a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function. This client will let the smart account query the signer's account state and interact with blockchain network.
Set up a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function. This client will let the smart account query the signer's account state and interact with the blockchain network.

```typescript
import { createPublicClient, http } from "viem";
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/components/NavDropdown/Products.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h2>Create embedded wallets</h2>
</a>
</li>
<li>
<a href="/delegation-toolkit" id="smart-accounts-kit-menu-button" onfocus='
<a href="/smart-accounts-kit" id="smart-accounts-kit-menu-button" onfocus='
document.getElementById("metamask-sdk-menu-button").classList.remove("selected");
document.getElementById("metamask-sdk-menu").classList.remove("selected-menu");
document.getElementById("smart-accounts-kit-menu-button").classList.add("selected");
Expand Down Expand Up @@ -289,7 +289,7 @@ <h2>Unreal SDK</h2>
<span class="sdk-selection-menu" id="smart-accounts-kit-menu">
<ul>
<li>
<a href="/delegation-toolkit/">
<a href="/smart-accounts-kit/">
<span>
<svg
class="svg-inline--fa fa-screwdriver-wrench fa-w-16 text-text-alternative group-hover:text-text-default"
Expand All @@ -300,7 +300,7 @@ <h2>Unreal SDK</h2>
</svg>
</span>
<div>
<h2>Delegation Toolkit</h2>
<h2>Smart Accounts Kit</h2>
<p>Create smart accounts that support delegated permissions, gas abstraction, and secure execution.</p>
</div>
</a>
Expand Down
6 changes: 3 additions & 3 deletions src/components/SidebarSectionDropdown/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ export const SNAPS_CONFIG: SidebarStaticTitleProps = {
pathPattern: '/snaps',
}

export const DELEGATION_TOOLKIT_CONFIG: SidebarStaticTitleProps = {
title: 'Delegation Toolkit',
pathPattern: '/delegation-toolkit',
export const SMART_ACCOUNTS_KIT_CONFIG: SidebarStaticTitleProps = {
title: 'Smart Accounts Kit',
pathPattern: '/smart-accounts-kit',
}

export function isPathInSections(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import versions from '@site/gator_versions.json'
import clsx from 'clsx'
import styles from './SidebarVersionDropdown.module.css'

export default function SidebarVersionDropdown({ path = 'delegation-toolkit' }: { path?: string }) {
export default function SidebarVersionDropdown({ path = 'smart-accounts-kit' }: { path?: string }) {
const history = useHistory()
const location = useLocation()
const dropdownRef = useRef<HTMLDivElement>(null)
Expand Down
2 changes: 1 addition & 1 deletion src/components/SubNavBar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ That's it! The SubNavBar will automatically appear on pages matching your path p
- **Wallet API** (`/wallet`) - Shows Wallet API sections
- **Snaps** (`/snaps`) - Shows Snaps development sections
- **Services** (`/services`) - Shows Infura services sections
- **Smart Accounts Kit** (`/delegation-toolkit`) - Shows MetaMask Smart Accounts Kit sections
- **Smart Accounts Kit** (`/smart-accounts-kit`) - Shows MetaMask Smart Accounts Kit sections

## Styling

Expand Down
4 changes: 2 additions & 2 deletions src/config/mobileProductsMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const mobileProductsMenu: MobileProductItem[] = [
href: '/embedded-wallets',
},
{
label: 'Delegation Toolkit',
href: '/delegation-toolkit',
label: 'Smart Accounts Kit',
href: '/smart-accounts-kit',
},
{
label: 'Snaps',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function Home(): JSX.Element {
title: 'Create smart accounts',
description:
'Integrate MetaMask Smart Accounts into your dapp. Create smart wallets that support delegated permissions, gas abstraction, and secure execution.',
href: '/delegation-toolkit',
href: '/smart-accounts-kit',
buttonIcon: 'arrow-right',
},
{
Expand Down
24 changes: 12 additions & 12 deletions src/pages/quickstart/NavigationOverlay/NavigationFlow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,32 +47,32 @@ const navigationOptions: NavigationOption[] = [
{
id: 'smart-accounts-kit-1',
title: 'I want to create a smart account',
description: 'Delegation Toolkit',
link: '/delegation-toolkit/get-started/smart-account-quickstart/',
description: 'Smart Accounts Kit',
link: '/smart-accounts-kit/get-started/smart-account-quickstart/',
},
{
id: 'smart-accounts-kit-4',
title: 'I want to perform executions on behalf of smart accounts',
description: 'Delegation Toolkit',
link: '/delegation-toolkit/guides/delegation/execute-on-smart-accounts-behalf',
description: 'Smart Accounts Kit',
link: '/smart-accounts-kit/guides/delegation/execute-on-smart-accounts-behalf',
},
{
id: 'smart-accounts-kit-2',
title: 'I want to perform executions on behalf of MetaMask users',
description: 'Delegation Toolkit',
link: '/delegation-toolkit/guides/erc7715/execute-on-metamask-users-behalf',
description: 'Smart Accounts Kit',
link: '/smart-accounts-kit/guides/advanced-permissions/execute-on-metamask-users-behalf',
},
{
id: 'smart-accounts-kit-3',
title: 'I want to send gasless transactions',
description: 'Delegation Toolkit',
link: '/delegation-toolkit/guides/smart-accounts/send-gasless-transaction',
description: 'Smart Accounts Kit',
link: '/smart-accounts-kit/guides/smart-accounts/send-gasless-transaction',
},
{
id: 'smart-accounts-kit-5',
title: 'I want to convert EOAs to smart accounts',
description: 'Delegation Toolkit',
link: '/delegation-toolkit/get-started/smart-account-quickstart/eip7702',
description: 'Smart Accounts Kit',
link: '/smart-accounts-kit/get-started/smart-account-quickstart/eip7702',
},
]

Expand Down Expand Up @@ -153,8 +153,8 @@ const NavigationFlow: React.FC<NavigationFlowProps> = ({ onSelect }) => {
<Link href="/wallet" className={styles.quickLink}>
💳 Embedded Wallets Docs
</Link>
<Link href="/delegation-toolkit" className={styles.quickLink}>
Delegation Toolkit Docs
<Link href="/smart-accounts-kit" className={styles.quickLink}>
Smart Accounts Kit Docs
</Link>
</div>
</div> */}
Expand Down
14 changes: 7 additions & 7 deletions src/pages/tutorials/create-custom-caveat-enforcer.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ author: MetaMask Developer Relations
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

This tutorial walks you through creating a custom [caveat enforcer](/delegation-toolkit/concepts/delegation/caveat-enforcers) and applying it to a [delegation](/delegation-toolkit/concepts/delegation/).
This tutorial walks you through creating a custom [caveat enforcer](/smart-accounts-kit/concepts/delegation/caveat-enforcers) and applying it to a [delegation](/smart-accounts-kit/concepts/delegation/).

The Delegation Toolkit includes [out-of-the-box caveat enforcers](/delegation-toolkit/reference/delegation/caveats) that define rules and restrictions for common use cases.
The Smart Accounts Kit includes [out-of-the-box caveat enforcers](/smart-accounts-kit/reference/delegation/caveats) that define rules and restrictions for common use cases.
For more specific control or other use cases, you can create custom caveat enforcers.
In this tutorial, you'll create and apply a caveat enforcer that only allows a delegation to be redeemed after a specific timestamp.

Expand All @@ -31,9 +31,9 @@ In this tutorial, you'll create and apply a caveat enforcer that only allows a d

## Steps

### 1. Install the Delegation Toolkit
### 1. Install the Smart Accounts Kit

Install the [Delegation Toolkit](https://www.npmjs.com/package/@metamask/smart-accounts-kit) in your project:
Install the [Smart Accounts Kit](https://www.npmjs.com/package/@metamask/smart-accounts-kit) in your project:

```bash npm2yarn
npm install @metamask/smart-accounts-kit
Expand All @@ -57,7 +57,7 @@ the current block timestamp is later than the defined allowed timestamp.
pragma solidity 0.8.23;

import { CaveatEnforcer } from "@delegator/src/enforcers/CaveatEnforcer.sol";
import { ModeCode } from "/delegation-toolkit/utils/Types.sol";
import { ModeCode } from "/smart-accounts-kit/utils/Types.sol";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Check the implementation, and fix the path.


contract AfterTimestampEnforcer is CaveatEnforcer {
/**
Expand Down Expand Up @@ -108,7 +108,7 @@ The Forge CLI will display the address of the deployed caveat enforcer.

### 4. Apply the caveat enforcer

Specify the address of the deployed `AfterTimestampEnforcer.sol` contract, add it to the [caveat builder](/delegation-toolkit/reference/delegation/#createcaveatbuilder), and create a delegation.
Specify the address of the deployed `AfterTimestampEnforcer.sol` contract, add it to the [caveat builder](/smart-accounts-kit/reference/delegation/#createcaveatbuilder), and create a delegation.

The following code snippet uses the custom caveat enforcer to create a delegation granting
a 0.01 ETH allowance that becomes spendable one hour after it is created:
Expand Down Expand Up @@ -181,4 +181,4 @@ export const delegatorSmartAccount = await toMetaMaskSmartAccount({
You've successfully created, deployed, and applied a custom caveat enforcer!

For production use cases, you might need to add additional caveats to restrict the delegation further.
Learn more about [caveat enforcers](/delegation-toolkit/concepts/delegation/caveat-enforcers).
Learn more about [caveat enforcers](/smart-accounts-kit/concepts/delegation/caveat-enforcers).
20 changes: 10 additions & 10 deletions src/pages/tutorials/create-invite-link.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Bob can start using your dapp right away, without installing a wallet or paying
You'll enable this by:

- Adding an [embedded wallet](/embedded-wallets) for instant onboarding.
- Creating a [MetaMask smart account](/delegation-toolkit/concepts/smart-accounts) to create and redeem an invitation.
- Creating an [open delegation](/delegation-toolkit/concepts/delegation) to represent an invitation.
- Creating a [MetaMask smart account](/smart-accounts-kit/concepts/smart-accounts) to create and redeem an invitation.
- Creating an [open delegation](/smart-accounts-kit/concepts/delegation) to represent an invitation.

## Prerequisites

Expand All @@ -38,7 +38,7 @@ You'll enable this by:

#### 1.1. Install dependencies

Install the [Delegation Toolkit](https://www.npmjs.com/package/@metamask/smart-accounts-kit) and other dependencies in your project:
Install the [Smart Accounts Kit](https://www.npmjs.com/package/@metamask/smart-accounts-kit) and other dependencies in your project:

```bash npm2yarn
npm install @metamask/smart-accounts-kit @web3auth/modal wagmi @tanstack/react-query
Expand Down Expand Up @@ -132,8 +132,8 @@ const bundlerClient = createBundlerClient({
### 3. Create a smart account

Create an account to create and redeem an invitation.
This account will create a delegation, and must be a [MetaMask smart account](/delegation-toolkit/concepts/smart-accounts).
This example uses a [Hybrid smart account](/delegation-toolkit/guides/smart-accounts/create-smart-account/#create-a-hybrid-smart-account), which is a flexible smart account implementation that supports both an externally owned account (EOA) owner and any number of passkey (WebAuthn) signers:
This account will create a delegation, and must be a [MetaMask smart account](/smart-accounts-kit/concepts/smart-accounts).
This example uses a [Hybrid smart account](/smart-accounts-kit/guides/smart-accounts/create-smart-account/#create-a-hybrid-smart-account), which is a flexible smart account implementation that supports both an externally owned account (EOA) owner and any number of passkey (WebAuthn) signers:

```tsx
import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit';
Expand Down Expand Up @@ -183,7 +183,7 @@ You can use the [MetaMask faucet](/developer-tools/faucet) to get Sepolia ETH.

#### 4.3. Create an open root delegation

Create an [open root delegation](/delegation-toolkit/concepts/delegation) to represent an invitation.
Create an [open root delegation](/smart-accounts-kit/concepts/delegation) to represent an invitation.
A root delegation is the first delegation in a chain of delegations, and an open root delegation grants permission to any account.
In this example, the inviter creates an invitation that can be redeemed by any invitee, allowing the invitee to spend up to 0.001 ETH.

Expand Down Expand Up @@ -259,7 +259,7 @@ const decodedDelegation = decodeDelegation(encodedDelegation);

#### 5.2. Redeem the delegation

[Redeem the delegation](/delegation-toolkit/guides/delegation/execute-on-smart-accounts-behalf/#7-redeem-the-delegation) by submitting a user operation from the smart account to the `DelegationManager` contract.
[Redeem the delegation](/smart-accounts-kit/guides/delegation/execute-on-smart-accounts-behalf/#7-redeem-the-delegation) by submitting a user operation from the smart account to the `DelegationManager` contract.
Submitting the user operation deploys the account for first-time users.

The delegation manager validates the delegation and executes delegated actions.
Expand Down Expand Up @@ -299,6 +299,6 @@ const userOperationHash = await bundlerClient.sendUserOperation({
## Next steps

- See [`invitation-link-example`](https://github.com/MetaMask/gator-examples/tree/feat/invitation-link-example/examples/invitation-link-example) on GitHub for a complete example dapp.
- When creating an invitation, you can add more rules and restrictions using [delegation scopes](/delegation-toolkit/guides/delegation/use-delegation-scopes) and [caveat enforcers](/delegation-toolkit/guides/delegation/use-delegation-scopes/constrain-scope).
- Learn more about [smart account implementations](/delegation-toolkit/guides/smart-accounts/create-smart-account).
- Learn more about [delegation types](/delegation-toolkit/concepts/delegation/#delegation-types).
- When creating an invitation, you can add more rules and restrictions using [delegation scopes](/smart-accounts-kit/guides/delegation/use-delegation-scopes) and [caveat enforcers](/smart-accounts-kit/guides/delegation/use-delegation-scopes/constrain-scope).
- Learn more about [smart account implementations](/smart-accounts-kit/guides/smart-accounts/create-smart-account).
- Learn more about [delegation types](/smart-accounts-kit/concepts/delegation/#delegation-types).
Loading
Loading