AcrossProviderConfig
Defined in: protocol-swap2-across/src/provider.ts:44
Extended by
Section titled “Extended by”Properties
Section titled “Properties”apiKey?
Section titled “apiKey?”
optionalapiKey?:string| (() =>string|undefined)
Defined in: protocol-swap2-across/src/provider.ts:56
The Across API V5 key (dashboard.across.to) — server only; the app convention is ACROSS_API_KEY. Best as a
getter read on every request, so the key lives where you keep secrets; a string is accepted too. It is sent only
as the Authorization: Bearer header to baseUrl, never put in a URL, a refusal or a quote, and an answer that
came through a redirect is refused. Without one (or one that is not printable ASCII) the provider quotes nothing
and reports itself disabled — it still builds, verifies and tracks. Under React Native a key is refused outright
(the constructor throws): use acrossRemoteProvider in the app. Across’s older integrator id and V4 key are not
used by this module.
baseUrl?
Section titled “baseUrl?”
optionalbaseUrl?:string
Defined in: protocol-swap2-across/src/provider.ts:58
V5 origin. Default https://api.across.to. Must be https (http only for localhost): the key rides on it.
enabled?
Section titled “enabled?”
optionalenabled?:boolean
Defined in: protocol-swap2-across/src/provider.ts:46
Dark flag (the app convention is ACROSS_ENABLED). Default true; without an apiKey the provider is disabled anyway.
fetchImpl?
Section titled “fetchImpl?”
optionalfetchImpl?: {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Defined in: protocol-swap2-across/src/provider.ts:76
Injectable for tests and for runtimes that bring their own.
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”URL | RequestInfo
RequestInit
Returns
Section titled “Returns”Promise<Response>
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”string | URL | Request
RequestInit
Returns
Section titled “Returns”Promise<Response>
maxFeeBps?
Section titled “maxFeeBps?”
optionalmaxFeeBps?:number
Defined in: protocol-swap2-across/src/provider.ts:70
Fee cap in bps of the input that a deposit may leave to relayers (default 1000 = 10 %, at most 5000).
quoteTtlMs?
Section titled “quoteTtlMs?”
optionalquoteTtlMs?:number
Defined in: protocol-swap2-across/src/provider.ts:72
Local lifetime of a quote (default 60 s, at most 5 min).
rpcUrls?
Section titled “rpcUrls?”
optionalrpcUrls?:Readonly<Record<string,string>>
Defined in: protocol-swap2-across/src/provider.ts:68
JSON-RPC URLs per CAIP-2 chain: status (the source chain’s to read the deposit, the destination’s to read its
fill), and the quote time when /suggested-fees does not answer (Ethereum’s and the source chain’s latest block).
suggestedFeesUrl?
Section titled “suggestedFeesUrl?”
optionalsuggestedFeesUrl?:string|null
Defined in: protocol-swap2-across/src/provider.ts:63
Across’s keyless relayer-fee quote (default ACROSS_SUGGESTED_FEES_URL); null turns it off and prices
every quote with the pinned floor (which needs rpcUrls for Ethereum and the source chain, for the quote time).
timeoutMs?
Section titled “timeoutMs?”
optionaltimeoutMs?:number
Defined in: protocol-swap2-across/src/provider.ts:74
Per API request, ms (default 10 000).