UNPKG

@taquito/taquito

Version:

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

32 lines 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DrainDelegateOperation = void 0; const operations_1 = require("./operations"); /** * * @description DrainDelegateOperation provides utility functions to fetch a new operation of kind drain_delegate * */ class DrainDelegateOperation extends operations_1.Operation { constructor(hash, params, raw, results, context) { super(hash, raw, results, context); this.params = params; } get operationResults() { const drainDelegateOp = Array.isArray(this.results) && this.results.find((op) => op.kind === 'drain_delegate'); const result = drainDelegateOp && drainDelegateOp.metadata && drainDelegateOp.metadata.balance_updates; return result ? result : undefined; } get consensusKey() { return this.params.consensus_key; } get delegate() { return this.params.delegate; } get destination() { return this.params.destination; } } exports.DrainDelegateOperation = DrainDelegateOperation; //# sourceMappingURL=drain-delegate-operation.js.map