jton-contracts
Version:
Free TON contracts wrapped in jTON
90 lines (89 loc) • 3.28 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SetcodeMultisigWallet = exports.SetcodeMultisigWalletContract = void 0;
const SetcodeMultisigWallet_1 = __importDefault(require("./source/SetcodeMultisigWallet"));
exports.SetcodeMultisigWalletContract = SetcodeMultisigWallet_1.default;
const jton_1 = require("jton");
__exportStar(require("./scripts"), exports);
class SetcodeMultisigWallet extends jton_1.Contract {
constructor(client, keys, timeout) {
super(client, {
abi: SetcodeMultisigWallet_1.default.abi,
tvc: SetcodeMultisigWallet_1.default.tvc,
initialData: {},
keys: keys
}, timeout);
}
/**********
* DEPLOY *
**********/
async deploy(input, timeout) {
return await super.deploy(input, timeout);
}
/**********
* PUBLIC *
**********/
async sendTransaction(input, keys) {
return await this.call('sendTransaction', input, keys);
}
async submitTransaction(input, keys) {
return await this.call('submitTransaction', input, keys);
}
async confirmTransaction(input, keys) {
return await this.call('confirmTransaction', input, keys);
}
async submitUpdate(input, keys) {
return await this.call('submitUpdate', input, keys);
}
async confirmUpdate(input, keys) {
return await this.call('confirmUpdate', input, keys);
}
async executeUpdate(input, keys) {
return await this.call('executeUpdate', input, keys);
}
/***********
* GETTERS *
***********/
async isConfirmed(input) {
return (await this.run('isConfirmed', input)).value.confirmed;
}
async getParameters() {
return (await this.run('getParameters')).value;
}
async getTransaction(input) {
return (await this.run('getTransaction', input)).value.trans;
}
async getTransactions() {
return (await this.run('getTransactions')).value.transactions;
}
async getTransactionIds() {
return (await this.run('getTransactionIds')).value.ids;
}
async getCustodians() {
return (await this.run('getCustodians')).value.custodians;
}
async getUpdateRequests() {
return (await this.run('getUpdateRequests')).value.updates;
}
}
exports.SetcodeMultisigWallet = SetcodeMultisigWallet;
SetcodeMultisigWallet.EXTERNAL = {
acceptTransfer: 'acceptTransfer'
};