Docs

smartWallet

smartWallet allows you to connect to a smart wallet using a personal wallet (acting as the key to the smart wallet)

A Smart Wallet is a wallet that is controlled by a smart contract following the ERC-4337 specification .

Example

To connect to a smart wallet, a personal wallet (acting as the key to the smart wallet) must first be connected.

Refer to SmartWalletConnectionOptions to see all the options connect method accepts.

import { smartWallet } from "thirdweb/wallets";
import { metamaskWallet } from "thirdweb/wallets";
// connect a personal wallet first - e.g. metamask, coinbase, etc.
const metamask = metamaskWallet();
await metamask.connect();
const wallet = smartWallet({
client,
chain,
gasless: true,
});
await wallet.connect({
personalWallet: metamask,
});

Parameters

Returns

The SmartWallet instance