opensea-js 4.0.3 → 4.0.6
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/README.md +42 -65
- package/lib/__tests__/api/api.d.ts +1 -0
- package/lib/__tests__/api/api.js +173 -0
- package/lib/__tests__/api/api.js.map +1 -0
- package/lib/__tests__/constants.d.ts +44 -0
- package/lib/__tests__/constants.js +58 -0
- package/lib/__tests__/constants.js.map +1 -0
- package/lib/__tests__/fixtures/orders.json +248 -0
- package/lib/__tests__/sdk/fees.d.ts +1 -0
- package/lib/__tests__/sdk/fees.js +259 -0
- package/lib/__tests__/sdk/fees.js.map +1 -0
- package/lib/__tests__/sdk/getOrders.d.ts +1 -0
- package/lib/__tests__/sdk/getOrders.js +111 -0
- package/lib/__tests__/sdk/getOrders.js.map +1 -0
- package/lib/__tests__/sdk/misc.d.ts +1 -0
- package/lib/__tests__/sdk/misc.js +175 -0
- package/lib/__tests__/sdk/misc.js.map +1 -0
- package/lib/__tests__/sdk/orders.d.ts +1 -0
- package/lib/__tests__/sdk/orders.js +125 -0
- package/lib/__tests__/sdk/orders.js.map +1 -0
- package/lib/__tests__/sdk/ownersAndTransfers.d.ts +1 -0
- package/lib/__tests__/sdk/ownersAndTransfers.js +464 -0
- package/lib/__tests__/sdk/ownersAndTransfers.js.map +1 -0
- package/lib/__tests__/support/setup.d.ts +1 -0
- package/lib/__tests__/support/setup.js +10 -0
- package/lib/__tests__/support/setup.js.map +1 -0
- package/lib/__tests__/utils.d.ts +2 -0
- package/lib/__tests__/utils.js +11 -0
- package/lib/__tests__/utils.js.map +1 -0
- package/lib/api.d.ts +3 -29
- package/lib/api.js +25 -122
- package/lib/api.js.map +1 -1
- package/lib/constants.d.ts +4 -13
- package/lib/constants.js +8 -17
- package/lib/constants.js.map +1 -1
- package/lib/contracts.d.ts +0 -5
- package/lib/contracts.js +1 -11
- package/lib/contracts.js.map +1 -1
- package/lib/orders/types.d.ts +2 -1
- package/lib/orders/utils.d.ts +1 -1
- package/lib/orders/utils.js +3 -2
- package/lib/orders/utils.js.map +1 -1
- package/lib/sdk.d.ts +1 -246
- package/lib/sdk.js +512 -1380
- package/lib/sdk.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/utils/utils.d.ts +7 -0
- package/lib/utils/utils.js +17 -1
- package/lib/utils/utils.js.map +1 -1
- package/package.json +2 -2
- package/lib/orders/constants.d.ts +0 -2
- package/lib/orders/constants.js +0 -6
- package/lib/orders/constants.js.map +0 -1
- package/lib/orders/validators.d.ts +0 -0
- package/lib/orders/validators.js +0 -2
- package/lib/orders/validators.js.map +0 -1
- package/lib/seaport.d.ts +0 -927
- package/lib/seaport.js +0 -4146
- package/lib/seaport.js.map +0 -1
package/README.md
CHANGED
|
@@ -34,7 +34,6 @@ Published on [GitHub](https://github.com/ProjectOpenSea/opensea-js) and [npm](ht
|
|
|
34
34
|
- [Bulk Transfers](#bulk-transfers)
|
|
35
35
|
- [Using ERC-20 Tokens Instead of Ether](#using-erc-20-tokens-instead-of-ether)
|
|
36
36
|
- [Private Auctions](#private-auctions)
|
|
37
|
-
- [Sharing Sale Fees with OpenSea](#sharing-sale-fees-with-opensea)
|
|
38
37
|
- [Listening to Events](#listening-to-events)
|
|
39
38
|
- [Learning More](#learning-more)
|
|
40
39
|
- [Example Code](#example-code)
|
|
@@ -63,6 +62,19 @@ Then, in your project, run:
|
|
|
63
62
|
npm install --save opensea-js
|
|
64
63
|
```
|
|
65
64
|
|
|
65
|
+
> **Warning**
|
|
66
|
+
> Due to the use of git-url dependencies, versions of `npm` below 8.5.2 are incompatible with this package due to broken integrity checksum validation.
|
|
67
|
+
> Above version 8.5.2, `npm` will no longer validate integrity checksums for git-url dependencies.
|
|
68
|
+
|
|
69
|
+
> **Warning**
|
|
70
|
+
> To use `yarn` the following resolution is required to be added to your package.json:
|
|
71
|
+
>
|
|
72
|
+
> ```
|
|
73
|
+
> "resolutions": {
|
|
74
|
+
> "@0x/utils": "https://github.com/ProjectOpensea/0x-tools/raw/provider-patch/utils/0x-utils-6.5.0.tgz",
|
|
75
|
+
> }
|
|
76
|
+
> ```
|
|
77
|
+
|
|
66
78
|
Install [web3](https://github.com/ethereum/web3.js) too if you haven't already.
|
|
67
79
|
|
|
68
80
|
If you run into an error while building the dependencies and you're on a Mac, run this:
|
|
@@ -276,55 +288,23 @@ const auction = await openseaSDK.createSellOrder({
|
|
|
276
288
|
|
|
277
289
|
Note that auctions aren't supported with Ether directly due to limitations in Ethereum, so you have to use an ERC20 token, like Wrapped Ether (WETH), a stablecoin like DAI, etc. See [Using ERC-20 Tokens Instead of Ether](#using-erc-20-tokens-instead-of-ether) for more info.
|
|
278
290
|
|
|
279
|
-
### Running Crowdsales
|
|
280
|
-
|
|
281
|
-
You can now sell items to users **without having to pay gas to mint them**!
|
|
282
|
-
|
|
283
|
-
To create a presale or crowdsale and create batches of sell orders for a single asset factory, first follow the [tutorial](https://docs.opensea.io/docs/opensea-initial-item-sale-tutorial) for creating your crowdsale contract.
|
|
284
|
-
|
|
285
|
-
Then call `createFactorySellOrders` with your factory contract address and asset option identifier, and set `numberOfOrders` to the number of assets you'd like to let users buy and mint:
|
|
286
|
-
|
|
287
|
-
```JavaScript
|
|
288
|
-
// Expire these auctions one day from now
|
|
289
|
-
const expirationTime = Math.round(Date.now() / 1000 + 60 * 60 * 24)
|
|
290
|
-
|
|
291
|
-
const sellOrders = await openseaSDK.createFactorySellOrders({
|
|
292
|
-
assetId: ASSET_OPTION_ID,
|
|
293
|
-
factoryAddress: FACTORY_CONTRACT_ADDRESS,
|
|
294
|
-
accountAddress,
|
|
295
|
-
startAmount,
|
|
296
|
-
endAmount,
|
|
297
|
-
expirationTime,
|
|
298
|
-
// Will create 100 sell orders in parallel batches of 10, to speed things up:
|
|
299
|
-
numberOfOrders: 100
|
|
300
|
-
})
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
Here's an [example script](https://github.com/ProjectOpenSea/opensea-creatures/blob/master/scripts/sell.js) you can use to mint items.
|
|
304
|
-
|
|
305
|
-
**NOTE:** If `numberOfOrders` is greater than 5, we will automatically batch them in groups of 5 so you can post orders in parallel. Requires an `apiKey` to be set during SDK initialization in order to not be throttled by the API.
|
|
306
|
-
|
|
307
|
-
Games using this method include [Coins & Steel](https://opensea.io/assets/coins&steelfounderssale) and a couple in stealth :) If you have questions or want support, contact us at contact@opensea.io (or in [Discord](https://discord.gg/ga8EJbv)).
|
|
308
|
-
|
|
309
291
|
### Fetching Orders
|
|
310
292
|
|
|
311
|
-
To retrieve a list of offers and auction on an asset, you can use an instance of the `OpenSeaAPI` exposed on the client. Parameters passed into API filter objects are
|
|
293
|
+
To retrieve a list of offers and auction on an asset, you can use an instance of the `OpenSeaAPI` exposed on the client. Parameters passed into API filter objects are camel-cased and serialized before being sent as [OpenSea API parameters](https://docs.opensea.io/v2.0/reference):
|
|
312
294
|
|
|
313
295
|
```JavaScript
|
|
314
|
-
import { OrderSide } from 'opensea-js/lib/types'
|
|
315
|
-
|
|
316
296
|
// Get offers (bids), a.k.a. orders where `side == 0`
|
|
317
297
|
const { orders, count } = await openseaSDK.api.getOrders({
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
side:
|
|
298
|
+
assetContractAddress: tokenAddress,
|
|
299
|
+
tokenId,
|
|
300
|
+
side: "bid"
|
|
321
301
|
})
|
|
322
302
|
|
|
323
303
|
// Get page 2 of all auctions, a.k.a. orders where `side == 1`
|
|
324
304
|
const { orders, count } = await openseaSDK.api.getOrders({
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
side:
|
|
305
|
+
assetContractAddress: tokenAddress,
|
|
306
|
+
tokenId,
|
|
307
|
+
side: "ask"
|
|
328
308
|
}, 2)
|
|
329
309
|
```
|
|
330
310
|
|
|
@@ -332,23 +312,28 @@ Note that the listing price of an asset is equal to the `currentPrice` of the **
|
|
|
332
312
|
|
|
333
313
|
To learn more about signatures, makers, takers, listingTime vs createdTime and other kinds of order terminology, please read the [**Terminology Section**](https://docs.opensea.io/reference#terminology) of the API Docs.
|
|
334
314
|
|
|
335
|
-
The available API filters for the orders endpoint is documented in the `
|
|
315
|
+
The available API filters for the orders endpoint is documented in the `OrdersQueryOptions` interface below, but see the main [API Docs](https://docs.opensea.io/reference#reference-getting-started) for a playground, along with more up-to-date and detailed explanantions.
|
|
336
316
|
|
|
337
317
|
```TypeScript
|
|
338
318
|
/**
|
|
339
319
|
* Attrs used by orderbook to make queries easier
|
|
340
320
|
* More to come soon!
|
|
341
321
|
*/
|
|
322
|
+
side: "bid" | "ask", // "bid" for buy orders, "ask" for sell orders
|
|
323
|
+
protocol?: "seaport"; // Protocol of the order (more options may be added in future)
|
|
342
324
|
maker?: string, // Address of the order's creator
|
|
343
325
|
taker?: string, // The null address if anyone is allowed to take the order
|
|
344
|
-
|
|
345
|
-
owner?: string, // Address of owner of the order's asset
|
|
326
|
+
owner?: string, // Address of owner of the order's item
|
|
346
327
|
sale_kind?: SaleKind, // 0 for fixed-price, 1 for Dutch auctions
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
328
|
+
assetContractAddress?: string, // Contract address for order's item
|
|
329
|
+
paymentTokenAddress?: string; // Contract address for order's payment token
|
|
330
|
+
tokenId?: number | string,
|
|
331
|
+
tokenIds?: Array<number | string>,
|
|
332
|
+
listedAfter?: number | string, // This means listing_time > value in seconds
|
|
333
|
+
listedBefore?: number | string, // This means listing_time <= value in seconds
|
|
334
|
+
orderBy?: "created_date" | "eth_price", // Field to sort results by
|
|
335
|
+
orderDirection?: "asc" | "desc", // Sort direction of orderBy sorting of results
|
|
336
|
+
onlyEnglish?: boolean, // Only return english auction orders
|
|
352
337
|
|
|
353
338
|
// For pagination
|
|
354
339
|
limit?: number,
|
|
@@ -360,26 +345,26 @@ The available API filters for the orders endpoint is documented in the `OrderJSO
|
|
|
360
345
|
To buy an item , you need to **fulfill a sell order**. To do that, it's just one call:
|
|
361
346
|
|
|
362
347
|
```JavaScript
|
|
363
|
-
const order = await openseaSDK.api.getOrder({ side:
|
|
348
|
+
const order = await openseaSDK.api.getOrder({ side: "ask", ... })
|
|
364
349
|
const accountAddress = "0x..." // The buyer's wallet address, also the taker
|
|
365
350
|
const transactionHash = await this.props.openseaSDK.fulfillOrder({ order, accountAddress })
|
|
366
351
|
```
|
|
367
352
|
|
|
368
353
|
Note that the `fulfillOrder` promise resolves when the transaction has been confirmed and mined to the blockchain. To get the transaction hash before this happens, add an event listener (see [Listening to Events](#listening-to-events)) for the `TransactionCreated` event.
|
|
369
354
|
|
|
370
|
-
If the order is a sell order (`order.side ===
|
|
355
|
+
If the order is a sell order (`order.side === "ask"`), the taker is the _buyer_ and this will prompt the buyer to pay for the item(s).
|
|
371
356
|
|
|
372
357
|
### Accepting Offers
|
|
373
358
|
|
|
374
359
|
Similar to fulfilling sell orders above, you need to fulfill a buy order on an item you own to receive the tokens in the offer.
|
|
375
360
|
|
|
376
361
|
```JavaScript
|
|
377
|
-
const order = await openseaSDK.api.getOrder({ side:
|
|
362
|
+
const order = await openseaSDK.api.getOrder({ side: "bid", ... })
|
|
378
363
|
const accountAddress = "0x..." // The owner's wallet address, also the taker
|
|
379
364
|
await this.props.openseaSDK.fulfillOrder({ order, accountAddress })
|
|
380
365
|
```
|
|
381
366
|
|
|
382
|
-
If the order is a buy order (`order.side ===
|
|
367
|
+
If the order is a buy order (`order.side === "bid"`), then the taker is the _owner_ and this will prompt the owner to exchange their item(s) for whatever is being offered in return. See [Listening to Events](#listening-to-events) below to respond to the setup transactions that occur the first time a user accepts a bid.
|
|
383
368
|
|
|
384
369
|
### Transferring Items or Coins (Gifting)
|
|
385
370
|
|
|
@@ -456,7 +441,7 @@ const auction = await openseaSDK.createSellOrder({
|
|
|
456
441
|
You can buy and transfer an item to someone else in one step! Just pass the `recipientAddress` parameter:
|
|
457
442
|
|
|
458
443
|
```JavaScript
|
|
459
|
-
const order = await openseaSDK.api.getOrder({ side:
|
|
444
|
+
const order = await openseaSDK.api.getOrder({ side: "ask", ... })
|
|
460
445
|
await this.props.openseaSDK.fulfillOrder({
|
|
461
446
|
order,
|
|
462
447
|
accountAddress, // The address of your wallet, which will sign the transaction
|
|
@@ -464,7 +449,7 @@ await this.props.openseaSDK.fulfillOrder({
|
|
|
464
449
|
})
|
|
465
450
|
```
|
|
466
451
|
|
|
467
|
-
If the order is a sell order (`order.side ===
|
|
452
|
+
If the order is a sell order (`order.side === "ask"`), the taker is the _buyer_ and this will prompt the buyer to pay for the item(s) but send them to the `recipientAddress`. If the order is a buy order ( `"bid"`), the taker is the _seller_ but the bid amount be sent to the `recipientAddress`.
|
|
468
453
|
|
|
469
454
|
### Bulk Transfers
|
|
470
455
|
|
|
@@ -508,8 +493,8 @@ You can use `getPaymentTokens` to search for tokens by symbol name. And you can
|
|
|
508
493
|
const token = (await openseaSDK.api.getPaymentTokens({ symbol: 'MANA'})).tokens[0]
|
|
509
494
|
|
|
510
495
|
const order = await openseaSDK.api.getOrders({
|
|
511
|
-
side:
|
|
512
|
-
|
|
496
|
+
side: "ask",
|
|
497
|
+
paymentTokenAddress: token.address
|
|
513
498
|
})
|
|
514
499
|
```
|
|
515
500
|
|
|
@@ -538,14 +523,6 @@ const listing = await openseaSDK.createSellOrder({
|
|
|
538
523
|
})
|
|
539
524
|
```
|
|
540
525
|
|
|
541
|
-
### Sharing Sale Fees with OpenSea
|
|
542
|
-
|
|
543
|
-
We share fees for successful sales with game developers, relayers, and affiliates using the OpenSea orderbook. Developers can customize the fee amount to apply to buyers and/or sellers.
|
|
544
|
-
|
|
545
|
-
See [Affiliate Program](#affiliate-program) above for how to register referrers for sales.
|
|
546
|
-
|
|
547
|
-
More information will appear here when our redesigned affiliate program is ready. In the meantime, contact us at contact@opensea.io (or in [Discord](https://discord.gg/ga8EJbv)), or use our legacy affiliate program at https://opensea.io/account#referrals.
|
|
548
|
-
|
|
549
526
|
### Listening to Events
|
|
550
527
|
|
|
551
528
|
Events are fired whenever transactions or orders are being created, and when transactions return receipts from recently mined blocks on the Ethereum blockchain.
|
|
@@ -636,7 +613,7 @@ If you need extra help, support is free! Contact the OpenSea devs. They're avail
|
|
|
636
613
|
|
|
637
614
|
Check out the [Ship's Log](https://github.com/ProjectOpenSea/ships-log), built with the SDK, which shows the recent orders in the OpenSea orderbook.
|
|
638
615
|
|
|
639
|
-
|
|
616
|
+
Also check out the [Mythereum marketplace](https://mythereum.io/marketplace), which is entirely powered by OpenSea.js.
|
|
640
617
|
|
|
641
618
|
## Migrating to version 1.0
|
|
642
619
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var chai_1 = require("chai");
|
|
40
|
+
var mocha_1 = require("mocha");
|
|
41
|
+
var constants_1 = require("../constants");
|
|
42
|
+
(0, mocha_1.suite)("api", function () {
|
|
43
|
+
(0, mocha_1.test)("API has correct base url", function () {
|
|
44
|
+
chai_1.assert.equal(constants_1.mainApi.apiBaseUrl, "https://api.opensea.io");
|
|
45
|
+
chai_1.assert.equal(constants_1.rinkebyApi.apiBaseUrl, "https://testnets-api.opensea.io");
|
|
46
|
+
});
|
|
47
|
+
(0, mocha_1.test)("API fetches bundles and prefetches sell orders", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
|
+
var bundles, bundle;
|
|
49
|
+
return __generator(this, function (_a) {
|
|
50
|
+
switch (_a.label) {
|
|
51
|
+
case 0: return [4 /*yield*/, constants_1.apiToTest.getBundles({
|
|
52
|
+
asset_contract_address: constants_1.CK_RINKEBY_ADDRESS,
|
|
53
|
+
})];
|
|
54
|
+
case 1:
|
|
55
|
+
bundles = (_a.sent()).bundles;
|
|
56
|
+
chai_1.assert.isArray(bundles);
|
|
57
|
+
bundle = bundles[0];
|
|
58
|
+
chai_1.assert.isNotNull(bundle);
|
|
59
|
+
if (!bundle) {
|
|
60
|
+
return [2 /*return*/];
|
|
61
|
+
}
|
|
62
|
+
chai_1.assert.include(bundle.assets.map(function (a) { return a.assetContract.name; }), "CryptoKittiesRinkeby");
|
|
63
|
+
return [2 /*return*/];
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}); });
|
|
67
|
+
(0, mocha_1.test)("Includes API key in token request", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
68
|
+
var oldLogger, logPromise;
|
|
69
|
+
return __generator(this, function (_a) {
|
|
70
|
+
switch (_a.label) {
|
|
71
|
+
case 0:
|
|
72
|
+
oldLogger = constants_1.rinkebyApi.logger;
|
|
73
|
+
logPromise = new Promise(function (resolve, reject) {
|
|
74
|
+
constants_1.rinkebyApi.logger = function (log) {
|
|
75
|
+
try {
|
|
76
|
+
chai_1.assert.include(log, "\"X-API-KEY\":\"".concat(constants_1.RINKEBY_API_KEY, "\""));
|
|
77
|
+
resolve();
|
|
78
|
+
}
|
|
79
|
+
catch (e) {
|
|
80
|
+
reject(e);
|
|
81
|
+
}
|
|
82
|
+
finally {
|
|
83
|
+
constants_1.rinkebyApi.logger = oldLogger;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
constants_1.rinkebyApi.getPaymentTokens({ symbol: "WETH" });
|
|
87
|
+
});
|
|
88
|
+
return [4 /*yield*/, logPromise];
|
|
89
|
+
case 1:
|
|
90
|
+
_a.sent();
|
|
91
|
+
return [2 /*return*/];
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}); });
|
|
95
|
+
(0, mocha_1.test)("API fetches tokens", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
96
|
+
var tokens;
|
|
97
|
+
return __generator(this, function (_a) {
|
|
98
|
+
switch (_a.label) {
|
|
99
|
+
case 0: return [4 /*yield*/, constants_1.apiToTest.getPaymentTokens({ symbol: "MANA" })];
|
|
100
|
+
case 1:
|
|
101
|
+
tokens = (_a.sent()).tokens;
|
|
102
|
+
chai_1.assert.isArray(tokens);
|
|
103
|
+
chai_1.assert.equal(tokens.length, 1);
|
|
104
|
+
chai_1.assert.equal(tokens[0].name, "Decentraland MANA");
|
|
105
|
+
return [2 /*return*/];
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}); });
|
|
109
|
+
(0, mocha_1.test)("API fetches fees for an asset", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
110
|
+
var asset;
|
|
111
|
+
return __generator(this, function (_a) {
|
|
112
|
+
switch (_a.label) {
|
|
113
|
+
case 0: return [4 /*yield*/, constants_1.apiToTest.getAsset({
|
|
114
|
+
tokenAddress: constants_1.CK_RINKEBY_ADDRESS,
|
|
115
|
+
tokenId: constants_1.CK_RINKEBY_TOKEN_ID,
|
|
116
|
+
})];
|
|
117
|
+
case 1:
|
|
118
|
+
asset = _a.sent();
|
|
119
|
+
chai_1.assert.equal(asset.tokenId, constants_1.CK_RINKEBY_TOKEN_ID.toString());
|
|
120
|
+
chai_1.assert.equal(asset.assetContract.name, "CryptoKittiesRinkeby");
|
|
121
|
+
chai_1.assert.equal(asset.assetContract.sellerFeeBasisPoints, constants_1.CK_RINKEBY_SELLER_FEE);
|
|
122
|
+
return [2 /*return*/];
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}); });
|
|
126
|
+
(0, mocha_1.test)("API fetches assets", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
127
|
+
var assets, asset;
|
|
128
|
+
return __generator(this, function (_a) {
|
|
129
|
+
switch (_a.label) {
|
|
130
|
+
case 0: return [4 /*yield*/, constants_1.apiToTest.getAssets({
|
|
131
|
+
asset_contract_address: constants_1.CK_RINKEBY_ADDRESS,
|
|
132
|
+
order_by: "sale_date",
|
|
133
|
+
})];
|
|
134
|
+
case 1:
|
|
135
|
+
assets = (_a.sent()).assets;
|
|
136
|
+
chai_1.assert.isArray(assets);
|
|
137
|
+
chai_1.assert.equal(assets.length, constants_1.apiToTest.pageSize);
|
|
138
|
+
asset = assets[0];
|
|
139
|
+
chai_1.assert.equal(asset.assetContract.name, "CryptoKittiesRinkeby");
|
|
140
|
+
return [2 /*return*/];
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}); });
|
|
144
|
+
(0, mocha_1.test)("API handles errors", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
145
|
+
var error_1, error_2;
|
|
146
|
+
return __generator(this, function (_a) {
|
|
147
|
+
switch (_a.label) {
|
|
148
|
+
case 0:
|
|
149
|
+
_a.trys.push([0, 2, , 3]);
|
|
150
|
+
return [4 /*yield*/, constants_1.apiToTest.get("/user")];
|
|
151
|
+
case 1:
|
|
152
|
+
_a.sent();
|
|
153
|
+
return [3 /*break*/, 3];
|
|
154
|
+
case 2:
|
|
155
|
+
error_1 = _a.sent();
|
|
156
|
+
chai_1.assert.include(error_1.message, "Unauthorized");
|
|
157
|
+
return [3 /*break*/, 3];
|
|
158
|
+
case 3:
|
|
159
|
+
_a.trys.push([3, 5, , 6]);
|
|
160
|
+
return [4 /*yield*/, constants_1.apiToTest.get("/asset/".concat(constants_1.CK_RINKEBY_ADDRESS, "/0"))];
|
|
161
|
+
case 4:
|
|
162
|
+
_a.sent();
|
|
163
|
+
return [3 /*break*/, 6];
|
|
164
|
+
case 5:
|
|
165
|
+
error_2 = _a.sent();
|
|
166
|
+
chai_1.assert.include(error_2.message, "Not found");
|
|
167
|
+
return [3 /*break*/, 6];
|
|
168
|
+
case 6: return [2 /*return*/];
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}); });
|
|
172
|
+
});
|
|
173
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/__tests__/api/api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA8B;AAC9B,+BAAoC;AACpC,0CAQsB;AAEtB,IAAA,aAAK,EAAC,KAAK,EAAE;IACX,IAAA,YAAI,EAAC,0BAA0B,EAAE;QAC/B,aAAM,CAAC,KAAK,CAAC,mBAAO,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAAC;QAC3D,aAAM,CAAC,KAAK,CAAC,sBAAU,CAAC,UAAU,EAAE,iCAAiC,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;IAEH,IAAA,YAAI,EAAC,gDAAgD,EAAE;;;;wBACjC,qBAAM,qBAAS,CAAC,UAAU,CAAC;wBAC7C,sBAAsB,EAAE,8BAAkB;qBAC3C,CAAC,EAAA;;oBAFM,OAAO,GAAK,CAAA,SAElB,CAAA,QAFa;oBAGf,aAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;oBAElB,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;oBAC1B,aAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;oBACzB,IAAI,CAAC,MAAM,EAAE;wBACX,sBAAO;qBACR;oBACD,aAAM,CAAC,OAAO,CACZ,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,aAAa,CAAC,IAAI,EAApB,CAAoB,CAAC,EAC9C,sBAAsB,CACvB,CAAC;;;;SACH,CAAC,CAAC;IAEH,IAAA,YAAI,EAAC,mCAAmC,EAAE;;;;;oBAClC,SAAS,GAAG,sBAAU,CAAC,MAAM,CAAC;oBAE9B,UAAU,GAAG,IAAI,OAAO,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declare const MAINNET_API_KEY: string | undefined;
|
|
4
|
+
export declare const RINKEBY_API_KEY: string | undefined;
|
|
5
|
+
export declare const mainApi: OpenSeaAPI;
|
|
6
|
+
export declare const rinkebyApi: OpenSeaAPI;
|
|
7
|
+
export declare const apiToTest: OpenSeaAPI;
|
|
8
|
+
export { CK_ADDRESS, CK_RINKEBY_ADDRESS };
|
|
9
|
+
export declare const GODS_UNCHAINED_ADDRESS = "0x6ebeaf8e8e946f0716e6533a6f2cefc83f60e8ab";
|
|
10
|
+
export declare const DIGITAL_ART_CHAIN_ADDRESS = "0x323a3e1693e7a0959f65972f3bf2dfcb93239dfe";
|
|
11
|
+
export declare const MYTHEREUM_ADDRESS = "0xc70be5b7c19529ef642d16c10dfe91c58b5c3bf0";
|
|
12
|
+
export declare const MYTHEREUM_SLUG = "mythereum";
|
|
13
|
+
export declare const DIGITAL_ART_CHAIN_TOKEN_ID = 189;
|
|
14
|
+
export declare const GODS_UNCHAINED_TOKEN_ID = 76719;
|
|
15
|
+
export declare const MYTHEREUM_TOKEN_ID = 4367;
|
|
16
|
+
export declare const WETH_ADDRESS = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2";
|
|
17
|
+
export declare const ENS_RINKEBY_TOKEN_ADDRESS = "0x53ceb15b76023fbec5bb39450214926f6aa77d2e";
|
|
18
|
+
export declare const ENS_RINKEBY_SHORT_NAME_OWNER = "0xe0ee13cd5a45e7fa140409edfc9ce17c7b11e6d2";
|
|
19
|
+
export declare const ENS_HELLO_TOKEN_ID = "12910348618308260923200348219926901280687058984330794534952861439530514639560";
|
|
20
|
+
export declare const ENS_HELLO_NAME = "hello";
|
|
21
|
+
export declare const CK_RINKEBY_TOKEN_ID = 1068;
|
|
22
|
+
export declare const CK_TOKEN_ID = 637488;
|
|
23
|
+
export declare const CK_RINKEBY_SELLER_FEE = 250;
|
|
24
|
+
export declare const CATS_IN_MECHS_ID = "11081664790290028159747096595969945056246807881612483124155840544084353614722";
|
|
25
|
+
export declare const AGE_OF_RUST_TOKEN_ID = "10855508365998404086189256032722001339622921863551706494238735756561045520384";
|
|
26
|
+
export declare const CRYPTOVOXELS_WEARABLE_ADDRESS = "0xa58b5224e2fd94020cb2837231b2b0e4247301a6";
|
|
27
|
+
export declare const CRYPTOVOXELS_WEARABLE_ID = "908";
|
|
28
|
+
export declare const CRYPTOVOXELS_WEARABLE_2_ID = "693";
|
|
29
|
+
export declare const DECENTRALAND_ADDRESS = "0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d";
|
|
30
|
+
export declare const DECENTRALAND_ID = "115792089237316195423570985008687907840339254722644902427849348925505937604680";
|
|
31
|
+
export declare const DISSOLUTION_TOKEN_ID = "39803530675327460487158288219684256433559304725576879659134376004308812431360";
|
|
32
|
+
export declare const CRYPTOFLOWERS_CONTRACT_ADDRESS_WITH_BUYER_FEE = "0x8bc67d00253fd60b1afcce88b78820413139f4c6";
|
|
33
|
+
export declare const SANDBOX_RINKEBY_ADDRESS = "0xcdeadfb2caa81d8c16d2935f3e379dda61242be9";
|
|
34
|
+
export declare const SANDBOX_RINKEBY_ID = "44221324190444972628403853229966997983936414854632412290085204005353951330306";
|
|
35
|
+
export declare const SPIRIT_CLASH_TOKEN_ID = "10855508365998412378240648478527290366700749920879042165450277893550637056000";
|
|
36
|
+
export declare const SPIRIT_CLASH_OWNER = "0x6a846239658f5a16a0b5977e1c0d007bc13267f0";
|
|
37
|
+
export declare const BENZENE_ADDRESS = "0x6524b87960c2d573ae514fd4181777e7842435d4";
|
|
38
|
+
export declare const GODS_UNCHAINED_CHEST_ADDRESS = "0xee85966b4974d3c6f71a2779cc3b6f53afbc2b68";
|
|
39
|
+
export declare const ALEX_ADDRESS = "0xe96a1b303a1eb8d04fb973eb2b291b8d591c8f72";
|
|
40
|
+
export declare const RANDOM_ADDRESS = "0x196a1b303a1eb8d04fb973eb2b291b8d591c8f72";
|
|
41
|
+
export declare const ALEX_ADDRESS_2 = "0x431e44389a003f0ec6e83b3578db5075a44ac523";
|
|
42
|
+
export declare const DEVIN_ADDRESS = "0x0239769a1adf4def9f07da824b80b9c4fcb59593";
|
|
43
|
+
export declare const DAN_ADDRESS = "0x530cf036ed4fa58f7301a9c788c9806624cefd19";
|
|
44
|
+
export declare const DAN_DAPPER_ADDRESS = "0x4819352bd7fadcCFAA8A2cDA4b2825a9ec51417c";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DAN_DAPPER_ADDRESS = exports.DAN_ADDRESS = exports.DEVIN_ADDRESS = exports.ALEX_ADDRESS_2 = exports.RANDOM_ADDRESS = exports.ALEX_ADDRESS = exports.GODS_UNCHAINED_CHEST_ADDRESS = exports.BENZENE_ADDRESS = exports.SPIRIT_CLASH_OWNER = exports.SPIRIT_CLASH_TOKEN_ID = exports.SANDBOX_RINKEBY_ID = exports.SANDBOX_RINKEBY_ADDRESS = exports.CRYPTOFLOWERS_CONTRACT_ADDRESS_WITH_BUYER_FEE = exports.DISSOLUTION_TOKEN_ID = exports.DECENTRALAND_ID = exports.DECENTRALAND_ADDRESS = exports.CRYPTOVOXELS_WEARABLE_2_ID = exports.CRYPTOVOXELS_WEARABLE_ID = exports.CRYPTOVOXELS_WEARABLE_ADDRESS = exports.AGE_OF_RUST_TOKEN_ID = exports.CATS_IN_MECHS_ID = exports.CK_RINKEBY_SELLER_FEE = exports.CK_TOKEN_ID = exports.CK_RINKEBY_TOKEN_ID = exports.ENS_HELLO_NAME = exports.ENS_HELLO_TOKEN_ID = exports.ENS_RINKEBY_SHORT_NAME_OWNER = exports.ENS_RINKEBY_TOKEN_ADDRESS = exports.WETH_ADDRESS = exports.MYTHEREUM_TOKEN_ID = exports.GODS_UNCHAINED_TOKEN_ID = exports.DIGITAL_ART_CHAIN_TOKEN_ID = exports.MYTHEREUM_SLUG = exports.MYTHEREUM_ADDRESS = exports.DIGITAL_ART_CHAIN_ADDRESS = exports.GODS_UNCHAINED_ADDRESS = exports.CK_RINKEBY_ADDRESS = exports.CK_ADDRESS = exports.apiToTest = exports.rinkebyApi = exports.mainApi = exports.RINKEBY_API_KEY = exports.MAINNET_API_KEY = void 0;
|
|
4
|
+
var api_1 = require("../api");
|
|
5
|
+
var constants_1 = require("../constants");
|
|
6
|
+
Object.defineProperty(exports, "CK_ADDRESS", { enumerable: true, get: function () { return constants_1.CK_ADDRESS; } });
|
|
7
|
+
Object.defineProperty(exports, "CK_RINKEBY_ADDRESS", { enumerable: true, get: function () { return constants_1.CK_RINKEBY_ADDRESS; } });
|
|
8
|
+
var types_1 = require("../types");
|
|
9
|
+
exports.MAINNET_API_KEY = process.env.API_KEY;
|
|
10
|
+
exports.RINKEBY_API_KEY = process.env.API_KEY;
|
|
11
|
+
exports.mainApi = new api_1.OpenSeaAPI({
|
|
12
|
+
apiKey: exports.MAINNET_API_KEY,
|
|
13
|
+
networkName: types_1.Network.Main,
|
|
14
|
+
}, console.info);
|
|
15
|
+
exports.rinkebyApi = new api_1.OpenSeaAPI({
|
|
16
|
+
apiKey: exports.RINKEBY_API_KEY,
|
|
17
|
+
networkName: types_1.Network.Rinkeby,
|
|
18
|
+
}, console.info);
|
|
19
|
+
exports.apiToTest = exports.rinkebyApi;
|
|
20
|
+
exports.GODS_UNCHAINED_ADDRESS = "0x6ebeaf8e8e946f0716e6533a6f2cefc83f60e8ab";
|
|
21
|
+
exports.DIGITAL_ART_CHAIN_ADDRESS = "0x323a3e1693e7a0959f65972f3bf2dfcb93239dfe";
|
|
22
|
+
exports.MYTHEREUM_ADDRESS = "0xc70be5b7c19529ef642d16c10dfe91c58b5c3bf0";
|
|
23
|
+
exports.MYTHEREUM_SLUG = "mythereum";
|
|
24
|
+
exports.DIGITAL_ART_CHAIN_TOKEN_ID = 189;
|
|
25
|
+
exports.GODS_UNCHAINED_TOKEN_ID = 76719;
|
|
26
|
+
exports.MYTHEREUM_TOKEN_ID = 4367;
|
|
27
|
+
exports.WETH_ADDRESS = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2";
|
|
28
|
+
exports.ENS_RINKEBY_TOKEN_ADDRESS = "0x53ceb15b76023fbec5bb39450214926f6aa77d2e";
|
|
29
|
+
exports.ENS_RINKEBY_SHORT_NAME_OWNER = "0xe0ee13cd5a45e7fa140409edfc9ce17c7b11e6d2";
|
|
30
|
+
exports.ENS_HELLO_TOKEN_ID = "12910348618308260923200348219926901280687058984330794534952861439530514639560";
|
|
31
|
+
exports.ENS_HELLO_NAME = "hello";
|
|
32
|
+
exports.CK_RINKEBY_TOKEN_ID = 1068;
|
|
33
|
+
exports.CK_TOKEN_ID = 637488;
|
|
34
|
+
exports.CK_RINKEBY_SELLER_FEE = 250;
|
|
35
|
+
// Toasta Gun, NFT
|
|
36
|
+
exports.CATS_IN_MECHS_ID = "11081664790290028159747096595969945056246807881612483124155840544084353614722";
|
|
37
|
+
// Bounty, FT
|
|
38
|
+
exports.AGE_OF_RUST_TOKEN_ID = "10855508365998404086189256032722001339622921863551706494238735756561045520384";
|
|
39
|
+
exports.CRYPTOVOXELS_WEARABLE_ADDRESS = "0xa58b5224e2fd94020cb2837231b2b0e4247301a6";
|
|
40
|
+
exports.CRYPTOVOXELS_WEARABLE_ID = "908";
|
|
41
|
+
exports.CRYPTOVOXELS_WEARABLE_2_ID = "693";
|
|
42
|
+
exports.DECENTRALAND_ADDRESS = "0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d";
|
|
43
|
+
exports.DECENTRALAND_ID = "115792089237316195423570985008687907840339254722644902427849348925505937604680";
|
|
44
|
+
exports.DISSOLUTION_TOKEN_ID = "39803530675327460487158288219684256433559304725576879659134376004308812431360";
|
|
45
|
+
exports.CRYPTOFLOWERS_CONTRACT_ADDRESS_WITH_BUYER_FEE = "0x8bc67d00253fd60b1afcce88b78820413139f4c6";
|
|
46
|
+
exports.SANDBOX_RINKEBY_ADDRESS = "0xcdeadfb2caa81d8c16d2935f3e379dda61242be9";
|
|
47
|
+
exports.SANDBOX_RINKEBY_ID = "44221324190444972628403853229966997983936414854632412290085204005353951330306";
|
|
48
|
+
exports.SPIRIT_CLASH_TOKEN_ID = "10855508365998412378240648478527290366700749920879042165450277893550637056000";
|
|
49
|
+
exports.SPIRIT_CLASH_OWNER = "0x6a846239658f5a16a0b5977e1c0d007bc13267f0";
|
|
50
|
+
exports.BENZENE_ADDRESS = "0x6524b87960c2d573ae514fd4181777e7842435d4";
|
|
51
|
+
exports.GODS_UNCHAINED_CHEST_ADDRESS = "0xee85966b4974d3c6f71a2779cc3b6f53afbc2b68";
|
|
52
|
+
exports.ALEX_ADDRESS = "0xe96a1b303a1eb8d04fb973eb2b291b8d591c8f72";
|
|
53
|
+
exports.RANDOM_ADDRESS = "0x196a1b303a1eb8d04fb973eb2b291b8d591c8f72";
|
|
54
|
+
exports.ALEX_ADDRESS_2 = "0x431e44389a003f0ec6e83b3578db5075a44ac523";
|
|
55
|
+
exports.DEVIN_ADDRESS = "0x0239769a1adf4def9f07da824b80b9c4fcb59593";
|
|
56
|
+
exports.DAN_ADDRESS = "0x530cf036ed4fa58f7301a9c788c9806624cefd19";
|
|
57
|
+
exports.DAN_DAPPER_ADDRESS = "0x4819352bd7fadcCFAA8A2cDA4b2825a9ec51417c";
|
|
58
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/__tests__/constants.ts"],"names":[],"mappings":";;;AAAA,8BAAoC;AACpC,0CAA8D;AAwBrD,2FAxBA,sBAAU,OAwBA;AAAE,mGAxBA,8BAAkB,OAwBA;AAvBvC,kCAAmC;AAEtB,QAAA,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;AACtC,QAAA,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;AAEtC,QAAA,OAAO,GAAG,IAAI,gBAAU,CACnC;IACE,MAAM,EAAE,uBAAe;IACvB,WAAW,EAAE,eAAO,CAAC,IAAI;C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