EnsResolverOptions
Defined in: names-ens/src/ens.ts:12
Options for ensResolver: an Ethereum-mainnet client or RPC URL, and caching.
Properties
Section titled “Properties”cacheTtlMs?
Section titled “cacheTtlMs?”
optionalcacheTtlMs?:number
Defined in: names-ens/src/ens.ts:29
Cache TTL for resolutions, reverse lookups and avatars. Default 5 min.
optionalccip?:EnsCcipOptions
Defined in: names-ens/src/ens.ts:27
How the client built from rpcUrl asks CCIP-Read gateways (see EnsCcipOptions). On React Native, offchain
names resolve only with ccip.fetch (one that refuses redirects, e.g. through your server) or
ccip.allowRedirectFollowingFetch. With your own client, use ccipRead: createEnsCcipRead(…) instead.
client?
Section titled “client?”
optionalclient?:object
Defined in: names-ens/src/ens.ts:19
A viem client on Ethereum mainnet (the registry + universal resolver live there). Create it with
ccipRead: ensCcipRead (or ccipRead: false): with viem’s default, a name’s offchain resolver
chooses URLs the user’s device fetches — http://192.168.1.1/… included. A client built from
rpcUrl has it already.
foreignTlds?
Section titled “foreignTlds?”
optionalforeignTlds?: readonlystring[]
Defined in: names-ens/src/ens.ts:36
TLDs this resolver should leave to others (sol, near, ton …). Default: those three plus t.me.
ipfsGateway?
Section titled “ipfsGateway?”
optionalipfsGateway?:string
Defined in: names-ens/src/ens.ts:34
IPFS gateway for ipfs:// avatars: an origin (https://gw.example, /ipfs/<cid> is appended, as viem did) or a
prefix ending in /ipfs/. Default https://ipfs.io/ipfs/. Point it at your own proxy to keep users’ IPs private.
rpcUrl?
Section titled “rpcUrl?”
optionalrpcUrl?:string
Defined in: names-ens/src/ens.ts:21
…or a mainnet RPC URL to build one from. One of the two is required.