UNPKG

@pokt-network/pocket-js

Version:

Pocket-js core package with the main functionalities to interact with the Pocket Network.

61 lines 2.13 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.MsgNodeUnjailTx = void 0; var tx_msg_1 = require("./tx-msg"); var utils_1 = require("./../../../utils"); /** * Model representing a MsgNodeUnjail to unjail as an Node in the Pocket Network */ var MsgNodeUnjailTx = /** @class */ (function (_super) { __extends(MsgNodeUnjailTx, _super); /** * @param {string} address - Address value */ function MsgNodeUnjailTx(address) { var _this = _super.call(this) || this; _this.AMINO_KEY = "pos/MsgUnjail"; _this.address = address; var errorOrUndefined = utils_1.validateAddressHex(_this.address); if (utils_1.typeGuard(errorOrUndefined, Error)) { throw errorOrUndefined; } return _this; } /** * Converts an Msg Object to StdSignDoc * @returns {object} - Msg type key value. * @memberof MsgNodeUnjail */ MsgNodeUnjailTx.prototype.toStdSignDocMsgObj = function () { return { type: this.AMINO_KEY, value: { address: this.address.toLowerCase() } }; }; /** * Converts an Msg Object to StdTx * @returns {any} - Msg type key value. * @memberof MsgNodeUnjail */ MsgNodeUnjailTx.prototype.toStdTxMsgObj = function () { return this.toStdSignDocMsgObj(); }; return MsgNodeUnjailTx; }(tx_msg_1.TxMsg)); exports.MsgNodeUnjailTx = MsgNodeUnjailTx; //# sourceMappingURL=msg-node-unjail.js.map