Expand description
LiFi aggregator protocol facade.
Thin wrapper that hits the LiFi API (https://li.quest/v1/quote)
and converts the response into an AggregatorQuote for consumption
by the aggregator family’s plan::execute_quote.
§Authentication
LiFi’s API can be called without authentication (rate-limited) or
with an API key passed via the x-lifi-api-key header. fetch_quote
accepts api_key: Option<&str> so the facade works in both modes.
§Scope
- Multi-chain same-chain swaps (fromChain == toChain == request.chain_id); cross-chain bridging deferred.
- Exact-in only (fromAmount) — exact-out not supported by LiFi’s quote endpoint
Structs§
- Aggregator
Quote - A quote fetched from an aggregator API.
- Aggregator
Request - Parameters for an aggregator quote request.
- Plan
Fragment - Output of a plan function: a bundle of calls + declared approvals + value.
Enums§
- Aggregator
Error - Aggregator family error type. Facades may wrap their protocol-
specific errors in
AggregatorError::Protocol(String)for uniform handling.
Constants§
- API_
BASE_ URL - LiFi Quote API base URL.
- CHAIN_
ID_ ETHEREUM - Ethereum mainnet chain ID.
- LIFI_
DIAMOND - Canonical LiFi Diamond contract on Ethereum mainnet.