Documentation Index
Fetch the complete documentation index at: https://docs.trustware.io/llms.txt
Use this file to discover all available pages before exploring further.
POST https://api.trustware.io/api/v1/routes/route
Builds the full transaction payload for signing and broadcasting. Call this after the user confirms the quote. Trustware creates an intent record internally so the transaction can be tracked from receipt submission through final settlement.
Pass a metadata object with any fields you need echoed back in all subsequent status responses — user ID, withdrawal ID, fiat destination, or any other reference data.
Request
| Field | Required | Description |
|---|---|---|
fromChain | Yes | Source chain ID as a string. |
toChain | Yes | Destination chain ID as a string. Use "stellar" for Stellar. |
fromToken | Yes | Source token contract address. Use "0xeeee...eeee" for the native token. |
toToken | Yes | Destination token contract address. |
fromAmount | Yes | Amount in the smallest unit of the source token. |
fromAmountUSD | No | USD equivalent of fromAmount. Used for display and analytics. |
fromAddress | Yes | Sender wallet address. |
toAddress | Yes | Recipient wallet address. |
slippage | No | Slippage tolerance as a percentage. Defaults to 1. |
slippageBps | No | Slippage in basis points. Equivalent to slippage * 100. |
metadata | No | Arbitrary key-value object echoed in all status responses. Use for user attribution. |
Response
| Field | Description |
|---|---|
intentId | Unique identifier for this intent. Pass this to /receipt and /status. |
route.estimate | Fee and amount estimates (same structure as the /quote response). |
route.execution.transaction | The transaction object to sign and broadcast. Pass this to your signing infrastructure. |
route.execution.transaction.to | Spender for this route — the provider contract (Squid, LiFi, etc.) the transaction is sent to. Changes when the selected provider changes between quotes. |
route.execution.transaction.data | Encoded calldata for the route transaction. |
route.execution.transaction.value | Native token value to send with the transaction (in wei). |
route.provider | The bridge/swap provider selected for this route (e.g. "squid", "lifi"). |
route.requestId | Provider-level request ID for debugging. |
route.reliabilityScore | Provider reliability score for this route (0–1). |
Token approvals
If the source token is an ERC-20, the user must approve the route’s spender before broadcasting. The spender isroute.execution.transaction.to — a provider contract (Squid, LiFi, etc.), not a Trustware contract.
Re-quoting can change the selected provider, which changes the spender. In that case the user will need a fresh approval. Check current allowance against the latest to address with GET /allowance before broadcasting.