@firmachain/firma-js
Version:
The Official FirmaChain Javascript SDK written in Typescript
56 lines (55 loc) • 2.6 kB
JavaScript
;
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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
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.StakingTxClient = void 0;
var proto_signing_1 = require("@cosmjs/proto-signing");
var tx_1 = require("cosmjs-types/cosmos/staking/v1beta1/tx");
var ITxClient_1 = require("../common/ITxClient");
var types = [
["/cosmos.staking.v1beta1.MsgDelegate", tx_1.MsgDelegate],
["/cosmos.staking.v1beta1.MsgUndelegate", tx_1.MsgUndelegate],
["/cosmos.staking.v1beta1.MsgBeginRedelegate", tx_1.MsgBeginRedelegate],
["/cosmos.staking.v1beta1.MsgEditValidator", tx_1.MsgEditValidator],
["/cosmos.staking.v1beta1.MsgCreateValidator", tx_1.MsgCreateValidator],
];
var registry = new proto_signing_1.Registry(types);
var StakingTxClient = /** @class */ (function (_super) {
__extends(StakingTxClient, _super);
function StakingTxClient(wallet, serverUrl) {
return _super.call(this, wallet, serverUrl, registry) || this;
}
StakingTxClient.getRegistry = function () {
return registry;
};
StakingTxClient.msgDelegate = function (data) {
return { typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: data };
};
StakingTxClient.msgUndelegate = function (data) {
return { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: data };
};
StakingTxClient.msgRedelegate = function (data) {
return { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: data };
};
StakingTxClient.msgEditValidator = function (data) {
return { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: data };
};
StakingTxClient.msgCreateValidator = function (data) {
return { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: data };
};
return StakingTxClient;
}(ITxClient_1.ITxClient));
exports.StakingTxClient = StakingTxClient;