import { CurrencyAmount, Price } from "./fractions";
import { Token } from "./token";
import { BigintIsh, FeeAmount } from "../internalConstants";
import { Tick, TickConstructorArgs } from "./tick";
import { TickDataProvider } from "./tickDataProvider";
export interface PoolConstructorArgs {
    id: number;
    active: boolean;
    tokenA: Token;
    tokenB: Token;
    fee: FeeAmount;
    sqrtPriceX64: BigintIsh;
    liquidity: BigintIsh;
    tickCurrent: number;
    feeGrowthGlobalAX64: BigintIsh;
    feeGrowthGlobalBX64: BigintIsh;
    ticks: TickDataProvider | (Tick | TickConstructorArgs)[];
}
/**
 * Represents a V3 pool
 */
export declare class Pool {
    readonly id: number;
    readonly active: boolean;
    readonly tokenA: Token;
    readonly tokenB: Token;
    readonly fee: FeeAmount;
    readonly sqrtPriceX64: bigint;
    readonly liquidity: bigint;
    readonly tickCurrent: number;
    readonly feeGrowthGlobalAX64: bigint;
    readonly feeGrowthGlobalBX64: bigint;
    readonly tickDataProvider: TickDataProvider;
    json?: any;
    buffer?: Uint8Array;
    bufferHash?: string;
    static hashToPoolMap: Map<string, Pool>;
    static idToPoolMap: Map<number, Pool>;
    private _tokenAPrice?;
    private _tokenBPrice?;
    /**
     * Construct 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 sqrtPriceX64 The sqrt of the current ratio of amounts of tokenB to tokenA
     * @param liquidity The current value of in range liquidity
     * @param tickCurrent The current tick of the pool
     * @param ticks The current state of the pool ticks or a data provider that can return tick data
     */
    constructor({ id, active, tokenA, tokenB, fee, sqrtPriceX64, liquidity, tickCurrent, ticks, feeGrowthGlobalAX64, feeGrowthGlobalBX64, }: PoolConstructorArgs);
    /**
     * Returns true if the token is either tokenA or tokenB
     * @param token The token to check
     * @returns True if token is either tokenA or token
     */
    involvesToken(token: Token): boolean;
    /**
     * Returns the current mid price of the pool in terms of tokenA, i.e. the ratio of tokenB over tokenA
     */
    get tokenAPrice(): Price<Token, Token>;
    /**
     * Returns the current mid price of the pool in terms of tokenB, i.e. the ratio of tokenA over tokenB
     */
    get tokenBPrice(): Price<Token, Token>;
    /**
     * Return the price of the given token in terms of the other token in the pool.
     * @param token The token to return price of
     * @returns The price of the given token, in terms of the other.
     */
    priceOf(token: Token): Price<Token, Token>;
    /**
     * Given an input amount of a token, return the computed output amount, and a pool with state updated after the trade
     * @param inputAmount The input amount for which to quote the output amount
     * @param sqrtPriceLimitX64 The Q64.96 sqrt price limit
     * @returns The output amount and the pool with updated state
     */
    getOutputAmount(inputAmount: CurrencyAmount<Token>, sqrtPriceLimitX64?: bigint): CurrencyAmount<Token>;
    /**
     * Given a desired output amount of a token, return the computed input amount and a pool with state updated after the trade
     * @param outputAmount the output amount for which to quote the input amount
     * @param sqrtPriceLimitX64 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
     */
    getInputAmount(outputAmount: CurrencyAmount<Token>, sqrtPriceLimitX64?: bigint): CurrencyAmount<Token>;
    /**
     * Executes a swap
     * @param zeroForOne Whether the amount in is tokenA or tokenB
     * @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)
     * @param sqrtPriceLimitX64 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
     * @returns sqrtPriceX64
     * @returns liquidity
     * @returns tickCurrent
     */
    private swap;
    get tickSpacing(): number;
    static toJSON(pool: Pool): object;
    static fromJSON(json: any): Pool;
    /**
     * Converts the pool to a byte array using msgpack encoding.
     * @param {Pool} pool - The pool instance to convert.
     * @returns {Uint8Array} The encoded bytes.
     */
    static toBuffer(pool: Pool): Uint8Array;
    /**
     * Creates a Pool instance from bytes or serialized data.
     * @param {Uint8Array | any} data - The bytes or serialized data.
     * @returns {Pool} The pool instance.
     */
    static fromBuffer(data: Uint8Array | any): Pool;
    static fromId(id: number): Pool;
    static createHash(buffer: Uint8Array, pool?: Pool): string | null;
    static hashEquals(pool: Pool, hash: string): boolean;
    equals(other: Pool): boolean;
}
