UNPKG

opensea-js

Version:

TypeScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs and our marketplace data

154 lines 5.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SafelistStatus = exports.TokenStandard = exports.OrderSide = exports.Chain = exports.EventType = void 0; /** * Events emitted by the SDK which can be used by frontend applications * to update state or show useful messages to users. * @category Events */ var EventType; (function (EventType) { /** * Emitted when the transaction is sent to the network and the application * is waiting for the transaction to be mined. */ EventType["TransactionCreated"] = "TransactionCreated"; /** * Emitted when the transaction has succeeded is mined and confirmed. */ EventType["TransactionConfirmed"] = "TransactionConfirmed"; /** * Emitted when the transaction has failed to be submitted. */ EventType["TransactionDenied"] = "TransactionDenied"; /** * Emitted when the transaction has failed to be mined. */ EventType["TransactionFailed"] = "TransactionFailed"; /** * Emitted when the {@link OpenSeaSDK.wrapEth} method is called. */ EventType["WrapEth"] = "WrapEth"; /** * Emitted when the {@link OpenSeaSDK.unwrapWeth} method is called. */ EventType["UnwrapWeth"] = "UnwrapWeth"; /** * Emitted when fulfilling a public or private order. */ EventType["MatchOrders"] = "MatchOrders"; /** * Emitted when the {@link OpenSeaSDK.cancelOrder} method is called. */ EventType["CancelOrder"] = "CancelOrder"; /** * Emitted when the {@link OpenSeaSDK.approveOrder} method is called. */ EventType["ApproveOrder"] = "ApproveOrder"; /** * Emitted when the {@link OpenSeaSDK.transfer} method is called. */ EventType["Transfer"] = "Transfer"; })(EventType || (exports.EventType = EventType = {})); /** * Each of the possible chains that OpenSea supports. * ⚠️NOTE: When adding to this list, also add to the util functions `getChainId` and `getWETHAddress` */ var Chain; (function (Chain) { // Mainnet Chains /** Ethereum */ Chain["Mainnet"] = "ethereum"; /** Polygon */ Chain["Polygon"] = "matic"; /** Klaytn */ Chain["Klaytn"] = "klaytn"; /** Base */ Chain["Base"] = "base"; /** Blast */ Chain["Blast"] = "blast"; /** Arbitrum */ Chain["Arbitrum"] = "arbitrum"; /** Arbitrum Nova */ Chain["ArbitrumNova"] = "arbitrum_nova"; /** Avalanche */ Chain["Avalanche"] = "avalanche"; /** Optimism */ Chain["Optimism"] = "optimism"; /** Solana */ Chain["Solana"] = "solana"; /** Zora */ Chain["Zora"] = "zora"; /** Sei */ Chain["Sei"] = "sei"; /** B3 */ Chain["B3"] = "b3"; /** Bera Chain */ Chain["BeraChain"] = "bera_chain"; /** ApeChain */ Chain["ApeChain"] = "ape_chain"; /** Flow */ Chain["Flow"] = "flow"; // Testnet Chains // ⚠️NOTE: When adding to this list, also add to the util function `isTestChain` /** Sepolia */ Chain["Sepolia"] = "sepolia"; /** Polygon Amoy */ Chain["Amoy"] = "amoy"; /** Klaytn Baobab */ Chain["Baobab"] = "baobab"; /** Base Testnet */ Chain["BaseSepolia"] = "base_sepolia"; /** Blast Testnet */ Chain["BlastSepolia"] = "blast_sepolia"; /** Arbitrum Sepolia */ Chain["ArbitrumSepolia"] = "arbitrum_sepolia"; /** Avalanche Fuji */ Chain["Fuji"] = "avalanche_fuji"; /** Optimism Sepolia */ Chain["OptimismSepolia"] = "optimism_sepolia"; /** Solana Devnet */ Chain["SolanaDevnet"] = "soldev"; /** Zora Sepolia */ Chain["ZoraSepolia"] = "zora_sepolia"; /** Sei Testnet */ Chain["SeiTestnet"] = "sei_testnet"; /** B3 Sepolia */ Chain["B3Sepolia"] = "b3_sepolia"; /** Flow Testnet */ Chain["FlowTestnet"] = "flow_testnet"; })(Chain || (exports.Chain = Chain = {})); /** * Order side: listing (ask) or offer (bid) */ var OrderSide; (function (OrderSide) { OrderSide["LISTING"] = "ask"; OrderSide["OFFER"] = "bid"; })(OrderSide || (exports.OrderSide = OrderSide = {})); /** * Token standards */ var TokenStandard; (function (TokenStandard) { TokenStandard["ERC20"] = "ERC20"; TokenStandard["ERC721"] = "ERC721"; TokenStandard["ERC1155"] = "ERC1155"; })(TokenStandard || (exports.TokenStandard = TokenStandard = {})); /** * The collection's approval status within OpenSea. * Can be one of: * - not_requested: brand new collections * - requested: collections that requested safelisting on our site * - approved: collections that are approved on our site and can be found in search results * - verified: verified collections */ var SafelistStatus; (function (SafelistStatus) { SafelistStatus["NOT_REQUESTED"] = "not_requested"; SafelistStatus["REQUESTED"] = "requested"; SafelistStatus["APPROVED"] = "approved"; SafelistStatus["VERIFIED"] = "verified"; SafelistStatus["DISABLED_TOP_TRENDING"] = "disabled_top_trending"; })(SafelistStatus || (exports.SafelistStatus = SafelistStatus = {})); //# sourceMappingURL=types.js.map