firma-js-chain-2.0
Version:
The Official FirmaChain Javascript SDK written in Typescript
41 lines (40 loc) • 1.84 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.BankTxClient = void 0;
var proto_signing_1 = require("@cosmjs/proto-signing");
var tx_1 = require("cosmjs-types/cosmos/bank/v1beta1/tx");
var ITxClient_1 = require("../common/ITxClient");
var types = [
["/cosmos.bank.v1beta1.MsgSend", tx_1.MsgSend],
["/cosmos.bank.v1beta1.MsgMultiSend", tx_1.MsgMultiSend]
];
var registry = new proto_signing_1.Registry(types);
var BankTxClient = /** @class */ (function (_super) {
__extends(BankTxClient, _super);
function BankTxClient(_wallet, _addr) {
return _super.call(this, _wallet, _addr, registry) || this;
}
BankTxClient.prototype.msgSend = function (data) {
return { typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: data };
};
BankTxClient.prototype.msgMultiSend = function (data) {
return { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: data };
};
return BankTxClient;
}(ITxClient_1.ITxClient));
exports.BankTxClient = BankTxClient;