@verified-network/verified-sdk
Version:
An SDK to develop applications on the Verified Network
41 lines (40 loc) • 1.31 kB
TypeScript
import { VerifiedContract, Options } from "../index";
import { VerifiedWallet } from "../../../wallet";
type SingleSwap = {
poolId: string;
kind: string;
assetIn: string;
assetOut: string;
amount: string;
userData: string;
};
type Swap = {
poolId: string;
assetInIndex: string;
assetOutIndex: string;
amount: string;
userData: string;
};
type Funds = {
sender: string;
fromInternalBalance: boolean;
recipient: string;
toInternalBalance: boolean;
};
export default class PoolContract extends VerifiedContract {
contractAddress: string;
constructor(signer: VerifiedWallet);
_getMeeQuote(paymentTokenAddress: string, functionName: string, args: any[], apiKey?: string, rpcUrl?: string): Promise<{
tokenAddress: string;
amount: string;
amountInWei: string;
amouuntValue: string;
chainId: number;
functionName: string;
}>;
swap(_swap: SingleSwap, _funds: Funds, _limit: string, _deadline: string, options?: Options): any;
batchSwap(_kind: string, _swaps: Swap[], _assests: string[], _funds: Funds, _limits: string[], _deadline: string, options?: Options): any;
getPoolTokens(_poolId: string, options?: Options): any;
getPool(_poolId: string, options?: Options): any;
}
export {};