import { Tick, TickConstructorArgs, TickDataProvider } from '../entities'; export interface SwapState { amountSpecifiedRemaining: bigint; amountCalculated: bigint; sqrtPriceX96: bigint; tick: number; liquidity: bigint; } /** * Construct a swap simulator * @param sqrtRatioX96 The sqrt of the current ratio of amounts of token1 to token0 * @param tickCurrent The current tick of the pool * @param tickSpacing The spacing between ticks * @param liquidity The current value of in range liquidity * @param fee The fee in hundredths of a bips of the input amount of every swap that is collected by the pool * @param ticks The current state of the pool ticks or a data provider that can return tick data */ export declare class SwapSimulator { readonly sqrtRatioX96: bigint; readonly tickCurrent: number; readonly tickSpacing: number; readonly liquidity: bigint; readonly fee: number; readonly ticks: TickDataProvider; constructor(sqrtRatioX96: bigint, tickCurrent: number, tickSpacing: number, liquidity: bigint, fee: number, ticks: TickDataProvider | (Tick | TickConstructorArgs)[]); /** * Given an input amount of a token, return the computed output amount * @param zeroForOne Whether the trade is zero for one * @param inputAmount The input amount for which to quote the output amount * @param sqrtPriceLimitX96 The Q64.96 sqrt price limit * @returns The output amount and the pool with updated state */ swapExactIn(zeroForOne: boolean, inputAmount: bigint, sqrtPriceLimitX96?: bigint): Promise; /** * Given a desired output amount of a token, return the computed input amount * @param zeroForOne Whether the trade is zero for one * @param outputAmount the output amount for which to quote the input amount * @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this value after the swap. If one for zero, the price cannot be greater than this value after the swap * @returns The input amount and the pool with updated state */ swapExactOut(zeroForOne: boolean, outputAmount: bigint, sqrtPriceLimitX96?: bigint): Promise; /** * Executes a swap * @param zeroForOne Whether the amount in is token0 or token1 * @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative) * @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this value after the swap. If one for zero, the price cannot be greater than this value after the swap * @returns amountCalculated */ swap(zeroForOne: boolean, amountSpecified: bigint, sqrtPriceLimitX96?: bigint): Promise; }