LifiProviderConfig
Defined in: protocol-swap2-lifi/src/provider.ts:171
Explicit constructor configuration; no deployment environment is read.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”allowInsecureApiUrl?
Section titled “allowInsecureApiUrl?”
optionalallowInsecureApiUrl?:boolean
Defined in: protocol-swap2-lifi/src/provider.ts:179
Allow an http: apiUrl (local development only): the quotes and the Diamond calldata travel it, and over plain
http anyone on the path rewrites them (scan 2026-10-27 modules, F20).
apiKey?
Section titled “apiKey?”
optionalapiKey?:string
Defined in: protocol-swap2-lifi/src/provider.ts:180
apiUrl?
Section titled “apiUrl?”
optionalapiUrl?:string
Defined in: protocol-swap2-lifi/src/provider.ts:174
LI.FI REST base URL. Explicitly injectable for proxies and tests; must be https unless allowInsecureApiUrl.
chooseRoute?
Section titled “chooseRoute?”
optionalchooseRoute?: (routes,params) =>LifiRouteChoice|null|undefined
Defined in: protocol-swap2-lifi/src/provider.ts:204
Route policy hook. When set, a cross-chain quote first asks LI.FI’s
/advanced/routes for the candidates, hands them to this function and
restricts /quote to what it returns (allowBridges / denyBridges /
order). Returning null/undefined, or any failure of the routes call,
leaves LI.FI’s default pick. The policy itself (tie band, max ETA, deny
list) belongs to the app; the module only carries the choice.
Parameters
Section titled “Parameters”routes
Section titled “routes”readonly LifiRouteOption[]
params
Section titled “params”Returns
Section titled “Returns”LifiRouteChoice | null | undefined
defaultSlippageBps?
Section titled “defaultSlippageBps?”
optionaldefaultSlippageBps?:number
Defined in: protocol-swap2-lifi/src/provider.ts:195
Slippage sent when the caller names none (bps, default 50 = LI.FI’s own documented default). Left unset, LI.FI picks it per request and it swings (0.9%–6% within a minute on Base ETH → Robinhood, 2026-10-12): the display quote’s minimum then sits above the live one and the execution floor refuses a route that hasn’t moved.
enabled?
Section titled “enabled?”
optionalenabled?:boolean
Defined in: protocol-swap2-lifi/src/provider.ts:172
integrator?
Section titled “integrator?”
optionalintegrator?:string
Defined in: protocol-swap2-lifi/src/provider.ts:181
quoteTtlMs?
Section titled “quoteTtlMs?”
optionalquoteTtlMs?:number
Defined in: protocol-swap2-lifi/src/provider.ts:187
Fail-closed local lifetime for the provider’s documented ~60s quote window.
trustedApprovalAddresses?
Section titled “trustedApprovalAddresses?”
optionaltrustedApprovalAddresses?:Readonly<Record<string, readonlystring[]>>
Defined in: protocol-swap2-lifi/src/provider.ts:185
Additional audited ERC-20 spenders returned by LI.FI for direct routes.
trustedTransactionTargets?
Section titled “trustedTransactionTargets?”
optionaltrustedTransactionTargets?:Readonly<Record<string, readonlystring[]>>
Defined in: protocol-swap2-lifi/src/provider.ts:183
Additional audited LI.FI entry points for networks whose Diamond differs.