@kaiachain/web3js-ext
Version:
web3.js extension for kaiachain blockchain
12 lines (11 loc) • 874 B
TypeScript
import { Web3Context } from "web3-core";
import { EthExecutionAPI, Numbers, Transaction, Web3Eth } from "web3";
import { GaslessSwapRouter, getAmountRepay, getMinAmountOut, getAmountIn } from "./gasless.js";
export declare function context_gasless(context: Web3Context<EthExecutionAPI>, eth: Web3Eth): {
getGaslessSwapRouter: (address?: string) => Promise<GaslessSwapRouter>;
getApproveTx: (fromAddress: string, tokenAddr: string, routerAddress: string, gasPrice: Numbers) => Promise<Transaction>;
getSwapTx: (fromAddress: string, tokenAddr: string, routerAddress: string, amountIn: Numbers, minAmountOut: Numbers, amountRepay: Numbers, gasPrice: Numbers, approveRequired?: boolean, deadlineBuffer?: Numbers) => Promise<Transaction>;
getAmountRepay: typeof getAmountRepay;
getMinAmountOut: typeof getMinAmountOut;
getAmountIn: typeof getAmountIn;
};