/swaps item and on every status_changed event.
Donβt hardcode status strings
Depending on the source chain, a deposit flows through one of two machines: EVM (deploy β swap) or Solana (settle). So each item carries three fields that let you react to meaning rather than memorizing every string:phase: which leg of the lifecycle:deploy|swap|settle|donecategory: the integrator-facing meaning, independent of chain:waiting: queued, will be picked up automaticallyactive: a transaction is in flight right nowretrying: the last attempt failed or was deferred; will retry after backoffsuccess: terminal, funds deliveredfailed: terminal, gave up
terminal:trueonce no further automatic transition will happen (completedordead)
terminal: true. completed is success, dead is failure. Everything else is in-progress.
Status reference
Happy paths
The error field
When a swap is in a retrying state (or dead), its error is a structured error:
errorisnullon any non-failing state. A non-nullerrornever means success. Success is alwaysstatus: "completed"witherror: null.- Branch on
error.code(stable), not onmessage. error.retryablereflects whether the worker will try again. Adeaditem always reportsretryable: false.
Retries & backoff
Failed attempts are retried automatically with exponential backoff:UNSUPPORTED_DEST, the item becomes dead. Every attempt emits a status_changed event carrying the incremented retryCount and the current error, so you can surface retry progress in real time.
deferred (Solana) is not a failure. It means settlement is temporarily blocked (e.g. no quote yet, or the accumulated balance is still too small) and will be retried. It shares the same backoff and dead cap as the failing states.Reacting to states
Next steps
Events
The event stream, and replaying what you missed after a disconnect.
API Reference
Every endpoint, request and response shape, and the error model.