Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

useName

Reverse lookup — resolve an address to its primary name.

Usage

import { useName } from "@oniym/react";
 
function Avatar({ address }: { address: string }) {
  const { data: name } = useName(address);
 
  return <span>{name ?? address}</span>;
}

Parameters

ParameterTypeDescription
addressstring | undefinedEVM address. Query disabled when undefined.

Returns

UseQueryResult<string | null>

Returns the claimed primary name, or null if no reverse record is set.

Query key

["oniym", "name", address]