UNPKG

@q-dev/q-js-sdk

Version:

Typescript Library to interact with Q System Contracts

35 lines 1.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PushPaymentsInstance = void 0; const SystemContractInstance_1 = require("../SystemContractInstance"); /** * Push payments instance to interact with Push payments contract. * See [onchain documentation](@system-contracts-repo/@network/PushPayments/) for more details. * An instance of this class for a deployed network can be obtained via {@link ContractRegistryInstance.pushPayments} */ class PushPaymentsInstance extends SystemContractInstance_1.SystemContractInstance { constructor(signerOrProvider, address) { super(signerOrProvider, 'PushPayments.json', address); } /** * [External documentation](@system-contracts-repo/@network/PushPayments/#balanceof) */ async balanceOf(account) { return (await this.instance.balanceOf(account)).toString(); } /** * [External documentation](@system-contracts-repo/@network/PushPayments/#safetransferto) */ async safeTransferTo(account, txOptions) { return this.submitTransaction('safeTransferTo', [account], txOptions); } /** * [External documentation](@system-contracts-repo/@network/PushPayments/#withdraw) */ async withdraw(txOptions) { return this.submitTransaction('withdraw', [], txOptions); } } exports.PushPaymentsInstance = PushPaymentsInstance; PushPaymentsInstance.registryKey = 'tokeneconomics.pushPayments'; //# sourceMappingURL=PushPaymentsInstance.js.map