import { DexRouter, DexFactory, DexPair } from '../contracts'; import { ContractTransaction } from 'ethers'; export declare class Liquidity { router: DexRouter; factory: DexFactory; constructor(routerAddress: string, factoryAddress: string, privKey: string, rpcURL: string); /** * A getter function for DEX's Router contract's instance * @return {DexRouter} - DexRouter contract's instance. */ getRouter(): DexRouter; /** * A function to add liquidity to a given pair of tokens (token0 & token1). * @param {string} token0Address - token0 a KIP7 contract's address of a given pair of tokens (whose liquidity to be added). * @param {string} token1Address - token1 a KIP7 contract's address of a given pair of tokens (whose liquidity to be added). * @param {string} amount0Desired - desired / max amount of the tokens of token0 want to add as liquidity. * @param {string} amount1Desired - desired / max amount of the tokens of token1 want to add as liquidity. * @param {string} amount0Min - minimum amount of the tokens of token0 want to add as liquidity. * @param {string} amount1Min - minimum amount of the tokens of token1 want to add as liquidity. * @param {number} deadline - UTC timestamp as deadline of this transaction, once deadline passed on-chain transaction should be reverted. * @return {Promise} - ContractTransaction object. */ add(token0Address: string, token1Address: string, amount0Desired: string, amount1Desired: string, amount0Min: string, amount1Min: string, deadline: string): Promise; /** * A function to add liquidity with Klay to a given pair of tokens (token & Klay). * @param {string} token - token a KIP7 contract's address of a given pair of tokens (whose liquidity to be added). * @param {string} amountTokenDesired - desired / max amount of the tokens of Token want to add as liquidity. * @param {string} amountKlayDesired - desired / max amount of the tokens of Klay want to add as liquidity. * @param {string} amountTokenMin - minimum amount of the tokens of Token want to add as liquidity. * @param {string} amountKlayMin - minimum amount of the tokens of Klay want to add as liquidity. * @param {number} deadline - UTC timestamp as deadline of this transaction, once deadline passed on-chain transaction should be reverted. * @return {Promise} - ContractTransaction object. */ addWithKlay(token: string, amountTokenDesired: string, amountKlayDesired: string, amountTokenMin: string, amountKlayMin: string, deadline: string): Promise; /** * A function to remove liquidity from a given pair of tokens (token0 & token1). * @param {DexPair} pair - instance of DexPair from whom liquidity to be removed. * @param {string} amount0Min - minimum amount of the tokens of token0 want to receive. * @param {string} amount1Min - minimum amount of the tokens of token1 want to receive. * @param {string} liquidity - amount of LP token known as liquidity which is required to be removed. * @param {number} deadline - UTC timestamp as deadline of this transaction, once deadline passed on-chain transaction should be reverted. * @return {Promise} - ContractTransaction object. */ remove(pair: DexPair, liquidity: string, amount0Min: string, amount1Min: string, deadline: string): Promise; /** * A function to remove liquidity from a given pair of tokens (token & klay). * @param {DexPair} pair - instance of DexPair from whom liquidity to be removed. * @param {string} amountKlayMin - minimum amount of the tokens of Klay want to receive. * @param {string} amountTokenMin - minimum amount of the tokens of Token want to receive. * @param {string} liquidity - amount of LP token known as liquidity which is required to be removed. * @param {number} deadline - UTC timestamp as deadline of this transaction, once deadline passed on-chain transaction should be reverted. * @return {Promise} - ContractTransaction object. */ removeWithKlay(pair: DexPair, liquidity: string, amountTokenMin: string, amountKlayMin: string, deadline: string): Promise; /** * A getter function to fetch instance of DexPair contract. * @param {string} token0Address - Address of token0 contract. * @param {string} token1Address - Address of token1 contract. * @param {string} privKey - private key of signer account. * @param {string} rpcURL - RPC URL of blockchain provider. * @return {Promise} - DexPair contract's instance. */ getPair(token0Address: string, token1Address: string, privKey: string, rpcURL: string): Promise; /** * A getter function to get WKLAY contract's address * @return {string} - WKLAY address. */ getAddressOfWKLAY(): Promise; }