import { BigintIsh, CurrencyAmount, Price, Token } from '@etcswapv2/sdk-core'; import JSBI from 'jsbi'; import { FeeAmount } from '../constants'; import { TickDataProvider } from './tickDataProvider'; /** * Represents a V3 pool */ export declare class Pool { readonly token0: Token; readonly token1: Token; readonly fee: FeeAmount; readonly sqrtRatioX96: JSBI; readonly liquidity: JSBI; readonly tickCurrent: number; readonly tickDataProvider: TickDataProvider; private _token0Price?; private _token1Price?; /** * Constructs a pool * @param tokenA One of the tokens in the pool * @param tokenB The other token in the pool * @param fee The fee in hundredths of a bips of the input amount of every swap that is collected by the pool * @param sqrtRatioX96 The sqrt of the current ratio of amounts of token1 to token0 * @param liquidity The current value of in range liquidity * @param tickCurrent The current tick of the pool * @param tickDataProvider The current state of the pool ticks */ constructor(tokenA: Token, tokenB: Token, fee: FeeAmount, sqrtRatioX96: BigintIsh, liquidity: BigintIsh, tickCurrent: number, tickDataProvider?: TickDataProvider); /** * Returns the chain ID of the tokens in the pool */ get chainId(): number; /** * Returns true if the token is either token0 or token1 */ involvesToken(token: Token): boolean; /** * Returns the current mid price of the pool in terms of token0 */ get token0Price(): Price; /** * Returns the current mid price of the pool in terms of token1 */ get token1Price(): Price; /** * Return the price of the given token in terms of the other token in the pool */ priceOf(token: Token): Price; /** * Returns the tick spacing of the pool */ get tickSpacing(): number; /** * Given an input amount of a token, return the computed output amount * @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 */ getOutputAmount(inputAmount: CurrencyAmount, sqrtPriceLimitX96?: JSBI): Promise<[CurrencyAmount, Pool]>; /** * Given a desired output amount of a token, return the computed input amount * @param outputAmount The output amount for which to quote the input amount * @param sqrtPriceLimitX96 The Q64.96 sqrt price limit * @returns The input amount and the pool with updated state */ getInputAmount(outputAmount: CurrencyAmount, sqrtPriceLimitX96?: JSBI): Promise<[CurrencyAmount, Pool]>; /** * Executes a swap * @param zeroForOne Whether the amount in is token0 or token1 * @param amountSpecified The amount of the swap * @param sqrtPriceLimitX96 The sqrt price limit */ private swap; /** * Computes a swap step */ private computeSwapStep; } //# sourceMappingURL=pool.d.ts.map