Skip to content

MetaMask Smart Account

MetaMask Smart Account has two types of implementations, each offering unique features and use cases. See Hybrid Smart Account and Multisig Smart Account to learn more about the implementations.

To implement MetaMask Smart Account, you can use the toMetaMaskSmartAccount function from delegation toolkit.

Install

pnpm
pnpm add @metamask/delegation-toolkit

Usage

example.ts
import { 
  Implementation, 
  toMetaMaskSmartAccount, 
} from "@metamask/delegation-toolkit"
import { client } from './client.js'
import { owner } from './owner.js'
 
const account = await toMetaMaskSmartAccount({ 
  client, 
  implementation: Implementation.Hybrid, 
  deployParams: [owner.address, [], [], []], 
  deploySalt: "0x", 
  signatory: { account: owner }, 
}) 

Returns

SmartAccount<MetaMaskSmartAccountImplementation<TImplementation>>

Parameters

See Parameters