UNPKG

@pokt-network/pocket-js

Version:

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

62 lines 2.22 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.MsgAppUnstake = void 0; var tx_msg_1 = require("./tx-msg"); var utils_1 = require("./../../../utils"); /** * Model representing a MsgAppStake to unstake an Application in the Pocket Network */ var MsgAppUnstake = /** @class */ (function (_super) { __extends(MsgAppUnstake, _super); /** * The address hex of the Application to unstake for * @param {string} appAddress - Application address */ function MsgAppUnstake(appAddress) { var _this = _super.call(this) || this; _this.AMINO_KEY = "apps/MsgAppBeginUnstake"; _this.appAddress = appAddress; var errorOrUndefined = utils_1.validateAddressHex(_this.appAddress); if (utils_1.typeGuard(errorOrUndefined, Error)) { throw errorOrUndefined; } return _this; } /** * Converts an Msg Object to StdSignDoc * @returns {object} - Msg type key value. * @memberof MsgAppUnstake */ MsgAppUnstake.prototype.toStdSignDocMsgObj = function () { return { type: this.AMINO_KEY, value: { application_address: this.appAddress.toLowerCase() } }; }; /** * Converts an Msg Object to StdSignDoc * @returns {any} - Msg type key value. * @memberof MsgAppUnstake */ MsgAppUnstake.prototype.toStdTxMsgObj = function () { return this.toStdSignDocMsgObj(); }; return MsgAppUnstake; }(tx_msg_1.TxMsg)); exports.MsgAppUnstake = MsgAppUnstake; //# sourceMappingURL=msg-app-unstake.js.map