Skip to content

useName

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

Supported providers:

  • ENS

Usage

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

Returns

type UseNameOptions = {
  address: `0x${string}`;
};
 
type UseNameQueryOptions = {
  enabled?: boolean;
  cacheTime?: number;
};