@opensea/sdk 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +7 -0
- package/README.md +70 -0
- package/lib/api/accounts.d.ts +27 -0
- package/lib/api/accounts.js +46 -0
- package/lib/api/accounts.js.map +1 -0
- package/lib/api/api.d.ts +489 -0
- package/lib/api/api.js +754 -0
- package/lib/api/api.js.map +1 -0
- package/lib/api/apiPaths.d.ts +46 -0
- package/lib/api/apiPaths.js +176 -0
- package/lib/api/apiPaths.js.map +1 -0
- package/lib/api/chains.d.ts +13 -0
- package/lib/api/chains.js +22 -0
- package/lib/api/chains.js.map +1 -0
- package/lib/api/collections.d.ts +34 -0
- package/lib/api/collections.js +80 -0
- package/lib/api/collections.js.map +1 -0
- package/lib/api/drops.d.ts +21 -0
- package/lib/api/drops.js +39 -0
- package/lib/api/drops.js.map +1 -0
- package/lib/api/events.d.ts +26 -0
- package/lib/api/events.js +43 -0
- package/lib/api/events.js.map +1 -0
- package/lib/api/fetcher.d.ts +24 -0
- package/lib/api/fetcher.js +3 -0
- package/lib/api/fetcher.js.map +1 -0
- package/lib/api/index.d.ts +2 -0
- package/lib/api/index.js +19 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/listings.d.ts +44 -0
- package/lib/api/listings.js +88 -0
- package/lib/api/listings.js.map +1 -0
- package/lib/api/nfts.d.ts +39 -0
- package/lib/api/nfts.js +79 -0
- package/lib/api/nfts.js.map +1 -0
- package/lib/api/offers.d.ts +54 -0
- package/lib/api/offers.js +124 -0
- package/lib/api/offers.js.map +1 -0
- package/lib/api/orders.d.ts +50 -0
- package/lib/api/orders.js +153 -0
- package/lib/api/orders.js.map +1 -0
- package/lib/api/search.d.ts +13 -0
- package/lib/api/search.js +22 -0
- package/lib/api/search.js.map +1 -0
- package/lib/api/tokens.d.ts +25 -0
- package/lib/api/tokens.js +43 -0
- package/lib/api/tokens.js.map +1 -0
- package/lib/api/types.d.ts +1113 -0
- package/lib/api/types.js +65 -0
- package/lib/api/types.js.map +1 -0
- package/lib/constants.d.ts +22 -0
- package/lib/constants.js +52 -0
- package/lib/constants.js.map +1 -0
- package/lib/index.d.ts +18 -0
- package/lib/index.js +24 -0
- package/lib/index.js.map +1 -0
- package/lib/orders/privateListings.d.ts +12 -0
- package/lib/orders/privateListings.js +130 -0
- package/lib/orders/privateListings.js.map +1 -0
- package/lib/orders/types.d.ts +160 -0
- package/lib/orders/types.js +10 -0
- package/lib/orders/types.js.map +1 -0
- package/lib/orders/utils.d.ts +89 -0
- package/lib/orders/utils.js +177 -0
- package/lib/orders/utils.js.map +1 -0
- package/lib/sdk/assets.d.ts +104 -0
- package/lib/sdk/assets.js +398 -0
- package/lib/sdk/assets.js.map +1 -0
- package/lib/sdk/cancellation.d.ts +97 -0
- package/lib/sdk/cancellation.js +235 -0
- package/lib/sdk/cancellation.js.map +1 -0
- package/lib/sdk/context.d.ts +28 -0
- package/lib/sdk/context.js +3 -0
- package/lib/sdk/context.js.map +1 -0
- package/lib/sdk/fulfillment.d.ts +153 -0
- package/lib/sdk/fulfillment.js +298 -0
- package/lib/sdk/fulfillment.js.map +1 -0
- package/lib/sdk/orders.d.ts +253 -0
- package/lib/sdk/orders.js +679 -0
- package/lib/sdk/orders.js.map +1 -0
- package/lib/sdk/tokens.d.ts +31 -0
- package/lib/sdk/tokens.js +65 -0
- package/lib/sdk/tokens.js.map +1 -0
- package/lib/sdk.d.ts +560 -0
- package/lib/sdk.js +693 -0
- package/lib/sdk.js.map +1 -0
- package/lib/src/api/accounts.d.ts +18 -0
- package/lib/src/api/accounts.js +30 -0
- package/lib/src/api/accounts.js.map +1 -0
- package/lib/src/api/api.d.ts +429 -0
- package/lib/src/api/api.js +652 -0
- package/lib/src/api/api.js.map +1 -0
- package/lib/src/api/apiPaths.d.ts +37 -0
- package/lib/src/api/apiPaths.js +140 -0
- package/lib/src/api/apiPaths.js.map +1 -0
- package/lib/src/api/collections.d.ts +26 -0
- package/lib/src/api/collections.js +57 -0
- package/lib/src/api/collections.js.map +1 -0
- package/lib/src/api/events.d.ts +26 -0
- package/lib/src/api/events.js +42 -0
- package/lib/src/api/events.js.map +1 -0
- package/lib/src/api/fetcher.d.ts +24 -0
- package/lib/src/api/fetcher.js +3 -0
- package/lib/src/api/fetcher.js.map +1 -0
- package/lib/src/api/index.d.ts +2 -0
- package/lib/src/api/index.js +19 -0
- package/lib/src/api/index.js.map +1 -0
- package/lib/src/api/listings.d.ts +44 -0
- package/lib/src/api/listings.js +86 -0
- package/lib/src/api/listings.js.map +1 -0
- package/lib/src/api/nfts.d.ts +35 -0
- package/lib/src/api/nfts.js +66 -0
- package/lib/src/api/nfts.js.map +1 -0
- package/lib/src/api/offers.d.ts +54 -0
- package/lib/src/api/offers.js +122 -0
- package/lib/src/api/offers.js.map +1 -0
- package/lib/src/api/orders.d.ts +50 -0
- package/lib/src/api/orders.js +151 -0
- package/lib/src/api/orders.js.map +1 -0
- package/lib/src/api/search.d.ts +13 -0
- package/lib/src/api/search.js +21 -0
- package/lib/src/api/search.js.map +1 -0
- package/lib/src/api/tokens.d.ts +25 -0
- package/lib/src/api/tokens.js +42 -0
- package/lib/src/api/tokens.js.map +1 -0
- package/lib/src/api/types.d.ts +840 -0
- package/lib/src/api/types.js +65 -0
- package/lib/src/api/types.js.map +1 -0
- package/lib/src/constants.d.ts +22 -0
- package/lib/src/constants.js +52 -0
- package/lib/src/constants.js.map +1 -0
- package/lib/src/index.d.ts +18 -0
- package/lib/src/index.js +24 -0
- package/lib/src/index.js.map +1 -0
- package/lib/src/orders/privateListings.d.ts +12 -0
- package/lib/src/orders/privateListings.js +130 -0
- package/lib/src/orders/privateListings.js.map +1 -0
- package/lib/src/orders/types.d.ts +160 -0
- package/lib/src/orders/types.js +10 -0
- package/lib/src/orders/types.js.map +1 -0
- package/lib/src/orders/utils.d.ts +89 -0
- package/lib/src/orders/utils.js +177 -0
- package/lib/src/orders/utils.js.map +1 -0
- package/lib/src/sdk/assets.d.ts +104 -0
- package/lib/src/sdk/assets.js +397 -0
- package/lib/src/sdk/assets.js.map +1 -0
- package/lib/src/sdk/cancellation.d.ts +97 -0
- package/lib/src/sdk/cancellation.js +234 -0
- package/lib/src/sdk/cancellation.js.map +1 -0
- package/lib/src/sdk/context.d.ts +28 -0
- package/lib/src/sdk/context.js +3 -0
- package/lib/src/sdk/context.js.map +1 -0
- package/lib/src/sdk/fulfillment.d.ts +153 -0
- package/lib/src/sdk/fulfillment.js +296 -0
- package/lib/src/sdk/fulfillment.js.map +1 -0
- package/lib/src/sdk/orders.d.ts +253 -0
- package/lib/src/sdk/orders.js +677 -0
- package/lib/src/sdk/orders.js.map +1 -0
- package/lib/src/sdk/tokens.d.ts +31 -0
- package/lib/src/sdk/tokens.js +64 -0
- package/lib/src/sdk/tokens.js.map +1 -0
- package/lib/src/sdk.d.ts +560 -0
- package/lib/src/sdk.js +675 -0
- package/lib/src/sdk.js.map +1 -0
- package/lib/src/typechain/contracts/ERC1155.d.ts +236 -0
- package/lib/src/typechain/contracts/ERC1155.js +3 -0
- package/lib/src/typechain/contracts/ERC1155.js.map +1 -0
- package/lib/src/typechain/contracts/ERC20.d.ts +141 -0
- package/lib/src/typechain/contracts/ERC20.js +3 -0
- package/lib/src/typechain/contracts/ERC20.js.map +1 -0
- package/lib/src/typechain/contracts/ERC721.d.ts +213 -0
- package/lib/src/typechain/contracts/ERC721.js +3 -0
- package/lib/src/typechain/contracts/ERC721.js.map +1 -0
- package/lib/src/typechain/contracts/Multicall3.d.ts +57 -0
- package/lib/src/typechain/contracts/Multicall3.js +3 -0
- package/lib/src/typechain/contracts/Multicall3.js.map +1 -0
- package/lib/src/typechain/contracts/TransferHelper.d.ts +55 -0
- package/lib/src/typechain/contracts/TransferHelper.js +3 -0
- package/lib/src/typechain/contracts/TransferHelper.js.map +1 -0
- package/lib/src/typechain/contracts/common.d.ts +50 -0
- package/lib/src/typechain/contracts/common.js +3 -0
- package/lib/src/typechain/contracts/common.js.map +1 -0
- package/lib/src/typechain/contracts/factories/ERC1155__factory.d.ts +250 -0
- package/lib/src/typechain/contracts/factories/ERC1155__factory.js +332 -0
- package/lib/src/typechain/contracts/factories/ERC1155__factory.js.map +1 -0
- package/lib/src/typechain/contracts/factories/ERC20__factory.d.ts +174 -0
- package/lib/src/typechain/contracts/factories/ERC20__factory.js +240 -0
- package/lib/src/typechain/contracts/factories/ERC20__factory.js.map +1 -0
- package/lib/src/typechain/contracts/factories/ERC721__factory.d.ts +268 -0
- package/lib/src/typechain/contracts/factories/ERC721__factory.js +351 -0
- package/lib/src/typechain/contracts/factories/ERC721__factory.js.map +1 -0
- package/lib/src/typechain/contracts/factories/Multicall3__factory.d.ts +43 -0
- package/lib/src/typechain/contracts/factories/Multicall3__factory.js +68 -0
- package/lib/src/typechain/contracts/factories/Multicall3__factory.js.map +1 -0
- package/lib/src/typechain/contracts/factories/TransferHelper__factory.d.ts +46 -0
- package/lib/src/typechain/contracts/factories/TransferHelper__factory.js +71 -0
- package/lib/src/typechain/contracts/factories/TransferHelper__factory.js.map +1 -0
- package/lib/src/typechain/contracts/factories/index.d.ts +5 -0
- package/lib/src/typechain/contracts/factories/index.js +17 -0
- package/lib/src/typechain/contracts/factories/index.js.map +1 -0
- package/lib/src/typechain/contracts/index.d.ts +11 -0
- package/lib/src/typechain/contracts/index.js +48 -0
- package/lib/src/typechain/contracts/index.js.map +1 -0
- package/lib/src/types.d.ts +387 -0
- package/lib/src/types.js +127 -0
- package/lib/src/types.js.map +1 -0
- package/lib/src/utils/chain.d.ts +60 -0
- package/lib/src/utils/chain.js +248 -0
- package/lib/src/utils/chain.js.map +1 -0
- package/lib/src/utils/converters.d.ts +37 -0
- package/lib/src/utils/converters.js +137 -0
- package/lib/src/utils/converters.js.map +1 -0
- package/lib/src/utils/dateHelper.d.ts +38 -0
- package/lib/src/utils/dateHelper.js +52 -0
- package/lib/src/utils/dateHelper.js.map +1 -0
- package/lib/src/utils/fees.d.ts +13 -0
- package/lib/src/utils/fees.js +29 -0
- package/lib/src/utils/fees.js.map +1 -0
- package/lib/src/utils/index.d.ts +2 -0
- package/lib/src/utils/index.js +19 -0
- package/lib/src/utils/index.js.map +1 -0
- package/lib/src/utils/protocol.d.ts +75 -0
- package/lib/src/utils/protocol.js +161 -0
- package/lib/src/utils/protocol.js.map +1 -0
- package/lib/src/utils/rateLimit.d.ts +34 -0
- package/lib/src/utils/rateLimit.js +97 -0
- package/lib/src/utils/rateLimit.js.map +1 -0
- package/lib/src/utils/stringHelper.d.ts +18 -0
- package/lib/src/utils/stringHelper.js +24 -0
- package/lib/src/utils/stringHelper.js.map +1 -0
- package/lib/src/utils/utils.d.ts +18 -0
- package/lib/src/utils/utils.js +45 -0
- package/lib/src/utils/utils.js.map +1 -0
- package/lib/typechain/contracts/ERC1155.d.ts +236 -0
- package/lib/typechain/contracts/ERC1155.js +3 -0
- package/lib/typechain/contracts/ERC1155.js.map +1 -0
- package/lib/typechain/contracts/ERC20.d.ts +141 -0
- package/lib/typechain/contracts/ERC20.js +3 -0
- package/lib/typechain/contracts/ERC20.js.map +1 -0
- package/lib/typechain/contracts/ERC721.d.ts +213 -0
- package/lib/typechain/contracts/ERC721.js +3 -0
- package/lib/typechain/contracts/ERC721.js.map +1 -0
- package/lib/typechain/contracts/Multicall3.d.ts +57 -0
- package/lib/typechain/contracts/Multicall3.js +3 -0
- package/lib/typechain/contracts/Multicall3.js.map +1 -0
- package/lib/typechain/contracts/TransferHelper.d.ts +55 -0
- package/lib/typechain/contracts/TransferHelper.js +3 -0
- package/lib/typechain/contracts/TransferHelper.js.map +1 -0
- package/lib/typechain/contracts/common.d.ts +50 -0
- package/lib/typechain/contracts/common.js +3 -0
- package/lib/typechain/contracts/common.js.map +1 -0
- package/lib/typechain/contracts/factories/ERC1155__factory.d.ts +250 -0
- package/lib/typechain/contracts/factories/ERC1155__factory.js +332 -0
- package/lib/typechain/contracts/factories/ERC1155__factory.js.map +1 -0
- package/lib/typechain/contracts/factories/ERC20__factory.d.ts +174 -0
- package/lib/typechain/contracts/factories/ERC20__factory.js +240 -0
- package/lib/typechain/contracts/factories/ERC20__factory.js.map +1 -0
- package/lib/typechain/contracts/factories/ERC721__factory.d.ts +268 -0
- package/lib/typechain/contracts/factories/ERC721__factory.js +351 -0
- package/lib/typechain/contracts/factories/ERC721__factory.js.map +1 -0
- package/lib/typechain/contracts/factories/Multicall3__factory.d.ts +43 -0
- package/lib/typechain/contracts/factories/Multicall3__factory.js +68 -0
- package/lib/typechain/contracts/factories/Multicall3__factory.js.map +1 -0
- package/lib/typechain/contracts/factories/TransferHelper__factory.d.ts +46 -0
- package/lib/typechain/contracts/factories/TransferHelper__factory.js +71 -0
- package/lib/typechain/contracts/factories/TransferHelper__factory.js.map +1 -0
- package/lib/typechain/contracts/factories/index.d.ts +5 -0
- package/lib/typechain/contracts/factories/index.js +17 -0
- package/lib/typechain/contracts/factories/index.js.map +1 -0
- package/lib/typechain/contracts/index.d.ts +11 -0
- package/lib/typechain/contracts/index.js +48 -0
- package/lib/typechain/contracts/index.js.map +1 -0
- package/lib/types.d.ts +389 -0
- package/lib/types.js +129 -0
- package/lib/types.js.map +1 -0
- package/lib/utils/chain.d.ts +64 -0
- package/lib/utils/chain.js +211 -0
- package/lib/utils/chain.js.map +1 -0
- package/lib/utils/chainIds.generated.d.ts +7 -0
- package/lib/utils/chainIds.generated.js +37 -0
- package/lib/utils/chainIds.generated.js.map +1 -0
- package/lib/utils/converters.d.ts +37 -0
- package/lib/utils/converters.js +137 -0
- package/lib/utils/converters.js.map +1 -0
- package/lib/utils/dateHelper.d.ts +38 -0
- package/lib/utils/dateHelper.js +52 -0
- package/lib/utils/dateHelper.js.map +1 -0
- package/lib/utils/fees.d.ts +13 -0
- package/lib/utils/fees.js +29 -0
- package/lib/utils/fees.js.map +1 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +19 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/protocol.d.ts +75 -0
- package/lib/utils/protocol.js +161 -0
- package/lib/utils/protocol.js.map +1 -0
- package/lib/utils/rateLimit.d.ts +34 -0
- package/lib/utils/rateLimit.js +97 -0
- package/lib/utils/rateLimit.js.map +1 -0
- package/lib/utils/stringHelper.d.ts +18 -0
- package/lib/utils/stringHelper.js +24 -0
- package/lib/utils/stringHelper.js.map +1 -0
- package/lib/utils/utils.d.ts +18 -0
- package/lib/utils/utils.js +45 -0
- package/lib/utils/utils.js.map +1 -0
- package/package.json +72 -0
- package/src/abi/ERC1155.json +314 -0
- package/src/abi/ERC20.json +222 -0
- package/src/abi/ERC721.json +333 -0
- package/src/abi/Multicall3.json +50 -0
- package/src/abi/TransferHelper.json +53 -0
- package/src/api/accounts.ts +69 -0
- package/src/api/api.ts +1152 -0
- package/src/api/apiPaths.ts +208 -0
- package/src/api/chains.ts +18 -0
- package/src/api/collections.ts +120 -0
- package/src/api/drops.ts +49 -0
- package/src/api/events.ts +71 -0
- package/src/api/fetcher.ts +31 -0
- package/src/api/index.ts +2 -0
- package/src/api/listings.ts +126 -0
- package/src/api/nfts.ts +144 -0
- package/src/api/offers.ts +242 -0
- package/src/api/orders.ts +283 -0
- package/src/api/search.ts +21 -0
- package/src/api/tokens.ts +67 -0
- package/src/api/types.ts +1210 -0
- package/src/constants.ts +90 -0
- package/src/index.ts +22 -0
- package/src/orders/privateListings.ts +173 -0
- package/src/orders/types.ts +191 -0
- package/src/orders/utils.ts +253 -0
- package/src/sdk/assets.ts +591 -0
- package/src/sdk/cancellation.ts +346 -0
- package/src/sdk/context.ts +33 -0
- package/src/sdk/fulfillment.ts +478 -0
- package/src/sdk/orders.ts +1149 -0
- package/src/sdk/tokens.ts +95 -0
- package/src/sdk.ts +1051 -0
- package/src/typechain/contracts/ERC1155.ts +440 -0
- package/src/typechain/contracts/ERC20.ts +286 -0
- package/src/typechain/contracts/ERC721.ts +412 -0
- package/src/typechain/contracts/Multicall3.ts +117 -0
- package/src/typechain/contracts/TransferHelper.ts +122 -0
- package/src/typechain/contracts/common.ts +131 -0
- package/src/typechain/contracts/factories/ERC1155__factory.ts +331 -0
- package/src/typechain/contracts/factories/ERC20__factory.ts +239 -0
- package/src/typechain/contracts/factories/ERC721__factory.ts +350 -0
- package/src/typechain/contracts/factories/Multicall3__factory.ts +67 -0
- package/src/typechain/contracts/factories/TransferHelper__factory.ts +76 -0
- package/src/typechain/contracts/factories/index.ts +8 -0
- package/src/typechain/contracts/index.ts +14 -0
- package/src/types.ts +413 -0
- package/src/utils/chain.ts +224 -0
- package/src/utils/chainIds.generated.ts +34 -0
- package/src/utils/converters.ts +145 -0
- package/src/utils/dateHelper.ts +48 -0
- package/src/utils/fees.ts +31 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/protocol.ts +185 -0
- package/src/utils/rateLimit.ts +147 -0
- package/src/utils/stringHelper.ts +25 -0
- package/src/utils/utils.ts +36 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.TransferHelper__factory = exports.Multicall3__factory = exports.ERC721__factory = exports.ERC20__factory = exports.ERC1155__factory = exports.factories = void 0;
|
|
37
|
+
exports.factories = __importStar(require("./factories"));
|
|
38
|
+
var ERC1155__factory_1 = require("./factories/ERC1155__factory");
|
|
39
|
+
Object.defineProperty(exports, "ERC1155__factory", { enumerable: true, get: function () { return ERC1155__factory_1.ERC1155__factory; } });
|
|
40
|
+
var ERC20__factory_1 = require("./factories/ERC20__factory");
|
|
41
|
+
Object.defineProperty(exports, "ERC20__factory", { enumerable: true, get: function () { return ERC20__factory_1.ERC20__factory; } });
|
|
42
|
+
var ERC721__factory_1 = require("./factories/ERC721__factory");
|
|
43
|
+
Object.defineProperty(exports, "ERC721__factory", { enumerable: true, get: function () { return ERC721__factory_1.ERC721__factory; } });
|
|
44
|
+
var Multicall3__factory_1 = require("./factories/Multicall3__factory");
|
|
45
|
+
Object.defineProperty(exports, "Multicall3__factory", { enumerable: true, get: function () { return Multicall3__factory_1.Multicall3__factory; } });
|
|
46
|
+
var TransferHelper__factory_1 = require("./factories/TransferHelper__factory");
|
|
47
|
+
Object.defineProperty(exports, "TransferHelper__factory", { enumerable: true, get: function () { return TransferHelper__factory_1.TransferHelper__factory; } });
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/typechain/contracts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,yDAAyC;AACzC,iEAAgE;AAAvD,oHAAA,gBAAgB,OAAA;AACzB,6DAA4D;AAAnD,gHAAA,cAAc,OAAA;AACvB,+DAA8D;AAArD,kHAAA,eAAe,OAAA;AACxB,uEAAsE;AAA7D,0HAAA,mBAAmB,OAAA;AAC5B,+EAA8E;AAArE,kIAAA,uBAAuB,OAAA"}
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import type { BigNumberish } from "ethers";
|
|
2
|
+
import type { Listing, Offer } from "./api/types";
|
|
3
|
+
import type { OrderV2 } from "./orders/types";
|
|
4
|
+
/**
|
|
5
|
+
* Events emitted by the SDK which can be used by frontend applications
|
|
6
|
+
* to update state or show useful messages to users.
|
|
7
|
+
* @category Events
|
|
8
|
+
*/
|
|
9
|
+
export declare enum EventType {
|
|
10
|
+
/**
|
|
11
|
+
* Emitted when the transaction is sent to the network and the application
|
|
12
|
+
* is waiting for the transaction to be mined.
|
|
13
|
+
*/
|
|
14
|
+
TransactionCreated = "TransactionCreated",
|
|
15
|
+
/**
|
|
16
|
+
* Emitted when the transaction is mined and confirmed.
|
|
17
|
+
*/
|
|
18
|
+
TransactionConfirmed = "TransactionConfirmed",
|
|
19
|
+
/**
|
|
20
|
+
* Emitted when the transaction has failed to be submitted.
|
|
21
|
+
*/
|
|
22
|
+
TransactionDenied = "TransactionDenied",
|
|
23
|
+
/**
|
|
24
|
+
* Emitted when the transaction has failed to be mined.
|
|
25
|
+
*/
|
|
26
|
+
TransactionFailed = "TransactionFailed",
|
|
27
|
+
/**
|
|
28
|
+
* Emitted when the {@link OpenSeaSDK.wrapEth} method is called.
|
|
29
|
+
*/
|
|
30
|
+
WrapEth = "WrapEth",
|
|
31
|
+
/**
|
|
32
|
+
* Emitted when the {@link OpenSeaSDK.unwrapWeth} method is called.
|
|
33
|
+
*/
|
|
34
|
+
UnwrapWeth = "UnwrapWeth",
|
|
35
|
+
/**
|
|
36
|
+
* Emitted when fulfilling a public or private order.
|
|
37
|
+
*/
|
|
38
|
+
MatchOrders = "MatchOrders",
|
|
39
|
+
/**
|
|
40
|
+
* Emitted when the {@link OpenSeaSDK.cancelOrder} method is called.
|
|
41
|
+
*/
|
|
42
|
+
CancelOrder = "CancelOrder",
|
|
43
|
+
/**
|
|
44
|
+
* Emitted when the {@link OpenSeaSDK.approveOrder} method is called.
|
|
45
|
+
*/
|
|
46
|
+
ApproveOrder = "ApproveOrder",
|
|
47
|
+
/**
|
|
48
|
+
* Emitted when the {@link OpenSeaSDK.transfer} method is called.
|
|
49
|
+
*/
|
|
50
|
+
Transfer = "Transfer",
|
|
51
|
+
/**
|
|
52
|
+
* Emitted when the {@link OpenSeaSDK.batchApproveAssets} method is called.
|
|
53
|
+
*/
|
|
54
|
+
ApproveAllAssets = "ApproveAllAssets"
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Data that gets sent with each {@link EventType}
|
|
58
|
+
* @category Events
|
|
59
|
+
*/
|
|
60
|
+
export interface EventData {
|
|
61
|
+
/**
|
|
62
|
+
* Wallet address of the user who initiated the event.
|
|
63
|
+
*/
|
|
64
|
+
accountAddress?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Amount of ETH sent when wrapping or unwrapping.
|
|
67
|
+
*/
|
|
68
|
+
amount?: BigNumberish;
|
|
69
|
+
/**
|
|
70
|
+
* The transaction hash of the event.
|
|
71
|
+
*/
|
|
72
|
+
transactionHash?: string;
|
|
73
|
+
/**
|
|
74
|
+
* The {@link EventType} of the event.
|
|
75
|
+
*/
|
|
76
|
+
event?: EventType;
|
|
77
|
+
/**
|
|
78
|
+
* Error which occurred when transaction was denied or failed.
|
|
79
|
+
*/
|
|
80
|
+
error?: unknown;
|
|
81
|
+
/**
|
|
82
|
+
* The {@link OrderV2} object.
|
|
83
|
+
*/
|
|
84
|
+
orderV2?: OrderV2;
|
|
85
|
+
/**
|
|
86
|
+
* The order as returned by the API ({@link Offer} or {@link Listing}).
|
|
87
|
+
*/
|
|
88
|
+
order?: Offer | Listing;
|
|
89
|
+
/**
|
|
90
|
+
* Array of assets for bulk transfer and batch approval operations.
|
|
91
|
+
*/
|
|
92
|
+
assets?: Array<{
|
|
93
|
+
asset: AssetWithTokenStandard;
|
|
94
|
+
toAddress?: string;
|
|
95
|
+
amount?: BigNumberish;
|
|
96
|
+
}>;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* OpenSea API configuration object
|
|
100
|
+
* @param chain `Chain` to use. Defaults to Ethereum Mainnet (`Chain.Mainnet`)
|
|
101
|
+
* @param apiKey API key to use
|
|
102
|
+
* @param apiBaseUrl Optional base URL to use for the API
|
|
103
|
+
*/
|
|
104
|
+
export interface OpenSeaAPIConfig {
|
|
105
|
+
chain?: Chain;
|
|
106
|
+
apiKey?: string;
|
|
107
|
+
apiBaseUrl?: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Each of the possible chains that OpenSea supports.
|
|
111
|
+
* ⚠️NOTE: When adding to this list, also add to the following functions:
|
|
112
|
+
* - `getChainId`
|
|
113
|
+
* - `getListingPaymentToken`
|
|
114
|
+
* - `getOfferPaymentToken`
|
|
115
|
+
* - `getNativeWrapTokenAddress` (if getOfferPaymentToken isn't the wrapped native asset)
|
|
116
|
+
*/
|
|
117
|
+
export declare enum Chain {
|
|
118
|
+
Mainnet = "ethereum",
|
|
119
|
+
Polygon = "polygon",
|
|
120
|
+
Base = "base",
|
|
121
|
+
Blast = "blast",
|
|
122
|
+
Arbitrum = "arbitrum",
|
|
123
|
+
Avalanche = "avalanche",
|
|
124
|
+
Optimism = "optimism",
|
|
125
|
+
Solana = "solana",
|
|
126
|
+
Zora = "zora",
|
|
127
|
+
Sei = "sei",
|
|
128
|
+
B3 = "b3",
|
|
129
|
+
BeraChain = "bera_chain",
|
|
130
|
+
ApeChain = "ape_chain",
|
|
131
|
+
Flow = "flow",
|
|
132
|
+
Ronin = "ronin",
|
|
133
|
+
Abstract = "abstract",
|
|
134
|
+
Shape = "shape",
|
|
135
|
+
Unichain = "unichain",
|
|
136
|
+
Gunzilla = "gunzilla",
|
|
137
|
+
HyperEVM = "hyperevm",
|
|
138
|
+
Somnia = "somnia",
|
|
139
|
+
Monad = "monad",
|
|
140
|
+
MegaETH = "megaeth",
|
|
141
|
+
Soneium = "soneium",
|
|
142
|
+
Hyperliquid = "hyperliquid"
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Order side: listing (ask) or offer (bid)
|
|
146
|
+
*/
|
|
147
|
+
export declare enum OrderSide {
|
|
148
|
+
LISTING = "ask",
|
|
149
|
+
OFFER = "bid"
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Token standards
|
|
153
|
+
*/
|
|
154
|
+
export declare enum TokenStandard {
|
|
155
|
+
ERC20 = "ERC20",
|
|
156
|
+
ERC721 = "ERC721",
|
|
157
|
+
ERC1155 = "ERC1155"
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* The collection's approval status within OpenSea.
|
|
161
|
+
* Can be one of:
|
|
162
|
+
* - not_requested: brand new collections
|
|
163
|
+
* - requested: collections that requested safelisting on our site
|
|
164
|
+
* - approved: collections that are approved on our site and can be found in search results
|
|
165
|
+
* - verified: verified collections
|
|
166
|
+
*/
|
|
167
|
+
export declare enum SafelistStatus {
|
|
168
|
+
NOT_REQUESTED = "not_requested",
|
|
169
|
+
REQUESTED = "requested",
|
|
170
|
+
APPROVED = "approved",
|
|
171
|
+
VERIFIED = "verified",
|
|
172
|
+
DISABLED_TOP_TRENDING = "disabled_top_trending"
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Collection fees
|
|
176
|
+
* @category API Models
|
|
177
|
+
*/
|
|
178
|
+
export interface Fee {
|
|
179
|
+
fee: number;
|
|
180
|
+
recipient: string;
|
|
181
|
+
required: boolean;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Generic Blockchain Asset.
|
|
185
|
+
* @category API Models
|
|
186
|
+
*/
|
|
187
|
+
export interface Asset {
|
|
188
|
+
/** The asset's token ID, or null if ERC-20 */
|
|
189
|
+
tokenId: string | null;
|
|
190
|
+
/** The asset's contract address */
|
|
191
|
+
tokenAddress: string;
|
|
192
|
+
/** The token standard (e.g. "ERC721") for this asset */
|
|
193
|
+
tokenStandard?: TokenStandard;
|
|
194
|
+
/** Optional for ENS names */
|
|
195
|
+
name?: string;
|
|
196
|
+
/** Optional for fungible items */
|
|
197
|
+
decimals?: number;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Generic Blockchain Asset, with tokenId required.
|
|
201
|
+
* @category API Models
|
|
202
|
+
*/
|
|
203
|
+
export interface AssetWithTokenId extends Asset {
|
|
204
|
+
/** The asset's token ID */
|
|
205
|
+
tokenId: string;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Generic Blockchain Asset, with tokenStandard required.
|
|
209
|
+
* @category API Models
|
|
210
|
+
*/
|
|
211
|
+
export interface AssetWithTokenStandard extends Asset {
|
|
212
|
+
/** The token standard (e.g. "ERC721") for this asset */
|
|
213
|
+
tokenStandard: TokenStandard;
|
|
214
|
+
}
|
|
215
|
+
interface OpenSeaCollectionStatsIntervalData {
|
|
216
|
+
interval: "one_day" | "seven_day" | "thirty_day";
|
|
217
|
+
volume: number;
|
|
218
|
+
volume_diff: number;
|
|
219
|
+
volume_change: number;
|
|
220
|
+
sales: number;
|
|
221
|
+
sales_diff: number;
|
|
222
|
+
average_price: number;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* OpenSea Collection Stats
|
|
226
|
+
* @category API Models
|
|
227
|
+
*/
|
|
228
|
+
export interface OpenSeaCollectionStats {
|
|
229
|
+
total: {
|
|
230
|
+
volume: number;
|
|
231
|
+
sales: number;
|
|
232
|
+
average_price: number;
|
|
233
|
+
num_owners: number;
|
|
234
|
+
market_cap: number;
|
|
235
|
+
floor_price: number;
|
|
236
|
+
floor_price_symbol: string;
|
|
237
|
+
};
|
|
238
|
+
intervals: OpenSeaCollectionStatsIntervalData[];
|
|
239
|
+
}
|
|
240
|
+
export interface RarityStrategy {
|
|
241
|
+
strategyId: string;
|
|
242
|
+
strategyVersion: string;
|
|
243
|
+
calculatedAt: string;
|
|
244
|
+
maxRank: number;
|
|
245
|
+
tokensScored: number;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* OpenSea collection metadata.
|
|
249
|
+
* @category API Models
|
|
250
|
+
*/
|
|
251
|
+
export interface OpenSeaCollection {
|
|
252
|
+
/** Name of the collection */
|
|
253
|
+
name: string;
|
|
254
|
+
/** The identifier (slug) of the collection */
|
|
255
|
+
collection: string;
|
|
256
|
+
/** Description of the collection */
|
|
257
|
+
description: string;
|
|
258
|
+
/** Image for the collection */
|
|
259
|
+
imageUrl: string;
|
|
260
|
+
/** Banner image for the collection */
|
|
261
|
+
bannerImageUrl: string;
|
|
262
|
+
/** Owner address of the collection */
|
|
263
|
+
owner: string;
|
|
264
|
+
/** The collection's safelist status */
|
|
265
|
+
safelistStatus: SafelistStatus;
|
|
266
|
+
/** The category of the collection */
|
|
267
|
+
category: string;
|
|
268
|
+
/** If the collection is disabled */
|
|
269
|
+
isDisabled: boolean;
|
|
270
|
+
/** If the collection is NSFW (not safe for work) */
|
|
271
|
+
isNSFW: boolean;
|
|
272
|
+
/** If trait offers are enabled */
|
|
273
|
+
traitOffersEnabled: boolean;
|
|
274
|
+
/** If collection offers are enabled */
|
|
275
|
+
collectionOffersEnabled: boolean;
|
|
276
|
+
/** The OpenSea url for the collection */
|
|
277
|
+
openseaUrl: string;
|
|
278
|
+
/** The project url for the collection */
|
|
279
|
+
projectUrl: string;
|
|
280
|
+
/** The wiki url for the collection */
|
|
281
|
+
wikiUrl: string;
|
|
282
|
+
/** The discord url for the collection */
|
|
283
|
+
discordUrl: string;
|
|
284
|
+
/** The telegram url for the collection */
|
|
285
|
+
telegramUrl: string;
|
|
286
|
+
/** The twitter username for the collection */
|
|
287
|
+
twitterUsername: string;
|
|
288
|
+
/** The instagram username for the collection */
|
|
289
|
+
instagramUsername: string;
|
|
290
|
+
/** The contracts for the collection */
|
|
291
|
+
contracts: {
|
|
292
|
+
address: string;
|
|
293
|
+
chain: Chain;
|
|
294
|
+
}[];
|
|
295
|
+
/** Accounts allowed to edit this collection */
|
|
296
|
+
editors: string[];
|
|
297
|
+
/** The fees for the collection */
|
|
298
|
+
fees: Fee[];
|
|
299
|
+
/** The rarity strategy for the collection */
|
|
300
|
+
rarity: RarityStrategy | null;
|
|
301
|
+
/** Pricing currencies for listings and offers in this collection */
|
|
302
|
+
pricingCurrencies?: PricingCurrencies;
|
|
303
|
+
/** The total supply of the collection (minted minus burned) */
|
|
304
|
+
totalSupply: number;
|
|
305
|
+
/** The number of unique items in the collection */
|
|
306
|
+
uniqueItemCount: number;
|
|
307
|
+
/** The created date of the collection */
|
|
308
|
+
createdDate: string;
|
|
309
|
+
/** When defined, the zone required for orders for the collection */
|
|
310
|
+
requiredZone?: string;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Full annotated Fungible Token spec with OpenSea metadata
|
|
314
|
+
*/
|
|
315
|
+
export interface OpenSeaPaymentToken {
|
|
316
|
+
name: string;
|
|
317
|
+
symbol: string;
|
|
318
|
+
decimals: number;
|
|
319
|
+
address: string;
|
|
320
|
+
chain: Chain;
|
|
321
|
+
imageUrl?: string;
|
|
322
|
+
ethPrice?: string;
|
|
323
|
+
usdPrice?: string;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Pricing currencies for a collection, defining default currencies for listings and offers.
|
|
327
|
+
* @category API Models
|
|
328
|
+
*/
|
|
329
|
+
export interface PricingCurrencies {
|
|
330
|
+
listingCurrency?: OpenSeaPaymentToken;
|
|
331
|
+
offerCurrency?: OpenSeaPaymentToken;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* OpenSea Account
|
|
335
|
+
* @category API Models
|
|
336
|
+
*/
|
|
337
|
+
export interface OpenSeaAccount {
|
|
338
|
+
address: string;
|
|
339
|
+
username: string;
|
|
340
|
+
profileImageUrl: string;
|
|
341
|
+
bannerImageUrl: string;
|
|
342
|
+
website: string;
|
|
343
|
+
socialMediaAccounts: SocialMediaAccount[];
|
|
344
|
+
bio: string;
|
|
345
|
+
joinedDate: string;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Social media account
|
|
349
|
+
* @category API Models
|
|
350
|
+
*/
|
|
351
|
+
export interface SocialMediaAccount {
|
|
352
|
+
platform: string;
|
|
353
|
+
username: string;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Enhanced Error type for rate limit errors that includes retry-after information
|
|
357
|
+
* @category API Models
|
|
358
|
+
*/
|
|
359
|
+
export interface OpenSeaRateLimitError extends Error {
|
|
360
|
+
/** The HTTP status code of the error response */
|
|
361
|
+
statusCode?: number;
|
|
362
|
+
/** The number of seconds to wait before retrying the request */
|
|
363
|
+
retryAfter?: number;
|
|
364
|
+
/** The response body from the API */
|
|
365
|
+
responseBody?: unknown;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Options for controlling HTTP request behavior.
|
|
369
|
+
* @category API Models
|
|
370
|
+
*/
|
|
371
|
+
export interface RequestOptions {
|
|
372
|
+
/**
|
|
373
|
+
* Request timeout in milliseconds.
|
|
374
|
+
* If the request takes longer than this, it will be aborted.
|
|
375
|
+
*/
|
|
376
|
+
timeout?: number;
|
|
377
|
+
/**
|
|
378
|
+
* An AbortSignal to cancel the request.
|
|
379
|
+
* Useful for implementing custom cancellation logic or timeouts.
|
|
380
|
+
* @example
|
|
381
|
+
* const controller = new AbortController();
|
|
382
|
+
* setTimeout(() => controller.abort(), 5000);
|
|
383
|
+
* await api.post('/path', body, headers, { signal: controller.signal });
|
|
384
|
+
*/
|
|
385
|
+
signal?: AbortSignal;
|
|
386
|
+
}
|
|
387
|
+
export {};
|
package/lib/src/types.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SafelistStatus = exports.TokenStandard = exports.OrderSide = exports.Chain = exports.EventType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Events emitted by the SDK which can be used by frontend applications
|
|
6
|
+
* to update state or show useful messages to users.
|
|
7
|
+
* @category Events
|
|
8
|
+
*/
|
|
9
|
+
var EventType;
|
|
10
|
+
(function (EventType) {
|
|
11
|
+
/**
|
|
12
|
+
* Emitted when the transaction is sent to the network and the application
|
|
13
|
+
* is waiting for the transaction to be mined.
|
|
14
|
+
*/
|
|
15
|
+
EventType["TransactionCreated"] = "TransactionCreated";
|
|
16
|
+
/**
|
|
17
|
+
* Emitted when the transaction is mined and confirmed.
|
|
18
|
+
*/
|
|
19
|
+
EventType["TransactionConfirmed"] = "TransactionConfirmed";
|
|
20
|
+
/**
|
|
21
|
+
* Emitted when the transaction has failed to be submitted.
|
|
22
|
+
*/
|
|
23
|
+
EventType["TransactionDenied"] = "TransactionDenied";
|
|
24
|
+
/**
|
|
25
|
+
* Emitted when the transaction has failed to be mined.
|
|
26
|
+
*/
|
|
27
|
+
EventType["TransactionFailed"] = "TransactionFailed";
|
|
28
|
+
/**
|
|
29
|
+
* Emitted when the {@link OpenSeaSDK.wrapEth} method is called.
|
|
30
|
+
*/
|
|
31
|
+
EventType["WrapEth"] = "WrapEth";
|
|
32
|
+
/**
|
|
33
|
+
* Emitted when the {@link OpenSeaSDK.unwrapWeth} method is called.
|
|
34
|
+
*/
|
|
35
|
+
EventType["UnwrapWeth"] = "UnwrapWeth";
|
|
36
|
+
/**
|
|
37
|
+
* Emitted when fulfilling a public or private order.
|
|
38
|
+
*/
|
|
39
|
+
EventType["MatchOrders"] = "MatchOrders";
|
|
40
|
+
/**
|
|
41
|
+
* Emitted when the {@link OpenSeaSDK.cancelOrder} method is called.
|
|
42
|
+
*/
|
|
43
|
+
EventType["CancelOrder"] = "CancelOrder";
|
|
44
|
+
/**
|
|
45
|
+
* Emitted when the {@link OpenSeaSDK.approveOrder} method is called.
|
|
46
|
+
*/
|
|
47
|
+
EventType["ApproveOrder"] = "ApproveOrder";
|
|
48
|
+
/**
|
|
49
|
+
* Emitted when the {@link OpenSeaSDK.transfer} method is called.
|
|
50
|
+
*/
|
|
51
|
+
EventType["Transfer"] = "Transfer";
|
|
52
|
+
/**
|
|
53
|
+
* Emitted when the {@link OpenSeaSDK.batchApproveAssets} method is called.
|
|
54
|
+
*/
|
|
55
|
+
EventType["ApproveAllAssets"] = "ApproveAllAssets";
|
|
56
|
+
})(EventType || (exports.EventType = EventType = {}));
|
|
57
|
+
/**
|
|
58
|
+
* Each of the possible chains that OpenSea supports.
|
|
59
|
+
* ⚠️NOTE: When adding to this list, also add to the following functions:
|
|
60
|
+
* - `getChainId`
|
|
61
|
+
* - `getListingPaymentToken`
|
|
62
|
+
* - `getOfferPaymentToken`
|
|
63
|
+
* - `getNativeWrapTokenAddress` (if getOfferPaymentToken isn't the wrapped native asset)
|
|
64
|
+
*/
|
|
65
|
+
var Chain;
|
|
66
|
+
(function (Chain) {
|
|
67
|
+
Chain["Mainnet"] = "ethereum";
|
|
68
|
+
Chain["Polygon"] = "polygon";
|
|
69
|
+
Chain["Base"] = "base";
|
|
70
|
+
Chain["Blast"] = "blast";
|
|
71
|
+
Chain["Arbitrum"] = "arbitrum";
|
|
72
|
+
Chain["Avalanche"] = "avalanche";
|
|
73
|
+
Chain["Optimism"] = "optimism";
|
|
74
|
+
Chain["Solana"] = "solana";
|
|
75
|
+
Chain["Zora"] = "zora";
|
|
76
|
+
Chain["Sei"] = "sei";
|
|
77
|
+
Chain["B3"] = "b3";
|
|
78
|
+
Chain["BeraChain"] = "bera_chain";
|
|
79
|
+
Chain["ApeChain"] = "ape_chain";
|
|
80
|
+
Chain["Flow"] = "flow";
|
|
81
|
+
Chain["Ronin"] = "ronin";
|
|
82
|
+
Chain["Abstract"] = "abstract";
|
|
83
|
+
Chain["Shape"] = "shape";
|
|
84
|
+
Chain["Unichain"] = "unichain";
|
|
85
|
+
Chain["Gunzilla"] = "gunzilla";
|
|
86
|
+
Chain["HyperEVM"] = "hyperevm";
|
|
87
|
+
Chain["Somnia"] = "somnia";
|
|
88
|
+
Chain["Monad"] = "monad";
|
|
89
|
+
Chain["MegaETH"] = "megaeth";
|
|
90
|
+
Chain["Soneium"] = "soneium";
|
|
91
|
+
Chain["Hyperliquid"] = "hyperliquid";
|
|
92
|
+
})(Chain || (exports.Chain = Chain = {}));
|
|
93
|
+
const _assertAPIChainsCovered = true;
|
|
94
|
+
/**
|
|
95
|
+
* Order side: listing (ask) or offer (bid)
|
|
96
|
+
*/
|
|
97
|
+
var OrderSide;
|
|
98
|
+
(function (OrderSide) {
|
|
99
|
+
OrderSide["LISTING"] = "ask";
|
|
100
|
+
OrderSide["OFFER"] = "bid";
|
|
101
|
+
})(OrderSide || (exports.OrderSide = OrderSide = {}));
|
|
102
|
+
/**
|
|
103
|
+
* Token standards
|
|
104
|
+
*/
|
|
105
|
+
var TokenStandard;
|
|
106
|
+
(function (TokenStandard) {
|
|
107
|
+
TokenStandard["ERC20"] = "ERC20";
|
|
108
|
+
TokenStandard["ERC721"] = "ERC721";
|
|
109
|
+
TokenStandard["ERC1155"] = "ERC1155";
|
|
110
|
+
})(TokenStandard || (exports.TokenStandard = TokenStandard = {}));
|
|
111
|
+
/**
|
|
112
|
+
* The collection's approval status within OpenSea.
|
|
113
|
+
* Can be one of:
|
|
114
|
+
* - not_requested: brand new collections
|
|
115
|
+
* - requested: collections that requested safelisting on our site
|
|
116
|
+
* - approved: collections that are approved on our site and can be found in search results
|
|
117
|
+
* - verified: verified collections
|
|
118
|
+
*/
|
|
119
|
+
var SafelistStatus;
|
|
120
|
+
(function (SafelistStatus) {
|
|
121
|
+
SafelistStatus["NOT_REQUESTED"] = "not_requested";
|
|
122
|
+
SafelistStatus["REQUESTED"] = "requested";
|
|
123
|
+
SafelistStatus["APPROVED"] = "approved";
|
|
124
|
+
SafelistStatus["VERIFIED"] = "verified";
|
|
125
|
+
SafelistStatus["DISABLED_TOP_TRENDING"] = "disabled_top_trending";
|
|
126
|
+
})(SafelistStatus || (exports.SafelistStatus = SafelistStatus = {}));
|
|
127
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AAKA;;;;GAIG;AACH,IAAY,SA8CX;AA9CD,WAAY,SAAS;IACnB;;;OAGG;IACH,sDAAyC,CAAA;IACzC;;OAEG;IACH,0DAA6C,CAAA;IAC7C;;OAEG;IACH,oDAAuC,CAAA;IACvC;;OAEG;IACH,oDAAuC,CAAA;IACvC;;OAEG;IACH,gCAAmB,CAAA;IACnB;;OAEG;IACH,sCAAyB,CAAA;IACzB;;OAEG;IACH,wCAA2B,CAAA;IAC3B;;OAEG;IACH,wCAA2B,CAAA;IAC3B;;OAEG;IACH,0CAA6B,CAAA;IAC7B;;OAEG;IACH,kCAAqB,CAAA;IACrB;;OAEG;IACH,kDAAqC,CAAA;AACvC,CAAC,EA9CW,SAAS,yBAAT,SAAS,QA8CpB;AAyDD;;;;;;;GAOG;AACH,IAAY,KA0BX;AA1BD,WAAY,KAAK;IACf,6BAAoB,CAAA;IACpB,4BAAmB,CAAA;IACnB,sBAAa,CAAA;IACb,wBAAe,CAAA;IACf,8BAAqB,CAAA;IACrB,gCAAuB,CAAA;IACvB,8BAAqB,CAAA;IACrB,0BAAiB,CAAA;IACjB,sBAAa,CAAA;IACb,oBAAW,CAAA;IACX,kBAAS,CAAA;IACT,iCAAwB,CAAA;IACxB,+BAAsB,CAAA;IACtB,sBAAa,CAAA;IACb,wBAAe,CAAA;IACf,8BAAqB,CAAA;IACrB,wBAAe,CAAA;IACf,8BAAqB,CAAA;IACrB,8BAAqB,CAAA;IACrB,8BAAqB,CAAA;IACrB,0BAAiB,CAAA;IACjB,wBAAe,CAAA;IACf,4BAAmB,CAAA;IACnB,4BAAmB,CAAA;IACnB,oCAA2B,CAAA;AAC7B,CAAC,EA1BW,KAAK,qBAAL,KAAK,QA0BhB;AAOD,MAAM,uBAAuB,GAA4B,IAAI,CAAA;AAE7D;;GAEG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAED;;GAEG;AACH,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,gCAAe,CAAA;IACf,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;AACrB,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED;;;;;;;GAOG;AACH,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,iDAA+B,CAAA;IAC/B,yCAAuB,CAAA;IACvB,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;IACrB,iEAA+C,CAAA;AACjD,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Chain } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Checks if a chain uses the alternate protocol addresses.
|
|
4
|
+
* These chains use non-standard Seaport, conduit, and signed zone deployments.
|
|
5
|
+
* @param chain The chain to check
|
|
6
|
+
* @returns True if the chain uses alternate protocol addresses
|
|
7
|
+
*/
|
|
8
|
+
export declare const usesAlternateProtocol: (chain: Chain) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Gets the chain ID for a given chain.
|
|
11
|
+
* @param chain The chain to get the ID for
|
|
12
|
+
* @returns The chain ID as a string
|
|
13
|
+
*/
|
|
14
|
+
export declare const getChainId: (chain: Chain) => "1" | "137" | "43114" | "42161" | "238" | "8453" | "10" | "7777777" | "1329" | "8333" | "80094" | "747" | "33139" | "2020" | "2741" | "360" | "130" | "43419" | "999" | "5031" | "143" | "4326";
|
|
15
|
+
/**
|
|
16
|
+
* Returns the default currency for offers on the given chain.
|
|
17
|
+
* @param chain The chain to get the offer payment token for
|
|
18
|
+
* @returns The token address for offers
|
|
19
|
+
*/
|
|
20
|
+
export declare const getOfferPaymentToken: (chain: Chain) => "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" | "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619" | "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7" | "0x82af49447d8a07e3bd95bd0d56f35241523fbab1" | "0x4300000000000000000000000000000000000004" | "0x4200000000000000000000000000000000000006" | "0x6969696969696969696969696969696969696969" | "0xe30fedd158a2e3b13e9badaeabafc5516e95e8c7" | "0xd3bf53dac106a0290b0483ecbc89d40fcc961f3e" | "0x48b62137edfa95a428d35c09e44256a739f6b557" | "0xe514d9deb7966c8be0ca922de8a064264ea6bcd4" | "0x3439153eb7af838ad19d56e1571fbd09333c2809" | "0x5aad7bba61d95c2c4e525a35f4062040264611f1" | "0x5555555555555555555555555555555555555555" | "0x046ede9564a72571df6f5e44d0405360c0f4dcab" | "0x3bd359c1119da7da1d913d1c4d2b7c461115433a";
|
|
21
|
+
/**
|
|
22
|
+
* Returns the default currency for listings on the given chain.
|
|
23
|
+
* @param chain The chain to get the listing payment token for
|
|
24
|
+
* @returns The token address for listings
|
|
25
|
+
*/
|
|
26
|
+
export declare const getListingPaymentToken: (chain: Chain) => "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619" | "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7" | "0xd3bf53dac106a0290b0483ecbc89d40fcc961f3e" | "0xe514d9deb7966c8be0ca922de8a064264ea6bcd4" | "0x0000000000000000000000000000000000000000";
|
|
27
|
+
/**
|
|
28
|
+
* Get the default conduit key and address for a given chain.
|
|
29
|
+
* @param chain The chain to get the conduit for
|
|
30
|
+
* @returns The conduit key and address for the chain
|
|
31
|
+
*/
|
|
32
|
+
export declare const getDefaultConduit: (chain: Chain) => {
|
|
33
|
+
key: string;
|
|
34
|
+
address: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Get the Seaport 1.6 contract address for a given chain.
|
|
38
|
+
* @param chain The chain to get the Seaport address for
|
|
39
|
+
* @returns The Seaport 1.6 address for the chain
|
|
40
|
+
*/
|
|
41
|
+
export declare const getSeaportAddress: (chain: Chain) => string;
|
|
42
|
+
/**
|
|
43
|
+
* Get the signed zone address for a given chain.
|
|
44
|
+
* @param chain The chain to get the signed zone address for
|
|
45
|
+
* @returns The signed zone address for the chain
|
|
46
|
+
*/
|
|
47
|
+
export declare const getSignedZone: (chain: Chain) => string;
|
|
48
|
+
/**
|
|
49
|
+
* Get the fee recipient address for a given chain
|
|
50
|
+
* @param chain The blockchain chain
|
|
51
|
+
* @returns The fee recipient address for the chain
|
|
52
|
+
*/
|
|
53
|
+
export declare const getFeeRecipient: (chain: Chain) => string;
|
|
54
|
+
/**
|
|
55
|
+
* Get the appropriate token address for wrap/unwrap operations.
|
|
56
|
+
* For Polygon, use WPOL. For other chains, use the wrapped native asset.
|
|
57
|
+
* @param chain The chain to get the token address for
|
|
58
|
+
* @returns The token address for wrap/unwrap operations
|
|
59
|
+
*/
|
|
60
|
+
export declare const getNativeWrapTokenAddress: (chain: Chain) => string;
|