@kaiachain/web3js-ext
Version:
web3.js extension for kaiachain blockchain
21 lines (20 loc) • 1.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.context_gasless = context_gasless;
const gasless_js_1 = require("./gasless.js");
function context_gasless(context, eth) {
return {
getGaslessSwapRouter: async function (address) {
return await (0, gasless_js_1.getGaslessSwapRouter)(context, address);
},
getApproveTx: async function (fromAddress, tokenAddr, routerAddress, gasPrice) {
return await (0, gasless_js_1.getApproveTx)(context, eth, fromAddress, tokenAddr, routerAddress, gasPrice);
},
getSwapTx: async function (fromAddress, tokenAddr, routerAddress, amountIn, minAmountOut, amountRepay, gasPrice, approveRequired = false, deadlineBuffer = 1800) {
return await (0, gasless_js_1.getSwapTx)(eth, fromAddress, tokenAddr, routerAddress, amountIn, minAmountOut, amountRepay, gasPrice, approveRequired, deadlineBuffer);
},
getAmountRepay: gasless_js_1.getAmountRepay,
getMinAmountOut: gasless_js_1.getMinAmountOut,
getAmountIn: gasless_js_1.getAmountIn,
};
}