import BigNumber from "bignumber.js"; import { TickData } from "../../types/TickData"; /** * * @notice Calculates sqrt(1.0001^tick) * @param tick The input tick for the above formula * @return sqrtPrice A Bignumber representing the sqrt of the ratio of the two assets (token1/token0) * at the given tick */ export declare function tickToSqrtPrice(tick: number): BigNumber; /** * * @notice Calculates the greatest tick value such that tickToSqrtPrice(tick) <= sqrtPrice * @param sqrtPrice The sqrt ratio for which to compute the tick * @return tick The greatest tick for which the ratio is less than or equal to the input ratio */ export declare function sqrtPriceToTick(sqrtPrice: BigNumber): number; /** * Calculates the word and bit position for a given tick in a bitmap. * * @param tick - The tick index. * @returns A tuple of [word index, bit position within the word]. */ export declare function position(tick: number): [word: number, position: number]; /** * * @notice Flips the initialized state for a given tick from false to true, or vice versa * @param bitmap The mapping in which to flip the tick * @param tick The tick to flip */ export declare function flipTick(bitmap: Record, tick: number, tickSpacing: number): void; /** * * @notice Returns the next initialized tick contained in the same word (or adjacent word) as the tick that is either * to the left (less than or equal to) or right (greater than) of the given tick * @param bitmap The mapping in which to compute the next initialized tick * @param tick The starting tick * @param lte Whether to search for the next initialized tick to the left (less than or equal to the starting tick) * @return next The next initialized or uninitialized tick up to 256 ticks away from the current tick * @return initialized Whether the next tick is initialized, as the function only searches within up to 256 ticks */ export declare function nextInitialisedTickWithInSameWord(bitmap: Record, tick: number, tickSpacing: number, lte: boolean): [number, boolean]; /** * * @notice Retrieves fee growth data * @param tickLowerData The tick data of lower tick boundary of the position * @param tickUpperData The tick data of upper tick boundary of the position * @param tickCurrent The current tick * @param feeGrowthGlobal0 The all-time global fee growth, per unit of liquidity, in token0 * @param feeGrowthGlobal1 The all-time global fee growth, per unit of liquidity, in token1 * @return feeGrowthInside0 The all-time fee growth in token0, per unit of liquidity, inside the position's tick boundaries * @return feeGrowthInside1 The all-time fee growth in token1, per unit of liquidity, inside the position's tick boundaries */ export declare function getFeeGrowthInside(tickLowerData: TickData, tickUpperData: TickData, tickCurrent: number, feeGrowthGlobal0: BigNumber, feeGrowthGlobal1: BigNumber): BigNumber[]; /** * * @notice Derives max liquidity per tick from given tick spacing * @dev thows if the ticks are not in the valid range * @param tickLower lower tick * @param tickUpper upper tick */ export declare function checkTicks(tickLower: number, tickUpper: number): void; /** * * @notice Derives max liquidity per tick from given tick spacing * @dev Executed within the pool constructor * @param tickSpacing The amount of required tick separation, realized in multiples of `tickSpacing` * e.g., a tickSpacing of 3 requires ticks to be initialized every 3rd tick i.e., ..., -6, -3, 0, 3, 6, ... * @return The max liquidity per tick */ export declare function tickSpacingToMaxLiquidityPerTick(tickSpacing: number): BigNumber; /** * Fee Amount mapped to the tick spacing */ export declare const feeAmountTickSpacing: { 500: number; 3000: number; 10000: number; }; /** * * @notice it will make the tick countable for other token * @param tick * @return reverse tick */ export declare function flipTickOrientation(tick: number): number; /** * * @notice it will ensure the tick spacing * @param tick - tick to be spaced * @param tickSpacing - tick spacing that should be considered while spacing a tick * @return spaced tick */ export declare function spaceTick(tick: number, tickSpacing: number): number; //# sourceMappingURL=tick.helper.d.ts.map