@firmachain/firma-js
Version:
The Official FirmaChain Javascript SDK written in Typescript
52 lines (51 loc) • 2.64 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.DistributionTxClient = void 0;
var proto_signing_1 = require("@cosmjs/proto-signing");
var tx_1 = require("cosmjs-types/cosmos/distribution/v1beta1/tx");
var ITxClient_1 = require("../common/ITxClient");
var types = [
["/cosmos.distribution.v1beta1.MsgFundCommunityPool", tx_1.MsgFundCommunityPool],
["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", tx_1.MsgSetWithdrawAddress],
["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", tx_1.MsgWithdrawDelegatorReward],
["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", tx_1.MsgWithdrawValidatorCommission]
];
var registry = new proto_signing_1.Registry(types);
var DistributionTxClient = /** @class */ (function (_super) {
__extends(DistributionTxClient, _super);
function DistributionTxClient(wallet, serverUrl) {
return _super.call(this, wallet, serverUrl, registry) || this;
}
DistributionTxClient.getRegistry = function () {
return registry;
};
DistributionTxClient.msgFundCommunityPool = function (data) {
return { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: data };
};
DistributionTxClient.msgSetWithdrawAddress = function (data) {
return { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: data };
};
DistributionTxClient.msgWithdrawDelegatorReward = function (data) {
return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", value: data };
};
DistributionTxClient.msgWithdrawValidatorCommission = function (data) {
return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: data };
};
return DistributionTxClient;
}(ITxClient_1.ITxClient));
exports.DistributionTxClient = DistributionTxClient;