opensea-js
Version:
TypeScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs and our marketplace data
117 lines • 4.09 kB
JavaScript
;
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 following functions:
* - `getChainId`
* - `getListingPaymentToken`
* - `getOfferPaymentToken`
* - `getNativeWrapTokenAddress` (if getOfferPaymentToken isn't the wrapped native asset)
*/
var Chain;
(function (Chain) {
Chain["Mainnet"] = "ethereum";
Chain["Polygon"] = "matic";
Chain["Base"] = "base";
Chain["Blast"] = "blast";
Chain["Arbitrum"] = "arbitrum";
Chain["ArbitrumNova"] = "arbitrum_nova";
Chain["Avalanche"] = "avalanche";
Chain["Optimism"] = "optimism";
Chain["Solana"] = "solana";
Chain["Zora"] = "zora";
Chain["Sei"] = "sei";
Chain["B3"] = "b3";
Chain["BeraChain"] = "bera_chain";
Chain["ApeChain"] = "ape_chain";
Chain["Flow"] = "flow";
Chain["Ronin"] = "ronin";
Chain["Abstract"] = "abstract";
Chain["Shape"] = "shape";
Chain["Unichain"] = "unichain";
Chain["Gunzilla"] = "gunzilla";
})(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