Install React peers
Complete provider tree
CTokenProvider props
Required:network, publicClient, and children. Optional: walletClient, tokens, and the core configuration options. In Next.js, create clients inside a Client Component.
Tokens display in array order; discovered holdings append when indexing is enabled. tokens={[]} disables defaults. See token hooks for resolution helpers.
Token images
icon accepts an image URL or app-served path; place these files in public/tokens. Omit it for built-in metadata. Missing/broken images use generated avatars. Indexing is unnecessary.
Supply your wallet client
An explicitwalletClient works without WagmiProvider. Keep QueryClientProvider around hooks and widgets:
Set the client’s
account, keep it stable between renders, replace it on account/chain changes, and pass null/undefined on disconnect. Use your own connect/disconnect UI.
Keep the wagmi peer dependency installed even when supplying your own wallet.
The public client handles reads and receipts; the wallet client signs and submits transactions. Session vouchers authorize reveals but cannot replace the wallet for writes.
Ethers or another wallet library
Adapt an ethers v6BrowserProvider to the required viem WalletClient:
custom(walletProvider) directly. Refresh the adapter on account/chain changes and clear it on disconnect. Other signers need a compatible signing adapter. See ethers BrowserProvider and viem WalletClient.