> ## Documentation Index
> Fetch the complete documentation index at: https://docs.avok.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Resolve names

> Resolve ENS and SNS names to addresses when sending, using @avokjs/core/helpers.

Avok resolves `alice.eth` and `alice.sol` to addresses so a user can send to a name. Resolution is **read-only**: it needs no contract and no backend, and it lives in `@avokjs/core/helpers`.

## Build a resolver

Compose a cross-service resolver from an ENS resolver, an SNS resolver, or both. Each service takes the client you use to read its chain:

```ts theme={null}
import { createEnsResolver, createSnsResolver, createNameResolver } from "@avokjs/core/helpers";

const resolver = createNameResolver({
  ens: createEnsResolver({ chainId: 1, client: ensClient }),
  sns: createSnsResolver({ rpc: snsRpc }),
});
```

`createNameResolver` dispatches forward resolution by suffix (`.sol` goes to SNS, everything else to ENS) and verifies reverse lookups against a forward resolution, so a reverse hit is returned only if it maps back to the queried address.

## Resolve a recipient

`resolveRecipient` accepts either a raw address for the rail or a name, and returns the resolved address:

```ts theme={null}
import { resolveRecipient } from "@avokjs/core/helpers";

const result = await resolveRecipient(resolver, "alice.eth", "evm");
if ("error" in result) {
  // Show result.error to the user.
} else {
  // result.address is the recipient; result.resolvedFrom is the name it came from, if any.
}
```

The `rail` argument is `"evm"` or `"solana"`. A raw address for that rail passes through unchanged; a name is resolved through the resolver. For exact signatures, see the [core subpaths reference](/reference/core-subpaths).
