Get the smart wallet address
Once a smart wallet has been created for a user, you can get the address for the smart wallet by finding the account oftype: 'smart_wallet' from the user’s linkedAccounts array.Sign a message
Use thesignMessage function from the client returned by useSmartWallets hook in your React component to sign a message using the user’s smart wallet.Usage
Parameters
ThesignMessage method accepts the following parameters:string | {raw: Hex | ByteArray}
required
The message to sign by the smart account.
SignMessageModalUIOptions
Optional UI customization options for the signature prompt.
Returns
Hex
The signed message by the smart wallet.
Sign typed data
Use thesignTypedData function from the client returned by useSmartWallets hook in your React component to sign structured data using the user’s smart wallet.Usage
Parameters
ThesignTypedData method accepts the following parameters:SignTypedDataParameters
required
The typed data to sign by the smart account.
SignMessageModalUIOptions
Optional UI customization options for the signature prompt.
Returns
Hex
The signed message by the smart wallet.
Send a transaction
Use thesendTransaction function from the client returned by useSmartWallets hook in your React component to send a transaction using the user’s smart wallet.Usage
Parameters
ThesendTransaction method accepts the following parameters:SendTransactionParameters
required
The transaction to send by the smart account.
SendTransactionModalUIOptions
Optional UI customization options for the transaction prompt.
Returns
Hex
The transaction hash of the sent transaction.
Batch transactions
Smart wallets support sending a batch of transactions in a single, atomic submission to the network.Usage
Parameters
ThesendTransaction method for batching accepts the following parameters:Array<{to: string, value?: bigint, data?: string}>
required
Array of transactions to batch together.
SendTransactionModalUIOptions
Optional UI customization options for the transaction prompt.
Returns
Hex
The transaction hash of the batched transaction.
Switch chains
Use thegetClientForChain method to create a new smart wallet client for a specific chain.Usage
Parameters
ThegetClientForChain method accepts the following parameters:number
required
The chain ID to create a client for.
Returns
SmartWalletClient
A new smart wallet client configured for the specified chain.

