- Quote-first flow — use
useQuotewithactionswhen you want to build your own UI and preview a quote before sending it. - Send-transaction flow — use
useTrailsSendTransactionwithactionswhen you want to trigger the Trails Widget.
useQuote and useTrailsSendTransaction are human-readable decimal strings, so "0.2" means 0.2 USDC / USDT / ETH depending on the selected token.
What Composable Actions are
A Trails intent is a two-phase transaction:- The user signs once on the origin chain. Their funds are bridged and/or swapped to an intent wallet on the destination chain.
- Trails then runs the destination calls from that intent wallet.
useQuote or useTrailsSendTransaction.
Available action builders
Import the builders you need directly from0xtrails:
See Building Actions for the full API of each builder.
Demo
Try composable actions in the SDK sandbox.Where to go next
- Quickstart — a multi-step example combining
deposit,swap,assertCondition, andlendin a single intent. - Building Actions — the full builder API, one section per builder.
- Dynamic Values —
dynamic()andself()for runtime amount / address resolution. - Markets & Providers — discover markets and providers.
- ERC-20 Helpers — token registry, calldata builders, slippage helper.
- Supported Chains — chain identifiers and swap provider coverage.