Skip to content

MetaMask Smart Account

MetaMask Smart Accounts has three types of implementations, each offering unique features and use cases. See Hybrid smart account, Multisig smart account, and Stateless 7702 smart account to learn more about the implementations.

To implement MetaMask Smart Accounts, you can use the toMetaMaskSmartAccount function from the Smart Accounts Kit.

Install

pnpm
pnpm add @metamask/smart-accounts-kit

Usage

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

Returns

SmartAccount<MetaMaskSmartAccountImplementation<TImplementation>>

Parameters

See Parameters