@opensea/sdk 12.3.0 → 12.4.1
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 +23 -8
- package/lib/api/api.d.ts +134 -14
- package/lib/api/api.js +222 -113
- package/lib/api/api.js.map +1 -1
- package/package.json +1 -1
- package/src/api/api.ts +227 -118
package/lib/api/api.js
CHANGED
|
@@ -43,22 +43,30 @@ class OpenSeaAPI {
|
|
|
43
43
|
/** Transport for every instance request. See {@link OpenSeaAPIConfig.fetch}. */
|
|
44
44
|
fetchImpl;
|
|
45
45
|
chain;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Per-domain clients. Prefer these over the flat `getCollection` / `getTraits` style methods on
|
|
48
|
+
* this class, which are deprecated and will be removed in the next major.
|
|
49
|
+
*
|
|
50
|
+
* `search` is absent because `SearchAPI` holds a single method also called `search`, so the
|
|
51
|
+
* property and the existing `search()` method want the same name and only one can be added
|
|
52
|
+
* without a break. Call it as `api.search(args)`.
|
|
53
|
+
*/
|
|
54
|
+
orders;
|
|
55
|
+
offers;
|
|
56
|
+
listings;
|
|
57
|
+
collections;
|
|
58
|
+
nfts;
|
|
59
|
+
accounts;
|
|
60
|
+
events;
|
|
61
|
+
tokens;
|
|
62
|
+
chains;
|
|
63
|
+
drops;
|
|
64
|
+
transactions;
|
|
65
|
+
assets;
|
|
60
66
|
/** Wallet-authenticated scoped REST helpers. */
|
|
61
67
|
walletAuth;
|
|
68
|
+
/** See the note above: this one stays private, and `api.search(args)` is the call. */
|
|
69
|
+
searchAPI;
|
|
62
70
|
/**
|
|
63
71
|
* Create an instance of the OpenSeaAPI
|
|
64
72
|
* @param config OpenSeaAPIConfig for setting up the API, including an optional API key, Chain name, and base URL
|
|
@@ -87,19 +95,19 @@ class OpenSeaAPI {
|
|
|
87
95
|
request: this.request.bind(this),
|
|
88
96
|
};
|
|
89
97
|
// Initialize specialized API clients
|
|
90
|
-
this.
|
|
91
|
-
this.
|
|
92
|
-
this.
|
|
93
|
-
this.
|
|
94
|
-
this.
|
|
95
|
-
this.
|
|
96
|
-
this.
|
|
98
|
+
this.orders = new orders_1.OrdersAPI(fetcher, this.chain);
|
|
99
|
+
this.offers = new offers_1.OffersAPI(fetcher, this.chain);
|
|
100
|
+
this.listings = new listings_1.ListingsAPI(fetcher);
|
|
101
|
+
this.collections = new collections_1.CollectionsAPI(fetcher);
|
|
102
|
+
this.nfts = new nfts_1.NFTsAPI(fetcher, this.chain);
|
|
103
|
+
this.accounts = new accounts_1.AccountsAPI(fetcher, this.chain);
|
|
104
|
+
this.events = new events_1.EventsAPI(fetcher);
|
|
97
105
|
this.searchAPI = new search_1.SearchAPI(fetcher);
|
|
98
|
-
this.
|
|
99
|
-
this.
|
|
100
|
-
this.
|
|
101
|
-
this.
|
|
102
|
-
this.
|
|
106
|
+
this.tokens = new tokens_1.TokensAPI(fetcher);
|
|
107
|
+
this.chains = new chains_1.ChainsAPI(fetcher);
|
|
108
|
+
this.drops = new drops_1.DropsAPI(fetcher);
|
|
109
|
+
this.transactions = new transactions_1.TransactionsAPI(fetcher);
|
|
110
|
+
this.assets = new assets_1.AssetsAPI(fetcher);
|
|
103
111
|
this.walletAuth = new walletAuth_1.WalletAuthAPI(fetcher);
|
|
104
112
|
}
|
|
105
113
|
/**
|
|
@@ -109,9 +117,10 @@ class OpenSeaAPI {
|
|
|
109
117
|
* @param chain The chain where the order is located. Defaults to the chain set in the constructor.
|
|
110
118
|
* @returns The {@link GetOrderByHashResponse} returned by the API (can be Offer or Listing)
|
|
111
119
|
* @throws An error if the order is not found
|
|
120
|
+
* @deprecated Use `api.orders.getOrderByHash()`. Removed in the next major.
|
|
112
121
|
*/
|
|
113
122
|
async getOrderByHash(orderHash, protocolAddress, chain = this.chain) {
|
|
114
|
-
return this.
|
|
123
|
+
return this.orders.getOrderByHash(orderHash, protocolAddress, chain);
|
|
115
124
|
}
|
|
116
125
|
/**
|
|
117
126
|
* Gets all offers for a given collection.
|
|
@@ -119,9 +128,10 @@ class OpenSeaAPI {
|
|
|
119
128
|
* @param limit The number of offers to return. Must be between 1 and 100. Default: 100
|
|
120
129
|
* @param next The cursor for the next page of results. This is returned from a previous request.
|
|
121
130
|
* @returns The {@link GetOffersResponse} returned by the API.
|
|
131
|
+
* @deprecated Use `api.offers.getAllOffers()`. Removed in the next major.
|
|
122
132
|
*/
|
|
123
133
|
async getAllOffers(collectionSlug, limit, next) {
|
|
124
|
-
return this.
|
|
134
|
+
return this.offers.getAllOffers(collectionSlug, limit, next);
|
|
125
135
|
}
|
|
126
136
|
/**
|
|
127
137
|
* Gets all listings for a given collection.
|
|
@@ -130,9 +140,10 @@ class OpenSeaAPI {
|
|
|
130
140
|
* @param next The cursor for the next page of results. This is returned from a previous request.
|
|
131
141
|
* @param includePrivateListings Whether to include private listings (default: false)
|
|
132
142
|
* @returns The {@link GetListingsResponse} returned by the API.
|
|
143
|
+
* @deprecated Use `api.listings.getAllListings()`. Removed in the next major.
|
|
133
144
|
*/
|
|
134
145
|
async getAllListings(collectionSlug, limit, next, includePrivateListings) {
|
|
135
|
-
return this.
|
|
146
|
+
return this.listings.getAllListings(collectionSlug, limit, next, includePrivateListings);
|
|
136
147
|
}
|
|
137
148
|
/**
|
|
138
149
|
* Gets trait offers for a given collection.
|
|
@@ -144,18 +155,20 @@ class OpenSeaAPI {
|
|
|
144
155
|
* @param floatValue The value of the trait for decimal-based numeric traits.
|
|
145
156
|
* @param intValue The value of the trait for integer-based numeric traits.
|
|
146
157
|
* @returns The {@link GetOffersResponse} returned by the API.
|
|
158
|
+
* @deprecated Use `api.offers.getTraitOffers()`. Removed in the next major.
|
|
147
159
|
*/
|
|
148
160
|
async getTraitOffers(collectionSlug, type, value, limit, next, floatValue, intValue) {
|
|
149
|
-
return this.
|
|
161
|
+
return this.offers.getTraitOffers(collectionSlug, type, value, limit, next, floatValue, intValue);
|
|
150
162
|
}
|
|
151
163
|
/**
|
|
152
164
|
* Gets the best offer for a given token.
|
|
153
165
|
* @param collectionSlug The slug of the collection.
|
|
154
166
|
* @param tokenId The token identifier.
|
|
155
167
|
* @returns The {@link GetBestOfferResponse} returned by the API.
|
|
168
|
+
* @deprecated Use `api.offers.getBestOffer()`. Removed in the next major.
|
|
156
169
|
*/
|
|
157
170
|
async getBestOffer(collectionSlug, tokenId) {
|
|
158
|
-
return this.
|
|
171
|
+
return this.offers.getBestOffer(collectionSlug, tokenId);
|
|
159
172
|
}
|
|
160
173
|
/**
|
|
161
174
|
* Gets the best listing for a given token.
|
|
@@ -163,9 +176,10 @@ class OpenSeaAPI {
|
|
|
163
176
|
* @param tokenId The token identifier.
|
|
164
177
|
* @param includePrivateListings Whether to include private listings (default: false)
|
|
165
178
|
* @returns The {@link GetBestListingResponse} returned by the API.
|
|
179
|
+
* @deprecated Use `api.listings.getBestListing()`. Removed in the next major.
|
|
166
180
|
*/
|
|
167
181
|
async getBestListing(collectionSlug, tokenId, includePrivateListings) {
|
|
168
|
-
return this.
|
|
182
|
+
return this.listings.getBestListing(collectionSlug, tokenId, includePrivateListings);
|
|
169
183
|
}
|
|
170
184
|
/**
|
|
171
185
|
* Gets the best listings for a given collection.
|
|
@@ -175,9 +189,10 @@ class OpenSeaAPI {
|
|
|
175
189
|
* @param includePrivateListings Whether to include private listings (default: false)
|
|
176
190
|
* @param traits Optional {@link TraitFilter} array. Returns 400 if a single trait matches more than 1000 items.
|
|
177
191
|
* @returns The {@link GetListingsResponse} returned by the API.
|
|
192
|
+
* @deprecated Use `api.listings.getBestListings()`. Removed in the next major.
|
|
178
193
|
*/
|
|
179
194
|
async getBestListings(collectionSlug, limit, next, includePrivateListings, traits) {
|
|
180
|
-
return this.
|
|
195
|
+
return this.listings.getBestListings(collectionSlug, limit, next, includePrivateListings, traits);
|
|
181
196
|
}
|
|
182
197
|
/**
|
|
183
198
|
* Get cross-chain fulfillment data for one or more listings.
|
|
@@ -185,9 +200,10 @@ class OpenSeaAPI {
|
|
|
185
200
|
* All listings must be EVM (Seaport orders). Payment can be from any chain (EVM or SVM).
|
|
186
201
|
* @param request The cross-chain fulfillment request containing listings, fulfiller, payment, and optional recipient
|
|
187
202
|
* @returns The {@link CrossChainFulfillmentResponse} with ordered transactions to sign and submit
|
|
203
|
+
* @deprecated Use `api.listings.getCrossChainFulfillmentData()`. Removed in the next major.
|
|
188
204
|
*/
|
|
189
205
|
async getCrossChainFulfillmentData(request) {
|
|
190
|
-
return this.
|
|
206
|
+
return this.listings.getCrossChainFulfillmentData(request);
|
|
191
207
|
}
|
|
192
208
|
/**
|
|
193
209
|
* Generate the data needed to fulfill a listing or an offer onchain.
|
|
@@ -201,27 +217,30 @@ class OpenSeaAPI {
|
|
|
201
217
|
* @param recipientAddress Optional recipient address for the NFT when fulfilling a listing. Not applicable for offers.
|
|
202
218
|
* @param includeOptionalCreatorFees Whether to include optional creator fees in the fulfillment. If creator fees are already required, this is a no-op. Defaults to false.
|
|
203
219
|
* @returns The {@link FulfillmentDataResponse}
|
|
220
|
+
* @deprecated Use `api.orders.generateFulfillmentData()`. Removed in the next major.
|
|
204
221
|
*/
|
|
205
222
|
async generateFulfillmentData(fulfillerAddress, orderHash, protocolAddress, side, assetContractAddress, tokenId, unitsToFill, recipientAddress, includeOptionalCreatorFees = false) {
|
|
206
|
-
return this.
|
|
223
|
+
return this.orders.generateFulfillmentData(fulfillerAddress, orderHash, protocolAddress, side, assetContractAddress, tokenId, unitsToFill, recipientAddress, includeOptionalCreatorFees);
|
|
207
224
|
}
|
|
208
225
|
/**
|
|
209
226
|
* Post a listing to OpenSea. Returns the new v2 Listing response format.
|
|
210
227
|
* @param order The order to post
|
|
211
228
|
* @param protocolAddress The contract address of the seaport protocol
|
|
212
229
|
* @returns The {@link Listing} posted to the API.
|
|
230
|
+
* @deprecated Use `api.orders.postListing()`. Removed in the next major.
|
|
213
231
|
*/
|
|
214
232
|
async postListing(order, protocolAddress) {
|
|
215
|
-
return this.
|
|
233
|
+
return this.orders.postListing(order, protocolAddress);
|
|
216
234
|
}
|
|
217
235
|
/**
|
|
218
236
|
* Post an offer to OpenSea. Returns the new v2 Offer response format.
|
|
219
237
|
* @param order The order to post
|
|
220
238
|
* @param protocolAddress The contract address of the seaport protocol
|
|
221
239
|
* @returns The {@link Offer} posted to the API.
|
|
240
|
+
* @deprecated Use `api.orders.postOffer()`. Removed in the next major.
|
|
222
241
|
*/
|
|
223
242
|
async postOffer(order, protocolAddress) {
|
|
224
|
-
return this.
|
|
243
|
+
return this.orders.postOffer(order, protocolAddress);
|
|
225
244
|
}
|
|
226
245
|
/**
|
|
227
246
|
* Build a OpenSea collection offer.
|
|
@@ -234,9 +253,10 @@ class OpenSeaAPI {
|
|
|
234
253
|
* @param traits If defined, an array of traits to create the multi-trait collection offer for.
|
|
235
254
|
* @param numericTraits If defined, an array of numeric trait criteria with min/max ranges.
|
|
236
255
|
* @returns The {@link BuildOfferResponse} returned by the API.
|
|
256
|
+
* @deprecated Use `api.offers.buildOffer()`. Removed in the next major.
|
|
237
257
|
*/
|
|
238
258
|
async buildOffer(offererAddress, quantity, collectionSlug, offerProtectionEnabled = true, traitType, traitValue, traits, numericTraits) {
|
|
239
|
-
return this.
|
|
259
|
+
return this.offers.buildOffer(offererAddress, quantity, collectionSlug, offerProtectionEnabled, traitType, traitValue, traits, numericTraits);
|
|
240
260
|
}
|
|
241
261
|
/**
|
|
242
262
|
* Get a list collection offers for a given slug.
|
|
@@ -244,9 +264,10 @@ class OpenSeaAPI {
|
|
|
244
264
|
* @param limit Optional limit for number of results.
|
|
245
265
|
* @param next Optional cursor for pagination.
|
|
246
266
|
* @returns The {@link GetOffersResponse} returned by the API.
|
|
267
|
+
* @deprecated Use `api.offers.getCollectionOffers()`. Removed in the next major.
|
|
247
268
|
*/
|
|
248
269
|
async getCollectionOffers(slug, limit, next) {
|
|
249
|
-
return this.
|
|
270
|
+
return this.offers.getCollectionOffers(slug, limit, next);
|
|
250
271
|
}
|
|
251
272
|
/**
|
|
252
273
|
* Post a collection offer to OpenSea.
|
|
@@ -257,9 +278,10 @@ class OpenSeaAPI {
|
|
|
257
278
|
* @param traits If defined, an array of traits to create the multi-trait collection offer for.
|
|
258
279
|
* @param numericTraits If defined, an array of numeric trait criteria with min/max ranges.
|
|
259
280
|
* @returns The {@link Offer} returned to the API.
|
|
281
|
+
* @deprecated Use `api.offers.postCollectionOffer()`. Removed in the next major.
|
|
260
282
|
*/
|
|
261
283
|
async postCollectionOffer(order, slug, traitType, traitValue, traits, numericTraits) {
|
|
262
|
-
return this.
|
|
284
|
+
return this.offers.postCollectionOffer(order, slug, traitType, traitValue, traits, numericTraits);
|
|
263
285
|
}
|
|
264
286
|
/**
|
|
265
287
|
* Fetch multiple NFTs for a collection.
|
|
@@ -268,9 +290,10 @@ class OpenSeaAPI {
|
|
|
268
290
|
* @param next Cursor to retrieve the next page of NFTs
|
|
269
291
|
* @param traits Optional {@link TraitFilter} array. Returns 400 if a single trait matches more than 1000 items.
|
|
270
292
|
* @returns The {@link ListNFTsResponse} returned by the API.
|
|
293
|
+
* @deprecated Use `api.nfts.getNFTsByCollection()`. Removed in the next major.
|
|
271
294
|
*/
|
|
272
295
|
async getNFTsByCollection(slug, limit = undefined, next = undefined, traits = undefined) {
|
|
273
|
-
return this.
|
|
296
|
+
return this.nfts.getNFTsByCollection(slug, limit, next, traits);
|
|
274
297
|
}
|
|
275
298
|
/**
|
|
276
299
|
* Fetch multiple NFTs for a contract.
|
|
@@ -279,9 +302,10 @@ class OpenSeaAPI {
|
|
|
279
302
|
* @param next Cursor to retrieve the next page of NFTs.
|
|
280
303
|
* @param chain The NFT's chain.
|
|
281
304
|
* @returns The {@link ListNFTsResponse} returned by the API.
|
|
305
|
+
* @deprecated Use `api.nfts.getNFTsByContract()`. Removed in the next major.
|
|
282
306
|
*/
|
|
283
307
|
async getNFTsByContract(address, limit = undefined, next = undefined, chain = this.chain) {
|
|
284
|
-
return this.
|
|
308
|
+
return this.nfts.getNFTsByContract(address, limit, next, chain);
|
|
285
309
|
}
|
|
286
310
|
/**
|
|
287
311
|
* Fetch NFTs owned by an account.
|
|
@@ -290,9 +314,10 @@ class OpenSeaAPI {
|
|
|
290
314
|
* @param next Cursor to retrieve the next page of NFTs
|
|
291
315
|
* @param chain The chain to query. Defaults to the chain set in the constructor.
|
|
292
316
|
* @returns The {@link ListNFTsResponse} returned by the API.
|
|
317
|
+
* @deprecated Use `api.nfts.getNFTsByAccount()`. Removed in the next major.
|
|
293
318
|
*/
|
|
294
319
|
async getNFTsByAccount(address, limit = undefined, next = undefined, chain = this.chain) {
|
|
295
|
-
return this.
|
|
320
|
+
return this.nfts.getNFTsByAccount(address, limit, next, chain);
|
|
296
321
|
}
|
|
297
322
|
/**
|
|
298
323
|
* Fetch metadata, traits, ownership information, and rarity for a single NFT.
|
|
@@ -300,17 +325,19 @@ class OpenSeaAPI {
|
|
|
300
325
|
* @param identifier the identifier of the NFT (i.e. Token ID)
|
|
301
326
|
* @param chain The NFT's chain.
|
|
302
327
|
* @returns The {@link GetNFTResponse} returned by the API.
|
|
328
|
+
* @deprecated Use `api.nfts.getNFT()`. Removed in the next major.
|
|
303
329
|
*/
|
|
304
330
|
async getNFT(address, identifier, chain = this.chain) {
|
|
305
|
-
return this.
|
|
331
|
+
return this.nfts.getNFT(address, identifier, chain);
|
|
306
332
|
}
|
|
307
333
|
/**
|
|
308
334
|
* Fetch an OpenSea collection.
|
|
309
335
|
* @param slug The slug (identifier) of the collection.
|
|
310
336
|
* @returns The {@link OpenSeaCollection} returned by the API.
|
|
337
|
+
* @deprecated Use `api.collections.getCollection()`. Removed in the next major.
|
|
311
338
|
*/
|
|
312
339
|
async getCollection(slug) {
|
|
313
|
-
return this.
|
|
340
|
+
return this.collections.getCollection(slug);
|
|
314
341
|
}
|
|
315
342
|
/**
|
|
316
343
|
* Fetch a list of OpenSea collections.
|
|
@@ -321,34 +348,38 @@ class OpenSeaAPI {
|
|
|
321
348
|
* @param limit The limit of collections to return.
|
|
322
349
|
* @param next The cursor for the next page of results. This is returned from a previous request.
|
|
323
350
|
* @returns List of {@link OpenSeaCollection} returned by the API.
|
|
351
|
+
* @deprecated Use `api.collections.getCollections()`. Removed in the next major.
|
|
324
352
|
*/
|
|
325
353
|
async getCollections(orderBy = types_2.CollectionOrderByOption.CREATED_DATE, chain, creatorUsername, includeHidden = false, limit, next) {
|
|
326
|
-
return this.
|
|
354
|
+
return this.collections.getCollections(orderBy, chain, creatorUsername, includeHidden, limit, next);
|
|
327
355
|
}
|
|
328
356
|
/**
|
|
329
357
|
* Fetch stats for an OpenSea collection.
|
|
330
358
|
* @param slug The slug (identifier) of the collection.
|
|
331
359
|
* @returns The {@link OpenSeaCollection} returned by the API.
|
|
360
|
+
* @deprecated Use `api.collections.getCollectionStats()`. Removed in the next major.
|
|
332
361
|
*/
|
|
333
362
|
async getCollectionStats(slug) {
|
|
334
|
-
return this.
|
|
363
|
+
return this.collections.getCollectionStats(slug);
|
|
335
364
|
}
|
|
336
365
|
/**
|
|
337
366
|
* Fetch a payment token.
|
|
338
367
|
* @param address The address of the payment token
|
|
339
368
|
* @param chain The chain of the payment token
|
|
340
369
|
* @returns The {@link OpenSeaPaymentToken} returned by the API.
|
|
370
|
+
* @deprecated Use `api.accounts.getPaymentToken()`. Removed in the next major.
|
|
341
371
|
*/
|
|
342
372
|
async getPaymentToken(address, chain = this.chain) {
|
|
343
|
-
return this.
|
|
373
|
+
return this.accounts.getPaymentToken(address, chain);
|
|
344
374
|
}
|
|
345
375
|
/**
|
|
346
376
|
* Fetch account for an address.
|
|
347
377
|
* @param address The address to fetch the account for
|
|
348
378
|
* @returns The {@link OpenSeaAccount} returned by the API.
|
|
379
|
+
* @deprecated Use `api.accounts.getAccount()`. Removed in the next major.
|
|
349
380
|
*/
|
|
350
381
|
async getAccount(address) {
|
|
351
|
-
return this.
|
|
382
|
+
return this.accounts.getAccount(address);
|
|
352
383
|
}
|
|
353
384
|
/**
|
|
354
385
|
* Force refresh the metadata for an NFT.
|
|
@@ -356,9 +387,10 @@ class OpenSeaAPI {
|
|
|
356
387
|
* @param identifier The identifier of the NFT.
|
|
357
388
|
* @param chain The chain where the NFT is located.
|
|
358
389
|
* @returns The response from the API.
|
|
390
|
+
* @deprecated Use `api.nfts.refreshNFTMetadata()`. Removed in the next major.
|
|
359
391
|
*/
|
|
360
392
|
async refreshNFTMetadata(address, identifier, chain = this.chain) {
|
|
361
|
-
return this.
|
|
393
|
+
return this.nfts.refreshNFTMetadata(address, identifier, chain);
|
|
362
394
|
}
|
|
363
395
|
/**
|
|
364
396
|
* Offchain cancel an order, offer or listing, by its order hash when protected by the SignedZone.
|
|
@@ -373,32 +405,36 @@ class OpenSeaAPI {
|
|
|
373
405
|
* name, version, address, and chain. The struct to sign is `OrderHash` containing a
|
|
374
406
|
* single bytes32 field.
|
|
375
407
|
* @returns The response from the API.
|
|
408
|
+
* @deprecated Use `api.orders.offchainCancelOrder()`. Removed in the next major.
|
|
376
409
|
*/
|
|
377
410
|
async offchainCancelOrder(protocolAddress, orderHash, chain = this.chain, offererSignature) {
|
|
378
|
-
return this.
|
|
411
|
+
return this.orders.offchainCancelOrder(protocolAddress, orderHash, chain, offererSignature);
|
|
379
412
|
}
|
|
380
413
|
/**
|
|
381
414
|
* Get ordered actions to cancel an order onchain.
|
|
415
|
+
* @deprecated Use `api.orders.createCancelOrderActions()`. Removed in the next major.
|
|
382
416
|
*/
|
|
383
417
|
async createCancelOrderActions(protocolAddress, orderIdentifier, request, chain = this.chain) {
|
|
384
|
-
return this.
|
|
418
|
+
return this.orders.createCancelOrderActions(protocolAddress, orderIdentifier, request, chain);
|
|
385
419
|
}
|
|
386
420
|
/**
|
|
387
421
|
* Gets a list of events based on query parameters.
|
|
388
422
|
* @param args Query parameters for filtering events.
|
|
389
423
|
* @returns The {@link GetEventsResponse} returned by the API.
|
|
424
|
+
* @deprecated Use `api.events.getEvents()`. Removed in the next major.
|
|
390
425
|
*/
|
|
391
426
|
async getEvents(args) {
|
|
392
|
-
return this.
|
|
427
|
+
return this.events.getEvents(args);
|
|
393
428
|
}
|
|
394
429
|
/**
|
|
395
430
|
* Gets a list of events for a specific account.
|
|
396
431
|
* @param address The account address.
|
|
397
432
|
* @param args Query parameters for filtering events.
|
|
398
433
|
* @returns The {@link GetEventsResponse} returned by the API.
|
|
434
|
+
* @deprecated Use `api.events.getEventsByAccount()`. Removed in the next major.
|
|
399
435
|
*/
|
|
400
436
|
async getEventsByAccount(address, args) {
|
|
401
|
-
return this.
|
|
437
|
+
return this.events.getEventsByAccount(address, args);
|
|
402
438
|
}
|
|
403
439
|
/**
|
|
404
440
|
* Gets a list of events for a specific collection. Pass `args.traits` to
|
|
@@ -406,9 +442,10 @@ class OpenSeaAPI {
|
|
|
406
442
|
* @param collectionSlug The slug (identifier) of the collection.
|
|
407
443
|
* @param args Query parameters; see {@link GetEventsByCollectionArgs}.
|
|
408
444
|
* @returns The {@link GetEventsResponse} returned by the API.
|
|
445
|
+
* @deprecated Use `api.events.getEventsByCollection()`. Removed in the next major.
|
|
409
446
|
*/
|
|
410
447
|
async getEventsByCollection(collectionSlug, args) {
|
|
411
|
-
return this.
|
|
448
|
+
return this.events.getEventsByCollection(collectionSlug, args);
|
|
412
449
|
}
|
|
413
450
|
/**
|
|
414
451
|
* Gets a list of events for a specific NFT.
|
|
@@ -417,76 +454,99 @@ class OpenSeaAPI {
|
|
|
417
454
|
* @param identifier The token identifier.
|
|
418
455
|
* @param args Query parameters for filtering events.
|
|
419
456
|
* @returns The {@link GetEventsResponse} returned by the API.
|
|
457
|
+
* @deprecated Use `api.events.getEventsByNFT()`. Removed in the next major.
|
|
420
458
|
*/
|
|
421
459
|
async getEventsByNFT(chain, address, identifier, args) {
|
|
422
|
-
return this.
|
|
460
|
+
return this.events.getEventsByNFT(chain, address, identifier, args);
|
|
423
461
|
}
|
|
424
462
|
/**
|
|
425
463
|
* Fetch smart contract information for a given chain and address.
|
|
426
464
|
* @param address The contract address.
|
|
427
465
|
* @param chain The chain where the contract is deployed. Defaults to the chain set in the constructor.
|
|
428
466
|
* @returns The {@link GetContractResponse} returned by the API.
|
|
467
|
+
* @deprecated Use `api.nfts.getContract()`. Removed in the next major.
|
|
429
468
|
*/
|
|
430
469
|
async getContract(address, chain = this.chain) {
|
|
431
|
-
return this.
|
|
470
|
+
return this.nfts.getContract(address, chain);
|
|
432
471
|
}
|
|
433
472
|
/**
|
|
434
473
|
* Fetch all traits for a collection with their possible values and counts.
|
|
435
474
|
* @param collectionSlug The slug (identifier) of the collection.
|
|
436
475
|
* @returns The {@link GetTraitsResponse} returned by the API.
|
|
476
|
+
* @deprecated Use `api.collections.getTraits()`. Removed in the next major.
|
|
437
477
|
*/
|
|
438
478
|
async getTraits(collectionSlug) {
|
|
439
|
-
return this.
|
|
479
|
+
return this.collections.getTraits(collectionSlug);
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Fetch floor prices per trait value for a collection.
|
|
483
|
+
*
|
|
484
|
+
* Covers text traits with at least one active listing, ordered by trait type, then value, then
|
|
485
|
+
* price. Numeric traits are not enumerated here; use {@link getTraits} for their min/max range.
|
|
486
|
+
* Every floor is denominated on the collection's own chain, identified by `chain` plus each
|
|
487
|
+
* entry's `paymentTokenSymbol`.
|
|
488
|
+
* @param collectionSlug The slug (identifier) of the collection.
|
|
489
|
+
* @returns The {@link TraitFloorsResponse} returned by the API.
|
|
490
|
+
* @deprecated Use `api.collections.getCollectionTraitFloors()`. Removed in the next major.
|
|
491
|
+
*/
|
|
492
|
+
async getCollectionTraitFloors(collectionSlug) {
|
|
493
|
+
return this.collections.getCollectionTraitFloors(collectionSlug);
|
|
440
494
|
}
|
|
441
495
|
/**
|
|
442
496
|
* Gets a list of trending tokens.
|
|
443
497
|
* @param args Optional query parameters for pagination.
|
|
444
498
|
* @returns The {@link GetTrendingTokensResponse} returned by the API.
|
|
499
|
+
* @deprecated Use `api.tokens.getTrendingTokens()`. Removed in the next major.
|
|
445
500
|
*/
|
|
446
501
|
async getTrendingTokens(args) {
|
|
447
|
-
return this.
|
|
502
|
+
return this.tokens.getTrendingTokens(args);
|
|
448
503
|
}
|
|
449
504
|
/**
|
|
450
505
|
* Gets a list of top tokens.
|
|
451
506
|
* @param args Optional query parameters for pagination.
|
|
452
507
|
* @returns The {@link GetTopTokensResponse} returned by the API.
|
|
508
|
+
* @deprecated Use `api.tokens.getTopTokens()`. Removed in the next major.
|
|
453
509
|
*/
|
|
454
510
|
async getTopTokens(args) {
|
|
455
|
-
return this.
|
|
511
|
+
return this.tokens.getTopTokens(args);
|
|
456
512
|
}
|
|
457
513
|
/**
|
|
458
514
|
* Gets a swap quote for exchanging tokens.
|
|
459
515
|
* @param args Query parameters for the swap quote including token addresses, amount, and chain.
|
|
460
516
|
* @returns The {@link GetSwapQuoteResponse} returned by the API.
|
|
517
|
+
* @deprecated Use `api.tokens.getSwapQuote()`. Removed in the next major.
|
|
461
518
|
*/
|
|
462
519
|
async getSwapQuote(args) {
|
|
463
|
-
return this.
|
|
520
|
+
return this.tokens.getSwapQuote(args);
|
|
464
521
|
}
|
|
465
522
|
/**
|
|
466
523
|
* Gets details for a specific token.
|
|
467
524
|
* @param chain The chain the token is on.
|
|
468
525
|
* @param address The token contract address.
|
|
469
526
|
* @returns The {@link GetTokenResponse} returned by the API.
|
|
527
|
+
* @deprecated Use `api.tokens.getToken()`. Removed in the next major.
|
|
470
528
|
*/
|
|
471
529
|
async getToken(chain, address) {
|
|
472
|
-
return this.
|
|
530
|
+
return this.tokens.getToken(chain, address);
|
|
473
531
|
}
|
|
474
532
|
/**
|
|
475
533
|
* Gets a paginated list of token groups — equivalent currencies across
|
|
476
534
|
* chains (e.g. ETH on Ethereum, Base, and Arbitrum share the "eth" group).
|
|
477
535
|
* @param args Optional query parameters (`limit`, `cursor`).
|
|
478
536
|
* @returns The {@link GetTokenGroupsResponse} returned by the API.
|
|
537
|
+
* @deprecated Use `api.tokens.getTokenGroups()`. Removed in the next major.
|
|
479
538
|
*/
|
|
480
539
|
async getTokenGroups(args) {
|
|
481
|
-
return this.
|
|
540
|
+
return this.tokens.getTokenGroups(args);
|
|
482
541
|
}
|
|
483
542
|
/**
|
|
484
543
|
* Gets a single token group by its slug (e.g. "eth").
|
|
485
544
|
* @param slug The token group slug.
|
|
486
545
|
* @returns The {@link GetTokenGroupResponse} returned by the API.
|
|
546
|
+
* @deprecated Use `api.tokens.getTokenGroup()`. Removed in the next major.
|
|
487
547
|
*/
|
|
488
548
|
async getTokenGroup(slug) {
|
|
489
|
-
return this.
|
|
549
|
+
return this.tokens.getTokenGroup(slug);
|
|
490
550
|
}
|
|
491
551
|
/**
|
|
492
552
|
* Search across collections, tokens, NFTs, and accounts.
|
|
@@ -500,18 +560,20 @@ class OpenSeaAPI {
|
|
|
500
560
|
/**
|
|
501
561
|
* Gets the list of supported blockchains and their capabilities.
|
|
502
562
|
* @returns The {@link GetChainsResponse} returned by the API.
|
|
563
|
+
* @deprecated Use `api.chains.getChains()`. Removed in the next major.
|
|
503
564
|
*/
|
|
504
565
|
async getChains() {
|
|
505
|
-
return this.
|
|
566
|
+
return this.chains.getChains();
|
|
506
567
|
}
|
|
507
568
|
/**
|
|
508
569
|
* Gets token balances for a given account.
|
|
509
570
|
* @param address The wallet address to fetch token balances for.
|
|
510
571
|
* @param args Optional query parameters for filtering and pagination.
|
|
511
572
|
* @returns The {@link GetAccountTokensResponse} returned by the API.
|
|
573
|
+
* @deprecated Use `api.accounts.getAccountTokens()`. Removed in the next major.
|
|
512
574
|
*/
|
|
513
575
|
async getAccountTokens(address, args) {
|
|
514
|
-
return this.
|
|
576
|
+
return this.accounts.getAccountTokens(address, args);
|
|
515
577
|
}
|
|
516
578
|
/**
|
|
517
579
|
* Validate NFT metadata by fetching and parsing it.
|
|
@@ -520,9 +582,10 @@ class OpenSeaAPI {
|
|
|
520
582
|
* @param chain The chain where the NFT is located. Defaults to the chain set in the constructor.
|
|
521
583
|
* @param ignoreCachedItemUrls Whether to ignore cached item URLs and re-fetch from source.
|
|
522
584
|
* @returns The {@link ValidateMetadataResponse} returned by the API.
|
|
585
|
+
* @deprecated Use `api.nfts.validateMetadata()`. Removed in the next major.
|
|
523
586
|
*/
|
|
524
587
|
async validateNFTMetadata(address, identifier, chain = this.chain, ignoreCachedItemUrls) {
|
|
525
|
-
return this.
|
|
588
|
+
return this.nfts.validateMetadata(address, identifier, chain, ignoreCachedItemUrls);
|
|
526
589
|
}
|
|
527
590
|
/**
|
|
528
591
|
* Gets all active offers for a specific NFT (not just the best offer).
|
|
@@ -531,27 +594,30 @@ class OpenSeaAPI {
|
|
|
531
594
|
* @param limit The number of offers to return. Must be between 1 and 200.
|
|
532
595
|
* @param next The cursor for the next page of results.
|
|
533
596
|
* @returns The {@link GetOffersResponse} returned by the API.
|
|
597
|
+
* @deprecated Use `api.offers.getOffersByNFT()`. Removed in the next major.
|
|
534
598
|
*/
|
|
535
599
|
async getOffersByNFT(collectionSlug, identifier, limit, next) {
|
|
536
|
-
return this.
|
|
600
|
+
return this.offers.getOffersByNFT(collectionSlug, identifier, limit, next);
|
|
537
601
|
}
|
|
538
602
|
/**
|
|
539
603
|
* Bulk-buy items from a collection using any payment token, including
|
|
540
604
|
* cross-chain. Returns an ordered list of transactions to execute.
|
|
541
605
|
* @param request The sweep request containing buyer, collection, payment, and item caps.
|
|
542
606
|
* @returns The {@link SweepCollectionResponse} returned by the API.
|
|
607
|
+
* @deprecated Use `api.listings.sweepCollection()`. Removed in the next major.
|
|
543
608
|
*/
|
|
544
609
|
async sweepCollection(request) {
|
|
545
|
-
return this.
|
|
610
|
+
return this.listings.sweepCollection(request);
|
|
546
611
|
}
|
|
547
612
|
/**
|
|
548
613
|
* Get executable transactions for a token swap. Companion to
|
|
549
614
|
* {@link OpenSeaAPI.getSwapQuote} — quote first, then execute.
|
|
550
615
|
* @param request The swap execution request.
|
|
551
616
|
* @returns The {@link SwapExecuteResponse} with transactions and a quote.
|
|
617
|
+
* @deprecated Use `api.tokens.executeSwap()`. Removed in the next major.
|
|
552
618
|
*/
|
|
553
619
|
async executeSwap(request) {
|
|
554
|
-
return this.
|
|
620
|
+
return this.tokens.executeSwap(request);
|
|
555
621
|
}
|
|
556
622
|
/**
|
|
557
623
|
* Get the receipt/status for a submitted transaction. Works for all transaction
|
|
@@ -559,34 +625,38 @@ class OpenSeaAPI {
|
|
|
559
625
|
* fulfillments, and token swaps. Poll this endpoint to check completion status.
|
|
560
626
|
* @param request The transaction receipt request.
|
|
561
627
|
* @returns The {@link TransactionReceiptResponse} returned by the API.
|
|
628
|
+
* @deprecated Use `api.transactions.getTransactionReceipt()`. Removed in the next major.
|
|
562
629
|
*/
|
|
563
630
|
async getTransactionReceipt(request) {
|
|
564
|
-
return this.
|
|
631
|
+
return this.transactions.getTransactionReceipt(request);
|
|
565
632
|
}
|
|
566
633
|
/**
|
|
567
634
|
* Gets a list of drops (mints).
|
|
568
635
|
* @param args Optional query parameters for filtering and pagination.
|
|
569
636
|
* @returns The {@link GetDropsResponse} returned by the API.
|
|
637
|
+
* @deprecated Use `api.drops.getDrops()`. Removed in the next major.
|
|
570
638
|
*/
|
|
571
639
|
async getDrops(args) {
|
|
572
|
-
return this.
|
|
640
|
+
return this.drops.getDrops(args);
|
|
573
641
|
}
|
|
574
642
|
/**
|
|
575
643
|
* Gets detailed drop information for a collection.
|
|
576
644
|
* @param slug The collection slug identifying the drop.
|
|
577
645
|
* @returns The {@link GetDropResponse} returned by the API.
|
|
646
|
+
* @deprecated Use `api.drops.getDrop()`. Removed in the next major.
|
|
578
647
|
*/
|
|
579
648
|
async getDrop(slug) {
|
|
580
|
-
return this.
|
|
649
|
+
return this.drops.getDrop(slug);
|
|
581
650
|
}
|
|
582
651
|
/**
|
|
583
652
|
* Builds a mint transaction for a drop.
|
|
584
653
|
* @param slug The collection slug identifying the drop.
|
|
585
654
|
* @param request The mint request containing minter address and quantity.
|
|
586
655
|
* @returns The {@link DropMintResponse} with ready-to-sign transaction data.
|
|
656
|
+
* @deprecated Use `api.drops.buildMintTransaction()`. Removed in the next major.
|
|
587
657
|
*/
|
|
588
658
|
async buildDropMintTransaction(slug, request) {
|
|
589
|
-
return this.
|
|
659
|
+
return this.drops.buildMintTransaction(slug, request);
|
|
590
660
|
}
|
|
591
661
|
/**
|
|
592
662
|
* Builds ordered transactions for paying on one chain and minting a drop on
|
|
@@ -596,42 +666,47 @@ class OpenSeaAPI {
|
|
|
596
666
|
* @param slug The collection slug identifying the drop.
|
|
597
667
|
* @param request The payer, minter, quantity, and source payment asset.
|
|
598
668
|
* @returns Transactions to submit and the request used to poll their receipt.
|
|
669
|
+
* @deprecated Use `api.drops.buildCrossChainMintTransactions()`. Removed in the next major.
|
|
599
670
|
*/
|
|
600
671
|
async buildCrossChainDropMintTransactions(slug, request) {
|
|
601
|
-
return this.
|
|
672
|
+
return this.drops.buildCrossChainMintTransactions(slug, request);
|
|
602
673
|
}
|
|
603
674
|
/**
|
|
604
675
|
* Gets trending collections sorted by sales activity.
|
|
605
676
|
* @param args Optional query parameters for timeframe, chain, category, and pagination.
|
|
606
677
|
* @returns The {@link GetCollectionsPaginatedResponse} returned by the API.
|
|
678
|
+
* @deprecated Use `api.collections.getTrendingCollections()`. Removed in the next major.
|
|
607
679
|
*/
|
|
608
680
|
async getTrendingCollections(args) {
|
|
609
|
-
return this.
|
|
681
|
+
return this.collections.getTrendingCollections(args);
|
|
610
682
|
}
|
|
611
683
|
/**
|
|
612
684
|
* Gets top collections ranked by various stats.
|
|
613
685
|
* @param args Optional query parameters for sort_by, chain, category, and pagination.
|
|
614
686
|
* @returns The {@link GetCollectionsPaginatedResponse} returned by the API.
|
|
687
|
+
* @deprecated Use `api.collections.getTopCollections()`. Removed in the next major.
|
|
615
688
|
*/
|
|
616
689
|
async getTopCollections(args) {
|
|
617
|
-
return this.
|
|
690
|
+
return this.collections.getTopCollections(args);
|
|
618
691
|
}
|
|
619
692
|
/**
|
|
620
693
|
* Resolve an ENS name, OpenSea username, or wallet address to canonical account info.
|
|
621
694
|
* @param identifier An ENS name (e.g. vitalik.eth), OpenSea username, or wallet address.
|
|
622
695
|
* @returns The {@link ResolveAccountResponse} returned by the API.
|
|
696
|
+
* @deprecated Use `api.accounts.resolveAccount()`. Removed in the next major.
|
|
623
697
|
*/
|
|
624
698
|
async resolveAccount(identifier) {
|
|
625
|
-
return this.
|
|
699
|
+
return this.accounts.resolveAccount(identifier);
|
|
626
700
|
}
|
|
627
701
|
/**
|
|
628
702
|
* Get the public agent ownership relationships for a profile.
|
|
629
703
|
* This is a public read and does not require wallet authentication.
|
|
630
704
|
* @param addressOrUsername An ENS name, OpenSea username, or wallet address.
|
|
631
705
|
* @returns The {@link AgentProfileRelationshipsResponse} returned by the API.
|
|
706
|
+
* @deprecated Use `api.accounts.getAgentProfileRelationships()`. Removed in the next major.
|
|
632
707
|
*/
|
|
633
708
|
async getAgentProfileRelationships(addressOrUsername) {
|
|
634
|
-
return this.
|
|
709
|
+
return this.accounts.getAgentProfileRelationships(addressOrUsername);
|
|
635
710
|
}
|
|
636
711
|
/**
|
|
637
712
|
* Get the collection that an NFT belongs to.
|
|
@@ -641,9 +716,10 @@ class OpenSeaAPI {
|
|
|
641
716
|
* @param identifier The token identifier.
|
|
642
717
|
* @param chain The chain where the NFT is located. Defaults to the chain set in the constructor.
|
|
643
718
|
* @returns The {@link OpenSeaCollection} returned by the API.
|
|
719
|
+
* @deprecated Use `api.nfts.getNFTCollection()`. Removed in the next major.
|
|
644
720
|
*/
|
|
645
721
|
async getNFTCollection(address, identifier, chain = this.chain) {
|
|
646
|
-
return this.
|
|
722
|
+
return this.nfts.getNFTCollection(address, identifier, chain);
|
|
647
723
|
}
|
|
648
724
|
/**
|
|
649
725
|
* Get detailed metadata for an NFT including name, description, image, traits,
|
|
@@ -652,17 +728,19 @@ class OpenSeaAPI {
|
|
|
652
728
|
* @param tokenId The token identifier.
|
|
653
729
|
* @param chain The chain where the NFT is located. Defaults to the chain set in the constructor.
|
|
654
730
|
* @returns The {@link GetNFTMetadataResponse} returned by the API.
|
|
731
|
+
* @deprecated Use `api.nfts.getNFTMetadata()`. Removed in the next major.
|
|
655
732
|
*/
|
|
656
733
|
async getNFTMetadata(address, tokenId, chain = this.chain) {
|
|
657
|
-
return this.
|
|
734
|
+
return this.nfts.getNFTMetadata(address, tokenId, chain);
|
|
658
735
|
}
|
|
659
736
|
/**
|
|
660
737
|
* Fetch multiple tokens in a single request.
|
|
661
738
|
* @param request Batch request listing chain + contract address pairs.
|
|
662
739
|
* @returns The {@link TokenBatchResponse} with detailed token info.
|
|
740
|
+
* @deprecated Use `api.tokens.getTokensBatch()`. Removed in the next major.
|
|
663
741
|
*/
|
|
664
742
|
async getTokensBatch(request) {
|
|
665
|
-
return this.
|
|
743
|
+
return this.tokens.getTokensBatch(request);
|
|
666
744
|
}
|
|
667
745
|
/**
|
|
668
746
|
* Fetch the price history of a token.
|
|
@@ -670,9 +748,10 @@ class OpenSeaAPI {
|
|
|
670
748
|
* @param address Token contract address.
|
|
671
749
|
* @param args Time-series window — `start_time` required, `end_time` defaults to now.
|
|
672
750
|
* @returns The {@link PriceHistoryResponse} returned by the API.
|
|
751
|
+
* @deprecated Use `api.tokens.getTokenPriceHistory()`. Removed in the next major.
|
|
673
752
|
*/
|
|
674
753
|
async getTokenPriceHistory(chain, address, args) {
|
|
675
|
-
return this.
|
|
754
|
+
return this.tokens.getTokenPriceHistory(chain, address, args);
|
|
676
755
|
}
|
|
677
756
|
/**
|
|
678
757
|
* Fetch OHLCV candles for a token.
|
|
@@ -680,187 +759,217 @@ class OpenSeaAPI {
|
|
|
680
759
|
* @param address Token contract address.
|
|
681
760
|
* @param args Time-series window plus candle `bucketSize` (required).
|
|
682
761
|
* @returns The {@link OhlcvResponse} returned by the API.
|
|
762
|
+
* @deprecated Use `api.tokens.getTokenOhlcv()`. Removed in the next major.
|
|
683
763
|
*/
|
|
684
764
|
async getTokenOhlcv(chain, address, args) {
|
|
685
|
-
return this.
|
|
765
|
+
return this.tokens.getTokenOhlcv(chain, address, args);
|
|
686
766
|
}
|
|
687
767
|
/**
|
|
688
768
|
* Fetch recent swap activity for a token.
|
|
769
|
+
* @deprecated Use `api.tokens.getTokenActivity()`. Removed in the next major.
|
|
689
770
|
*/
|
|
690
771
|
async getTokenActivity(chain, address, args) {
|
|
691
|
-
return this.
|
|
772
|
+
return this.tokens.getTokenActivity(chain, address, args);
|
|
692
773
|
}
|
|
693
774
|
/**
|
|
694
775
|
* Fetch materialized trade count, USD volume, and average trade size for a
|
|
695
776
|
* token across the requested windows.
|
|
777
|
+
* @deprecated Use `api.tokens.getTokenActivityStats()`. Removed in the next major.
|
|
696
778
|
*/
|
|
697
779
|
async getTokenActivityStats(chain, address, args) {
|
|
698
|
-
return this.
|
|
780
|
+
return this.tokens.getTokenActivityStats(chain, address, args);
|
|
699
781
|
}
|
|
700
782
|
/**
|
|
701
783
|
* Fetch paginated fungible token activity (transfers, swaps, wraps, and
|
|
702
784
|
* unwraps) for an account across all chains.
|
|
785
|
+
* @deprecated Use `api.tokens.getAccountTokenActivity()`. Removed in the next major.
|
|
703
786
|
*/
|
|
704
787
|
async getAccountTokenActivity(address, args) {
|
|
705
|
-
return this.
|
|
788
|
+
return this.tokens.getAccountTokenActivity(address, args);
|
|
706
789
|
}
|
|
707
790
|
/**
|
|
708
791
|
* Fetch paginated holders for a token, including quantity held, USD value,
|
|
709
792
|
* and aggregate distribution health (STRONG | HEALTHY | CONCERNING | BAD).
|
|
793
|
+
* @deprecated Use `api.tokens.getTokenHolders()`. Removed in the next major.
|
|
710
794
|
*/
|
|
711
795
|
async getTokenHolders(chain, address, args) {
|
|
712
|
-
return this.
|
|
796
|
+
return this.tokens.getTokenHolders(chain, address, args);
|
|
713
797
|
}
|
|
714
798
|
/**
|
|
715
799
|
* Fetch liquidity pools for a token (pool type, USD reserves, and
|
|
716
800
|
* bonding-curve progress / graduation flag where applicable).
|
|
801
|
+
* @deprecated Use `api.tokens.getTokenLiquidityPools()`. Removed in the next major.
|
|
717
802
|
*/
|
|
718
803
|
async getTokenLiquidityPools(chain, address, args) {
|
|
719
|
-
return this.
|
|
804
|
+
return this.tokens.getTokenLiquidityPools(chain, address, args);
|
|
720
805
|
}
|
|
721
806
|
/**
|
|
722
807
|
* Fetch multiple NFTs in a single request.
|
|
808
|
+
* @deprecated Use `api.nfts.getNFTsBatch()`. Removed in the next major.
|
|
723
809
|
*/
|
|
724
810
|
async getNFTsBatch(request) {
|
|
725
|
-
return this.
|
|
811
|
+
return this.nfts.getNFTsBatch(request);
|
|
726
812
|
}
|
|
727
813
|
/**
|
|
728
814
|
* Fetch owners of an NFT.
|
|
815
|
+
* @deprecated Use `api.nfts.getNFTOwners()`. Removed in the next major.
|
|
729
816
|
*/
|
|
730
817
|
async getNFTOwners(address, identifier, chain = this.chain, args) {
|
|
731
|
-
return this.
|
|
818
|
+
return this.nfts.getNFTOwners(address, identifier, chain, args);
|
|
732
819
|
}
|
|
733
820
|
/**
|
|
734
821
|
* Fetch analytics (historical sale points) for an NFT.
|
|
822
|
+
* @deprecated Use `api.nfts.getNFTAnalytics()`. Removed in the next major.
|
|
735
823
|
*/
|
|
736
824
|
async getNFTAnalytics(address, identifier, chain = this.chain) {
|
|
737
|
-
return this.
|
|
825
|
+
return this.nfts.getNFTAnalytics(address, identifier, chain);
|
|
738
826
|
}
|
|
739
827
|
/**
|
|
740
828
|
* Fetch multiple collections in a single request by slug.
|
|
829
|
+
* @deprecated Use `api.collections.getCollectionsBatch()`. Removed in the next major.
|
|
741
830
|
*/
|
|
742
831
|
async getCollectionsBatch(request) {
|
|
743
|
-
return this.
|
|
832
|
+
return this.collections.getCollectionsBatch(request);
|
|
744
833
|
}
|
|
745
834
|
/**
|
|
746
835
|
* Fetch top offers for a collection grouped by price level.
|
|
836
|
+
* @deprecated Use `api.collections.getCollectionOfferAggregates()`. Removed in the next major.
|
|
747
837
|
*/
|
|
748
838
|
async getCollectionOfferAggregates(slug, args) {
|
|
749
|
-
return this.
|
|
839
|
+
return this.collections.getCollectionOfferAggregates(slug, args);
|
|
750
840
|
}
|
|
751
841
|
/**
|
|
752
842
|
* Fetch holders of a collection.
|
|
843
|
+
* @deprecated Use `api.collections.getCollectionHolders()`. Removed in the next major.
|
|
753
844
|
*/
|
|
754
845
|
async getCollectionHolders(slug, args) {
|
|
755
|
-
return this.
|
|
846
|
+
return this.collections.getCollectionHolders(slug, args);
|
|
756
847
|
}
|
|
757
848
|
/**
|
|
758
849
|
* Fetch the floor-price history of a collection.
|
|
850
|
+
* @deprecated Use `api.collections.getCollectionFloorPrices()`. Removed in the next major.
|
|
759
851
|
*/
|
|
760
852
|
async getCollectionFloorPrices(slug, args) {
|
|
761
|
-
return this.
|
|
853
|
+
return this.collections.getCollectionFloorPrices(slug, args);
|
|
762
854
|
}
|
|
763
855
|
/**
|
|
764
856
|
* Get ordered approval + sign actions to create one or more listings.
|
|
857
|
+
* @deprecated Use `api.listings.createListingActions()`. Removed in the next major.
|
|
765
858
|
*/
|
|
766
859
|
async createListingActions(request) {
|
|
767
|
-
return this.
|
|
860
|
+
return this.listings.createListingActions(request);
|
|
768
861
|
}
|
|
769
862
|
/**
|
|
770
863
|
* Get ordered actions to fulfill a listing.
|
|
864
|
+
* @deprecated Use `api.listings.createListingFulfillmentActions()`. Removed in the next major.
|
|
771
865
|
*/
|
|
772
866
|
async createListingFulfillmentActions(request) {
|
|
773
|
-
return this.
|
|
867
|
+
return this.listings.createListingFulfillmentActions(request);
|
|
774
868
|
}
|
|
775
869
|
/**
|
|
776
870
|
* Get ordered actions to create an offer.
|
|
871
|
+
* @deprecated Use `api.offers.createOfferActions()`. Removed in the next major.
|
|
777
872
|
*/
|
|
778
873
|
async createOfferActions(request) {
|
|
779
|
-
return this.
|
|
874
|
+
return this.offers.createOfferActions(request);
|
|
780
875
|
}
|
|
781
876
|
/**
|
|
782
877
|
* Get ordered actions to fulfill an offer.
|
|
878
|
+
* @deprecated Use `api.offers.createOfferFulfillmentActions()`. Removed in the next major.
|
|
783
879
|
*/
|
|
784
880
|
async createOfferFulfillmentActions(request) {
|
|
785
|
-
return this.
|
|
881
|
+
return this.offers.createOfferFulfillmentActions(request);
|
|
786
882
|
}
|
|
787
883
|
/**
|
|
788
884
|
* Build a deploy-contract transaction for a new drop.
|
|
885
|
+
* @deprecated Use `api.drops.deployDropContract()`. Removed in the next major.
|
|
789
886
|
*/
|
|
790
887
|
async deployDropContract(request) {
|
|
791
|
-
return this.
|
|
888
|
+
return this.drops.deployDropContract(request);
|
|
792
889
|
}
|
|
793
890
|
/**
|
|
794
891
|
* Get the receipt of a previously submitted drop-deploy transaction.
|
|
892
|
+
* @deprecated Use `api.drops.getDeployReceipt()`. Removed in the next major.
|
|
795
893
|
*/
|
|
796
894
|
async getDeployContractReceipt(chain, txHash) {
|
|
797
|
-
return this.
|
|
895
|
+
return this.drops.getDeployReceipt(chain, txHash);
|
|
798
896
|
}
|
|
799
897
|
/**
|
|
800
898
|
* Build transactions to transfer NFTs or tokens between wallets.
|
|
899
|
+
* @deprecated Use `api.assets.transferAssets()`. Removed in the next major.
|
|
801
900
|
*/
|
|
802
901
|
async transferAssets(request) {
|
|
803
|
-
return this.
|
|
902
|
+
return this.assets.transferAssets(request);
|
|
804
903
|
}
|
|
805
904
|
/**
|
|
806
905
|
* Get portfolio stats (net worth, P&L) for an account.
|
|
906
|
+
* @deprecated Use `api.accounts.getPortfolioStats()`. Removed in the next major.
|
|
807
907
|
*/
|
|
808
908
|
async getPortfolioStats(address, args) {
|
|
809
|
-
return this.
|
|
909
|
+
return this.accounts.getPortfolioStats(address, args);
|
|
810
910
|
}
|
|
811
911
|
/**
|
|
812
912
|
* Get portfolio net-worth history for an account.
|
|
913
|
+
* @deprecated Use `api.accounts.getPortfolioHistory()`. Removed in the next major.
|
|
813
914
|
*/
|
|
814
915
|
async getPortfolioHistory(address, args) {
|
|
815
|
-
return this.
|
|
916
|
+
return this.accounts.getPortfolioHistory(address, args);
|
|
816
917
|
}
|
|
817
918
|
/**
|
|
818
919
|
* Get offers received by an account.
|
|
920
|
+
* @deprecated Use `api.accounts.getProfileOffersReceived()`. Removed in the next major.
|
|
819
921
|
*/
|
|
820
922
|
async getProfileOffersReceived(address, args) {
|
|
821
|
-
return this.
|
|
923
|
+
return this.accounts.getProfileOffersReceived(address, args);
|
|
822
924
|
}
|
|
823
925
|
/**
|
|
824
926
|
* Get active offers made by an account.
|
|
927
|
+
* @deprecated Use `api.accounts.getProfileOffers()`. Removed in the next major.
|
|
825
928
|
*/
|
|
826
929
|
async getProfileOffers(address, args) {
|
|
827
|
-
return this.
|
|
930
|
+
return this.accounts.getProfileOffers(address, args);
|
|
828
931
|
}
|
|
829
932
|
/**
|
|
830
933
|
* Get active listings for an account.
|
|
934
|
+
* @deprecated Use `api.accounts.getProfileListings()`. Removed in the next major.
|
|
831
935
|
*/
|
|
832
936
|
async getProfileListings(address, args) {
|
|
833
|
-
return this.
|
|
937
|
+
return this.accounts.getProfileListings(address, args);
|
|
834
938
|
}
|
|
835
939
|
/**
|
|
836
940
|
* Get items favorited by an account.
|
|
941
|
+
* @deprecated Use `api.accounts.getProfileFavorites()`. Removed in the next major.
|
|
837
942
|
*/
|
|
838
943
|
async getProfileFavorites(address, args) {
|
|
839
|
-
return this.
|
|
944
|
+
return this.accounts.getProfileFavorites(address, args);
|
|
840
945
|
}
|
|
841
946
|
/**
|
|
842
947
|
* Get collections owned by an account.
|
|
948
|
+
* @deprecated Use `api.accounts.getProfileCollections()`. Removed in the next major.
|
|
843
949
|
*/
|
|
844
950
|
async getProfileCollections(address, args) {
|
|
845
|
-
return this.
|
|
951
|
+
return this.accounts.getProfileCollections(address, args);
|
|
846
952
|
}
|
|
847
953
|
/**
|
|
848
954
|
* Get aggregated trading P&L (realized + unrealized) for an account.
|
|
955
|
+
* @deprecated Use `api.accounts.getWalletPnl()`. Removed in the next major.
|
|
849
956
|
*/
|
|
850
957
|
async getWalletPnl(address) {
|
|
851
|
-
return this.
|
|
958
|
+
return this.accounts.getWalletPnl(address);
|
|
852
959
|
}
|
|
853
960
|
/**
|
|
854
961
|
* Get closed (realized) trading positions for an account.
|
|
962
|
+
* @deprecated Use `api.accounts.getWalletClosedPositions()`. Removed in the next major.
|
|
855
963
|
*/
|
|
856
964
|
async getWalletClosedPositions(address, args) {
|
|
857
|
-
return this.
|
|
965
|
+
return this.accounts.getWalletClosedPositions(address, args);
|
|
858
966
|
}
|
|
859
967
|
/**
|
|
860
968
|
* Get the token transfers contributing to a wallet's position in a currency.
|
|
969
|
+
* @deprecated Use `api.accounts.getWalletTokenTransfers()`. Removed in the next major.
|
|
861
970
|
*/
|
|
862
971
|
async getWalletTokenTransfers(address, args) {
|
|
863
|
-
return this.
|
|
972
|
+
return this.accounts.getWalletTokenTransfers(address, args);
|
|
864
973
|
}
|
|
865
974
|
/**
|
|
866
975
|
* Generic fetch method for any API endpoint with automatic rate limit retry
|