UNPKG

firma-js-chain-2.0

Version:

The Official FirmaChain Javascript SDK written in Typescript

45 lines (44 loc) 2.06 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.NftTxClient = void 0; var proto_signing_1 = require("@cosmjs/proto-signing"); var NftTxTypes_1 = require("./NftTxTypes"); var ITxClient_1 = require("../common/ITxClient"); var types = [ ["/firmachain.firmachain.nft.MsgTransfer", NftTxTypes_1.MsgTransfer], ["/firmachain.firmachain.nft.MsgMint", NftTxTypes_1.MsgMint], ["/firmachain.firmachain.nft.MsgBurn", NftTxTypes_1.MsgBurn], ]; var registry = new proto_signing_1.Registry(types); var NftTxClient = /** @class */ (function (_super) { __extends(NftTxClient, _super); function NftTxClient(_wallet, _addr) { return _super.call(this, _wallet, _addr, registry) || this; } NftTxClient.prototype.msgTransfer = function (data) { return { typeUrl: "/firmachain.firmachain.nft.MsgTransfer", value: data }; }; NftTxClient.prototype.msgMint = function (data) { return { typeUrl: "/firmachain.firmachain.nft.MsgMint", value: data }; }; NftTxClient.prototype.msgBurn = function (data) { return { typeUrl: "/firmachain.firmachain.nft.MsgBurn", value: data }; }; return NftTxClient; }(ITxClient_1.ITxClient)); exports.NftTxClient = NftTxClient;