User's wallet address
Transaction object to build
Minimum output amount (slippage protection). Will be ignored if slippage is provided in swapOptions. Optional, deprecated - use swapOptions.slippage instead.
Input coin for the swap
Quote from the aggregator
Referral ID for tracking
Whether to print debug information
OptionalapiKey: stringAPI key for aggregator access
OptionalswapOptions: SwapOptionsSwap configuration options. If slippage is provided, it will be used to calculate minAmountOut instead of the minAmountOut parameter.
Transaction result representing the output coin
Builds a swap transaction from a quote
This function constructs a complete swap transaction based on a quote from the aggregator. It handles service fees, multiple routes, and ensures proper transaction structure.