UNPKG

@q-dev/q-js-sdk

Version:

Typescript Library to interact with Q System Contracts

53 lines 2.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SystemReserveInstance = void 0; const SystemContractInstance_1 = require("../SystemContractInstance"); /** * System reserve instance to interact with System reserve contract. * See [onchain documentation](@system-contracts-repo/@network/SystemReserve/) for more details. * An instance of this class for a deployed network can be obtained via {@link ContractRegistryInstance.systemReserve} */ class SystemReserveInstance extends SystemContractInstance_1.SystemContractInstance { constructor(signerOrProvider, address) { super(signerOrProvider, 'SystemReserve.json', address); } /** * [External documentation](@system-contracts-repo/@network/SystemReserve/#cooldownphase) */ async coolDownPhase() { return (await this.instance.coolDownPhase()).toString(); } /** * [External documentation](@system-contracts-repo/@network/SystemReserve/#systempaused) */ async systemPaused() { return this.instance.systemPaused(); } /** * [External documentation](@system-contracts-repo/@network/SystemReserve/#availableamount) */ async availableAmount() { return (await this.instance.availableAmount()).toString(); } /** * [External documentation](@system-contracts-repo/@network/SystemReserve/#setpausestate) */ async setPauseState(state, txOptions) { return this.submitTransaction('setPauseState', [state], txOptions); } /** * [External documentation](@system-contracts-repo/@network/SystemReserve/#withdraw) */ async withdraw(amount, txOptions) { return this.submitTransaction('withdraw', [amount], txOptions); } /** * [External documentation](@system-contracts-repo/@network/SystemReserve/#geteligiblecontractkeys) */ async getEligibleContractKeys() { return this.instance.getEligibleContractKeys(); } } exports.SystemReserveInstance = SystemReserveInstance; SystemReserveInstance.registryKey = 'tokeneconomics.systemReserve'; //# sourceMappingURL=SystemReserveInstance.js.map