RelayProviderConfig
Defined in: protocol-swap2-relay/src/provider.ts:41
Extended by
Section titled “Extended by”Properties
Section titled “Properties”apiKey?
Section titled “apiKey?”
optionalapiKey?:string
Defined in: protocol-swap2-relay/src/provider.ts:52
Sent as x-api-key when set. Relay’s /quote/v3 refuses a quote without one (401), so either this or a baseUrl
proxy that adds it is needed. Prefer the proxy — a key shipped in an app is public.
baseUrl?
Section titled “baseUrl?”
optionalbaseUrl?:string
Defined in: protocol-swap2-relay/src/provider.ts:47
Relay’s API (default https://api.relay.link) or the app’s own proxy in front of it. Untrusted either way: every answer is verified on the device.
clearedStore?
Section titled “clearedStore?”
optionalclearedStore?:RelayClearedStore
Defined in: protocol-swap2-relay/src/provider.ts:61
Where cleared order ids are also kept, so that “one deposit per order” survives an app restart (the built-in
record lives in memory). has is asked and add awaited right before a signature; either throwing refuses.
enabled?
Section titled “enabled?”
optionalenabled?:boolean
Defined in: protocol-swap2-relay/src/provider.ts:42
fetchImpl?
Section titled “fetchImpl?”
optionalfetchImpl?: {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Defined in: protocol-swap2-relay/src/provider.ts:56
Injectable for tests and for runtimes that bring their own.
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”RequestInfo | URL
RequestInit
Returns
Section titled “Returns”Promise<Response>
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”string | Request | URL
RequestInit
Returns
Section titled “Returns”Promise<Response>
quoteTtlMs?
Section titled “quoteTtlMs?”
optionalquoteTtlMs?:number
Defined in: protocol-swap2-relay/src/provider.ts:54
Local lifetime of a quote (default 60 s, at most 5 min). The order itself is refused once older than 10 min.