Skip to content
docs

LayerswapProviderConfig

Defined in: protocol-swap2-layerswap/src/provider.ts:49

optional apiKey?: string

Defined in: protocol-swap2-layerswap/src/provider.ts:57

Sent as X-LS-APIKEY (Partner Dashboard → app → key; the key picks mainnet or testnet). Read endpoints answer without one; swap creation is attributed to it. Prefer a proxy that adds it — a key shipped in an app is public.


optional baseUrl?: string

Defined in: protocol-swap2-layerswap/src/provider.ts:52

Layerswap’s API (default https://api.layerswap.io/api/v2) or the app’s own proxy in front of it.


optional enabled?: boolean

Defined in: protocol-swap2-layerswap/src/provider.ts:50


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

Defined in: protocol-swap2-layerswap/src/provider.ts:59

Injectable for tests and for runtimes that bring their own.

(input, init?): Promise<Response>

MDN Reference

RequestInfo | URL

RequestInit

Promise<Response>

(input, init?): Promise<Response>

MDN Reference

string | Request | URL

RequestInit

Promise<Response>