How it works
Trails is built on an intent address primitive: a unique contract address computed from the full transaction parameters. When a user deposits tokens into their intent address, Trails automatically executes every step needed to deliver the result: swaps, bridges, relaying, with no further input from the user.- Intent definition: specify the origin token, destination token, amount, and target chain
- Intent address generation: Trails computes a unique address encoding all transaction parameters
- User deposits: the user transfers tokens to their intent address in a single confirmation
- Origin execution: a relayer executes the encoded origin transaction (swaps, bridges as needed)
- Destination settlement: bridged funds arrive and the final transaction executes on the destination chain
- Receipt: Trails confirms settlement; funds reach the recipient
Widget & SDK
The Trails Widget is a drop-in React component that handles the full payment UI. The Headless SDK gives you full control over the presentation while Trails handles the execution.| Path | Package | Best for |
|---|---|---|
| Widget | 0xtrails/widget | Drop-in UI: wraps any button or element |
| Headless SDK | 0xtrails | Custom UI with full control over presentation |
Pay
Accept any token from any chain and receive a specific token on a specific chain. Users pay from their full cross-chain balance.Fund
Deposit funds into any wallet or chain from any starting token. Fund mode includes a built-in onramp: users can fund directly from a credit card, bank account, or existing crypto balance without leaving your app.mode="fund" is set.
Swap
Exchange any token for any other token across chains.Direct API
The Direct API lets you build the full intent lifecycle in server-side code, with no frontend required.Install
Initialize
X-Access-Key header. Base URL: https://trails-api.sequence.app/rpc/Trails/.
Step 1: Get a quote
Step 2: Commit the quote
Step 3: Execute
Transfer method: send tokens to the intent deposit address, then confirm:Step 4: Monitor until complete
getIntentReceipt for non-blocking status checks. Terminal states: SUCCEEDED, FAILED.
Supported chains and tokens
Trails supports all EVM-compatible chains. To query available tokens and supported networks:Get started
Trails quickstart
Integrate the Widget, Headless SDK, or Direct API in minutes.
API reference
Full endpoint reference, request/response schemas, and error codes.