UNPKG

@firmachain/firma-js

Version:

The Official FirmaChain Javascript SDK written in Typescript

52 lines (51 loc) 2.37 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.TokenTxClient = void 0; var proto_signing_1 = require("@cosmjs/proto-signing"); var TokenTxTypes_1 = require("./TokenTxTypes"); var ITxClient_1 = require("../common/ITxClient"); var types = [ ["/firmachain.firmachain.token.MsgCreateToken", TokenTxTypes_1.MsgCreateToken], ["/firmachain.firmachain.token.MsgUpdateTokenURI", TokenTxTypes_1.MsgUpdateTokenURI], ["/firmachain.firmachain.token.MsgMint", TokenTxTypes_1.MsgMint], ["/firmachain.firmachain.token.MsgBurn", TokenTxTypes_1.MsgBurn] ]; var registry = new proto_signing_1.Registry(types); var TokenTxClient = /** @class */ (function (_super) { __extends(TokenTxClient, _super); function TokenTxClient(wallet, serverUrl) { return _super.call(this, wallet, serverUrl, registry) || this; } TokenTxClient.getRegistry = function () { return registry; }; TokenTxClient.msgCreateToken = function (data) { return { typeUrl: "/firmachain.firmachain.token.MsgCreateToken", value: data }; }; TokenTxClient.msgUpdateTokenURI = function (data) { return { typeUrl: "/firmachain.firmachain.token.MsgUpdateTokenURI", value: data }; }; TokenTxClient.msgMint = function (data) { return { typeUrl: "/firmachain.firmachain.token.MsgMint", value: data }; }; TokenTxClient.msgBurn = function (data) { return { typeUrl: "/firmachain.firmachain.token.MsgBurn", value: data }; }; return TokenTxClient; }(ITxClient_1.ITxClient)); exports.TokenTxClient = TokenTxClient;