pollStatus

open suspend fun pollStatus(request: LifiStatusRequest, onUpdate: (LifiStatusRawResponse) -> Boolean? = null, options: LifiPollStatusOptions = LifiPollStatusOptions()): Result<LifiStatusRawResponse>

Polls the LiFi status for a transfer until it reaches a terminal state (DONE / FAILED) or times out.

Return

A successful Result containing the DONE status, or the most recent status when onUpdate returns false to stop early. Returns a failed Result when the transfer reaches FAILED (LifiTradeAssetException.LifiTransferFailed), when polling times out (LifiTradeAssetException.PollTimeout), or when repeated errors exceed the configured cap (LifiTradeAssetException.PollFailed).

Parameters

request

The status request describing which transfer to poll.

onUpdate

Optional callback invoked on each non-terminal status. Return false to stop polling.

options

Polling configuration (interval, initial delay, timeout).