Use this page when you need more than the quickstart and want the full integration sequence.

Integration sequence

StepActionFailure to handle
1Fetch quotequote unavailable, unsupported route, expired quote
2Generate secretinsecure randomness, secret leakage, secret reuse
3Create orderquote consumed, amount mismatch, duplicate commitment
4Initiate source sideallowance failure, wrong token, wrong amount, already deployed
5Wait for solversolver delay, destination side missing
6Claim destination sidewrong secret, hop payload mismatch, vault missing
7Poll completionwatcher lag, bridge pending, expiry, cancel path

Quote and order rules

The order payload must match the consumed quote exactly:
  • source asset
  • destination asset
  • source amount
  • destination amount
  • quote ID
If the user edits amount, asset, recipient, or route after quote selection, request a new quote.

Initiation rules

Use the chain registry and order response to choose the right factory and token address. For Avalanche routes, the effective settlement chain may differ from the final destination chain because hop routes settle through a bridge-chain vault first.

Polling rules

Poll GET /orders/{order_id} and read:
  • source_intent.create_tx_hash
  • destination_intent.create_tx_hash
  • destination_intent.claim_tx_hash
  • destination_intent.bridge_tx_hash
  • source_intent.claim_tx_hash
  • any cancel_tx_hash
Show transaction hashes as soon as they exist. Users trust a pending swap more when they can inspect the chain themselves.
UI stateOrder fields
Waiting for source initiationmissing source_intent.create_tx_hash
Waiting for solversource initiated, destination not initiated
Ready to claimdestination initiated and not claimed
Claim pendingclaim submitted, waiting for watcher update
Bridge pendinghop route with bridge dispatch not finalized
Completeexpected claim fields populated for the route
Cancel availableexpiry reached and claim missing

Integration checklist

  • Keep the raw secret out of logs, analytics, URLs, and crash reports.
  • Treat quote and order amounts as base-unit strings.
  • Store order_id and both swap_id values.
  • Read route metadata before deciding what “complete” means.
  • Give users a visible cancel path for expired swaps.