UNPKG

ordinalsbot

Version:
94 lines 4.56 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Ordinalsbot = exports.TokenPay = exports.Mempool = exports.Satextractor = exports.Satscanner = exports.Inscription = exports.MarketPlace = exports.InscriptionError = exports.InscriptionClient = void 0; const index_1 = require("./inscription/index"); const index_2 = require("./launchpad/index"); const marketplace_1 = require("./marketplace"); const index_3 = require("./mempool/index"); const index_4 = require("./satextractor/index"); const index_5 = require("./satscanner/index"); const index_6 = require("./tokenpay/index"); const types_1 = require("./types"); var client_1 = require("./client"); Object.defineProperty(exports, "InscriptionClient", { enumerable: true, get: function () { return client_1.InscriptionClient; } }); var error_1 = require("./inscription/error"); Object.defineProperty(exports, "InscriptionError", { enumerable: true, get: function () { return error_1.InscriptionError; } }); __exportStar(require("./types"), exports); var marketplace_2 = require("./marketplace"); Object.defineProperty(exports, "MarketPlace", { enumerable: true, get: function () { return marketplace_2.MarketPlace; } }); var index_7 = require("./inscription/index"); Object.defineProperty(exports, "Inscription", { enumerable: true, get: function () { return index_7.Inscription; } }); var index_8 = require("./satscanner/index"); Object.defineProperty(exports, "Satscanner", { enumerable: true, get: function () { return index_8.Satscanner; } }); var index_9 = require("./satextractor/index"); Object.defineProperty(exports, "Satextractor", { enumerable: true, get: function () { return index_9.Satextractor; } }); var index_10 = require("./mempool/index"); Object.defineProperty(exports, "Mempool", { enumerable: true, get: function () { return index_10.Mempool; } }); var index_11 = require("./tokenpay/index"); Object.defineProperty(exports, "TokenPay", { enumerable: true, get: function () { return index_11.TokenPay; } }); class Ordinalsbot { constructor(key = "", environment = types_1.InscriptionEnvNetwork.mainnet, tokenPayApiKey, options) { environment = types_1.InscriptionEnvNetwork[environment] ?? types_1.InscriptionEnvNetwork.mainnet; if (this.marketPlaceObj === undefined) { this.marketPlaceObj = new marketplace_1.MarketPlace(key, environment, options); } if (this.inscriptionObj === undefined) { this.inscriptionObj = new index_1.Inscription(key, environment, options); } if (this.launchpadObj === undefined) { this.launchpadObj = new index_2.Launchpad(key, environment, options); } if (this.mempoolObj === undefined) { this.mempoolObj = new index_3.Mempool(key, environment, options); } if (this.satextractorObj === undefined) { this.satextractorObj = new index_4.Satextractor(key, environment, options); } if (this.satscannerObj === undefined) { this.satscannerObj = new index_5.Satscanner(key, environment, options); } if (this.tokenpayObj === undefined && tokenPayApiKey) { this.tokenpayObj = new index_6.TokenPay(key, environment, tokenPayApiKey, options); } } MarketPlace() { return this.marketPlaceObj; } Inscription() { return this.inscriptionObj; } Launchpad() { return this.launchpadObj; } Mempool() { return this.mempoolObj; } Satextractor() { return this.satextractorObj; } Satscanner() { return this.satscannerObj; } TokenPay() { if (!this.tokenpayObj) { throw new Error("TokenPay has not been initialized"); } return this.tokenpayObj; } } exports.Ordinalsbot = Ordinalsbot; //# sourceMappingURL=index.js.map