LifiProtocol that supply defaults.
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