Skip to main content
The TypeScript SDK is WIP. Today, poll GET /intent-details/:intentId directly. Webhooks are planned but not yet shipped.
After submission, an intent moves through a small set of states. Today, you track via polling; the SDK’s subscribe is a thin polling helper, and webhook delivery is on the roadmap.

States

These come from the relayer’s IntentDetails.status field. Non-terminal (intent is still in flight): Terminal (intent is done, no further state changes): None of the terminal-failure states (failed, expired, cancelled) lose funds. The bridge’s escape path refunds the sender in all three cases, which is also why you can treat “no solver took it” as an expected failure mode rather than an emergency. State transitions are forward-only. Once terminal, the intent is final.

Poll

Direct API:
SDK (when published):
For interactive UIs, poll every 2–5 seconds while the intent is live (pending or solving).

Subscribe (polling helper)

Under the hood this is a polling loop against GET /intent-details/:intentId. When webhooks ship, this method will switch to a long-lived connection automatically.

Webhooks (planned)

WIP. The planned shape is shown for forward compatibility, none of these calls work today.
Each callback will be signed with HMAC using secret:
TODO: confirm webhook event names, payload shape, signature header, and retry policy before publish.

Choosing a method (today)

Idempotency (when webhooks ship)

Webhook deliveries can repeat on retries. Use the eventId in each callback to deduplicate before applying side effects.

Failure semantics

  • No solver bids before auction closes → intent transitions to expired, sender is refunded via the bridge’s escape path.
  • Solver bid but failed to deliver in the protocol’s execution window → intent transitions to failed, sender is refunded.
  • Sender cancels before a winner is picked → intent transitions to cancelled, sender is refunded.
Each of these is a handleable state, not an error. Surface the reason to the user and let them retry with wider parameters (higher reward, longer auction, looser minAmountOut, different chain pair).

Recipient flow: claiming funds

How recipients sweep settled stealth-address balances.