Skip to content
docs

ZeroExRemoteOptions

Defined in: protocol-swap2-0x/src/remote.ts:185

optional allowInsecureBaseUrl?: boolean

Defined in: protocol-swap2-core/dist/remote.d.ts:109

Allow a non-https absolute baseUrl (local development only). Quotes, builds and typed orders travel this channel; over plain http anyone on the path can rewrite them (scan 2026-10-27 modules, F4).

Pick.allowInsecureBaseUrl


baseUrl: string

Defined in: protocol-swap2-core/dist/remote.d.ts:34

Endpoint prefix, e.g. “/api/v2/swap2” (same-origin) or absolute URL.

Pick.baseUrl


optional chains?: Readonly<Record<number, ZeroExChain | null>>

Defined in: protocol-swap2-0x/src/remote.ts:151

ZeroExPinsConfig.chains


optional defaultSlippageBps?: number

Defined in: protocol-swap2-0x/src/remote.ts:157

The most slippage accepted when a request names none, bps. Default 50; keep it in step with the backend’s default.

ZeroExPinsConfig.defaultSlippageBps


optional enabled?: () => boolean

Defined in: protocol-swap2-core/dist/remote.d.ts:38

Optional synchronous dark flag for accurate client-side discovery.

boolean

Pick.enabled


optional fetchImpl?: {(input, init?): Promise<Response>; (input, init?): Promise<Response>; }

Defined in: protocol-swap2-core/dist/remote.d.ts:111

Defaults to globalThis.fetch — injectable for tests.

(input, init?): Promise<Response>

MDN Reference

URL | RequestInfo

RequestInit

Promise<Response>

(input, init?): Promise<Response>

MDN Reference

string | URL | Request

RequestInit

Promise<Response>

Pick.fetchImpl


optional headers?: Record<string, string>

Defined in: protocol-swap2-core/dist/remote.d.ts:113

Extra headers (e.g. auth) attached to every call.

Pick.headers


optional rpcUrls?: Readonly<Record<number, readonly string[]>>

Defined in: protocol-swap2-0x/src/remote.ts:153

JSON-RPC endpoints per EVM chain id — the app’s own, for the Settler registry read.

ZeroExPinsConfig.rpcUrls


optional settlerMaxAgeMs?: number

Defined in: protocol-swap2-0x/src/remote.ts:154

ZeroExPinsConfig.settlerMaxAgeMs


optional settlerResolver?: SettlerResolver

Defined in: protocol-swap2-0x/src/remote.ts:155

ZeroExPinsConfig.settlerResolver


optional timeoutMs?: number

Defined in: protocol-swap2-core/dist/remote.d.ts:115

Per-request fail-closed timeout. Defaults to 12 seconds.

Pick.timeoutMs