Skip to content


The useName hook is used to get name from an onchain identity provider for a given address.

Supported providers:

  • ENS


import { useName } from '@coinbase/onchainkit/identity';
const { data: name, isLoading } = useName({ address: '0x1234' });


type UseNameOptions = {
  address: Address; // The Ethereum address for which the ENS name is to be fetched.
  chain?: Chain; // Optional chain for domain resolution
type UseNameQueryOptions = {
  enabled?: boolean;
  cacheTime?: number;