import * as _aptos_labs_ts_sdk from '@aptos-labs/ts-sdk'; import { AnyNumber, InputEntryFunctionData, Network } from '@aptos-labs/ts-sdk'; import { Axios } from 'axios'; type PoolSortBy = "tvl"; declare enum PoolType { AMM = "AMM", CLMM = "CLMM", STABLE = "STABLE" } interface GetPoolsParams { page?: number; size?: number; sortBy?: PoolSortBy; type?: PoolType; } interface PoolToken { addr: string; amount: string; img: string; reserve: string; symbol: string; verified: boolean; } interface GetPools { apr: string; createdAt: string; fee: string; feeTier: string; poolId: string; poolType: PoolType; tokens: PoolToken[]; tvl: string; txns: number; volume: string; volumeData: { volume24h: string; volume30d: string; volume7d: string; volumeprev24h: string; }; volumePercentage24h: string; volumePercentage30d: string; volumePercentage7d: string; } interface PoolInfo { feeTier: string; poolId: string; poolType: PoolType; sqrtPrice: string; tickSpacing: number; tokens: { addr: string; decimals: number; reserve: number; ticker: string; verified: boolean; }[]; totalShare: string; } type PaginatedResult = { data: TData[]; total: number; }; type SimpleResult = TData; type RequestResult = { id: number; jsonrpc: string; method: string; result: TData; usIn: number; usOut: number; usDiff: number; }; type Nullable = T | undefined | null; declare class PoolModule { protected _sdk: TappSDK; constructor(sdk: TappSDK); getPools(params?: GetPoolsParams): Promise>; getInfo(poolId: string): Promise; } interface PositionToRemove { positionAddr: string; mintedShare: AnyNumber; minAmount0: AnyNumber; minAmount1: AnyNumber; } interface RemoveSingleAMMLiquidityParams extends PositionToRemove { poolId: string; } interface RemoveMultipleAMMLiquidityParams { poolId: string; positions: PositionToRemove[]; } interface RemoveSingleCLMMLiquidityParams extends PositionToRemove { poolId: string; } interface RemoveMultipleCLMMLiquidityParams { poolId: string; positions: PositionToRemove[]; } interface RemoveSingleStableLiquidityParams { poolId: string; liquidityType: number; position: { positionAddr: string; mintedShare: AnyNumber; amounts: AnyNumber[]; }; } interface RemoveMultipleStableLiquidityParams { poolId: string; liquidityType: number; positions: { positionAddr: string; mintedShare: AnyNumber; amounts: AnyNumber[]; }[]; } interface AddAMMLiquidityParams { poolId: string; amountA: number; amountB: number; } interface AddCLMMLiquidityParams { poolId: string; minPrice: number; maxPrice: number; amountA: number; amountB: number; fee: number; isMaxAmountB: boolean; } interface AddStableLiquidityParams { poolId: string; amounts: number[]; } interface CreateAMMPoolAndAddLiquidityParams { tokenAddress: string[]; fee: number; amounts: number[]; } interface CreateCLMMPoolAndAddLiquidityParams { tokenAddress: string[]; fee: number; amounts: number[]; initialPrice: number; minPrice: number; maxPrice: number; isMaxAmountB: boolean; } interface CreateStablePoolAndAddLiquidityParams { tokenAddress: string[]; fee: number; amounts: number[]; amplificationFactor: number; offpeg_fee_multiplier?: number; } interface CollectFeeParams { poolId: string; positionAddr: string; } declare class PositionModule { protected _sdk: TappSDK; constructor(sdk: TappSDK); removeSingleAMMLiquidity(params: RemoveSingleAMMLiquidityParams): InputEntryFunctionData; removeMultipleAMMLiquidity(params: RemoveMultipleAMMLiquidityParams): InputEntryFunctionData; removeSingleCLMMLiquidity(params: RemoveSingleCLMMLiquidityParams): InputEntryFunctionData; removeMultipleCLMMLiquidity(params: RemoveMultipleCLMMLiquidityParams): InputEntryFunctionData; removeSingleStableLiquidity(params: RemoveSingleStableLiquidityParams): InputEntryFunctionData; removeMultipleStableLiquidity(params: RemoveMultipleStableLiquidityParams): InputEntryFunctionData; addAMMLiquidity(params: AddAMMLiquidityParams): InputEntryFunctionData; addCLMMLiquidity(params: AddCLMMLiquidityParams): InputEntryFunctionData; addStableLiquidity(params: AddStableLiquidityParams): InputEntryFunctionData; createAMMPoolAndAddLiquidity(params: CreateAMMPoolAndAddLiquidityParams): InputEntryFunctionData; createCLMMPoolAndAddLiquidity(params: CreateCLMMPoolAndAddLiquidityParams): InputEntryFunctionData; createStablePoolAndAddLiquidity(params: CreateStablePoolAndAddLiquidityParams): InputEntryFunctionData; collectFee(params: CollectFeeParams): InputEntryFunctionData; } declare class RequestModule { protected _http: Axios; constructor(http: Axios); post(method: string, query?: Record): Promise; private _reqId; } interface SwapAMMParams { poolId: string; a2b: boolean; fixedAmountIn?: boolean; amount0: AnyNumber; amount1: AnyNumber; } interface SwapCLMMParams { poolId: string; amountIn: AnyNumber; minAmountOut: AnyNumber; a2b: boolean; fixedAmountIn: boolean; targetSqrtPrice: AnyNumber; } interface SwapStableParams { poolId: string; tokenIn: number; tokenOut: number; amountIn: AnyNumber; minAmountOut: AnyNumber; } interface SDKConfig { network: Network; url: string; contractAddress: string; } declare class SwapModule { protected _sdk: TappSDK; constructor(sdk: TappSDK); swapAMMTransactionPayload({ poolId, a2b, fixedAmountIn, amount0, amount1, }: SwapAMMParams): _aptos_labs_ts_sdk.InputEntryFunctionData; swapCLMMTransactionPayload({ poolId, amountIn, minAmountOut, a2b, fixedAmountIn, targetSqrtPrice, }: SwapCLMMParams): _aptos_labs_ts_sdk.InputEntryFunctionData; swapStableTransactionPayload({ poolId, tokenIn, tokenOut, amountIn, minAmountOut, }: SwapStableParams): _aptos_labs_ts_sdk.InputEntryFunctionData; getRoute(tokenAddr0: string, tokenAddr1: string): Promise; } declare class TappSDK { protected _pool: PoolModule; protected _swap: SwapModule; protected _position: PositionModule; protected _sdkConfig: SDKConfig; protected _request: RequestModule; constructor(config: SDKConfig); get Pool(): PoolModule; get Swap(): SwapModule; get Position(): PositionModule; get sdkConfig(): SDKConfig; get request(): RequestModule; } interface InitTappSDKConfig { network?: Network.MAINNET | Network.TESTNET; url?: string; } declare const initTappSDK: (initConfig: InitTappSDKConfig) => TappSDK; export { type AddAMMLiquidityParams, type AddCLMMLiquidityParams, type AddStableLiquidityParams, type CollectFeeParams, type CreateAMMPoolAndAddLiquidityParams, type CreateCLMMPoolAndAddLiquidityParams, type CreateStablePoolAndAddLiquidityParams, type GetPools, type GetPoolsParams, type Nullable, type PaginatedResult, type PoolInfo, type PoolSortBy, type PoolToken, PoolType, type RemoveMultipleAMMLiquidityParams, type RemoveMultipleCLMMLiquidityParams, type RemoveMultipleStableLiquidityParams, type RemoveSingleAMMLiquidityParams, type RemoveSingleCLMMLiquidityParams, type RemoveSingleStableLiquidityParams, type RequestResult, type SDKConfig, type SimpleResult, initTappSDK };