UNPKG

locklift

Version:

Node JS framework for working with Ever contracts. Inspired by Truffle and Hardhat. Helps you to build, test, run and maintain your smart contracts.

58 lines (57 loc) 1.67 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LockliftWallet = void 0; const everscale_standalone_client_1 = require("everscale-standalone-client"); class LockliftWallet extends everscale_standalone_client_1.GenericAccount { constructor(args) { super({ address: args.address, publicKey: args.publicKey, abi: LOCKLIFT_WALLET_ABI, prepareMessage: async (args, ctx) => { const payload = args.payload ? ctx.encodeInternalInput(args.payload) : ""; return { method: "sendTransaction", params: { dest: args.recipient, value: args.amount, bounce: args.bounce, flags: 3, payload, }, }; }, }); } } exports.LockliftWallet = LockliftWallet; const LOCKLIFT_WALLET_ABI = `{ "ABI version": 2, version: "2.2", header: ["pubkey", "time", "expire"], functions: [ { name: "constructor", inputs: [], outputs: [], }, { name: "sendTransaction", inputs: [ { name: "dest", type: "address" }, { name: "value", type: "uint128" }, { name: "bounce", type: "bool" }, { name: "flags", type: "uint8" }, { name: "payload", type: "cell" }, ], outputs: [], }, ], data: [], events: [], fields: [ { name: "_pubkey", type: "uint256" }, { name: "_timestamp", type: "uint64" }, { name: "_constructorFlag", type: "bool" }, ], }`;