getAddresses
Returns a list of account addresses owned by the wallet or client.
Usage
ts
import { walletClient } from './client'
const accounts = await walletClient.getAddresses()
// ['0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC']
import { walletClient } from './client'
const accounts = await walletClient.getAddresses()
// ['0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC']
ts
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
export const walletClient = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum)
})
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
export const walletClient = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum)
})
Returns
A list of checksummed addresses.