@opensea/sdk 12.3.0 → 12.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/api/api.ts CHANGED
@@ -141,6 +141,7 @@ import {
141
141
  type TokenSwapActivityPaginatedResponse,
142
142
  type TokenTimeSeriesArgs,
143
143
  type TraitFilter,
144
+ type TraitFloorsResponse,
144
145
  type TransactionReceiptRequest,
145
146
  type TransactionReceiptResponse,
146
147
  type TransferRequest,
@@ -176,23 +177,32 @@ export class OpenSeaAPI {
176
177
  private readonly fetchImpl: typeof globalThis.fetch
177
178
  private chain: Chain
178
179
 
179
- // Specialized API clients
180
- private ordersAPI: OrdersAPI
181
- private offersAPI: OffersAPI
182
- private listingsAPI: ListingsAPI
183
- private collectionsAPI: CollectionsAPI
184
- private nftsAPI: NFTsAPI
185
- private accountsAPI: AccountsAPI
186
- private eventsAPI: EventsAPI
187
- private searchAPI: SearchAPI
188
- private tokensAPI: TokensAPI
189
- private chainsAPI: ChainsAPI
190
- private dropsAPI: DropsAPI
191
- private transactionsAPI: TransactionsAPI
192
- private assetsAPI: AssetsAPI
180
+ /**
181
+ * Per-domain clients. Prefer these over the flat `getCollection` / `getTraits` style methods on
182
+ * this class, which are deprecated and will be removed in the next major.
183
+ *
184
+ * `search` is absent because `SearchAPI` holds a single method also called `search`, so the
185
+ * property and the existing `search()` method want the same name and only one can be added
186
+ * without a break. Call it as `api.search(args)`.
187
+ */
188
+ public readonly orders: OrdersAPI
189
+ public readonly offers: OffersAPI
190
+ public readonly listings: ListingsAPI
191
+ public readonly collections: CollectionsAPI
192
+ public readonly nfts: NFTsAPI
193
+ public readonly accounts: AccountsAPI
194
+ public readonly events: EventsAPI
195
+ public readonly tokens: TokensAPI
196
+ public readonly chains: ChainsAPI
197
+ public readonly drops: DropsAPI
198
+ public readonly transactions: TransactionsAPI
199
+ public readonly assets: AssetsAPI
193
200
  /** Wallet-authenticated scoped REST helpers. */
194
201
  public readonly walletAuth: WalletAuthAPI
195
202
 
203
+ /** See the note above: this one stays private, and `api.search(args)` is the call. */
204
+ private searchAPI: SearchAPI
205
+
196
206
  /**
197
207
  * Create an instance of the OpenSeaAPI
198
208
  * @param config OpenSeaAPIConfig for setting up the API, including an optional API key, Chain name, and base URL
@@ -224,19 +234,19 @@ export class OpenSeaAPI {
224
234
  }
225
235
 
226
236
  // Initialize specialized API clients
227
- this.ordersAPI = new OrdersAPI(fetcher, this.chain)
228
- this.offersAPI = new OffersAPI(fetcher, this.chain)
229
- this.listingsAPI = new ListingsAPI(fetcher)
230
- this.collectionsAPI = new CollectionsAPI(fetcher)
231
- this.nftsAPI = new NFTsAPI(fetcher, this.chain)
232
- this.accountsAPI = new AccountsAPI(fetcher, this.chain)
233
- this.eventsAPI = new EventsAPI(fetcher)
237
+ this.orders = new OrdersAPI(fetcher, this.chain)
238
+ this.offers = new OffersAPI(fetcher, this.chain)
239
+ this.listings = new ListingsAPI(fetcher)
240
+ this.collections = new CollectionsAPI(fetcher)
241
+ this.nfts = new NFTsAPI(fetcher, this.chain)
242
+ this.accounts = new AccountsAPI(fetcher, this.chain)
243
+ this.events = new EventsAPI(fetcher)
234
244
  this.searchAPI = new SearchAPI(fetcher)
235
- this.tokensAPI = new TokensAPI(fetcher)
236
- this.chainsAPI = new ChainsAPI(fetcher)
237
- this.dropsAPI = new DropsAPI(fetcher)
238
- this.transactionsAPI = new TransactionsAPI(fetcher)
239
- this.assetsAPI = new AssetsAPI(fetcher)
245
+ this.tokens = new TokensAPI(fetcher)
246
+ this.chains = new ChainsAPI(fetcher)
247
+ this.drops = new DropsAPI(fetcher)
248
+ this.transactions = new TransactionsAPI(fetcher)
249
+ this.assets = new AssetsAPI(fetcher)
240
250
  this.walletAuth = new WalletAuthAPI(fetcher)
241
251
  }
242
252
 
@@ -247,13 +257,14 @@ export class OpenSeaAPI {
247
257
  * @param chain The chain where the order is located. Defaults to the chain set in the constructor.
248
258
  * @returns The {@link GetOrderByHashResponse} returned by the API (can be Offer or Listing)
249
259
  * @throws An error if the order is not found
260
+ * @deprecated Use `api.orders.getOrderByHash()`. Removed in the next major.
250
261
  */
251
262
  public async getOrderByHash(
252
263
  orderHash: string,
253
264
  protocolAddress: string,
254
265
  chain: Chain = this.chain,
255
266
  ): Promise<GetOrderByHashResponse> {
256
- return this.ordersAPI.getOrderByHash(orderHash, protocolAddress, chain)
267
+ return this.orders.getOrderByHash(orderHash, protocolAddress, chain)
257
268
  }
258
269
 
259
270
  /**
@@ -262,13 +273,14 @@ export class OpenSeaAPI {
262
273
  * @param limit The number of offers to return. Must be between 1 and 100. Default: 100
263
274
  * @param next The cursor for the next page of results. This is returned from a previous request.
264
275
  * @returns The {@link GetOffersResponse} returned by the API.
276
+ * @deprecated Use `api.offers.getAllOffers()`. Removed in the next major.
265
277
  */
266
278
  public async getAllOffers(
267
279
  collectionSlug: string,
268
280
  limit?: number,
269
281
  next?: string,
270
282
  ): Promise<GetOffersResponse> {
271
- return this.offersAPI.getAllOffers(collectionSlug, limit, next)
283
+ return this.offers.getAllOffers(collectionSlug, limit, next)
272
284
  }
273
285
 
274
286
  /**
@@ -278,6 +290,7 @@ export class OpenSeaAPI {
278
290
  * @param next The cursor for the next page of results. This is returned from a previous request.
279
291
  * @param includePrivateListings Whether to include private listings (default: false)
280
292
  * @returns The {@link GetListingsResponse} returned by the API.
293
+ * @deprecated Use `api.listings.getAllListings()`. Removed in the next major.
281
294
  */
282
295
  public async getAllListings(
283
296
  collectionSlug: string,
@@ -285,7 +298,7 @@ export class OpenSeaAPI {
285
298
  next?: string,
286
299
  includePrivateListings?: boolean,
287
300
  ): Promise<GetListingsResponse> {
288
- return this.listingsAPI.getAllListings(
301
+ return this.listings.getAllListings(
289
302
  collectionSlug,
290
303
  limit,
291
304
  next,
@@ -303,6 +316,7 @@ export class OpenSeaAPI {
303
316
  * @param floatValue The value of the trait for decimal-based numeric traits.
304
317
  * @param intValue The value of the trait for integer-based numeric traits.
305
318
  * @returns The {@link GetOffersResponse} returned by the API.
319
+ * @deprecated Use `api.offers.getTraitOffers()`. Removed in the next major.
306
320
  */
307
321
  public async getTraitOffers(
308
322
  collectionSlug: string,
@@ -313,7 +327,7 @@ export class OpenSeaAPI {
313
327
  floatValue?: number,
314
328
  intValue?: number,
315
329
  ): Promise<GetOffersResponse> {
316
- return this.offersAPI.getTraitOffers(
330
+ return this.offers.getTraitOffers(
317
331
  collectionSlug,
318
332
  type,
319
333
  value,
@@ -329,12 +343,13 @@ export class OpenSeaAPI {
329
343
  * @param collectionSlug The slug of the collection.
330
344
  * @param tokenId The token identifier.
331
345
  * @returns The {@link GetBestOfferResponse} returned by the API.
346
+ * @deprecated Use `api.offers.getBestOffer()`. Removed in the next major.
332
347
  */
333
348
  public async getBestOffer(
334
349
  collectionSlug: string,
335
350
  tokenId: string | number,
336
351
  ): Promise<GetBestOfferResponse> {
337
- return this.offersAPI.getBestOffer(collectionSlug, tokenId)
352
+ return this.offers.getBestOffer(collectionSlug, tokenId)
338
353
  }
339
354
 
340
355
  /**
@@ -343,13 +358,14 @@ export class OpenSeaAPI {
343
358
  * @param tokenId The token identifier.
344
359
  * @param includePrivateListings Whether to include private listings (default: false)
345
360
  * @returns The {@link GetBestListingResponse} returned by the API.
361
+ * @deprecated Use `api.listings.getBestListing()`. Removed in the next major.
346
362
  */
347
363
  public async getBestListing(
348
364
  collectionSlug: string,
349
365
  tokenId: string | number,
350
366
  includePrivateListings?: boolean,
351
367
  ): Promise<GetBestListingResponse> {
352
- return this.listingsAPI.getBestListing(
368
+ return this.listings.getBestListing(
353
369
  collectionSlug,
354
370
  tokenId,
355
371
  includePrivateListings,
@@ -364,6 +380,7 @@ export class OpenSeaAPI {
364
380
  * @param includePrivateListings Whether to include private listings (default: false)
365
381
  * @param traits Optional {@link TraitFilter} array. Returns 400 if a single trait matches more than 1000 items.
366
382
  * @returns The {@link GetListingsResponse} returned by the API.
383
+ * @deprecated Use `api.listings.getBestListings()`. Removed in the next major.
367
384
  */
368
385
  public async getBestListings(
369
386
  collectionSlug: string,
@@ -372,7 +389,7 @@ export class OpenSeaAPI {
372
389
  includePrivateListings?: boolean,
373
390
  traits?: TraitFilter[],
374
391
  ): Promise<GetListingsResponse> {
375
- return this.listingsAPI.getBestListings(
392
+ return this.listings.getBestListings(
376
393
  collectionSlug,
377
394
  limit,
378
395
  next,
@@ -387,11 +404,12 @@ export class OpenSeaAPI {
387
404
  * All listings must be EVM (Seaport orders). Payment can be from any chain (EVM or SVM).
388
405
  * @param request The cross-chain fulfillment request containing listings, fulfiller, payment, and optional recipient
389
406
  * @returns The {@link CrossChainFulfillmentResponse} with ordered transactions to sign and submit
407
+ * @deprecated Use `api.listings.getCrossChainFulfillmentData()`. Removed in the next major.
390
408
  */
391
409
  public async getCrossChainFulfillmentData(
392
410
  request: CrossChainFulfillmentRequest,
393
411
  ): Promise<CrossChainFulfillmentResponse> {
394
- return this.listingsAPI.getCrossChainFulfillmentData(request)
412
+ return this.listings.getCrossChainFulfillmentData(request)
395
413
  }
396
414
 
397
415
  /**
@@ -406,6 +424,7 @@ export class OpenSeaAPI {
406
424
  * @param recipientAddress Optional recipient address for the NFT when fulfilling a listing. Not applicable for offers.
407
425
  * @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.
408
426
  * @returns The {@link FulfillmentDataResponse}
427
+ * @deprecated Use `api.orders.generateFulfillmentData()`. Removed in the next major.
409
428
  */
410
429
  public async generateFulfillmentData(
411
430
  fulfillerAddress: string,
@@ -418,7 +437,7 @@ export class OpenSeaAPI {
418
437
  recipientAddress?: string,
419
438
  includeOptionalCreatorFees: boolean = false,
420
439
  ): Promise<Camelize<FulfillmentDataResponse>> {
421
- return this.ordersAPI.generateFulfillmentData(
440
+ return this.orders.generateFulfillmentData(
422
441
  fulfillerAddress,
423
442
  orderHash,
424
443
  protocolAddress,
@@ -436,12 +455,13 @@ export class OpenSeaAPI {
436
455
  * @param order The order to post
437
456
  * @param protocolAddress The contract address of the seaport protocol
438
457
  * @returns The {@link Listing} posted to the API.
458
+ * @deprecated Use `api.orders.postListing()`. Removed in the next major.
439
459
  */
440
460
  public async postListing(
441
461
  order: ProtocolData,
442
462
  protocolAddress: string,
443
463
  ): Promise<Listing> {
444
- return this.ordersAPI.postListing(order, protocolAddress)
464
+ return this.orders.postListing(order, protocolAddress)
445
465
  }
446
466
 
447
467
  /**
@@ -449,12 +469,13 @@ export class OpenSeaAPI {
449
469
  * @param order The order to post
450
470
  * @param protocolAddress The contract address of the seaport protocol
451
471
  * @returns The {@link Offer} posted to the API.
472
+ * @deprecated Use `api.orders.postOffer()`. Removed in the next major.
452
473
  */
453
474
  public async postOffer(
454
475
  order: ProtocolData,
455
476
  protocolAddress: string,
456
477
  ): Promise<Offer> {
457
- return this.ordersAPI.postOffer(order, protocolAddress)
478
+ return this.orders.postOffer(order, protocolAddress)
458
479
  }
459
480
 
460
481
  /**
@@ -468,6 +489,7 @@ export class OpenSeaAPI {
468
489
  * @param traits If defined, an array of traits to create the multi-trait collection offer for.
469
490
  * @param numericTraits If defined, an array of numeric trait criteria with min/max ranges.
470
491
  * @returns The {@link BuildOfferResponse} returned by the API.
492
+ * @deprecated Use `api.offers.buildOffer()`. Removed in the next major.
471
493
  */
472
494
  public async buildOffer(
473
495
  offererAddress: string,
@@ -479,7 +501,7 @@ export class OpenSeaAPI {
479
501
  traits?: Array<{ type: string; value: string }>,
480
502
  numericTraits?: Array<{ type: string; min?: number; max?: number }>,
481
503
  ): Promise<BuildOfferResponse> {
482
- return this.offersAPI.buildOffer(
504
+ return this.offers.buildOffer(
483
505
  offererAddress,
484
506
  quantity,
485
507
  collectionSlug,
@@ -497,13 +519,14 @@ export class OpenSeaAPI {
497
519
  * @param limit Optional limit for number of results.
498
520
  * @param next Optional cursor for pagination.
499
521
  * @returns The {@link GetOffersResponse} returned by the API.
522
+ * @deprecated Use `api.offers.getCollectionOffers()`. Removed in the next major.
500
523
  */
501
524
  public async getCollectionOffers(
502
525
  slug: string,
503
526
  limit?: number,
504
527
  next?: string,
505
528
  ): Promise<GetOffersResponse> {
506
- return this.offersAPI.getCollectionOffers(slug, limit, next)
529
+ return this.offers.getCollectionOffers(slug, limit, next)
507
530
  }
508
531
 
509
532
  /**
@@ -515,6 +538,7 @@ export class OpenSeaAPI {
515
538
  * @param traits If defined, an array of traits to create the multi-trait collection offer for.
516
539
  * @param numericTraits If defined, an array of numeric trait criteria with min/max ranges.
517
540
  * @returns The {@link Offer} returned to the API.
541
+ * @deprecated Use `api.offers.postCollectionOffer()`. Removed in the next major.
518
542
  */
519
543
  public async postCollectionOffer(
520
544
  order: ProtocolData,
@@ -524,7 +548,7 @@ export class OpenSeaAPI {
524
548
  traits?: Array<{ type: string; value: string }>,
525
549
  numericTraits?: Array<{ type: string; min?: number; max?: number }>,
526
550
  ): Promise<CollectionOffer | null> {
527
- return this.offersAPI.postCollectionOffer(
551
+ return this.offers.postCollectionOffer(
528
552
  order,
529
553
  slug,
530
554
  traitType,
@@ -541,6 +565,7 @@ export class OpenSeaAPI {
541
565
  * @param next Cursor to retrieve the next page of NFTs
542
566
  * @param traits Optional {@link TraitFilter} array. Returns 400 if a single trait matches more than 1000 items.
543
567
  * @returns The {@link ListNFTsResponse} returned by the API.
568
+ * @deprecated Use `api.nfts.getNFTsByCollection()`. Removed in the next major.
544
569
  */
545
570
  public async getNFTsByCollection(
546
571
  slug: string,
@@ -548,7 +573,7 @@ export class OpenSeaAPI {
548
573
  next: string | undefined = undefined,
549
574
  traits: TraitFilter[] | undefined = undefined,
550
575
  ): Promise<ListNFTsResponse> {
551
- return this.nftsAPI.getNFTsByCollection(slug, limit, next, traits)
576
+ return this.nfts.getNFTsByCollection(slug, limit, next, traits)
552
577
  }
553
578
 
554
579
  /**
@@ -558,6 +583,7 @@ export class OpenSeaAPI {
558
583
  * @param next Cursor to retrieve the next page of NFTs.
559
584
  * @param chain The NFT's chain.
560
585
  * @returns The {@link ListNFTsResponse} returned by the API.
586
+ * @deprecated Use `api.nfts.getNFTsByContract()`. Removed in the next major.
561
587
  */
562
588
  public async getNFTsByContract(
563
589
  address: string,
@@ -565,7 +591,7 @@ export class OpenSeaAPI {
565
591
  next: string | undefined = undefined,
566
592
  chain: Chain = this.chain,
567
593
  ): Promise<ListNFTsResponse> {
568
- return this.nftsAPI.getNFTsByContract(address, limit, next, chain)
594
+ return this.nfts.getNFTsByContract(address, limit, next, chain)
569
595
  }
570
596
 
571
597
  /**
@@ -575,6 +601,7 @@ export class OpenSeaAPI {
575
601
  * @param next Cursor to retrieve the next page of NFTs
576
602
  * @param chain The chain to query. Defaults to the chain set in the constructor.
577
603
  * @returns The {@link ListNFTsResponse} returned by the API.
604
+ * @deprecated Use `api.nfts.getNFTsByAccount()`. Removed in the next major.
578
605
  */
579
606
  public async getNFTsByAccount(
580
607
  address: string,
@@ -582,7 +609,7 @@ export class OpenSeaAPI {
582
609
  next: string | undefined = undefined,
583
610
  chain = this.chain,
584
611
  ): Promise<ListNFTsResponse> {
585
- return this.nftsAPI.getNFTsByAccount(address, limit, next, chain)
612
+ return this.nfts.getNFTsByAccount(address, limit, next, chain)
586
613
  }
587
614
 
588
615
  /**
@@ -591,22 +618,24 @@ export class OpenSeaAPI {
591
618
  * @param identifier the identifier of the NFT (i.e. Token ID)
592
619
  * @param chain The NFT's chain.
593
620
  * @returns The {@link GetNFTResponse} returned by the API.
621
+ * @deprecated Use `api.nfts.getNFT()`. Removed in the next major.
594
622
  */
595
623
  public async getNFT(
596
624
  address: string,
597
625
  identifier: string,
598
626
  chain = this.chain,
599
627
  ): Promise<GetNFTResponse> {
600
- return this.nftsAPI.getNFT(address, identifier, chain)
628
+ return this.nfts.getNFT(address, identifier, chain)
601
629
  }
602
630
 
603
631
  /**
604
632
  * Fetch an OpenSea collection.
605
633
  * @param slug The slug (identifier) of the collection.
606
634
  * @returns The {@link OpenSeaCollection} returned by the API.
635
+ * @deprecated Use `api.collections.getCollection()`. Removed in the next major.
607
636
  */
608
637
  public async getCollection(slug: string): Promise<OpenSeaCollection> {
609
- return this.collectionsAPI.getCollection(slug)
638
+ return this.collections.getCollection(slug)
610
639
  }
611
640
 
612
641
  /**
@@ -618,6 +647,7 @@ export class OpenSeaAPI {
618
647
  * @param limit The limit of collections to return.
619
648
  * @param next The cursor for the next page of results. This is returned from a previous request.
620
649
  * @returns List of {@link OpenSeaCollection} returned by the API.
650
+ * @deprecated Use `api.collections.getCollections()`. Removed in the next major.
621
651
  */
622
652
  public async getCollections(
623
653
  orderBy: CollectionOrderByOption = CollectionOrderByOption.CREATED_DATE,
@@ -627,7 +657,7 @@ export class OpenSeaAPI {
627
657
  limit?: number,
628
658
  next?: string,
629
659
  ): Promise<GetCollectionsResponse> {
630
- return this.collectionsAPI.getCollections(
660
+ return this.collections.getCollections(
631
661
  orderBy,
632
662
  chain,
633
663
  creatorUsername,
@@ -641,11 +671,12 @@ export class OpenSeaAPI {
641
671
  * Fetch stats for an OpenSea collection.
642
672
  * @param slug The slug (identifier) of the collection.
643
673
  * @returns The {@link OpenSeaCollection} returned by the API.
674
+ * @deprecated Use `api.collections.getCollectionStats()`. Removed in the next major.
644
675
  */
645
676
  public async getCollectionStats(
646
677
  slug: string,
647
678
  ): Promise<OpenSeaCollectionStats> {
648
- return this.collectionsAPI.getCollectionStats(slug)
679
+ return this.collections.getCollectionStats(slug)
649
680
  }
650
681
 
651
682
  /**
@@ -653,21 +684,23 @@ export class OpenSeaAPI {
653
684
  * @param address The address of the payment token
654
685
  * @param chain The chain of the payment token
655
686
  * @returns The {@link OpenSeaPaymentToken} returned by the API.
687
+ * @deprecated Use `api.accounts.getPaymentToken()`. Removed in the next major.
656
688
  */
657
689
  public async getPaymentToken(
658
690
  address: string,
659
691
  chain = this.chain,
660
692
  ): Promise<OpenSeaPaymentToken> {
661
- return this.accountsAPI.getPaymentToken(address, chain)
693
+ return this.accounts.getPaymentToken(address, chain)
662
694
  }
663
695
 
664
696
  /**
665
697
  * Fetch account for an address.
666
698
  * @param address The address to fetch the account for
667
699
  * @returns The {@link OpenSeaAccount} returned by the API.
700
+ * @deprecated Use `api.accounts.getAccount()`. Removed in the next major.
668
701
  */
669
702
  public async getAccount(address: string): Promise<OpenSeaAccount> {
670
- return this.accountsAPI.getAccount(address)
703
+ return this.accounts.getAccount(address)
671
704
  }
672
705
 
673
706
  /**
@@ -676,13 +709,14 @@ export class OpenSeaAPI {
676
709
  * @param identifier The identifier of the NFT.
677
710
  * @param chain The chain where the NFT is located.
678
711
  * @returns The response from the API.
712
+ * @deprecated Use `api.nfts.refreshNFTMetadata()`. Removed in the next major.
679
713
  */
680
714
  public async refreshNFTMetadata(
681
715
  address: string,
682
716
  identifier: string,
683
717
  chain: Chain = this.chain,
684
718
  ): Promise<Record<string, unknown>> {
685
- return this.nftsAPI.refreshNFTMetadata(address, identifier, chain)
719
+ return this.nfts.refreshNFTMetadata(address, identifier, chain)
686
720
  }
687
721
 
688
722
  /**
@@ -698,6 +732,7 @@ export class OpenSeaAPI {
698
732
  * name, version, address, and chain. The struct to sign is `OrderHash` containing a
699
733
  * single bytes32 field.
700
734
  * @returns The response from the API.
735
+ * @deprecated Use `api.orders.offchainCancelOrder()`. Removed in the next major.
701
736
  */
702
737
  public async offchainCancelOrder(
703
738
  protocolAddress: string,
@@ -705,7 +740,7 @@ export class OpenSeaAPI {
705
740
  chain: Chain = this.chain,
706
741
  offererSignature?: string,
707
742
  ): Promise<CancelOrderResponse> {
708
- return this.ordersAPI.offchainCancelOrder(
743
+ return this.orders.offchainCancelOrder(
709
744
  protocolAddress,
710
745
  orderHash,
711
746
  chain,
@@ -715,6 +750,7 @@ export class OpenSeaAPI {
715
750
 
716
751
  /**
717
752
  * Get ordered actions to cancel an order onchain.
753
+ * @deprecated Use `api.orders.createCancelOrderActions()`. Removed in the next major.
718
754
  */
719
755
  public async createCancelOrderActions(
720
756
  protocolAddress: string,
@@ -722,7 +758,7 @@ export class OpenSeaAPI {
722
758
  request: CreateCancelOrderActionsRequest,
723
759
  chain: Chain = this.chain,
724
760
  ): Promise<CreateCancelOrderActionsResponse> {
725
- return this.ordersAPI.createCancelOrderActions(
761
+ return this.orders.createCancelOrderActions(
726
762
  protocolAddress,
727
763
  orderIdentifier,
728
764
  request,
@@ -734,9 +770,10 @@ export class OpenSeaAPI {
734
770
  * Gets a list of events based on query parameters.
735
771
  * @param args Query parameters for filtering events.
736
772
  * @returns The {@link GetEventsResponse} returned by the API.
773
+ * @deprecated Use `api.events.getEvents()`. Removed in the next major.
737
774
  */
738
775
  public async getEvents(args?: GetEventsArgs): Promise<GetEventsResponse> {
739
- return this.eventsAPI.getEvents(args)
776
+ return this.events.getEvents(args)
740
777
  }
741
778
 
742
779
  /**
@@ -744,12 +781,13 @@ export class OpenSeaAPI {
744
781
  * @param address The account address.
745
782
  * @param args Query parameters for filtering events.
746
783
  * @returns The {@link GetEventsResponse} returned by the API.
784
+ * @deprecated Use `api.events.getEventsByAccount()`. Removed in the next major.
747
785
  */
748
786
  public async getEventsByAccount(
749
787
  address: string,
750
788
  args?: GetEventsArgs,
751
789
  ): Promise<GetEventsResponse> {
752
- return this.eventsAPI.getEventsByAccount(address, args)
790
+ return this.events.getEventsByAccount(address, args)
753
791
  }
754
792
 
755
793
  /**
@@ -758,12 +796,13 @@ export class OpenSeaAPI {
758
796
  * @param collectionSlug The slug (identifier) of the collection.
759
797
  * @param args Query parameters; see {@link GetEventsByCollectionArgs}.
760
798
  * @returns The {@link GetEventsResponse} returned by the API.
799
+ * @deprecated Use `api.events.getEventsByCollection()`. Removed in the next major.
761
800
  */
762
801
  public async getEventsByCollection(
763
802
  collectionSlug: string,
764
803
  args?: GetEventsByCollectionArgs,
765
804
  ): Promise<GetEventsResponse> {
766
- return this.eventsAPI.getEventsByCollection(collectionSlug, args)
805
+ return this.events.getEventsByCollection(collectionSlug, args)
767
806
  }
768
807
 
769
808
  /**
@@ -773,6 +812,7 @@ export class OpenSeaAPI {
773
812
  * @param identifier The token identifier.
774
813
  * @param args Query parameters for filtering events.
775
814
  * @returns The {@link GetEventsResponse} returned by the API.
815
+ * @deprecated Use `api.events.getEventsByNFT()`. Removed in the next major.
776
816
  */
777
817
  public async getEventsByNFT(
778
818
  chain: Chain,
@@ -780,7 +820,7 @@ export class OpenSeaAPI {
780
820
  identifier: string,
781
821
  args?: GetEventsArgs,
782
822
  ): Promise<GetEventsResponse> {
783
- return this.eventsAPI.getEventsByNFT(chain, address, identifier, args)
823
+ return this.events.getEventsByNFT(chain, address, identifier, args)
784
824
  }
785
825
 
786
826
  /**
@@ -788,54 +828,76 @@ export class OpenSeaAPI {
788
828
  * @param address The contract address.
789
829
  * @param chain The chain where the contract is deployed. Defaults to the chain set in the constructor.
790
830
  * @returns The {@link GetContractResponse} returned by the API.
831
+ * @deprecated Use `api.nfts.getContract()`. Removed in the next major.
791
832
  */
792
833
  public async getContract(
793
834
  address: string,
794
835
  chain: Chain = this.chain,
795
836
  ): Promise<GetContractResponse> {
796
- return this.nftsAPI.getContract(address, chain)
837
+ return this.nfts.getContract(address, chain)
797
838
  }
798
839
 
799
840
  /**
800
841
  * Fetch all traits for a collection with their possible values and counts.
801
842
  * @param collectionSlug The slug (identifier) of the collection.
802
843
  * @returns The {@link GetTraitsResponse} returned by the API.
844
+ * @deprecated Use `api.collections.getTraits()`. Removed in the next major.
803
845
  */
804
846
  public async getTraits(collectionSlug: string): Promise<GetTraitsResponse> {
805
- return this.collectionsAPI.getTraits(collectionSlug)
847
+ return this.collections.getTraits(collectionSlug)
848
+ }
849
+
850
+ /**
851
+ * Fetch floor prices per trait value for a collection.
852
+ *
853
+ * Covers text traits with at least one active listing, ordered by trait type, then value, then
854
+ * price. Numeric traits are not enumerated here; use {@link getTraits} for their min/max range.
855
+ * Every floor is denominated on the collection's own chain, identified by `chain` plus each
856
+ * entry's `paymentTokenSymbol`.
857
+ * @param collectionSlug The slug (identifier) of the collection.
858
+ * @returns The {@link TraitFloorsResponse} returned by the API.
859
+ * @deprecated Use `api.collections.getCollectionTraitFloors()`. Removed in the next major.
860
+ */
861
+ public async getCollectionTraitFloors(
862
+ collectionSlug: string,
863
+ ): Promise<TraitFloorsResponse> {
864
+ return this.collections.getCollectionTraitFloors(collectionSlug)
806
865
  }
807
866
 
808
867
  /**
809
868
  * Gets a list of trending tokens.
810
869
  * @param args Optional query parameters for pagination.
811
870
  * @returns The {@link GetTrendingTokensResponse} returned by the API.
871
+ * @deprecated Use `api.tokens.getTrendingTokens()`. Removed in the next major.
812
872
  */
813
873
  public async getTrendingTokens(
814
874
  args?: GetTokensArgs,
815
875
  ): Promise<GetTrendingTokensResponse> {
816
- return this.tokensAPI.getTrendingTokens(args)
876
+ return this.tokens.getTrendingTokens(args)
817
877
  }
818
878
 
819
879
  /**
820
880
  * Gets a list of top tokens.
821
881
  * @param args Optional query parameters for pagination.
822
882
  * @returns The {@link GetTopTokensResponse} returned by the API.
883
+ * @deprecated Use `api.tokens.getTopTokens()`. Removed in the next major.
823
884
  */
824
885
  public async getTopTokens(
825
886
  args?: GetTokensArgs,
826
887
  ): Promise<GetTopTokensResponse> {
827
- return this.tokensAPI.getTopTokens(args)
888
+ return this.tokens.getTopTokens(args)
828
889
  }
829
890
 
830
891
  /**
831
892
  * Gets a swap quote for exchanging tokens.
832
893
  * @param args Query parameters for the swap quote including token addresses, amount, and chain.
833
894
  * @returns The {@link GetSwapQuoteResponse} returned by the API.
895
+ * @deprecated Use `api.tokens.getSwapQuote()`. Removed in the next major.
834
896
  */
835
897
  public async getSwapQuote(
836
898
  args: GetSwapQuoteArgs,
837
899
  ): Promise<GetSwapQuoteResponse> {
838
- return this.tokensAPI.getSwapQuote(args)
900
+ return this.tokens.getSwapQuote(args)
839
901
  }
840
902
 
841
903
  /**
@@ -843,12 +905,13 @@ export class OpenSeaAPI {
843
905
  * @param chain The chain the token is on.
844
906
  * @param address The token contract address.
845
907
  * @returns The {@link GetTokenResponse} returned by the API.
908
+ * @deprecated Use `api.tokens.getToken()`. Removed in the next major.
846
909
  */
847
910
  public async getToken(
848
911
  chain: string,
849
912
  address: string,
850
913
  ): Promise<GetTokenResponse> {
851
- return this.tokensAPI.getToken(chain, address)
914
+ return this.tokens.getToken(chain, address)
852
915
  }
853
916
 
854
917
  /**
@@ -856,20 +919,22 @@ export class OpenSeaAPI {
856
919
  * chains (e.g. ETH on Ethereum, Base, and Arbitrum share the "eth" group).
857
920
  * @param args Optional query parameters (`limit`, `cursor`).
858
921
  * @returns The {@link GetTokenGroupsResponse} returned by the API.
922
+ * @deprecated Use `api.tokens.getTokenGroups()`. Removed in the next major.
859
923
  */
860
924
  public async getTokenGroups(
861
925
  args?: GetTokenGroupsArgs,
862
926
  ): Promise<GetTokenGroupsResponse> {
863
- return this.tokensAPI.getTokenGroups(args)
927
+ return this.tokens.getTokenGroups(args)
864
928
  }
865
929
 
866
930
  /**
867
931
  * Gets a single token group by its slug (e.g. "eth").
868
932
  * @param slug The token group slug.
869
933
  * @returns The {@link GetTokenGroupResponse} returned by the API.
934
+ * @deprecated Use `api.tokens.getTokenGroup()`. Removed in the next major.
870
935
  */
871
936
  public async getTokenGroup(slug: string): Promise<GetTokenGroupResponse> {
872
- return this.tokensAPI.getTokenGroup(slug)
937
+ return this.tokens.getTokenGroup(slug)
873
938
  }
874
939
 
875
940
  /**
@@ -885,9 +950,10 @@ export class OpenSeaAPI {
885
950
  /**
886
951
  * Gets the list of supported blockchains and their capabilities.
887
952
  * @returns The {@link GetChainsResponse} returned by the API.
953
+ * @deprecated Use `api.chains.getChains()`. Removed in the next major.
888
954
  */
889
955
  public async getChains(): Promise<GetChainsResponse> {
890
- return this.chainsAPI.getChains()
956
+ return this.chains.getChains()
891
957
  }
892
958
 
893
959
  /**
@@ -895,12 +961,13 @@ export class OpenSeaAPI {
895
961
  * @param address The wallet address to fetch token balances for.
896
962
  * @param args Optional query parameters for filtering and pagination.
897
963
  * @returns The {@link GetAccountTokensResponse} returned by the API.
964
+ * @deprecated Use `api.accounts.getAccountTokens()`. Removed in the next major.
898
965
  */
899
966
  public async getAccountTokens(
900
967
  address: string,
901
968
  args?: GetAccountTokensArgs,
902
969
  ): Promise<GetAccountTokensResponse> {
903
- return this.accountsAPI.getAccountTokens(address, args)
970
+ return this.accounts.getAccountTokens(address, args)
904
971
  }
905
972
 
906
973
  /**
@@ -910,6 +977,7 @@ export class OpenSeaAPI {
910
977
  * @param chain The chain where the NFT is located. Defaults to the chain set in the constructor.
911
978
  * @param ignoreCachedItemUrls Whether to ignore cached item URLs and re-fetch from source.
912
979
  * @returns The {@link ValidateMetadataResponse} returned by the API.
980
+ * @deprecated Use `api.nfts.validateMetadata()`. Removed in the next major.
913
981
  */
914
982
  public async validateNFTMetadata(
915
983
  address: string,
@@ -917,7 +985,7 @@ export class OpenSeaAPI {
917
985
  chain: Chain = this.chain,
918
986
  ignoreCachedItemUrls?: boolean,
919
987
  ): Promise<ValidateMetadataResponse> {
920
- return this.nftsAPI.validateMetadata(
988
+ return this.nfts.validateMetadata(
921
989
  address,
922
990
  identifier,
923
991
  chain,
@@ -932,6 +1000,7 @@ export class OpenSeaAPI {
932
1000
  * @param limit The number of offers to return. Must be between 1 and 200.
933
1001
  * @param next The cursor for the next page of results.
934
1002
  * @returns The {@link GetOffersResponse} returned by the API.
1003
+ * @deprecated Use `api.offers.getOffersByNFT()`. Removed in the next major.
935
1004
  */
936
1005
  public async getOffersByNFT(
937
1006
  collectionSlug: string,
@@ -939,12 +1008,7 @@ export class OpenSeaAPI {
939
1008
  limit?: number,
940
1009
  next?: string,
941
1010
  ): Promise<GetOffersResponse> {
942
- return this.offersAPI.getOffersByNFT(
943
- collectionSlug,
944
- identifier,
945
- limit,
946
- next,
947
- )
1011
+ return this.offers.getOffersByNFT(collectionSlug, identifier, limit, next)
948
1012
  }
949
1013
 
950
1014
  /**
@@ -952,11 +1016,12 @@ export class OpenSeaAPI {
952
1016
  * cross-chain. Returns an ordered list of transactions to execute.
953
1017
  * @param request The sweep request containing buyer, collection, payment, and item caps.
954
1018
  * @returns The {@link SweepCollectionResponse} returned by the API.
1019
+ * @deprecated Use `api.listings.sweepCollection()`. Removed in the next major.
955
1020
  */
956
1021
  public async sweepCollection(
957
1022
  request: SweepCollectionRequest,
958
1023
  ): Promise<SweepCollectionResponse> {
959
- return this.listingsAPI.sweepCollection(request)
1024
+ return this.listings.sweepCollection(request)
960
1025
  }
961
1026
 
962
1027
  /**
@@ -964,11 +1029,12 @@ export class OpenSeaAPI {
964
1029
  * {@link OpenSeaAPI.getSwapQuote} — quote first, then execute.
965
1030
  * @param request The swap execution request.
966
1031
  * @returns The {@link SwapExecuteResponse} with transactions and a quote.
1032
+ * @deprecated Use `api.tokens.executeSwap()`. Removed in the next major.
967
1033
  */
968
1034
  public async executeSwap(
969
1035
  request: SwapExecuteRequest,
970
1036
  ): Promise<SwapExecuteResponse> {
971
- return this.tokensAPI.executeSwap(request)
1037
+ return this.tokens.executeSwap(request)
972
1038
  }
973
1039
 
974
1040
  /**
@@ -977,29 +1043,32 @@ export class OpenSeaAPI {
977
1043
  * fulfillments, and token swaps. Poll this endpoint to check completion status.
978
1044
  * @param request The transaction receipt request.
979
1045
  * @returns The {@link TransactionReceiptResponse} returned by the API.
1046
+ * @deprecated Use `api.transactions.getTransactionReceipt()`. Removed in the next major.
980
1047
  */
981
1048
  public async getTransactionReceipt(
982
1049
  request: TransactionReceiptRequest,
983
1050
  ): Promise<TransactionReceiptResponse> {
984
- return this.transactionsAPI.getTransactionReceipt(request)
1051
+ return this.transactions.getTransactionReceipt(request)
985
1052
  }
986
1053
 
987
1054
  /**
988
1055
  * Gets a list of drops (mints).
989
1056
  * @param args Optional query parameters for filtering and pagination.
990
1057
  * @returns The {@link GetDropsResponse} returned by the API.
1058
+ * @deprecated Use `api.drops.getDrops()`. Removed in the next major.
991
1059
  */
992
1060
  public async getDrops(args?: GetDropsArgs): Promise<GetDropsResponse> {
993
- return this.dropsAPI.getDrops(args)
1061
+ return this.drops.getDrops(args)
994
1062
  }
995
1063
 
996
1064
  /**
997
1065
  * Gets detailed drop information for a collection.
998
1066
  * @param slug The collection slug identifying the drop.
999
1067
  * @returns The {@link GetDropResponse} returned by the API.
1068
+ * @deprecated Use `api.drops.getDrop()`. Removed in the next major.
1000
1069
  */
1001
1070
  public async getDrop(slug: string): Promise<GetDropResponse> {
1002
- return this.dropsAPI.getDrop(slug)
1071
+ return this.drops.getDrop(slug)
1003
1072
  }
1004
1073
 
1005
1074
  /**
@@ -1007,12 +1076,13 @@ export class OpenSeaAPI {
1007
1076
  * @param slug The collection slug identifying the drop.
1008
1077
  * @param request The mint request containing minter address and quantity.
1009
1078
  * @returns The {@link DropMintResponse} with ready-to-sign transaction data.
1079
+ * @deprecated Use `api.drops.buildMintTransaction()`. Removed in the next major.
1010
1080
  */
1011
1081
  public async buildDropMintTransaction(
1012
1082
  slug: string,
1013
1083
  request: DropMintRequest,
1014
1084
  ): Promise<DropMintResponse> {
1015
- return this.dropsAPI.buildMintTransaction(slug, request)
1085
+ return this.drops.buildMintTransaction(slug, request)
1016
1086
  }
1017
1087
 
1018
1088
  /**
@@ -1023,45 +1093,49 @@ export class OpenSeaAPI {
1023
1093
  * @param slug The collection slug identifying the drop.
1024
1094
  * @param request The payer, minter, quantity, and source payment asset.
1025
1095
  * @returns Transactions to submit and the request used to poll their receipt.
1096
+ * @deprecated Use `api.drops.buildCrossChainMintTransactions()`. Removed in the next major.
1026
1097
  */
1027
1098
  public async buildCrossChainDropMintTransactions(
1028
1099
  slug: string,
1029
1100
  request: CrossChainDropMintRequest,
1030
1101
  ): Promise<CrossChainDropMintResponse> {
1031
- return this.dropsAPI.buildCrossChainMintTransactions(slug, request)
1102
+ return this.drops.buildCrossChainMintTransactions(slug, request)
1032
1103
  }
1033
1104
 
1034
1105
  /**
1035
1106
  * Gets trending collections sorted by sales activity.
1036
1107
  * @param args Optional query parameters for timeframe, chain, category, and pagination.
1037
1108
  * @returns The {@link GetCollectionsPaginatedResponse} returned by the API.
1109
+ * @deprecated Use `api.collections.getTrendingCollections()`. Removed in the next major.
1038
1110
  */
1039
1111
  public async getTrendingCollections(
1040
1112
  args?: GetTrendingCollectionsArgs,
1041
1113
  ): Promise<GetCollectionsPaginatedResponse> {
1042
- return this.collectionsAPI.getTrendingCollections(args)
1114
+ return this.collections.getTrendingCollections(args)
1043
1115
  }
1044
1116
 
1045
1117
  /**
1046
1118
  * Gets top collections ranked by various stats.
1047
1119
  * @param args Optional query parameters for sort_by, chain, category, and pagination.
1048
1120
  * @returns The {@link GetCollectionsPaginatedResponse} returned by the API.
1121
+ * @deprecated Use `api.collections.getTopCollections()`. Removed in the next major.
1049
1122
  */
1050
1123
  public async getTopCollections(
1051
1124
  args?: GetTopCollectionsArgs,
1052
1125
  ): Promise<GetCollectionsPaginatedResponse> {
1053
- return this.collectionsAPI.getTopCollections(args)
1126
+ return this.collections.getTopCollections(args)
1054
1127
  }
1055
1128
 
1056
1129
  /**
1057
1130
  * Resolve an ENS name, OpenSea username, or wallet address to canonical account info.
1058
1131
  * @param identifier An ENS name (e.g. vitalik.eth), OpenSea username, or wallet address.
1059
1132
  * @returns The {@link ResolveAccountResponse} returned by the API.
1133
+ * @deprecated Use `api.accounts.resolveAccount()`. Removed in the next major.
1060
1134
  */
1061
1135
  public async resolveAccount(
1062
1136
  identifier: string,
1063
1137
  ): Promise<ResolveAccountResponse> {
1064
- return this.accountsAPI.resolveAccount(identifier)
1138
+ return this.accounts.resolveAccount(identifier)
1065
1139
  }
1066
1140
 
1067
1141
  /**
@@ -1069,11 +1143,12 @@ export class OpenSeaAPI {
1069
1143
  * This is a public read and does not require wallet authentication.
1070
1144
  * @param addressOrUsername An ENS name, OpenSea username, or wallet address.
1071
1145
  * @returns The {@link AgentProfileRelationshipsResponse} returned by the API.
1146
+ * @deprecated Use `api.accounts.getAgentProfileRelationships()`. Removed in the next major.
1072
1147
  */
1073
1148
  public async getAgentProfileRelationships(
1074
1149
  addressOrUsername: string,
1075
1150
  ): Promise<AgentProfileRelationshipsResponse> {
1076
- return this.accountsAPI.getAgentProfileRelationships(addressOrUsername)
1151
+ return this.accounts.getAgentProfileRelationships(addressOrUsername)
1077
1152
  }
1078
1153
 
1079
1154
  /**
@@ -1084,13 +1159,14 @@ export class OpenSeaAPI {
1084
1159
  * @param identifier The token identifier.
1085
1160
  * @param chain The chain where the NFT is located. Defaults to the chain set in the constructor.
1086
1161
  * @returns The {@link OpenSeaCollection} returned by the API.
1162
+ * @deprecated Use `api.nfts.getNFTCollection()`. Removed in the next major.
1087
1163
  */
1088
1164
  public async getNFTCollection(
1089
1165
  address: string,
1090
1166
  identifier: string,
1091
1167
  chain: Chain = this.chain,
1092
1168
  ): Promise<OpenSeaCollection> {
1093
- return this.nftsAPI.getNFTCollection(address, identifier, chain)
1169
+ return this.nfts.getNFTCollection(address, identifier, chain)
1094
1170
  }
1095
1171
 
1096
1172
  /**
@@ -1100,24 +1176,26 @@ export class OpenSeaAPI {
1100
1176
  * @param tokenId The token identifier.
1101
1177
  * @param chain The chain where the NFT is located. Defaults to the chain set in the constructor.
1102
1178
  * @returns The {@link GetNFTMetadataResponse} returned by the API.
1179
+ * @deprecated Use `api.nfts.getNFTMetadata()`. Removed in the next major.
1103
1180
  */
1104
1181
  public async getNFTMetadata(
1105
1182
  address: string,
1106
1183
  tokenId: string,
1107
1184
  chain: Chain = this.chain,
1108
1185
  ): Promise<GetNFTMetadataResponse> {
1109
- return this.nftsAPI.getNFTMetadata(address, tokenId, chain)
1186
+ return this.nfts.getNFTMetadata(address, tokenId, chain)
1110
1187
  }
1111
1188
 
1112
1189
  /**
1113
1190
  * Fetch multiple tokens in a single request.
1114
1191
  * @param request Batch request listing chain + contract address pairs.
1115
1192
  * @returns The {@link TokenBatchResponse} with detailed token info.
1193
+ * @deprecated Use `api.tokens.getTokensBatch()`. Removed in the next major.
1116
1194
  */
1117
1195
  public async getTokensBatch(
1118
1196
  request: BatchTokensRequest,
1119
1197
  ): Promise<TokenBatchResponse> {
1120
- return this.tokensAPI.getTokensBatch(request)
1198
+ return this.tokens.getTokensBatch(request)
1121
1199
  }
1122
1200
 
1123
1201
  /**
@@ -1126,13 +1204,14 @@ export class OpenSeaAPI {
1126
1204
  * @param address Token contract address.
1127
1205
  * @param args Time-series window — `start_time` required, `end_time` defaults to now.
1128
1206
  * @returns The {@link PriceHistoryResponse} returned by the API.
1207
+ * @deprecated Use `api.tokens.getTokenPriceHistory()`. Removed in the next major.
1129
1208
  */
1130
1209
  public async getTokenPriceHistory(
1131
1210
  chain: Chain,
1132
1211
  address: string,
1133
1212
  args: TokenTimeSeriesArgs,
1134
1213
  ): Promise<PriceHistoryResponse> {
1135
- return this.tokensAPI.getTokenPriceHistory(chain, address, args)
1214
+ return this.tokens.getTokenPriceHistory(chain, address, args)
1136
1215
  }
1137
1216
 
1138
1217
  /**
@@ -1141,84 +1220,92 @@ export class OpenSeaAPI {
1141
1220
  * @param address Token contract address.
1142
1221
  * @param args Time-series window plus candle `bucketSize` (required).
1143
1222
  * @returns The {@link OhlcvResponse} returned by the API.
1223
+ * @deprecated Use `api.tokens.getTokenOhlcv()`. Removed in the next major.
1144
1224
  */
1145
1225
  public async getTokenOhlcv(
1146
1226
  chain: Chain,
1147
1227
  address: string,
1148
1228
  args: TokenTimeSeriesArgs & { bucketSize: string },
1149
1229
  ): Promise<OhlcvResponse> {
1150
- return this.tokensAPI.getTokenOhlcv(chain, address, args)
1230
+ return this.tokens.getTokenOhlcv(chain, address, args)
1151
1231
  }
1152
1232
 
1153
1233
  /**
1154
1234
  * Fetch recent swap activity for a token.
1235
+ * @deprecated Use `api.tokens.getTokenActivity()`. Removed in the next major.
1155
1236
  */
1156
1237
  public async getTokenActivity(
1157
1238
  chain: Chain,
1158
1239
  address: string,
1159
1240
  args?: TokenActivityArgs,
1160
1241
  ): Promise<TokenSwapActivityPaginatedResponse> {
1161
- return this.tokensAPI.getTokenActivity(chain, address, args)
1242
+ return this.tokens.getTokenActivity(chain, address, args)
1162
1243
  }
1163
1244
 
1164
1245
  /**
1165
1246
  * Fetch materialized trade count, USD volume, and average trade size for a
1166
1247
  * token across the requested windows.
1248
+ * @deprecated Use `api.tokens.getTokenActivityStats()`. Removed in the next major.
1167
1249
  */
1168
1250
  public async getTokenActivityStats(
1169
1251
  chain: Chain,
1170
1252
  address: string,
1171
1253
  args?: TokenActivityStatsArgs,
1172
1254
  ): Promise<TokenActivityStatsResponse> {
1173
- return this.tokensAPI.getTokenActivityStats(chain, address, args)
1255
+ return this.tokens.getTokenActivityStats(chain, address, args)
1174
1256
  }
1175
1257
 
1176
1258
  /**
1177
1259
  * Fetch paginated fungible token activity (transfers, swaps, wraps, and
1178
1260
  * unwraps) for an account across all chains.
1261
+ * @deprecated Use `api.tokens.getAccountTokenActivity()`. Removed in the next major.
1179
1262
  */
1180
1263
  public async getAccountTokenActivity(
1181
1264
  address: string,
1182
1265
  args?: GetAccountTokenActivityArgs,
1183
1266
  ): Promise<GetAccountTokenActivityResponse> {
1184
- return this.tokensAPI.getAccountTokenActivity(address, args)
1267
+ return this.tokens.getAccountTokenActivity(address, args)
1185
1268
  }
1186
1269
 
1187
1270
  /**
1188
1271
  * Fetch paginated holders for a token, including quantity held, USD value,
1189
1272
  * and aggregate distribution health (STRONG | HEALTHY | CONCERNING | BAD).
1273
+ * @deprecated Use `api.tokens.getTokenHolders()`. Removed in the next major.
1190
1274
  */
1191
1275
  public async getTokenHolders(
1192
1276
  chain: Chain,
1193
1277
  address: string,
1194
1278
  args?: TokenHoldersArgs,
1195
1279
  ): Promise<TokenHoldersResponse> {
1196
- return this.tokensAPI.getTokenHolders(chain, address, args)
1280
+ return this.tokens.getTokenHolders(chain, address, args)
1197
1281
  }
1198
1282
 
1199
1283
  /**
1200
1284
  * Fetch liquidity pools for a token (pool type, USD reserves, and
1201
1285
  * bonding-curve progress / graduation flag where applicable).
1286
+ * @deprecated Use `api.tokens.getTokenLiquidityPools()`. Removed in the next major.
1202
1287
  */
1203
1288
  public async getTokenLiquidityPools(
1204
1289
  chain: Chain,
1205
1290
  address: string,
1206
1291
  args?: TokenLiquidityPoolsArgs,
1207
1292
  ): Promise<TokenLiquidityPoolsResponse> {
1208
- return this.tokensAPI.getTokenLiquidityPools(chain, address, args)
1293
+ return this.tokens.getTokenLiquidityPools(chain, address, args)
1209
1294
  }
1210
1295
 
1211
1296
  /**
1212
1297
  * Fetch multiple NFTs in a single request.
1298
+ * @deprecated Use `api.nfts.getNFTsBatch()`. Removed in the next major.
1213
1299
  */
1214
1300
  public async getNFTsBatch(
1215
1301
  request: BatchNftsRequest,
1216
1302
  ): Promise<NftBatchResponse> {
1217
- return this.nftsAPI.getNFTsBatch(request)
1303
+ return this.nfts.getNFTsBatch(request)
1218
1304
  }
1219
1305
 
1220
1306
  /**
1221
1307
  * Fetch owners of an NFT.
1308
+ * @deprecated Use `api.nfts.getNFTOwners()`. Removed in the next major.
1222
1309
  */
1223
1310
  public async getNFTOwners(
1224
1311
  address: string,
@@ -1226,218 +1313,240 @@ export class OpenSeaAPI {
1226
1313
  chain: Chain = this.chain,
1227
1314
  args?: NFTOwnersArgs,
1228
1315
  ): Promise<OwnersPaginatedResponse> {
1229
- return this.nftsAPI.getNFTOwners(address, identifier, chain, args)
1316
+ return this.nfts.getNFTOwners(address, identifier, chain, args)
1230
1317
  }
1231
1318
 
1232
1319
  /**
1233
1320
  * Fetch analytics (historical sale points) for an NFT.
1321
+ * @deprecated Use `api.nfts.getNFTAnalytics()`. Removed in the next major.
1234
1322
  */
1235
1323
  public async getNFTAnalytics(
1236
1324
  address: string,
1237
1325
  identifier: string,
1238
1326
  chain: Chain = this.chain,
1239
1327
  ): Promise<NftAnalyticsResponse> {
1240
- return this.nftsAPI.getNFTAnalytics(address, identifier, chain)
1328
+ return this.nfts.getNFTAnalytics(address, identifier, chain)
1241
1329
  }
1242
1330
 
1243
1331
  /**
1244
1332
  * Fetch multiple collections in a single request by slug.
1333
+ * @deprecated Use `api.collections.getCollectionsBatch()`. Removed in the next major.
1245
1334
  */
1246
1335
  public async getCollectionsBatch(
1247
1336
  request: BatchCollectionsRequest,
1248
1337
  ): Promise<CollectionBatchResponse> {
1249
- return this.collectionsAPI.getCollectionsBatch(request)
1338
+ return this.collections.getCollectionsBatch(request)
1250
1339
  }
1251
1340
 
1252
1341
  /**
1253
1342
  * Fetch top offers for a collection grouped by price level.
1343
+ * @deprecated Use `api.collections.getCollectionOfferAggregates()`. Removed in the next major.
1254
1344
  */
1255
1345
  public async getCollectionOfferAggregates(
1256
1346
  slug: string,
1257
1347
  args?: PaginatedAnalyticsArgs,
1258
1348
  ): Promise<CollectionOfferAggregatesPaginatedResponse> {
1259
- return this.collectionsAPI.getCollectionOfferAggregates(slug, args)
1349
+ return this.collections.getCollectionOfferAggregates(slug, args)
1260
1350
  }
1261
1351
 
1262
1352
  /**
1263
1353
  * Fetch holders of a collection.
1354
+ * @deprecated Use `api.collections.getCollectionHolders()`. Removed in the next major.
1264
1355
  */
1265
1356
  public async getCollectionHolders(
1266
1357
  slug: string,
1267
1358
  args?: CollectionHoldersArgs,
1268
1359
  ): Promise<CollectionHoldersPaginatedResponse> {
1269
- return this.collectionsAPI.getCollectionHolders(slug, args)
1360
+ return this.collections.getCollectionHolders(slug, args)
1270
1361
  }
1271
1362
 
1272
1363
  /**
1273
1364
  * Fetch the floor-price history of a collection.
1365
+ * @deprecated Use `api.collections.getCollectionFloorPrices()`. Removed in the next major.
1274
1366
  */
1275
1367
  public async getCollectionFloorPrices(
1276
1368
  slug: string,
1277
1369
  args?: CollectionFloorPricesArgs,
1278
1370
  ): Promise<FloorPriceHistoryResponse> {
1279
- return this.collectionsAPI.getCollectionFloorPrices(slug, args)
1371
+ return this.collections.getCollectionFloorPrices(slug, args)
1280
1372
  }
1281
1373
 
1282
1374
  /**
1283
1375
  * Get ordered approval + sign actions to create one or more listings.
1376
+ * @deprecated Use `api.listings.createListingActions()`. Removed in the next major.
1284
1377
  */
1285
1378
  public async createListingActions(
1286
1379
  request: CreateListingActionsRequest,
1287
1380
  ): Promise<CreateListingActionsResponse> {
1288
- return this.listingsAPI.createListingActions(request)
1381
+ return this.listings.createListingActions(request)
1289
1382
  }
1290
1383
 
1291
1384
  /**
1292
1385
  * Get ordered actions to fulfill a listing.
1386
+ * @deprecated Use `api.listings.createListingFulfillmentActions()`. Removed in the next major.
1293
1387
  */
1294
1388
  public async createListingFulfillmentActions(
1295
1389
  request: CreateListingFulfillmentActionsRequest,
1296
1390
  ): Promise<CreateListingFulfillmentActionsResponse> {
1297
- return this.listingsAPI.createListingFulfillmentActions(request)
1391
+ return this.listings.createListingFulfillmentActions(request)
1298
1392
  }
1299
1393
 
1300
1394
  /**
1301
1395
  * Get ordered actions to create an offer.
1396
+ * @deprecated Use `api.offers.createOfferActions()`. Removed in the next major.
1302
1397
  */
1303
1398
  public async createOfferActions(
1304
1399
  request: CreateOfferActionsRequest,
1305
1400
  ): Promise<CreateOfferActionsResponse> {
1306
- return this.offersAPI.createOfferActions(request)
1401
+ return this.offers.createOfferActions(request)
1307
1402
  }
1308
1403
 
1309
1404
  /**
1310
1405
  * Get ordered actions to fulfill an offer.
1406
+ * @deprecated Use `api.offers.createOfferFulfillmentActions()`. Removed in the next major.
1311
1407
  */
1312
1408
  public async createOfferFulfillmentActions(
1313
1409
  request: CreateOfferFulfillmentActionsRequest,
1314
1410
  ): Promise<CreateOfferFulfillmentActionsResponse> {
1315
- return this.offersAPI.createOfferFulfillmentActions(request)
1411
+ return this.offers.createOfferFulfillmentActions(request)
1316
1412
  }
1317
1413
 
1318
1414
  /**
1319
1415
  * Build a deploy-contract transaction for a new drop.
1416
+ * @deprecated Use `api.drops.deployDropContract()`. Removed in the next major.
1320
1417
  */
1321
1418
  public async deployDropContract(
1322
1419
  request: DropDeployRequest,
1323
1420
  ): Promise<DropDeployResponse> {
1324
- return this.dropsAPI.deployDropContract(request)
1421
+ return this.drops.deployDropContract(request)
1325
1422
  }
1326
1423
 
1327
1424
  /**
1328
1425
  * Get the receipt of a previously submitted drop-deploy transaction.
1426
+ * @deprecated Use `api.drops.getDeployReceipt()`. Removed in the next major.
1329
1427
  */
1330
1428
  public async getDeployContractReceipt(
1331
1429
  chain: Chain,
1332
1430
  txHash: string,
1333
1431
  ): Promise<DropDeployReceiptResponse> {
1334
- return this.dropsAPI.getDeployReceipt(chain, txHash)
1432
+ return this.drops.getDeployReceipt(chain, txHash)
1335
1433
  }
1336
1434
 
1337
1435
  /**
1338
1436
  * Build transactions to transfer NFTs or tokens between wallets.
1437
+ * @deprecated Use `api.assets.transferAssets()`. Removed in the next major.
1339
1438
  */
1340
1439
  public async transferAssets(
1341
1440
  request: TransferRequest,
1342
1441
  ): Promise<TransferResponse> {
1343
- return this.assetsAPI.transferAssets(request)
1442
+ return this.assets.transferAssets(request)
1344
1443
  }
1345
1444
 
1346
1445
  /**
1347
1446
  * Get portfolio stats (net worth, P&L) for an account.
1447
+ * @deprecated Use `api.accounts.getPortfolioStats()`. Removed in the next major.
1348
1448
  */
1349
1449
  public async getPortfolioStats(
1350
1450
  address: string,
1351
1451
  args?: PortfolioArgs,
1352
1452
  ): Promise<PortfolioStatsResponse> {
1353
- return this.accountsAPI.getPortfolioStats(address, args)
1453
+ return this.accounts.getPortfolioStats(address, args)
1354
1454
  }
1355
1455
 
1356
1456
  /**
1357
1457
  * Get portfolio net-worth history for an account.
1458
+ * @deprecated Use `api.accounts.getPortfolioHistory()`. Removed in the next major.
1358
1459
  */
1359
1460
  public async getPortfolioHistory(
1360
1461
  address: string,
1361
1462
  args?: PortfolioArgs,
1362
1463
  ): Promise<PortfolioHistoryResponse> {
1363
- return this.accountsAPI.getPortfolioHistory(address, args)
1464
+ return this.accounts.getPortfolioHistory(address, args)
1364
1465
  }
1365
1466
 
1366
1467
  /**
1367
1468
  * Get offers received by an account.
1469
+ * @deprecated Use `api.accounts.getProfileOffersReceived()`. Removed in the next major.
1368
1470
  */
1369
1471
  public async getProfileOffersReceived(
1370
1472
  address: string,
1371
1473
  args?: ProfileOrdersArgs,
1372
1474
  ): Promise<ProfileOffersResponse> {
1373
- return this.accountsAPI.getProfileOffersReceived(address, args)
1475
+ return this.accounts.getProfileOffersReceived(address, args)
1374
1476
  }
1375
1477
 
1376
1478
  /**
1377
1479
  * Get active offers made by an account.
1480
+ * @deprecated Use `api.accounts.getProfileOffers()`. Removed in the next major.
1378
1481
  */
1379
1482
  public async getProfileOffers(
1380
1483
  address: string,
1381
1484
  args?: ProfileOrdersArgs,
1382
1485
  ): Promise<ProfileOffersResponse> {
1383
- return this.accountsAPI.getProfileOffers(address, args)
1486
+ return this.accounts.getProfileOffers(address, args)
1384
1487
  }
1385
1488
 
1386
1489
  /**
1387
1490
  * Get active listings for an account.
1491
+ * @deprecated Use `api.accounts.getProfileListings()`. Removed in the next major.
1388
1492
  */
1389
1493
  public async getProfileListings(
1390
1494
  address: string,
1391
1495
  args?: ProfileOrdersArgs,
1392
1496
  ): Promise<ProfileListingsResponse> {
1393
- return this.accountsAPI.getProfileListings(address, args)
1497
+ return this.accounts.getProfileListings(address, args)
1394
1498
  }
1395
1499
 
1396
1500
  /**
1397
1501
  * Get items favorited by an account.
1502
+ * @deprecated Use `api.accounts.getProfileFavorites()`. Removed in the next major.
1398
1503
  */
1399
1504
  public async getProfileFavorites(
1400
1505
  address: string,
1401
1506
  args?: ProfileFavoritesArgs,
1402
1507
  ): Promise<ProfileFavoritesResponse> {
1403
- return this.accountsAPI.getProfileFavorites(address, args)
1508
+ return this.accounts.getProfileFavorites(address, args)
1404
1509
  }
1405
1510
 
1406
1511
  /**
1407
1512
  * Get collections owned by an account.
1513
+ * @deprecated Use `api.accounts.getProfileCollections()`. Removed in the next major.
1408
1514
  */
1409
1515
  public async getProfileCollections(
1410
1516
  address: string,
1411
1517
  args?: ProfileCollectionsArgs,
1412
1518
  ): Promise<ProfileCollectionsResponse> {
1413
- return this.accountsAPI.getProfileCollections(address, args)
1519
+ return this.accounts.getProfileCollections(address, args)
1414
1520
  }
1415
1521
 
1416
1522
  /**
1417
1523
  * Get aggregated trading P&L (realized + unrealized) for an account.
1524
+ * @deprecated Use `api.accounts.getWalletPnl()`. Removed in the next major.
1418
1525
  */
1419
1526
  public async getWalletPnl(address: string): Promise<WalletPnlResponse> {
1420
- return this.accountsAPI.getWalletPnl(address)
1527
+ return this.accounts.getWalletPnl(address)
1421
1528
  }
1422
1529
 
1423
1530
  /**
1424
1531
  * Get closed (realized) trading positions for an account.
1532
+ * @deprecated Use `api.accounts.getWalletClosedPositions()`. Removed in the next major.
1425
1533
  */
1426
1534
  public async getWalletClosedPositions(
1427
1535
  address: string,
1428
1536
  args?: WalletClosedPositionsArgs,
1429
1537
  ): Promise<ClosedPositionsResponse> {
1430
- return this.accountsAPI.getWalletClosedPositions(address, args)
1538
+ return this.accounts.getWalletClosedPositions(address, args)
1431
1539
  }
1432
1540
 
1433
1541
  /**
1434
1542
  * Get the token transfers contributing to a wallet's position in a currency.
1543
+ * @deprecated Use `api.accounts.getWalletTokenTransfers()`. Removed in the next major.
1435
1544
  */
1436
1545
  public async getWalletTokenTransfers(
1437
1546
  address: string,
1438
1547
  args: WalletTokenTransfersArgs,
1439
1548
  ): Promise<PositionTokenTransfersResponse> {
1440
- return this.accountsAPI.getWalletTokenTransfers(address, args)
1549
+ return this.accounts.getWalletTokenTransfers(address, args)
1441
1550
  }
1442
1551
 
1443
1552
  /**