getWalletClient
Action for accessing viem's Wallet Client for connected account.
import { getWalletClient } from '@wagmi/core'
Usage
The following examples use the ENS Registry contract.
import { getWalletClient } from '@wagmi/core'
const walletClient = await getWalletClient()
Return Value
WalletClient
Configuration
chainId (optional)
Chain ID to use for the Wallet Client.
import { getWalletClient } from '@wagmi/core'
import { optimism } from '@wagmi/core/chains'
const walletClient = await getWalletClient({
chainId: optimism.id,
})