Skip to content

getAddress

The getAddress utility is designed to retrieve an address from an onchain identity provider for a given name.

Usage

Get ENS Name from mainnet chain

code
import { getAddress } from '@coinbase/onchainkit/identity';
 
const address = await getAddress({ name: 'zizzamia.eth' });

Get Basename from base chain

code
import { getAddress } from '@coinbase/onchainkit/identity';
import { base } from 'viem/chains';
 
const address = await getAddress({ name: 'zizzamia.base.eth', chain: base });

Returns

Promise<GetAddressReturnType>

Parameters

GetAddress