UNPKG

ndtr-dexter

Version:

Customizable Typescript SDK for interacting with Cardano DEXs

29 lines (28 loc) 1.52 kB
import { LiquidityPool } from './models/liquidity-pool'; import { BaseDataProvider } from '../providers/data/base-data-provider'; import { Token } from './models/asset'; import { BaseDex } from './base-dex'; import { DatumParameters, PayToAddress, RequestConfig, SwapFee, UTxO } from '../types'; import { BaseApi } from './api/base-api'; export declare class Minswap extends BaseDex { readonly name: string; readonly api: BaseApi; /** * On-Chain constants. */ readonly marketOrderAddress: string; readonly limitOrderAddress: string; readonly lpTokenPolicyId: string; readonly poolNftPolicyId: string; readonly poolValidityAsset: string; constructor(requestConfig?: RequestConfig); liquidityPoolAddresses(provider: BaseDataProvider): Promise<string[]>; liquidityPools(provider: BaseDataProvider): Promise<LiquidityPool[]>; liquidityPoolFromUtxo(provider: BaseDataProvider, utxo: UTxO): Promise<LiquidityPool | undefined>; estimatedGive(liquidityPool: LiquidityPool, swapOutToken: Token, swapOutAmount: bigint): bigint; estimatedReceive(liquidityPool: LiquidityPool, swapInToken: Token, swapInAmount: bigint): bigint; priceImpactPercent(liquidityPool: LiquidityPool, swapInToken: Token, swapInAmount: bigint): number; buildSwapOrder(liquidityPool: LiquidityPool, swapParameters: DatumParameters): Promise<PayToAddress[]>; buildCancelSwapOrder(txOutputs: UTxO[], returnAddress: string): Promise<PayToAddress[]>; swapOrderFees(): SwapFee[]; }