pk_...) and the SDK installed.
Add a swap
RenderSwap with the source and destination. Set from.amount to fix what the customer spends, or to.amount to fix what they receive.
to.amount) when the receiving side needs a precise amount, such as a settlement or invoice. Use exact input (from.amount) for conversions where the sender controls the spend. Set slippageTolerance to cap price movement, for example 0.005 for 0.5%.
Accept USDT on Tron
To let a customer pay from a Tron wallet, install@0xtrails/tvm and pass tronAdapter() in adapters. The widget detects installed Tron wallets and offers Tron as a source.
tronAdapter() to the same array. The same prop works on Fund and Pay. For server-side Tron flows, see Tron and Solana in the API reference.
Build your own swap UI
useQuote returns a live quote and a send function, so you can render your own interface. It requires TrailsProvider; see React hooks.
refetchQuote before executing a quote the customer has been viewing.
From your server
For treasury movements and settlement between networks, such as USDT on Tron to USDC on Polygon, quote and execute the intent with the API. Tron and Solana are supported as origins and destinations alongside EVM networks. See quotes and execution. By default, routing balances cost and speed. To favor one, setpreference in the quote options to FASTEST or CHEAPEST. The preference is best effort: if no route matches it, OMS returns the best available route instead.