Skip to content
docs

NameResolver

Defined in: names.ts:71

Turns names into addresses for one chain and back. names-ens implements it; nameResolvers combines several.

readonly id: string

Defined in: names.ts:73

Resolver id, e.g. ens.

avatar(name): Promise<string | null>

Defined in: names.ts:85

Avatar URL (https / ipfs / resolved NFT image) or null. Wallets should fetch it through their own proxy.

string

Promise<string | null>


resolve(name, chain, options?): Promise<ResolvedName>

Defined in: names.ts:81

Name → address for chain. Throws NameError; never falls back to another chain’s record. fresh: true must bypass any cache: the signing-time check (assertNameUnchanged) asks that way, and a cached answer would let a re-pointed name through.

string

string

boolean

Promise<ResolvedName>


reverse(address, chain): Promise<string | null>

Defined in: names.ts:83

Address → primary name, verified by forward resolution; null when there is none or it does not match.

string

string

Promise<string | null>


supports(name): boolean

Defined in: names.ts:75

Cheap shape check: does this resolver serve names like this one? No I/O.

string

boolean