getAddress
import { getAddress } from '@coinbase/onchainkit/identity'; const address = await getAddress({ name: 'zizzamia.eth' });
import { getAddress } from '@coinbase/onchainkit/identity'; import { base } from 'viem/chains'; const address = await getAddress({ name: 'zizzamia.base.eth', chain: base });
type GetAddressReturnType = Address | null; type Address = `0x${string}`;
type GetAddressParams = { /** Name to resolve */ name: string | Basename; /** Optional chain for domain resolution */ chain?: Chain; }; type Basename = BaseMainnetName | BaseSepoliaName; type BaseMainnetName = `${string}.base.eth`; type BaseSepoliaName = `${string}.basetest.eth`; type Chain = { id: number; name: string; // ... other chain properties };
Was this page helpful?