opensea-js 6.1.9 → 6.1.11

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 CHANGED
@@ -12,33 +12,6 @@
12
12
 
13
13
  # OpenSea.js <!-- omit in toc -->
14
14
 
15
- A JavaScript library for crypto-native e-commerce: buying, selling, and bidding on NFTs (non-fungible tokens). With OpenSea.js, you can easily build your own native marketplace. These can be ERC-721 or ERC-1155 (semi-fungible) items. You don't have to deploy your own smart contracts or manage backend orderbooks.
16
-
17
- - [Synopsis](#synopsis)
18
- - [Installation](#installation)
19
- - [Getting Started](#getting-started)
20
- - [Fetching Assets](#fetching-assets)
21
- - [Checking Balances and Ownerships](#checking-balances-and-ownerships)
22
- - [Making Offers](#making-offers)
23
- - [Offer Limits](#offer-limits)
24
- - [Making Listings / Selling Items](#making-listings--selling-items)
25
- - [Fetching Orders](#fetching-orders)
26
- - [Buying Items](#buying-items)
27
- - [Accepting Offers](#accepting-offers)
28
- - [Advanced](#advanced)
29
- - [Scheduling Future Listings](#scheduling-future-listings)
30
- - [Purchasing Items for Other Users](#purchasing-items-for-other-users)
31
- - [Using ERC-20 Tokens Instead of Ether](#using-erc-20-tokens-instead-of-ether)
32
- - [Private Auctions](#private-auctions)
33
- - [Listening to Events](#listening-to-events)
34
- - [Learning More](#learning-more)
35
- - [Changelog](#changelog)
36
- - [Development Information](#development-information)
37
- - [Diagnosing Common Issues](#diagnosing-common-issues)
38
- - [Testing your branch locally](#testing-your-branch-locally)
39
-
40
- ## Synopsis
41
-
42
15
  This is the JavaScript SDK for [OpenSea](https://opensea.io), the largest marketplace for NFTs.
43
16
 
44
17
  It allows developers to access the official orderbook, filter it, create buy orders (**offers**), create sell orders (**listings**), and complete trades programmatically.
@@ -47,452 +20,21 @@ Get started by [requesting an API key](https://docs.opensea.io/reference/api-key
47
20
 
48
21
  Happy seafaring! ⛵️
49
22
 
50
- ## Installation
51
-
52
- Node.js version 16 is the minimum required for the SDK. Execute `nvm use`, if you have Node Version Manager.
53
-
54
- Then, in your project, run:
55
-
56
- ```bash
57
- npm install --save opensea-js
58
- # or
59
- yarn add opensea-js
60
- ```
61
-
62
- ## Getting Started
63
-
64
- To get started, first [request an API key](https://docs.opensea.io/reference/api-keys). Note the terms of use for using API data.
65
-
66
- Then, create a new OpenSeaJS client, called an OpenSeaSDK 🚢, using your web3 provider:
67
-
68
- ```typescript
69
- import { ethers } from "ethers";
70
- import { OpenSeaSDK, Chain } from "opensea-js";
71
-
72
- // This example provider won't let you make transactions, only read-only calls:
73
- const provider = new ethers.providers.JsonRpcProvider(
74
- "https://mainnet.infura.io",
75
- );
76
-
77
- const openseaSDK = new OpenSeaSDK(provider, {
78
- chain: Chain.Mainnet,
79
- apiKey: YOUR_API_KEY,
80
- });
81
- ```
82
-
83
- **NOTE:** For testnet, please use `Chain.Goerli` as the `chain`. Rinkeby was deprecated in 2022.
84
-
85
- **NOTE:** Using the sample provider above won't let you authorize transactions, which are needed when approving and trading assets and currency. To make transactions, you need a provider with a private key or mnemonic set.
86
-
87
- In a browser with web3 or an extension like [MetaMask](https://metamask.io/) or [Coinbase Wallet](https://www.coinbase.com/wallet), you can use `window.ethereum` to access the native provider.
88
-
89
- ### Fetching Assets
90
-
91
- Assets are items on OpenSea. They can be non-fungible (conforming to standards like ERC721), semi-fungible (like ERC1155 assets), and even fungible (ERC20).
92
-
93
- Assets are represented by the `Asset` type, defined in TypeScript:
94
-
95
- ```TypeScript
96
- /**
97
- * Simple, unannotated non-fungible asset spec
98
- */
99
- export interface Asset {
100
- // The asset's token ID, or null if ERC-20
101
- tokenId: string | null,
102
- // The asset's contract address
103
- tokenAddress: string,
104
- // The schema name (defaults to "ERC721") for this asset
105
- tokenStandard?: TokenStandard,
106
- // Optional for ENS names
107
- name?: string,
108
- // Optional for fungible items
109
- decimals?: number
110
- }
111
- ```
112
-
113
- The `Asset` type is the minimal type you need for most marketplace actions. `TokenStandard` is optional. If omitted, most actions will assume you're referring to a non-fungible, ERC721 asset. Other options include 'ERC20' and 'ERC1155'. You can import `import { TokenStandard } from "opensea-js/lib/types"` to get the full range of schemas supported.
114
-
115
- You can fetch an asset using the `OpenSeaAPI`, which will return an `OpenSeaAsset` for you (`OpenSeaAsset` extends `Asset`):
116
-
117
- ```TypeScript
118
- const asset: OpenSeaAsset = await openseaSDK.api.getAsset({
119
- tokenAddress, // string
120
- tokenId, // string | number | BigNumber | null
121
- })
122
- ```
123
-
124
- Note that fungible ERC20 assets have `null` as their token id.
125
-
126
- #### Checking Balances and Ownerships
127
-
128
- The nice thing about the `Asset` type is that it unifies logic between fungibles, non-fungibles, and semi-fungibles.
129
-
130
- Once you have an `Asset`, you can see how many any account owns, regardless of whether it's an ERC-20 token or a non-fungible good:
131
-
132
- ```typescript
133
- const asset = {
134
- tokenAddress: "0x06012c8cf97bead5deae237070f9587f8e7a266d", // CryptoKitties
135
- tokenId: "1", // Token ID
136
- };
137
-
138
- const balance = await openseaSDK.getBalance({
139
- accountAddress, // string
140
- asset, // Asset
141
- });
142
-
143
- const ownsKitty = balance.greaterThan(0);
144
- ```
145
-
146
- ### Making Offers
147
-
148
- Once you have your asset, you can do this to make an offer on it:
149
-
150
- ```typescript
151
- // Token ID and smart contract address for a non-fungible token:
152
- const { tokenId, tokenAddress } = YOUR_ASSET;
153
- // The offerer's wallet address:
154
- const accountAddress = "0x1234...";
155
-
156
- const offer = await openseaSDK.createBuyOrder({
157
- asset: {
158
- tokenId,
159
- tokenAddress,
160
- tokenStandard, // TokenStandard. If omitted, defaults to 'ERC721'. Other options include 'ERC20' and 'ERC1155'
161
- },
162
- accountAddress,
163
- // Value of the offer, in units of the payment token (or wrapped ETH if none is specified):
164
- startAmount: 1.2,
165
- });
166
- ```
167
-
168
- When you make an offer on an item owned by an OpenSea user, **that user will automatically get an email notifying them with the offer amount**, if it's above their desired threshold.
169
-
170
- #### Offer Limits
171
-
172
- Note: The total value of buy orders must not exceed 1000 x wallet balance.
173
-
174
- ### Making Listings / Selling Items
175
-
176
- To sell an asset, call `createSellOrder`. You can do a fixed-price listing, where `startAmount` is equal to `endAmount`, or a declining [Dutch auction](https://en.wikipedia.org/wiki/Dutch_auction), where `endAmount` is lower and the price declines until `expirationTime` is hit:
177
-
178
- ```typescript
179
- // Expire this auction one day from now.
180
- // Note that we convert from the JavaScript timestamp (milliseconds):
181
- const expirationTime = Math.round(Date.now() / 1000 + 60 * 60 * 24);
182
-
183
- const listing = await openseaSDK.createSellOrder({
184
- asset: {
185
- tokenId,
186
- tokenAddress,
187
- },
188
- accountAddress,
189
- startAmount: 3,
190
- // If `endAmount` is specified, the order will decline in value to that amount until `expirationTime`. Otherwise, it's a fixed-price order:
191
- endAmount: 0.1,
192
- expirationTime,
193
- });
194
- ```
195
-
196
- The units for `startAmount` and `endAmount` are Ether, ETH. If you want to specify another ERC-20 token to use, see [Using ERC-20 Tokens Instead of Ether](#using-erc-20-tokens-instead-of-ether).
197
-
198
- See [Listening to Events](#listening-to-events) to respond to the setup transactions that occur the first time a user sells an item.
199
-
200
- #### Creating English Auctions
201
-
202
- English Auctions are auctions that start at a small amount (we recommend even doing 0!) and increase with every bid. At expiration time, the item sells to the highest bidder.
203
-
204
- To create an English Auction set `englishAuction` to `true`:
205
-
206
- ```typescript
207
- // Create an auction to receive Wrapped Ether (WETH). See note below.
208
- const paymentTokenAddress = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2";
209
-
210
- const startAmount = 0; // The minimum amount to sell for, in normal units (e.g. ETH)
211
-
212
- const order = await openseaSDK.createSellOrder({
213
- asset: {
214
- tokenId,
215
- tokenAddress,
216
- },
217
- accountAddress,
218
- startAmount,
219
- expirationTime,
220
- paymentTokenAddress,
221
- englishAuction: true,
222
- });
223
- ```
224
-
225
- 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.
226
-
227
- ### Fetching Orders
228
-
229
- To retrieve a list of offers and auctions 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):
230
-
231
- ```typescript
232
- // Get offers (bids), a.k.a. orders where `side == 0`
233
- const { orders, count } = await openseaSDK.api.getOrders({
234
- assetContractAddress: tokenAddress,
235
- tokenId,
236
- side: "bid",
237
- });
238
-
239
- // Get page 2 of all auctions, a.k.a. orders where `side == 1`
240
- const { orders, count } = await openseaSDK.api.getOrders(
241
- {
242
- assetContractAddress: tokenAddress,
243
- tokenId,
244
- side: "ask",
245
- },
246
- 2,
247
- );
248
- ```
249
-
250
- Note that the listing price of an asset is equal to the `currentPrice` of the **lowest valid sell order** on the asset. Users can lower their listing price without invalidating previous sell orders, so all get shipped down until they're canceled, or one is fulfilled.
251
-
252
- 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.
253
-
254
- 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 explanations.
255
-
256
- ```TypeScript
257
- /**
258
- * Attrs used by orderbook to make queries easier
259
- */
260
- side: "bid" | "ask", // "bid" for buy orders, "ask" for sell orders
261
- protocol?: "seaport"; // Protocol of the order (more options may be added in future)
262
- maker?: string, // Address of the order's creator
263
- taker?: string, // The null address if anyone is allowed to take the order
264
- owner?: string, // Address of owner of the order's item
265
- assetContractAddress?: string, // Contract address for order's item
266
- paymentTokenAddress?: string; // Contract address for order's payment token
267
- tokenId?: number | string,
268
- tokenIds?: Array<number | string>,
269
- listedAfter?: number | string, // This means listing_time > value in seconds
270
- listedBefore?: number | string, // This means listing_time <= value in seconds
271
- orderBy?: "created_date" | "eth_price", // Field to sort results by
272
- orderDirection?: "asc" | "desc", // Sort direction of orderBy sorting of results
273
- onlyEnglish?: boolean, // Only return english auction orders
274
-
275
- // For pagination
276
- limit?: number,
277
- offset?: number,
278
- ```
279
-
280
- ### Buying Items
23
+ ## Documentation
281
24
 
282
- To buy an item, you need to **fulfill a sell order**. To do that, it's just one call:
283
-
284
- ```typescript
285
- const order = await openseaSDK.api.getOrder({ side: "ask", ... })
286
- const accountAddress = "0x..." // The buyer's wallet address, also the taker
287
- const transactionHash = await openseaSDK.fulfillOrder({ order, accountAddress })
288
- ```
289
-
290
- 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.
291
-
292
- 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).
293
-
294
- ### Accepting Offers
295
-
296
- 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.
297
-
298
- ```typescript
299
- const order = await openseaSDK.api.getOrder({ side: "bid", ... })
300
- const accountAddress = "0x..." // The owner's wallet address, also the taker
301
- await openseaSDK.fulfillOrder({ order, accountAddress })
302
- ```
303
-
304
- 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.
305
-
306
- ## Advanced
307
-
308
- Interested in purchasing for users server-side or with a bot, scheduling future orders, or making bids in different ERC-20 tokens? OpenSea.js can help with that.
309
-
310
- ### Scheduling Future Listings
311
-
312
- You can create sell orders that aren't fulfillable until a future date. Just pass in a `listingTime` (a UTC timestamp in seconds) to your SDK instance:
313
-
314
- ```typescript
315
- const order = await openseaSDK.createSellOrder({
316
- tokenAddress,
317
- tokenId,
318
- accountAddress,
319
- startAmount: 1,
320
- listingTime: Math.round(Date.now() / 1000 + 60 * 60 * 24), // One day from now
321
- });
322
- ```
323
-
324
- ### Purchasing Items for Other Users
325
-
326
- You can buy and transfer an item to someone else in one step! Just pass the `recipientAddress` parameter:
327
-
328
- ```typescript
329
- const order = await openseaSDK.api.getOrder({ side: "ask", ... })
330
- await openseaSDK.fulfillOrder({
331
- order,
332
- accountAddress, // The address of your wallet, which will sign the transaction
333
- recipientAddress // The address of the recipient, i.e. the wallet you're purchasing on behalf of
334
- })
335
- ```
336
-
337
- 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`.
338
-
339
- This will automatically approve the assets for trading and confirm the transaction for sending them.
340
-
341
- ### Using ERC-20 Tokens Instead of Ether
342
-
343
- Here's an example of listing the Genesis CryptoKitty for $100! No more needing to worry about the exchange rate:
344
-
345
- ```typescript
346
- // Token address for the DAI stablecoin, which is pegged to $1 USD
347
- const paymentTokenAddress = "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359";
348
-
349
- // The units for `startAmount` and `endAmount` are now in DAI, so $100 USD
350
- const auction = await openseaSDK.createSellOrder({
351
- tokenAddress: "0x06012c8cf97bead5deae237070f9587f8e7a266d", // CryptoKitties
352
- tokenId: "1", // Token ID
353
- accountAddress: OWNERS_WALLET_ADDRESS,
354
- startAmount: 100,
355
- paymentTokenAddress,
356
- });
357
- ```
358
-
359
- You can use `getPaymentTokens` to search for tokens by symbol name. And you can even list all orders for a specific ERC-20 token by querying the API:
360
-
361
- ```typescript
362
- const token = (await openseaSDK.api.getPaymentTokens({ symbol: "MANA" }))
363
- .tokens[0];
364
-
365
- const order = await openseaSDK.api.getOrders({
366
- side: "ask",
367
- paymentTokenAddress: token.address,
368
- });
369
- ```
370
-
371
- ### Private Auctions
372
-
373
- You can make offers and listings that can only be fulfilled by an address or email of your choosing. This allows you to negotiate a price in some channel and sell for your chosen price on OpenSea, **without having to trust that the counterparty will abide by your terms!**
374
-
375
- Here's an example of listing a Decentraland parcel for 10 ETH with a specific buyer address allowed to take it. No more needing to worry about whether they'll give you enough back!
376
-
377
- ```typescript
378
- // Address allowed to buy from you
379
- const buyerAddress = "0x123...";
380
-
381
- const listing = await openseaSDK.createSellOrder({
382
- tokenAddress: "0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d", // Decentraland
383
- tokenId:
384
- "115792089237316195423570985008687907832853042650384256231655107562007036952461", // Token ID
385
- accountAddress: OWNERS_WALLET_ADDRESS,
386
- startAmount: 10,
387
- buyerAddress,
388
- });
389
- ```
390
-
391
- ### Listening to Events
392
-
393
- Events are fired whenever transactions or orders are being created, and when transactions return receipts from recently mined blocks on the Ethereum blockchain.
394
-
395
- Our recommendation is that you "forward" OpenSea events to your own store or state management system. Here are examples of listening to the events:
396
-
397
- ```typescript
398
- import { openSeaSDK, EventType } from 'opensea-js'
399
-
400
- handleSDKEvents() {
401
- openSeaSDK.addListener(EventType.TransactionCreated, ({ transactionHash, event }) => {
402
- console.info('Transaction created: ', { transactionHash, event })
403
- })
404
- openSeaSDK.addListener(EventType.TransactionConfirmed, ({ transactionHash, event }) => {
405
- console.info('Transaction confirmed: ',{ transactionHash, event })
406
- })
407
- openSeaSDK.addListener(EventType.TransactionDenied, ({ transactionHash, event }) => {
408
- console.info('Transaction denied: ',{ transactionHash, event })
409
- })
410
- openSeaSDK.addListener(EventType.TransactionFailed, ({ transactionHash, event }) => {
411
- console.info('Transaction failed: ',{ transactionHash, event })
412
- })
413
- openSeaSDK.addListener(EventType.WrapEth, ({ accountAddress, amount }) => {
414
- console.info('Wrap ETH: ',{ accountAddress, amount })
415
- })
416
- openSeaSDK.addListener(EventType.UnwrapWeth, ({ accountAddress, amount }) => {
417
- console.info('Unwrap ETH: ',{ accountAddress, amount })
418
- })
419
- openSeaSDK.addListener(EventType.MatchOrders, ({ buy, sell, accountAddress }) => {
420
- console.info('Match orders: ', { buy, sell, accountAddress })
421
- })
422
- openSeaSDK.addListener(EventType.CancelOrder, ({ order, accountAddress }) => {
423
- console.info('Cancel order: ', { order, accountAddress })
424
- })
425
- }
426
- ```
427
-
428
- To remove all listeners call `openseaSDK.removeAllListeners()`.
429
-
430
- ## Learning More
431
-
432
- Auto-generated documentation for each export is available [here](https://projectopensea.github.io/opensea-js/).
25
+ - [Quick Start Guide](developerDocs/quick-start.md)
26
+ - [Getting Started Guide](developerDocs/getting-started.md)
27
+ - [Advanced Use Cases](developerDocs/advanced-use-cases.md)
28
+ - [SDK Reference](https://projectopensea.github.io/opensea-js/)
29
+ - [Frequently Asked Questions](developerDocs/faq.md)
30
+ - [Contributing](developerDocs/contributing.md)
433
31
 
434
32
  ## Changelog
435
33
 
436
- See the [Changelog](CHANGELOG.md).
437
-
438
- ## Development Information
439
-
440
- **Setup**
441
-
442
- Before any development, install the required NPM dependencies:
443
-
444
- ```bash
445
- npm install
446
- ```
447
-
448
- And install TypeScript if you haven't already:
449
-
450
- ```bash
451
- npm install -g typescript
452
- ```
453
-
454
- **Build**
455
-
456
- Then, lint and build the library into the `lib` directory:
457
-
458
- ```bash
459
- npm run build
460
- ```
461
-
462
- Or run the tests:
463
-
464
- ```bash
465
- npm test
466
- ```
467
-
468
- Note that the tests require access to Alchemy and the OpenSea API. The timeout is adjustable via the `test` script in `package.json`.
469
-
470
- **Generate Documentation**
471
-
472
- Generate html docs, also available for browsing [here](https://projectopensea.github.io/opensea-js/):
473
-
474
- ```bash
475
- npm run docs-build
476
- ```
477
-
478
- **Contributing**
479
-
480
- Contributions welcome! Please use GitHub issues for suggestions/concerns - if you prefer to express your intentions in code, feel free to submit a pull request.
481
-
482
- ## Diagnosing Common Issues
483
-
484
- - Is the `expirationTime` in the future? If not, change it to a time in the future.
485
-
486
- - Are the input addresses all strings? If not, convert them to strings.
487
-
488
- - Is your computer's internal clock accurate? If not, try enabling automatic clock adjustment locally or following [this tutorial](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-time.html) to update an Amazon EC2 instance.
489
-
490
- ## Testing your branch locally
34
+ The changelog for recent versions can be found at:
491
35
 
492
- ```sh
493
- npm link # in opensea-js repo
494
- npm link opensea-js # in repo you're working on
495
- ```
36
+ - https://docs.opensea.io/changelog
37
+ - https://github.com/ProjectOpenSea/opensea-js/releases
496
38
 
497
39
  [version-badge]: https://img.shields.io/github/package-json/v/ProjectOpenSea/opensea-js
498
40
  [version-link]: https://github.com/ProjectOpenSea/opensea-js/releases
@@ -505,6 +47,6 @@ npm link opensea-js # in repo you're working on
505
47
  [license-badge]: https://img.shields.io/github/license/ProjectOpenSea/opensea-js
506
48
  [license-link]: https://github.com/ProjectOpenSea/opensea-js/blob/main/LICENSE
507
49
  [docs-badge]: https://img.shields.io/badge/OpenSea.js-documentation-informational
508
- [docs-link]: https://github.com/ProjectOpenSea/opensea-js#getting-started
50
+ [docs-link]: https://github.com/ProjectOpenSea/opensea-js#documentation
509
51
  [discussions-badge]: https://img.shields.io/badge/OpenSea.js-discussions-blueviolet
510
52
  [discussions-link]: https://github.com/ProjectOpenSea/opensea-js/discussions
package/lib/api/api.d.ts CHANGED
@@ -36,8 +36,8 @@ export declare class OpenSeaAPI {
36
36
  * @param options.orderDirection The direction to sort the orders
37
37
  * @param options.orderBy The field to sort the orders by
38
38
  * @param options.limit The number of orders to retrieve
39
- * @param options.makerAddress Fitler by the wallet addres of the order maker
40
- * @param options.takerAddress Filter by wallet address of the order taker
39
+ * @param options.maker Filter by the wallet address of the order maker
40
+ * @param options.taker Filter by wallet address of the order taker
41
41
  * @param options.asset_contract_address Address of the NFT's contract
42
42
  * @param options.token_ids String array of token IDs to filter by.
43
43
  * @param options.listed_after Filter by orders listed after the Unix epoch timestamp in seconds
@@ -55,8 +55,8 @@ export declare class OpenSeaAPI {
55
55
  * @param options.orderDirection The direction to sort the orders
56
56
  * @param options.orderBy The field to sort the orders by
57
57
  * @param options.limit The number of orders to retrieve
58
- * @param options.makerAddress Fitler by the wallet addres of the order maker
59
- * @param options.takerAddress Filter by wallet address of the order taker
58
+ * @param options.maker Filter by the wallet address of the order maker
59
+ * @param options.taker Filter by wallet address of the order taker
60
60
  * @param options.asset_contract_address Address of the NFT's contract
61
61
  * @param options.token_ids String array of token IDs to filter by.
62
62
  * @param options.listed_after Filter by orders listed after the Unix epoch timestamp in seconds
package/lib/api/api.js CHANGED
@@ -59,8 +59,8 @@ class OpenSeaAPI {
59
59
  * @param options.orderDirection The direction to sort the orders
60
60
  * @param options.orderBy The field to sort the orders by
61
61
  * @param options.limit The number of orders to retrieve
62
- * @param options.makerAddress Fitler by the wallet addres of the order maker
63
- * @param options.takerAddress Filter by wallet address of the order taker
62
+ * @param options.maker Filter by the wallet address of the order maker
63
+ * @param options.taker Filter by wallet address of the order taker
64
64
  * @param options.asset_contract_address Address of the NFT's contract
65
65
  * @param options.token_ids String array of token IDs to filter by.
66
66
  * @param options.listed_after Filter by orders listed after the Unix epoch timestamp in seconds
@@ -88,8 +88,8 @@ class OpenSeaAPI {
88
88
  * @param options.orderDirection The direction to sort the orders
89
89
  * @param options.orderBy The field to sort the orders by
90
90
  * @param options.limit The number of orders to retrieve
91
- * @param options.makerAddress Fitler by the wallet addres of the order maker
92
- * @param options.takerAddress Filter by wallet address of the order taker
91
+ * @param options.maker Filter by the wallet address of the order maker
92
+ * @param options.taker Filter by wallet address of the order taker
93
93
  * @param options.asset_contract_address Address of the NFT's contract
94
94
  * @param options.token_ids String array of token IDs to filter by.
95
95
  * @param options.listed_after Filter by orders listed after the Unix epoch timestamp in seconds
@@ -216,7 +216,7 @@ class OpenSeaAPI {
216
216
  */
217
217
  getAsset({ tokenAddress, tokenId, }, retries = 1) {
218
218
  return __awaiter(this, void 0, void 0, function* () {
219
- if (![types_1.Chain.Mainnet, types_1.Chain.Goerli].includes(this.chain)) {
219
+ if (![types_1.Chain.Mainnet, types_1.Chain.Sepolia].includes(this.chain)) {
220
220
  throw new Error("Please use `getNFT()` for multichain capabilities.");
221
221
  }
222
222
  let json;
@@ -346,7 +346,7 @@ class OpenSeaAPI {
346
346
  */
347
347
  getAssets(query = {}) {
348
348
  return __awaiter(this, void 0, void 0, function* () {
349
- if (![types_1.Chain.Mainnet, types_1.Chain.Goerli].includes(this.chain)) {
349
+ if (![types_1.Chain.Mainnet, types_1.Chain.Sepolia].includes(this.chain)) {
350
350
  throw new Error("Please use `getNFTsByContract()` or `getNFTsByCollection()` for multichain capabilities.");
351
351
  }
352
352
  const json = yield this.get(`${constants_1.API_V1_PATH}/assets/`, Object.assign({ limit: this.pageSize }, query));
@@ -380,8 +380,8 @@ class OpenSeaAPI {
380
380
  */
381
381
  getPaymentTokens(query = {}, page = 1, retries = 1) {
382
382
  return __awaiter(this, void 0, void 0, function* () {
383
- if (![types_1.Chain.Mainnet, types_1.Chain.Goerli].includes(this.chain)) {
384
- throw new Error("This method does not work outside of Mainnet and Goerli chains as it uses the v1 API.");
383
+ if (![types_1.Chain.Mainnet, types_1.Chain.Sepolia].includes(this.chain)) {
384
+ throw new Error("This method does not work outside of Mainnet and Sepolia chains as it uses the v1 API.");
385
385
  }
386
386
  let json;
387
387
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api/api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAgC;AAahC,4CAA+E;AAW/E,2CAkByB;AACzB,oCASkB;AAClB,0CAOwB;AAExB;;;GAGG;AACH,MAAa,UAAU;IAkBrB;;;;OAIG;IACH,YAAY,MAAwB,EAAE,MAA8B;;QAlBpE;;WAEG;QACI,aAAQ,GAAG,EAAE,CAAC;QAQb,eAAU,GAAG,IAAI,CAAC;QAQxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,MAAA,MAAM,CAAC,KAAK,mCAAI,aAAK,CAAC,OAAO,CAAC;QAE3C,IAAI,CAAC,UAAU,GAAG,IAAA,mBAAW,EAAC,IAAI,CAAC,KAAK,CAAC;YACvC,CAAC,CAAC,4BAAgB;YAClB,CAAC,CAAC,4BAAgB,CAAC;QAErB,gCAAgC;QAChC,IAAI,CAAC,MAAM,GAAG,MA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eaAPI {
60
60
  * @param options.orderDirection The direction to sort the orders
61
61
  * @param options.orderBy The field to sort the orders by
62
62
  * @param options.limit The number of orders to retrieve
63
- * @param options.makerAddress Fitler by the wallet addres of the order maker
64
- * @param options.takerAddress Filter by wallet address of the order taker
63
+ * @param options.maker Filter by the wallet address of the order maker
64
+ * @param options.taker Filter by wallet address of the order taker
65
65
  * @param options.asset_contract_address Address of the NFT's contract
66
66
  * @param options.token_ids String array of token IDs to filter by.
67
67
  * @param options.listed_after Filter by orders listed after the Unix epoch timestamp in seconds
@@ -89,8 +89,8 @@ class OpenSeaAPI {
89
89
  * @param options.orderDirection The direction to sort the orders
90
90
  * @param options.orderBy The field to sort the orders by
91
91
  * @param options.limit The number of orders to retrieve
92
- * @param options.makerAddress Fitler by the wallet addres of the order maker
93
- * @param options.takerAddress Filter by wallet address of the order taker
92
+ * @param options.maker Filter by the wallet address of the order maker
93
+ * @param options.taker Filter by wallet address of the order taker
94
94
  * @param options.asset_contract_address Address of the NFT's contract
95
95
  * @param options.token_ids String array of token IDs to filter by.
96
96
  * @param options.listed_after Filter by orders listed after the Unix epoch timestamp in seconds
@@ -217,7 +217,7 @@ class OpenSeaAPI {
217
217
  */
218
218
  getAsset({ tokenAddress, tokenId, }, retries = 1) {
219
219
  return __awaiter(this, void 0, void 0, function* () {
220
- if (![types_1.Chain.Mainnet, types_1.Chain.Goerli].includes(this.chain)) {
220
+ if (![types_1.Chain.Mainnet, types_1.Chain.Sepolia].includes(this.chain)) {
221
221
  throw new Error("Please use `getNFT()` for multichain capabilities.");
222
222
  }
223
223
  let json;
@@ -347,7 +347,7 @@ class OpenSeaAPI {
347
347
  */
348
348
  getAssets(query = {}) {
349
349
  return __awaiter(this, void 0, void 0, function* () {
350
- if (![types_1.Chain.Mainnet, types_1.Chain.Goerli].includes(this.chain)) {
350
+ if (![types_1.Chain.Mainnet, types_1.Chain.Sepolia].includes(this.chain)) {
351
351
  throw new Error("Please use `getNFTsByContract()` or `getNFTsByCollection()` for multichain capabilities.");
352
352
  }
353
353
  const json = yield this.get(`${constants_1.API_V1_PATH}/assets/`, Object.assign({ limit: this.pageSize }, query));
@@ -381,8 +381,8 @@ class OpenSeaAPI {
381
381
  */
382
382
  getPaymentTokens(query = {}, page = 1, retries = 1) {
383
383
  return __awaiter(this, void 0, void 0, function* () {
384
- if (![types_1.Chain.Mainnet, types_1.Chain.Goerli].includes(this.chain)) {
385
- throw new Error("This method does not work outside of Mainnet and Goerli chains as it uses the v1 API.");
384
+ if (![types_1.Chain.Mainnet, types_1.Chain.Sepolia].includes(this.chain)) {
385
+ throw new Error("This method does not work outside of Mainnet and Sepolia chains as it uses the v1 API.");
386
386
  }
387
387
  let json;
388
388
  try {
@@ -535,7 +535,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
535
535
  },{}],4:[function(require,module,exports){
536
536
  "use strict";
537
537
  Object.defineProperty(exports, "__esModule", { value: true });
538
- exports.SHARED_STOREFRONT_LAZY_MINT_ADAPTER_CROSS_CHAIN_ADDRESS = exports.SHARED_STOREFRONT_ADDRESSES = exports.SHARED_STOREFRONT_ADDRESS_GOERLI = exports.SHARED_STOREFRONT_ADDRESS_MAINNET = exports.ENGLISH_AUCTION_ZONE = exports.DEFAULT_ZONE = exports.API_V1_PATH = exports.API_BASE_TESTNET = exports.API_BASE_MAINNET = exports.MAX_EXPIRATION_MONTHS = exports.INVERSE_BASIS_POINT = void 0;
538
+ exports.SHARED_STOREFRONT_LAZY_MINT_ADAPTER_CROSS_CHAIN_ADDRESS = exports.SHARED_STOREFRONT_ADDRESSES = exports.SHARED_STOREFRONT_ADDRESS_GOERLI = exports.SHARED_STOREFRONT_ADDRESS_MAINNET = exports.ENGLISH_AUCTION_ZONE_TESTNETS = exports.ENGLISH_AUCTION_ZONE_MAINNETS = exports.DEFAULT_ZONE = exports.API_V1_PATH = exports.API_BASE_TESTNET = exports.API_BASE_MAINNET = exports.MAX_EXPIRATION_MONTHS = exports.INVERSE_BASIS_POINT = void 0;
539
539
  const ethers_1 = require("ethers");
540
540
  exports.INVERSE_BASIS_POINT = 10000; // 100 basis points per 1%
541
541
  exports.MAX_EXPIRATION_MONTHS = 1;
@@ -543,7 +543,8 @@ exports.API_BASE_MAINNET = "https://api.opensea.io";
543
543
  exports.API_BASE_TESTNET = "https://testnets-api.opensea.io";
544
544
  exports.API_V1_PATH = `/api/v1`;
545
545
  exports.DEFAULT_ZONE = ethers_1.ethers.constants.AddressZero;
546
- exports.ENGLISH_AUCTION_ZONE = "0x110b2b128a9ed1be5ef3232d8e4e41640df5c2cd";
546
+ exports.ENGLISH_AUCTION_ZONE_MAINNETS = "0x110b2b128a9ed1be5ef3232d8e4e41640df5c2cd";
547
+ exports.ENGLISH_AUCTION_ZONE_TESTNETS = "0x9B814233894Cd227f561B78Cc65891AA55C62Ad2";
547
548
  // Ignore eslint no-unused-modules for below to keep backward compatibility
548
549
  // in case a downstream user was already using these imports directly.
549
550
  // These can be made non-exported in next major-versioned release.
@@ -1100,7 +1101,7 @@ class OpenSeaSDK {
1100
1101
  * Create a sell order to make a listing for a asset.
1101
1102
  * @param options
1102
1103
  * @param options.asset The asset to trade
1103
- * @param options.accountAddress Address of the wallet making the buy order
1104
+ * @param options.accountAddress Address of the wallet making the sell order
1104
1105
  * @param options.startAmount Value of the listing at the start of the auction in units, not base units e.g. not wei, of the payment token (or WETH if no payment token address specified)
1105
1106
  * @param options.endAmount Value of the listing at the end of the auction. If specified, price will change linearly between startAmount and endAmount as time progresses.
1106
1107
  * @param options.quantity The number of assets to list (if fungible or semi-fungible). Defaults to 1.
@@ -1151,7 +1152,11 @@ class OpenSeaSDK {
1151
1152
  consideration: considerationFeeItems,
1152
1153
  startTime: listingTime === null || listingTime === void 0 ? void 0 : listingTime.toString(),
1153
1154
  endTime: (_a = expirationTime === null || expirationTime === void 0 ? void 0 : expirationTime.toString()) !== null && _a !== void 0 ? _a : (0, utils_3.getMaxOrderExpirationTimestamp)().toString(),
1154
- zone: englishAuction ? constants_2.ENGLISH_AUCTION_ZONE : constants_2.DEFAULT_ZONE,
1155
+ zone: englishAuction
1156
+ ? (0, utils_3.isTestChain)(this.chain)
1157
+ ? constants_2.ENGLISH_AUCTION_ZONE_TESTNETS
1158
+ : constants_2.ENGLISH_AUCTION_ZONE_MAINNETS
1159
+ : constants_2.DEFAULT_ZONE,
1155
1160
  domain,
1156
1161
  salt: ethers_1.BigNumber.from(salt !== null && salt !== void 0 ? salt : 0).toString(),
1157
1162
  restrictedByZone: englishAuction ? true : false,
@@ -1371,7 +1376,7 @@ class OpenSeaSDK {
1371
1376
  * Get an account's balance of any Asset. This asset can be an ERC20, ERC1155, or ERC721.
1372
1377
  * @param options
1373
1378
  * @param options.accountAddress Account address to check
1374
- * @param options.asset The Asset to check balance for
1379
+ * @param options.asset The Asset to check balance for. tokenStandard must be set.
1375
1380
  * @param retries How many times to retry if balance is 0. Defaults to 1.
1376
1381
  * @returns The balance of the asset for the account.
1377
1382
  *
@@ -1487,7 +1492,7 @@ class OpenSeaSDK {
1487
1492
  return __awaiter(this, void 0, void 0, function* () {
1488
1493
  const isEther = tokenAddress === ethers_1.ethers.constants.AddressZero;
1489
1494
  let paymentToken;
1490
- if (!isEther && [types_1.Chain.Mainnet, types_1.Chain.Goerli].includes(this.chain)) {
1495
+ if (!isEther && [types_1.Chain.Mainnet, types_1.Chain.Sepolia].includes(this.chain)) {
1491
1496
  const { tokens } = yield this.api.getPaymentTokens({
1492
1497
  address: tokenAddress.toLowerCase(),
1493
1498
  });
@@ -1546,13 +1551,17 @@ class OpenSeaSDK {
1546
1551
  _requireAccountIsAvailable(accountAddress) {
1547
1552
  return __awaiter(this, void 0, void 0, function* () {
1548
1553
  const accountAddressChecksummed = ethers_1.ethers.utils.getAddress(accountAddress);
1549
- if ((this._signerOrProvider instanceof ethers_1.Wallet &&
1550
- this._signerOrProvider.address === accountAddressChecksummed) ||
1551
- (this._signerOrProvider instanceof ethers_1.providers.JsonRpcProvider &&
1552
- (yield this._signerOrProvider.listAccounts()).includes(accountAddressChecksummed))) {
1554
+ const availableAccounts = [];
1555
+ if ("address" in this._signerOrProvider) {
1556
+ availableAccounts.push(this._signerOrProvider.address);
1557
+ }
1558
+ else if ("listAccounts" in this._signerOrProvider) {
1559
+ availableAccounts.push(...(yield this._signerOrProvider.listAccounts()));
1560
+ }
1561
+ if (availableAccounts.includes(accountAddressChecksummed)) {
1553
1562
  return;
1554
1563
  }
1555
- throw new Error(`Specified accountAddress is not available through wallet or provider: ${accountAddressChecksummed}`);
1564
+ throw new Error(`Specified accountAddress is not available through wallet or provider: ${accountAddressChecksummed}. Accounts available: ${availableAccounts.length > 0 ? availableAccounts.join(", ") : "none"}`);
1556
1565
  });
1557
1566
  }
1558
1567
  _confirmTransaction(transactionHash, event, description) {
@@ -30483,8 +30492,7 @@ const deductFees = (items, fees) => {
30483
30492
  };
30484
30493
  exports.deductFees = deductFees;
30485
30494
  const mapInputItemToOfferItem = (item) => {
30486
- var _a, _b, _c, _d, _e, _f, _g;
30487
- // Item is an NFT
30495
+ var _a, _b, _c, _d, _e, _f, _g, _h;
30488
30496
  if ("itemType" in item) {
30489
30497
  // Convert this to a criteria based item
30490
30498
  if ("identifiers" in item || "criteria" in item) {
@@ -30505,11 +30513,12 @@ const mapInputItemToOfferItem = (item) => {
30505
30513
  return {
30506
30514
  itemType: item.itemType,
30507
30515
  token: item.token,
30508
- identifierOrCriteria: item.identifier,
30516
+ // prevent undefined for fungible items
30517
+ identifierOrCriteria: (_d = item.identifier) !== null && _d !== void 0 ? _d : "0",
30509
30518
  // @ts-ignore
30510
30519
  startAmount: item.amount,
30511
30520
  // @ts-ignore
30512
- endAmount: (_e = (_d = item.endAmount) !== null && _d !== void 0 ? _d : item.amount) !== null && _e !== void 0 ? _e : "1",
30521
+ endAmount: (_f = (_e = item.endAmount) !== null && _e !== void 0 ? _e : item.amount) !== null && _f !== void 0 ? _f : "1",
30513
30522
  };
30514
30523
  }
30515
30524
  return {
@@ -30525,10 +30534,10 @@ const mapInputItemToOfferItem = (item) => {
30525
30534
  itemType: item.token && item.token !== ethers_1.ethers.constants.AddressZero
30526
30535
  ? constants_1.ItemType.ERC20
30527
30536
  : constants_1.ItemType.NATIVE,
30528
- token: (_f = item.token) !== null && _f !== void 0 ? _f : ethers_1.ethers.constants.AddressZero,
30537
+ token: (_g = item.token) !== null && _g !== void 0 ? _g : ethers_1.ethers.constants.AddressZero,
30529
30538
  identifierOrCriteria: "0",
30530
30539
  startAmount: item.amount,
30531
- endAmount: (_g = item.endAmount) !== null && _g !== void 0 ? _g : item.amount,
30540
+ endAmount: (_h = item.endAmount) !== null && _h !== void 0 ? _h : item.amount,
30532
30541
  };
30533
30542
  };
30534
30543
  exports.mapInputItemToOfferItem = mapInputItemToOfferItem;
@@ -4,7 +4,8 @@ export declare const API_BASE_MAINNET = "https://api.opensea.io";
4
4
  export declare const API_BASE_TESTNET = "https://testnets-api.opensea.io";
5
5
  export declare const API_V1_PATH = "/api/v1";
6
6
  export declare const DEFAULT_ZONE = "0x0000000000000000000000000000000000000000";
7
- export declare const ENGLISH_AUCTION_ZONE = "0x110b2b128a9ed1be5ef3232d8e4e41640df5c2cd";
7
+ export declare const ENGLISH_AUCTION_ZONE_MAINNETS = "0x110b2b128a9ed1be5ef3232d8e4e41640df5c2cd";
8
+ export declare const ENGLISH_AUCTION_ZONE_TESTNETS = "0x9B814233894Cd227f561B78Cc65891AA55C62Ad2";
8
9
  export declare const SHARED_STOREFRONT_ADDRESS_MAINNET = "0x495f947276749ce646f68ac8c248420045cb7b5e";
9
10
  export declare const SHARED_STOREFRONT_ADDRESS_GOERLI = "0x804159144aefb1dc17b171afcefa5b33746c722f";
10
11
  export declare const SHARED_STOREFRONT_ADDRESSES: string[];
package/lib/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SHARED_STOREFRONT_LAZY_MINT_ADAPTER_CROSS_CHAIN_ADDRESS = exports.SHARED_STOREFRONT_ADDRESSES = exports.SHARED_STOREFRONT_ADDRESS_GOERLI = exports.SHARED_STOREFRONT_ADDRESS_MAINNET = exports.ENGLISH_AUCTION_ZONE = exports.DEFAULT_ZONE = exports.API_V1_PATH = exports.API_BASE_TESTNET = exports.API_BASE_MAINNET = exports.MAX_EXPIRATION_MONTHS = exports.INVERSE_BASIS_POINT = void 0;
3
+ exports.SHARED_STOREFRONT_LAZY_MINT_ADAPTER_CROSS_CHAIN_ADDRESS = exports.SHARED_STOREFRONT_ADDRESSES = exports.SHARED_STOREFRONT_ADDRESS_GOERLI = exports.SHARED_STOREFRONT_ADDRESS_MAINNET = exports.ENGLISH_AUCTION_ZONE_TESTNETS = exports.ENGLISH_AUCTION_ZONE_MAINNETS = exports.DEFAULT_ZONE = exports.API_V1_PATH = exports.API_BASE_TESTNET = exports.API_BASE_MAINNET = exports.MAX_EXPIRATION_MONTHS = exports.INVERSE_BASIS_POINT = void 0;
4
4
  const ethers_1 = require("ethers");
5
5
  exports.INVERSE_BASIS_POINT = 10000; // 100 basis points per 1%
6
6
  exports.MAX_EXPIRATION_MONTHS = 1;
@@ -8,7 +8,8 @@ exports.API_BASE_MAINNET = "https://api.opensea.io";
8
8
  exports.API_BASE_TESTNET = "https://testnets-api.opensea.io";
9
9
  exports.API_V1_PATH = `/api/v1`;
10
10
  exports.DEFAULT_ZONE = ethers_1.ethers.constants.AddressZero;
11
- exports.ENGLISH_AUCTION_ZONE = "0x110b2b128a9ed1be5ef3232d8e4e41640df5c2cd";
11
+ exports.ENGLISH_AUCTION_ZONE_MAINNETS = "0x110b2b128a9ed1be5ef3232d8e4e41640df5c2cd";
12
+ exports.ENGLISH_AUCTION_ZONE_TESTNETS = "0x9B814233894Cd227f561B78Cc65891AA55C62Ad2";
12
13
  // Ignore eslint no-unused-modules for below to keep backward compatibility
13
14
  // in case a downstream user was already using these imports directly.
14
15
  // These can be made non-exported in next major-versioned release.
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.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xC,4CAA4C,CAAC;AAE/C,2EAA2E;AAC3E,sEAAsE;AACtE,kEAAkE;AAClE,oDAAoD;AACvC,QAAA,iCAAiC,GAC5C,4CAA4C,CAAC;AAC/C,oDAAoD;AACvC,QAAA,gCAAgC,GAC3C,4CAA4C,CAAC;AAC/C,MAAM,iCAAiC,GACrC,4CAA4C,CAAC;AAC/C,MAAM,gCAAgC,GACpC,4CAA4C,CAAC;AAClC,QAAA,2BAA2B,GAAG;IACzC,yCAAiC;IACjC,wCAAgC;IAChC,iCAAiC;IACjC,gCAAgC;CACjC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;AAC7B,QAAA,uDAAuD,GAClE,4CAA4C,CAAC"}
package/lib/sdk.d.ts CHANGED
@@ -107,7 +107,7 @@ export declare class OpenSeaSDK {
107
107
  * Create a sell order to make a listing for a asset.
108
108
  * @param options
109
109
  * @param options.asset The asset to trade
110
- * @param options.accountAddress Address of the wallet making the buy order
110
+ * @param options.accountAddress Address of the wallet making the sell order
111
111
  * @param options.startAmount Value of the listing at the start of the auction in units, not base units e.g. not wei, of the payment token (or WETH if no payment token address specified)
112
112
  * @param options.endAmount Value of the listing at the end of the auction. If specified, price will change linearly between startAmount and endAmount as time progresses.
113
113
  * @param options.quantity The number of assets to list (if fungible or semi-fungible). Defaults to 1.
@@ -218,7 +218,7 @@ export declare class OpenSeaSDK {
218
218
  * Get an account's balance of any Asset. This asset can be an ERC20, ERC1155, or ERC721.
219
219
  * @param options
220
220
  * @param options.accountAddress Account address to check
221
- * @param options.asset The Asset to check balance for
221
+ * @param options.asset The Asset to check balance for. tokenStandard must be set.
222
222
  * @param retries How many times to retry if balance is 0. Defaults to 1.
223
223
  * @returns The balance of the asset for the account.
224
224
  *
package/lib/sdk.js CHANGED
@@ -247,7 +247,7 @@ class OpenSeaSDK {
247
247
  * Create a sell order to make a listing for a asset.
248
248
  * @param options
249
249
  * @param options.asset The asset to trade
250
- * @param options.accountAddress Address of the wallet making the buy order
250
+ * @param options.accountAddress Address of the wallet making the sell order
251
251
  * @param options.startAmount Value of the listing at the start of the auction in units, not base units e.g. not wei, of the payment token (or WETH if no payment token address specified)
252
252
  * @param options.endAmount Value of the listing at the end of the auction. If specified, price will change linearly between startAmount and endAmount as time progresses.
253
253
  * @param options.quantity The number of assets to list (if fungible or semi-fungible). Defaults to 1.
@@ -298,7 +298,11 @@ class OpenSeaSDK {
298
298
  consideration: considerationFeeItems,
299
299
  startTime: listingTime === null || listingTime === void 0 ? void 0 : listingTime.toString(),
300
300
  endTime: (_a = expirationTime === null || expirationTime === void 0 ? void 0 : expirationTime.toString()) !== null && _a !== void 0 ? _a : (0, utils_3.getMaxOrderExpirationTimestamp)().toString(),
301
- zone: englishAuction ? constants_2.ENGLISH_AUCTION_ZONE : constants_2.DEFAULT_ZONE,
301
+ zone: englishAuction
302
+ ? (0, utils_3.isTestChain)(this.chain)
303
+ ? constants_2.ENGLISH_AUCTION_ZONE_TESTNETS
304
+ : constants_2.ENGLISH_AUCTION_ZONE_MAINNETS
305
+ : constants_2.DEFAULT_ZONE,
302
306
  domain,
303
307
  salt: ethers_1.BigNumber.from(salt !== null && salt !== void 0 ? salt : 0).toString(),
304
308
  restrictedByZone: englishAuction ? true : false,
@@ -518,7 +522,7 @@ class OpenSeaSDK {
518
522
  * Get an account's balance of any Asset. This asset can be an ERC20, ERC1155, or ERC721.
519
523
  * @param options
520
524
  * @param options.accountAddress Account address to check
521
- * @param options.asset The Asset to check balance for
525
+ * @param options.asset The Asset to check balance for. tokenStandard must be set.
522
526
  * @param retries How many times to retry if balance is 0. Defaults to 1.
523
527
  * @returns The balance of the asset for the account.
524
528
  *
@@ -634,7 +638,7 @@ class OpenSeaSDK {
634
638
  return __awaiter(this, void 0, void 0, function* () {
635
639
  const isEther = tokenAddress === ethers_1.ethers.constants.AddressZero;
636
640
  let paymentToken;
637
- if (!isEther && [types_1.Chain.Mainnet, types_1.Chain.Goerli].includes(this.chain)) {
641
+ if (!isEther && [types_1.Chain.Mainnet, types_1.Chain.Sepolia].includes(this.chain)) {
638
642
  const { tokens } = yield this.api.getPaymentTokens({
639
643
  address: tokenAddress.toLowerCase(),
640
644
  });
@@ -693,13 +697,17 @@ class OpenSeaSDK {
693
697
  _requireAccountIsAvailable(accountAddress) {
694
698
  return __awaiter(this, void 0, void 0, function* () {
695
699
  const accountAddressChecksummed = ethers_1.ethers.utils.getAddress(accountAddress);
696
- if ((this._signerOrProvider instanceof ethers_1.Wallet &&
697
- this._signerOrProvider.address === accountAddressChecksummed) ||
698
- (this._signerOrProvider instanceof ethers_1.providers.JsonRpcProvider &&
699
- (yield this._signerOrProvider.listAccounts()).includes(accountAddressChecksummed))) {
700
+ const availableAccounts = [];
701
+ if ("address" in this._signerOrProvider) {
702
+ availableAccounts.push(this._signerOrProvider.address);
703
+ }
704
+ else if ("listAccounts" in this._signerOrProvider) {
705
+ availableAccounts.push(...(yield this._signerOrProvider.listAccounts()));
706
+ }
707
+ if (availableAccounts.includes(accountAddressChecksummed)) {
700
708
  return;
701
709
  }
702
- throw new Error(`Specified accountAddress is not available through wallet or provider: ${accountAddressChecksummed}`);
710
+ throw new Error(`Specified accountAddress is not available through wallet or provider: ${accountAddressChecksummed}. Accounts available: ${availableAccounts.length > 0 ? availableAccounts.join(", ") : "none"}`);
703
711
  });
704
712
  }
705
713
  _confirmTransaction(transactionHash, event, description) {
package/lib/sdk.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAwC;AACxC,oDAA8C;AAC9C,iEAAwE;AAOxE,mCAQgB;AAChB,4CAA8C;AAC9C,mCAAuC;AAEvC,2CAIqB;AACrB,8DAIkC;AAElC,0CAAkE;AAClE,qDAI+B;AAC/B,mCAYiB;AACjB,yCASuB;AAEvB;;;GAGG;AACH,MAAa,UAAU;IAerB;;;;;;;;OAQG;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wB,WAAW,EAAE,CAAC,CAAC;YAEnD,IAAI;gBACF,IAAI,CAAC,SAAS,CAAC,iBAAS,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAAC;gBACnE,MAAM,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC;gBACxD,IAAI,CAAC,MAAM,CAAC,0BAA0B,WAAW,EAAE,CAAC,CAAC;gBACrD,IAAI,CAAC,SAAS,CAAC,iBAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC;aACtE;YAAC,OAAO,KAAK,EAAE;gBACd,IAAI,CAAC,MAAM,CAAC,uBAAuB,WAAW,EAAE,CAAC,CAAC;gBAClD,IAAI,CAAC,SAAS,CAAC,iBAAS,CAAC,iBAAiB,kCACrC,oBAAoB,KACvB,KAAK,IACL,CAAC;gBACH,MAAM,KAAK,CAAC;aACb;QACH,CAAC;KAAA;CACF;AAxiCD,gCAwiCC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opensea-js",
3
- "version": "6.1.9",
3
+ "version": "6.1.11",
4
4
  "description": "JavaScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs and our marketplace data!",
5
5
  "license": "MIT",
6
6
  "author": "OpenSea Developers",
@@ -43,14 +43,14 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "@typechain/ethers-v5": "^11.0.0",
46
- "@types/chai": "4.3.5",
46
+ "@types/chai": "4.3.6",
47
47
  "@types/chai-as-promised": "^7.1.5",
48
48
  "@types/mocha": "^10.0.0",
49
49
  "@types/node": "^18.0.0",
50
50
  "@typescript-eslint/eslint-plugin": "^6.0.0",
51
51
  "@typescript-eslint/parser": "^6.0.0",
52
52
  "browserify": "^17.0.0",
53
- "chai": "4.3.7",
53
+ "chai": "4.3.10",
54
54
  "chai-as-promised": "^7.1.1",
55
55
  "concurrently": "^8.2.0",
56
56
  "confusing-browser-globals": "^1.0.11",
@@ -61,14 +61,14 @@
61
61
  "eslint-plugin-import": "^2.25.3",
62
62
  "eslint-plugin-prettier": "^5.0.0-alpha.2",
63
63
  "husky": "^8.0.3",
64
- "lint-staged": "^13.2.2",
64
+ "lint-staged": "^14.0.0",
65
65
  "mocha": "^10.0.0",
66
66
  "nyc": "^15.1.0",
67
67
  "prettier": "^3.0.0",
68
68
  "prettier-package-json": "^2.8.0",
69
69
  "ts-node": "10.9.1",
70
70
  "typechain": "^8.0.0",
71
- "typedoc": "^0.24.8",
71
+ "typedoc": "^0.25.0",
72
72
  "typedoc-plugin-markdown": "^3.15.4",
73
73
  "typescript": "^5.1.3"
74
74
  },
package/src/api/api.ts CHANGED
@@ -107,8 +107,8 @@ export class OpenSeaAPI {
107
107
  * @param options.orderDirection The direction to sort the orders
108
108
  * @param options.orderBy The field to sort the orders by
109
109
  * @param options.limit The number of orders to retrieve
110
- * @param options.makerAddress Fitler by the wallet addres of the order maker
111
- * @param options.takerAddress Filter by wallet address of the order taker
110
+ * @param options.maker Filter by the wallet address of the order maker
111
+ * @param options.taker Filter by wallet address of the order taker
112
112
  * @param options.asset_contract_address Address of the NFT's contract
113
113
  * @param options.token_ids String array of token IDs to filter by.
114
114
  * @param options.listed_after Filter by orders listed after the Unix epoch timestamp in seconds
@@ -147,8 +147,8 @@ export class OpenSeaAPI {
147
147
  * @param options.orderDirection The direction to sort the orders
148
148
  * @param options.orderBy The field to sort the orders by
149
149
  * @param options.limit The number of orders to retrieve
150
- * @param options.makerAddress Fitler by the wallet addres of the order maker
151
- * @param options.takerAddress Filter by wallet address of the order taker
150
+ * @param options.maker Filter by the wallet address of the order maker
151
+ * @param options.taker Filter by wallet address of the order taker
152
152
  * @param options.asset_contract_address Address of the NFT's contract
153
153
  * @param options.token_ids String array of token IDs to filter by.
154
154
  * @param options.listed_after Filter by orders listed after the Unix epoch timestamp in seconds
@@ -333,7 +333,7 @@ export class OpenSeaAPI {
333
333
  },
334
334
  retries = 1,
335
335
  ): Promise<OpenSeaAsset> {
336
- if (![Chain.Mainnet, Chain.Goerli].includes(this.chain)) {
336
+ if (![Chain.Mainnet, Chain.Sepolia].includes(this.chain)) {
337
337
  throw new Error("Please use `getNFT()` for multichain capabilities.");
338
338
  }
339
339
 
@@ -496,7 +496,7 @@ export class OpenSeaAPI {
496
496
  public async getAssets(
497
497
  query: OpenSeaAssetQuery = {},
498
498
  ): Promise<GetAssetsResponse> {
499
- if (![Chain.Mainnet, Chain.Goerli].includes(this.chain)) {
499
+ if (![Chain.Mainnet, Chain.Sepolia].includes(this.chain)) {
500
500
  throw new Error(
501
501
  "Please use `getNFTsByContract()` or `getNFTsByCollection()` for multichain capabilities.",
502
502
  );
@@ -544,9 +544,9 @@ export class OpenSeaAPI {
544
544
  page = 1,
545
545
  retries = 1,
546
546
  ): Promise<GetPaymentTokensResponse> {
547
- if (![Chain.Mainnet, Chain.Goerli].includes(this.chain)) {
547
+ if (![Chain.Mainnet, Chain.Sepolia].includes(this.chain)) {
548
548
  throw new Error(
549
- "This method does not work outside of Mainnet and Goerli chains as it uses the v1 API.",
549
+ "This method does not work outside of Mainnet and Sepolia chains as it uses the v1 API.",
550
550
  );
551
551
  }
552
552
 
package/src/constants.ts CHANGED
@@ -8,8 +8,10 @@ export const API_BASE_TESTNET = "https://testnets-api.opensea.io";
8
8
  export const API_V1_PATH = `/api/v1`;
9
9
 
10
10
  export const DEFAULT_ZONE = ethers.constants.AddressZero;
11
- export const ENGLISH_AUCTION_ZONE =
11
+ export const ENGLISH_AUCTION_ZONE_MAINNETS =
12
12
  "0x110b2b128a9ed1be5ef3232d8e4e41640df5c2cd";
13
+ export const ENGLISH_AUCTION_ZONE_TESTNETS =
14
+ "0x9B814233894Cd227f561B78Cc65891AA55C62Ad2";
13
15
 
14
16
  // Ignore eslint no-unused-modules for below to keep backward compatibility
15
17
  // in case a downstream user was already using these imports directly.
package/src/sdk.ts CHANGED
@@ -22,7 +22,8 @@ import { Offer, NFT } from "./api/types";
22
22
  import {
23
23
  INVERSE_BASIS_POINT,
24
24
  DEFAULT_ZONE,
25
- ENGLISH_AUCTION_ZONE,
25
+ ENGLISH_AUCTION_ZONE_MAINNETS,
26
+ ENGLISH_AUCTION_ZONE_TESTNETS,
26
27
  } from "./constants";
27
28
  import {
28
29
  constructPrivateListingCounterOrder,
@@ -58,6 +59,7 @@ import {
58
59
  feesToBasisPoints,
59
60
  requireValidProtocol,
60
61
  getWETHAddress,
62
+ isTestChain,
61
63
  } from "./utils/utils";
62
64
 
63
65
  /**
@@ -423,7 +425,7 @@ export class OpenSeaSDK {
423
425
  * Create a sell order to make a listing for a asset.
424
426
  * @param options
425
427
  * @param options.asset The asset to trade
426
- * @param options.accountAddress Address of the wallet making the buy order
428
+ * @param options.accountAddress Address of the wallet making the sell order
427
429
  * @param options.startAmount Value of the listing at the start of the auction in units, not base units e.g. not wei, of the payment token (or WETH if no payment token address specified)
428
430
  * @param options.endAmount Value of the listing at the end of the auction. If specified, price will change linearly between startAmount and endAmount as time progresses.
429
431
  * @param options.quantity The number of assets to list (if fungible or semi-fungible). Defaults to 1.
@@ -527,7 +529,11 @@ export class OpenSeaSDK {
527
529
  endTime:
528
530
  expirationTime?.toString() ??
529
531
  getMaxOrderExpirationTimestamp().toString(),
530
- zone: englishAuction ? ENGLISH_AUCTION_ZONE : DEFAULT_ZONE,
532
+ zone: englishAuction
533
+ ? isTestChain(this.chain)
534
+ ? ENGLISH_AUCTION_ZONE_TESTNETS
535
+ : ENGLISH_AUCTION_ZONE_MAINNETS
536
+ : DEFAULT_ZONE,
531
537
  domain,
532
538
  salt: BigNumber.from(salt ?? 0).toString(),
533
539
  restrictedByZone: englishAuction ? true : false,
@@ -859,7 +865,7 @@ export class OpenSeaSDK {
859
865
  * Get an account's balance of any Asset. This asset can be an ERC20, ERC1155, or ERC721.
860
866
  * @param options
861
867
  * @param options.accountAddress Account address to check
862
- * @param options.asset The Asset to check balance for
868
+ * @param options.asset The Asset to check balance for. tokenStandard must be set.
863
869
  * @param retries How many times to retry if balance is 0. Defaults to 1.
864
870
  * @returns The balance of the asset for the account.
865
871
  *
@@ -1010,7 +1016,7 @@ export class OpenSeaSDK {
1010
1016
  ) {
1011
1017
  const isEther = tokenAddress === ethers.constants.AddressZero;
1012
1018
  let paymentToken: OpenSeaFungibleToken | undefined;
1013
- if (!isEther && [Chain.Mainnet, Chain.Goerli].includes(this.chain)) {
1019
+ if (!isEther && [Chain.Mainnet, Chain.Sepolia].includes(this.chain)) {
1014
1020
  const { tokens } = await this.api.getPaymentTokens({
1015
1021
  address: tokenAddress.toLowerCase(),
1016
1022
  });
@@ -1083,18 +1089,22 @@ export class OpenSeaSDK {
1083
1089
  */
1084
1090
  private async _requireAccountIsAvailable(accountAddress: string) {
1085
1091
  const accountAddressChecksummed = ethers.utils.getAddress(accountAddress);
1086
- if (
1087
- (this._signerOrProvider instanceof Wallet &&
1088
- this._signerOrProvider.address === accountAddressChecksummed) ||
1089
- (this._signerOrProvider instanceof providers.JsonRpcProvider &&
1090
- (await this._signerOrProvider.listAccounts()).includes(
1091
- accountAddressChecksummed,
1092
- ))
1093
- ) {
1092
+ const availableAccounts: string[] = [];
1093
+
1094
+ if ("address" in this._signerOrProvider) {
1095
+ availableAccounts.push(this._signerOrProvider.address);
1096
+ } else if ("listAccounts" in this._signerOrProvider) {
1097
+ availableAccounts.push(...(await this._signerOrProvider.listAccounts()));
1098
+ }
1099
+
1100
+ if (availableAccounts.includes(accountAddressChecksummed)) {
1094
1101
  return;
1095
1102
  }
1103
+
1096
1104
  throw new Error(
1097
- `Specified accountAddress is not available through wallet or provider: ${accountAddressChecksummed}`,
1105
+ `Specified accountAddress is not available through wallet or provider: ${accountAddressChecksummed}. Accounts available: ${
1106
+ availableAccounts.length > 0 ? availableAccounts.join(", ") : "none"
1107
+ }`,
1098
1108
  );
1099
1109
  }
1100
1110