UNPKG

@swaptoshi/dex-module

Version:

Klayr decentralized exchange (dex) on-chain module

71 lines (70 loc) 2.99 kB
import { Modules, Types } from 'klayr-framework'; export declare class DexEndpoint extends Modules.BaseEndpoint { getConfig(_context: Types.ModuleEndpointContext): Promise<import("./types").DexModuleConfig>; quoteExactInput(context: Types.ModuleEndpointContext): Promise<{ amountOut: string; sqrtPriceX96AfterList: string[]; initializedTicksCrossedList: string[]; }>; quoteExactInputSingle(context: Types.ModuleEndpointContext): Promise<{ amountOut: string; sqrtPriceX96After: string; initializedTicksCrossed: string; }>; quoteExactOutput(context: Types.ModuleEndpointContext): Promise<{ amountIn: string; sqrtPriceX96AfterList: string[]; initializedTicksCrossedList: string[]; }>; quoteExactOutputSingle(context: Types.ModuleEndpointContext): Promise<{ amountIn: string; sqrtPriceX96After: string; initializedTicksCrossed: string; }>; quotePrice(context: Types.ModuleEndpointContext): Promise<{ price: number; pair: string; }>; getPoolAddressFromCollectionId(context: Types.ModuleEndpointContext): Promise<{ poolAddress: string; }>; getPool(context: Types.ModuleEndpointContext): Promise<{ address: Buffer<ArrayBufferLike>; collectionId: Buffer<ArrayBufferLike>; token0: Buffer; token1: Buffer; fee: import("./stores/library/int").Uint24String; tickSpacing: import("./stores/library/int").Int24String; maxLiquidityPerTick: import("./stores/library/int").Uint128String; feeGrowthGlobal0X128: import("./stores/library/int").Uint256String; feeGrowthGlobal1X128: import("./stores/library/int").Uint256String; liquidity: import("./stores/library/int").Uint128String; slot0: import("./types").Slot0; }>; getPosition(context: Types.ModuleEndpointContext): Promise<{ value: { principal0: string; principal1: string; fees0: string; fees1: string; }; token0: Buffer; token1: Buffer; fee: string; tickLower: import("./stores/library/int").Int24String; tickUpper: import("./stores/library/int").Int24String; liquidity: import("./stores/library/int").Uint128String; feeGrowthInside0LastX128: import("./stores/library/int").Uint256String; feeGrowthInside1LastX128: import("./stores/library/int").Uint256String; tokensOwed0: import("./stores/library/int").Uint128String; tokensOwed1: import("./stores/library/int").Uint128String; }>; getTokenURI(context: Types.ModuleEndpointContext): Promise<{ tokenURI: string; }>; getMetadata(context: Types.ModuleEndpointContext): Promise<import("./types").NFTMetadata>; observe(context: Types.ModuleEndpointContext): Promise<{ tickCumulatives: string[]; secondsPerLiquidityCumulativeX128s: string[]; }>; }