@ardier16/q-js-sdk
Version:
Typescript Library to interact with Q System Contracts
35 lines • 1.51 kB
JavaScript
;
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(web3, address) {
super(web3, 'PushPayments.json', address);
}
/**
* [External documentation](@system-contracts-repo/@network/PushPayments/#balanceof)
*/
async balanceOf(account) {
return this.instance.methods.balanceOf(account).call();
}
/**
* [External documentation](@system-contracts-repo/@network/PushPayments/#safetransferto)
*/
async safeTransferTo(account, txOptions) {
return this.submitTransaction(this.instance.methods.safeTransferTo(account), txOptions);
}
/**
* [External documentation](@system-contracts-repo/@network/PushPayments/#withdraw)
*/
async withdraw(txOptions) {
return this.submitTransaction(this.instance.methods.withdraw(), txOptions);
}
}
exports.PushPaymentsInstance = PushPaymentsInstance;
PushPaymentsInstance.registryKey = 'tokeneconomics.pushPayments';
//# sourceMappingURL=PushPaymentsInstance.js.map