Lifi
Lifi provider implementation for trading functionality.
This class provides access to Lifi's cross-chain trading capabilities, including routes discovery, quotes, transaction status, and step details, as well as the high-level tradeAsset bridging method.
Parameters
The Lifi trading API instance.
Closure that signs and submits an EVM transaction (injected by Portal).
Closure that waits for on-chain confirmation (injected by Portal).
Polling configuration used per-step while executing tradeAsset.
Constructors
Functions
Retrieves a quote from the Lifi integration.
Retrieves routes from the Lifi integration.
Retrieves an unsigned transaction from the Lifi integration that has yet to be signed/submitted.
Retrieves the status of a transaction from the Lifi integration.
Polls the LiFi status for a transfer until it reaches a terminal state (DONE / FAILED) or times out.
High-level bridging method that fetches routes, executes each step sequentially (sign, confirm on-chain, poll LiFi status until terminal), and returns the resulting transaction hashes, executed steps, and the selected route.