UNPKG

@firmachain/firma-js

Version:

The Official FirmaChain Javascript SDK written in Typescript

80 lines (79 loc) 4.62 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 (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.CommonTxClient = void 0; var proto_signing_1 = require("@cosmjs/proto-signing"); var tx_1 = require("cosmjs-types/cosmos/bank/v1beta1/tx"); var tx_2 = require("cosmjs-types/cosmos/distribution/v1beta1/tx"); var tx_3 = require("cosmjs-types/cosmos/gov/v1beta1/tx"); var tx_4 = require("cosmjs-types/cosmos/staking/v1beta1/tx"); var tx_5 = require("cosmjs-types/cosmwasm/wasm/v1/tx"); var AuthzTxTypes_1 = require("../authz/AuthzTxTypes"); var ContractTxTypes_1 = require("../contract/ContractTxTypes"); var FeeGrantTxTypes_1 = require("../feegrant/FeeGrantTxTypes"); var NftTxTypes_1 = require("../nft/NftTxTypes"); var TokenTxTypes_1 = require("../token/TokenTxTypes"); var ITxClient_1 = require("./ITxClient"); var types = [ ["/cosmos.authz.v1beta1.MsgExec", AuthzTxTypes_1.MsgExec], ["/cosmos.authz.v1beta1.MsgGrant", AuthzTxTypes_1.MsgGrant], ["/cosmos.authz.v1beta1.MsgRevoke", AuthzTxTypes_1.MsgRevoke], ["/cosmos.bank.v1beta1.MsgSend", tx_1.MsgSend], ["/cosmos.bank.v1beta1.MsgMultiSend", tx_1.MsgMultiSend], ["/firmachain.firmachain.contract.MsgCreateContractFile", ContractTxTypes_1.MsgCreateContractFile], ["/firmachain.firmachain.contract.MsgAddContractLog", ContractTxTypes_1.MsgAddContractLog], ["/cosmwasm.wasm.v1.MsgStoreCode", tx_5.MsgStoreCode], ["/cosmwasm.wasm.v1.MsgInstantiateContract", tx_5.MsgInstantiateContract], ["/cosmwasm.wasm.v1.MsgExecuteContract", tx_5.MsgExecuteContract], ["/cosmwasm.wasm.v1.MsgUpdateAdmin", tx_5.MsgUpdateAdmin], ["/cosmwasm.wasm.v1.MsgClearAdmin", tx_5.MsgClearAdmin], ["/cosmwasm.wasm.v1.MsgMigrateContract", tx_5.MsgMigrateContract], ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", tx_2.MsgFundCommunityPool], ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", tx_2.MsgSetWithdrawAddress], ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", tx_2.MsgWithdrawDelegatorReward], ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", tx_2.MsgWithdrawValidatorCommission], ["/cosmos.feegrant.v1beta1.MsgGrantAllowance", FeeGrantTxTypes_1.MsgGrantAllowance], ["/cosmos.feegrant.v1beta1.MsgRevokeAllowance", FeeGrantTxTypes_1.MsgRevokeAllowance], ["/cosmos.gov.v1beta1.MsgDeposit", tx_3.MsgDeposit], ["/cosmos.gov.v1beta1.MsgSubmitProposal", tx_3.MsgSubmitProposal], ["/cosmos.gov.v1beta1.MsgVote", tx_3.MsgVote], ["/ibc.applications.transfer.v1.MsgTransfer", NftTxTypes_1.MsgTransfer], ["/firmachain.firmachain.nft.MsgTransfer", NftTxTypes_1.MsgTransfer], ["/firmachain.firmachain.nft.MsgMint", NftTxTypes_1.MsgMint], ["/firmachain.firmachain.nft.MsgBurn", NftTxTypes_1.MsgBurn], ["/cosmos.staking.v1beta1.MsgDelegate", tx_4.MsgDelegate], ["/cosmos.staking.v1beta1.MsgUndelegate", tx_4.MsgUndelegate], ["/cosmos.staking.v1beta1.MsgBeginRedelegate", tx_4.MsgBeginRedelegate], ["/cosmos.staking.v1beta1.MsgEditValidator", tx_4.MsgEditValidator], ["/cosmos.staking.v1beta1.MsgCreateValidator", tx_4.MsgCreateValidator], ["/firmachain.firmachain.token.MsgCreateToken", TokenTxTypes_1.MsgCreateToken], ["/firmachain.firmachain.token.MsgUpdateTokenURI", TokenTxTypes_1.MsgUpdateTokenURI], ["/firmachain.firmachain.token.MsgMint", NftTxTypes_1.MsgMint], ["/firmachain.firmachain.token.MsgBurn", NftTxTypes_1.MsgBurn] ]; var registry = new proto_signing_1.Registry(types); var CommonTxClient = /** @class */ (function (_super) { __extends(CommonTxClient, _super); function CommonTxClient(wallet, address) { return _super.call(this, wallet, address, registry) || this; } CommonTxClient.getRegistry = function () { return registry; }; return CommonTxClient; }(ITxClient_1.ITxClient)); exports.CommonTxClient = CommonTxClient;