Skip to main content
Function Signature Four callable forms. The first is the protocol requirement, which takes all three arguments; the other three are convenience overloads on LifiProtocol that supply defaults.
Description Polls the Li.Fi status endpoint until the transfer reaches a terminal state, then returns the final status. This is the same polling tradeAsset performs internally after each step confirms, exposed for manual flows where you already hold a transaction hash. Returning false from onUpdate stops polling early and returns the last status received — it is not an error. Returning true continues polling. onUpdate only fires on non-terminal polls. A DONE status returns immediately and a FAILED status throws, so neither reaches the callback — read the terminal state from the return value rather than from onUpdate. Parameters The Required column describes the three-argument protocol requirement, where neither onUpdate nor options carries a default. The convenience overloads supply both, which is why most call sites pass only request. LifiPollStatusOptions: Returns LifiStatusRawResponse — the final status payload from Li.Fi, or the last one received if onUpdate returned false. Throws Also throws CancellationError if the surrounding Task is cancelled. Example Usage
With custom cadence:
Related Documentation