# Reverse Resolution

Reverse resolution is the opposite of forward resolution, instead of looking up an address from a name, you look up the reverse record associated with an address. This is essential for displaying human-readable names in your UI instead of raw addresses.

#### Using useReverseResolve

The useReverseResolve hook handles reverse resolution for Ethereum addresses with ENSIP-19 multichain support:

```tsx
import { useReverseResolve } from '@justaname.id/react';

export const UserIdentity = ({ address }: { address: string }) => {
  const { ensName, isReverseResolveLoading } = useReverseResolve({ address });

  if (isReverseResolveLoading) return <span>Loading...</span>;

  // Display the ENS name if available, otherwise show truncated address
  return (
    <span>
      {ensName || `${address.slice(0, 6)}...${address.slice(-4)}`}
    </span>
  );
};
```

#### Multichain Resolution

The hook uses a three-level fallback strategy for resolution:

1. Try with coinType 0 (default Ethereum)
2. Try with coinType based on chainId (multichain per ENSIP-19)
3. Fallback to JustaName offchain records

```tsx
const { ensName } = useReverseResolve({
  address: '0x1234...abcd',
  chainId: 8453, // Base chain
});
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.justaname.id/react-sdk/reverse-resolution.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
