Calculates the complete swap result including fees for a bonding curve swap.
An object containing the actual input amount, fee, and output amount
Error if the bucket has insufficient reserves or calculation errors occur
The bonding curve bucket
The input amount (before fees)
The swap direction (Buy = SOL in, tokens out; Sell = tokens in, SOL out)
Generated using TypeDoc
Calculates the complete swap result including fees for a bonding curve swap.
Returns
An object containing the actual input amount, fee, and output amount
Throws
Error if the bucket has insufficient reserves or calculation errors occur