User's wallet address
Transaction object to build
Minimum output amount (slippage protection)
Input coin for the swap
Quote from the aggregator
Referral ID for tracking
Whether to print debug information
Optional
apiKey: stringAPI key for aggregator access
Optional
swapOptions: SwapOptionsSwap configuration options
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.