UNPKG

@taquito/taquito

Version:

High level functionality that builds upon the other packages in the Tezos Typescript Library Suite.

31 lines 1.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ProposalsOperation = void 0; const operations_1 = require("./operations"); /** * * @description ProposalsOperation provides utility functions to fetch a new operation of kind proposals * */ class ProposalsOperation extends operations_1.Operation { constructor(hash, params, source, raw, results, context) { super(hash, raw, results, context); this.params = params; this.source = source; } get operationResults() { const proposalsOp = Array.isArray(this.results) && this.results.find((op) => op.kind === 'proposals'); const result = proposalsOp; return result ? result : undefined; } get proposals() { return this.params.proposals; } get period() { var _a; return (_a = this.operationResults) === null || _a === void 0 ? void 0 : _a.period; } } exports.ProposalsOperation = ProposalsOperation; //# sourceMappingURL=proposals-operation.js.map