EnsCcipOptions
Defined in: names-ens/src/ens.ts:67
How ensCcipRequest / createEnsCcipRead reach CCIP-Read gateways.
Properties
Section titled “Properties”allowRedirectFollowingFetch?
Section titled “allowRedirectFollowingFetch?”
optionalallowRedirectFollowingFetch?:boolean
Defined in: names-ens/src/ens.ts:83
Ask gateways with the global fetch even on a runtime whose fetch follows redirects whatever redirect says
(React Native). Default false: there, without fetch, offchain (CCIP-Read) names do not resolve. true brings
them back and accepts the trade-off: a gateway that answers with a redirect makes the device send one blind
request (no answer is read) to the target, a LAN or loopback host included, before the redirect is noticed.
fetch?
Section titled “fetch?”
optionalfetch?: (url,init) =>Promise<Response>
Defined in: names-ens/src/ens.ts:76
The fetch used to ask gateways, in place of the default transport. Supply one that does not follow redirects: a
native fetch that honours redirect: 'manual'/'error', or one that sends the request to your own server’s
CCIP-Read proxy (which refuses redirects and checks the address it connects to). Passing it says redirects are
handled, so gateways are asked on every runtime, React Native included. The https check on the URL text still
runs first; where the host resolves is then up to this fetch (on Node it replaces the pinned transport — pass it
when gateways must go through a proxy or a split-horizon DNS you trust).
Parameters
Section titled “Parameters”string
RequestInit
Returns
Section titled “Returns”Promise<Response>
maxResponseBytes?
Section titled “maxResponseBytes?”
optionalmaxResponseBytes?:number
Defined in: names-ens/src/ens.ts:90
Largest gateway answer read, in bytes; a larger one (declared or streamed) is refused. Default 1 MiB.
timeoutMs?
Section titled “timeoutMs?”
optionaltimeoutMs?:number
Defined in: names-ens/src/ens.ts:88
For one gateway: the request and the whole answer. Default 10 s. Runs alongside the caller’s signal (viem passes none by default), so a gateway that never finishes its answer cannot hold the lookup.