UNPKG

@magiceden/magiceden-sdk

Version:

A TypeScript SDK for interacting with Magic Eden's API across multiple chains.

26 lines (25 loc) 777 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NftServiceFactory = void 0; const types_1 = require("../../types"); const solana_1 = require("./solana"); const evm_1 = require("./evm"); /** * Factory for creating NFT services */ class NftServiceFactory { /** * Creates an NFT service based on the chain */ static create(config) { switch (config.chain) { case types_1.ChainType.SOLANA: return new solana_1.SolanaNftService(config); case types_1.ChainType.EVM: return new evm_1.EvmNftService(config); default: throw new Error(`Unsupported chain: ${config.chain}`); } } } exports.NftServiceFactory = NftServiceFactory;