NameResolver
Defined in: names.ts:71
Turns names into addresses for one chain and back. names-ens implements it; nameResolvers combines several.
Properties
Section titled “Properties”
readonlyid:string
Defined in: names.ts:73
Resolver id, e.g. ens.
Methods
Section titled “Methods”avatar()
Section titled “avatar()”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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<string | null>
resolve()
Section titled “resolve()”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.
Parameters
Section titled “Parameters”string
string
options?
Section titled “options?”fresh?
Section titled “fresh?”boolean
Returns
Section titled “Returns”Promise<ResolvedName>
reverse()
Section titled “reverse()”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.
Parameters
Section titled “Parameters”address
Section titled “address”string
string
Returns
Section titled “Returns”Promise<string | null>
supports()
Section titled “supports()”supports(
name):boolean
Defined in: names.ts:75
Cheap shape check: does this resolver serve names like this one? No I/O.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean