@swaptoshi/dex-module
Version:
Klayr decentralized exchange (dex) on-chain module
9 lines (8 loc) • 1.68 kB
TypeScript
import { Uint128String, Int128String, Uint256String, Int56String, Uint160String, Uint32String, Int24String } from '../int';
import { TickInfoStore } from '../../tick_info';
import { ImmutableContext, MutableContext, TickInfo } from '../../../types';
export declare function tickSpacingToMaxLiquidityPerTick(tickSpacing: Int24String): Uint128String;
export declare function getFeeGrowthInside(tickInfoStore: TickInfoStore, context: ImmutableContext, poolAddress: Buffer, tickLower: Int24String, tickUpper: Int24String, tickCurrent: Int24String, feeGrowthGlobal0X128: Uint256String, feeGrowthGlobal1X128: Uint256String): Promise<[feeGrowthInside0X128: Uint256String, feeGrowthInside1X128: Uint256String]>;
export declare function update(tickInfoStore: TickInfoStore, context: MutableContext, poolAddress: Buffer, tick: Int24String, tickCurrent: Int24String, liquidityDelta: Int128String, feeGrowthGlobal0X128: Uint256String, feeGrowthGlobal1X128: Uint256String, secondsPerLiquidityCumulativeX128: Uint160String, tickCumulative: Int56String, time: Uint32String, upper: boolean, maxLiquidity: Uint128String, simulation?: boolean): Promise<[flipped: boolean, tickInfo: TickInfo]>;
export declare function clear(tickInfoStore: TickInfoStore, context: MutableContext, poolAddress: Buffer, tick: Int24String, simulation?: boolean): Promise<void>;
export declare function cross(tickInfoStore: TickInfoStore, context: MutableContext, poolAddress: Buffer, tick: Int24String, feeGrowthGlobal0X128: Uint256String, feeGrowthGlobal1X128: Uint256String, secondsPerLiquidityCumulativeX128: Uint160String, tickCumulative: Int56String, time: Uint32String, simulation?: boolean): Promise<Int128String>;