Extending Client with ERC-7811 Actions
Setting up your Viem Client
To use the experimental functionality of ERC-7811, you can extend your existing (or new) Viem Client with experimental ERC-7811 Actions.
import { createClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { erc7811Actions } from 'viem/experimental'
const client = createClient({
chain: mainnet,
transport: http(),
}).extend(erc7811Actions())
const assets = await client.getAssets({
account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
})