wait_crosschain_swaps

Documentation for eth_defi.lifi.crosschain.wait_crosschain_swaps function.

wait_crosschain_swaps(results, max_wait_seconds=None, poll_interval=10, progress=True)

Wait for cross-chain bridge transfers to complete on destination chains.

Polls the LI.FI GET /v1/status endpoint for each executed swap until all transfers reach a terminal status (DONE or FAILED) or the timeout is reached.

Parameters
Returns

Dict mapping tx_hash → final LI.FI status response dict. Each response contains a status field (DONE, FAILED, PENDING, etc.) and optionally a receiving dict with the destination transaction hash.

Return type

dict[hexbytes.main.HexBytes, dict]