@opensea/sdk 10.5.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/lib/api/accounts.js +12 -8
  2. package/lib/api/accounts.js.map +1 -1
  3. package/lib/api/api.d.ts +16 -10
  4. package/lib/api/api.js +42 -18
  5. package/lib/api/api.js.map +1 -1
  6. package/lib/api/collections.js +7 -15
  7. package/lib/api/collections.js.map +1 -1
  8. package/lib/api/fetcher.d.ts +35 -5
  9. package/lib/api/listings.js +3 -3
  10. package/lib/api/listings.js.map +1 -1
  11. package/lib/api/nfts.d.ts +1 -1
  12. package/lib/api/nfts.js +2 -5
  13. package/lib/api/nfts.js.map +1 -1
  14. package/lib/api/offers.d.ts +11 -0
  15. package/lib/api/offers.js +14 -11
  16. package/lib/api/offers.js.map +1 -1
  17. package/lib/api/orders.d.ts +16 -1
  18. package/lib/api/orders.js +17 -3
  19. package/lib/api/orders.js.map +1 -1
  20. package/lib/api/tokens.d.ts +2 -2
  21. package/lib/api/tokens.js +1 -1
  22. package/lib/api/tokens.js.map +1 -1
  23. package/lib/api/types.d.ts +196 -356
  24. package/lib/api/types.js +2 -1
  25. package/lib/api/types.js.map +1 -1
  26. package/lib/orders/types.d.ts +2 -2
  27. package/lib/orders/utils.d.ts +53 -13
  28. package/lib/orders/utils.js +33 -50
  29. package/lib/orders/utils.js.map +1 -1
  30. package/lib/sdk/base.d.ts +11 -4
  31. package/lib/sdk/base.js +4 -4
  32. package/lib/sdk/base.js.map +1 -1
  33. package/lib/sdk/cancellation.d.ts +3 -1
  34. package/lib/sdk/cancellation.js +12 -6
  35. package/lib/sdk/cancellation.js.map +1 -1
  36. package/lib/sdk/fulfillment.js +7 -4
  37. package/lib/sdk/fulfillment.js.map +1 -1
  38. package/lib/sdk/orders.js +1 -1
  39. package/lib/sdk/orders.js.map +1 -1
  40. package/lib/types.d.ts +22 -122
  41. package/lib/types.js.map +1 -1
  42. package/lib/utils/case.d.ts +63 -0
  43. package/lib/utils/case.js +83 -0
  44. package/lib/utils/case.js.map +1 -0
  45. package/lib/utils/utils.d.ts +0 -1
  46. package/lib/utils/utils.js +0 -1
  47. package/lib/utils/utils.js.map +1 -1
  48. package/package.json +2 -2
  49. package/src/api/accounts.ts +14 -8
  50. package/src/api/api.ts +60 -25
  51. package/src/api/collections.ts +7 -21
  52. package/src/api/fetcher.ts +41 -6
  53. package/src/api/listings.ts +3 -3
  54. package/src/api/nfts.ts +3 -7
  55. package/src/api/offers.ts +17 -10
  56. package/src/api/orders.ts +29 -5
  57. package/src/api/tokens.ts +2 -2
  58. package/src/api/types.ts +265 -399
  59. package/src/orders/types.ts +2 -2
  60. package/src/orders/utils.ts +57 -79
  61. package/src/sdk/base.ts +4 -4
  62. package/src/sdk/cancellation.ts +16 -6
  63. package/src/sdk/fulfillment.ts +7 -6
  64. package/src/sdk/orders.ts +1 -1
  65. package/src/types.ts +33 -120
  66. package/src/utils/case.ts +150 -0
  67. package/src/utils/utils.ts +0 -1
  68. package/lib/utils/converters.d.ts +0 -37
  69. package/lib/utils/converters.js +0 -137
  70. package/lib/utils/converters.js.map +0 -1
  71. package/src/utils/converters.ts +0 -145
@@ -1,7 +1,9 @@
1
- import type { SwapExecuteRequest as ApiSwapExecuteRequest, SwapExecuteResponse as ApiSwapExecuteResponse, SweepCollectionRequest as ApiSweepCollectionRequest, SweepCollectionResponse as ApiSweepCollectionResponse, TransactionReceiptRequest as ApiTransactionReceiptRequest, TransactionReceiptResponse as ApiTransactionReceiptResponse, AssetMetadataResponse, InstantApiKeyResponse, ListingsResponse, NftListResponse, OffersResponse, TokenGroupPaginatedResponse, TokenGroupResponse } from "@opensea/api-types";
2
- import type { ConsiderationItem } from "@opensea/seaport-js/lib/types";
1
+ import type { BuildOfferResponse as ApiBuildOfferResponse, CancelResponse as ApiCancelResponse, Listing as ApiListing, Nft as ApiNft, Offer as ApiOffer, Order as ApiOrder, OrderAsset as ApiOrderAsset, Payment as ApiPayment, Price as ApiPrice, SwapExecuteRequest as ApiSwapExecuteRequest, SwapExecuteResponse as ApiSwapExecuteResponse, SwapQuoteResponse as ApiSwapQuoteResponse, SweepCollectionRequest as ApiSweepCollectionRequest, SweepCollectionResponse as ApiSweepCollectionResponse, Trait as ApiTrait, TransactionReceiptRequest as ApiTransactionReceiptRequest, TransactionReceiptResponse as ApiTransactionReceiptResponse, AssetMetadataResponse, ChainResponse, DropDetailedResponse, DropResponse, DropStageResponse, InstantApiKeyResponse, ListingsResponse, NftDetailed, NftListResponse, NftResponse, OffersResponse, TokenBalanceResponse, TokenGroupPaginatedResponse, TokenGroupResponse } from "@opensea/api-types";
3
2
  import type { OrderType, ProtocolData } from "../orders/types";
4
3
  import type { OpenSeaCollection } from "../types";
4
+ import type { Camelize } from "../utils/case";
5
+ export type OrderAsset = Camelize<ApiOrderAsset>;
6
+ export type Price = Camelize<ApiPrice>;
5
7
  /**
6
8
  * A single trait filter used by collection-scoped read endpoints (NFTs by
7
9
  * collection, best listings by collection, events by collection). Multiple
@@ -27,18 +29,15 @@ export interface TraitFilter {
27
29
  */
28
30
  export declare function encodeTraitsParam(traits: TraitFilter[] | undefined): string | undefined;
29
31
  /**
30
- * Response from OpenSea API for building an offer.
32
+ * Response from OpenSea API for building an offer. Camelized from api-types
33
+ * `BuildOfferResponse` (the spec already ships camelCase keys here, so the
34
+ * camelize at the fetcher is a no-op).
31
35
  * @category API Response Types
32
36
  */
33
- export type BuildOfferResponse = {
34
- /** A portion of the parameters needed to submit a criteria offer, i.e. collection offer. */
35
- partialParameters: PartialParameters;
36
- /** Criteria echoed back from the build request. Includes collection and trait info. */
37
- criteria: BuildOfferCriteria;
38
- };
37
+ export type BuildOfferResponse = Camelize<ApiBuildOfferResponse>;
39
38
  /**
40
- * Criteria returned by the build offer endpoint.
41
- * Subset of {@link Criteria} — only collection and trait fields.
39
+ * Criteria returned by the build offer endpoint. Subset of the wire-format
40
+ * criteria — only collection and trait fields.
42
41
  * @category API Response Types
43
42
  */
44
43
  export type BuildOfferCriteria = {
@@ -46,29 +45,6 @@ export type BuildOfferCriteria = {
46
45
  traits?: TraitCriteria[];
47
46
  numericTraits?: NumericTraitCriteria[];
48
47
  };
49
- type PartialParameters = {
50
- consideration: ConsiderationItem[];
51
- zone: string;
52
- zoneHash: string;
53
- };
54
- /**
55
- * Criteria for collection or trait offers.
56
- * @category API Response Types
57
- */
58
- type Criteria = {
59
- /** The collection for the criteria */
60
- collection: CollectionCriteria;
61
- /** The contract for the criteria */
62
- contract: ContractCriteria;
63
- /** Represents a list of token ids which can be used to fulfill the criteria offer. */
64
- encoded_token_ids?: string;
65
- /** The trait for the criteria (single trait) */
66
- trait?: TraitCriteria;
67
- /** Multiple traits for the criteria (multi-trait offers) */
68
- traits?: TraitCriteria[];
69
- /** Numeric traits for the criteria (numeric trait offers) */
70
- numericTraits?: NumericTraitCriteria[];
71
- };
72
48
  /**
73
49
  * Criteria for trait offers.
74
50
  * @category API Response Types
@@ -90,29 +66,24 @@ type NumericTraitCriteria = {
90
66
  type CollectionCriteria = {
91
67
  slug: string;
92
68
  };
93
- type ContractCriteria = {
94
- address: string;
95
- };
96
69
  /**
97
70
  * Query args for Get Collections
98
71
  * @category API Query Args
99
72
  */
100
73
  export interface GetCollectionsArgs {
101
- order_by?: string;
74
+ orderBy?: string;
102
75
  limit?: number;
103
76
  next?: string;
104
77
  chain?: string;
105
- creator_username?: string;
106
- include_hidden?: boolean;
78
+ creatorUsername?: string;
79
+ includeHidden?: boolean;
107
80
  }
108
81
  /**
109
82
  * Response from OpenSea API for fetching a single collection.
83
+ * Bare collection object (the response is not wrapped). See {@link OpenSeaCollection}.
110
84
  * @category API Response Types
111
85
  */
112
- export type GetCollectionResponse = {
113
- /** Collection object. See {@link OpenSeaCollection} */
114
- collection: OpenSeaCollection;
115
- };
86
+ export type GetCollectionResponse = OpenSeaCollection;
116
87
  /**
117
88
  * Response from OpenSea API for fetching a list of collections.
118
89
  * @category API Response Types
@@ -141,59 +112,41 @@ export declare enum OrderStatus {
141
112
  CANCELLED = "CANCELLED"
142
113
  }
143
114
  /**
144
- * Base Order type shared between Listings and Offers.
115
+ * Base Order shape — camelized from `@opensea/api-types`, with `protocolData`
116
+ * narrowed to the seaport-js `OrderWithCounter` type (a.k.a. {@link ProtocolData})
117
+ * since SDK callers pass this directly to Seaport.
145
118
  * @category API Models
146
119
  */
147
- export type Order = {
148
- /** Offer Identifier */
149
- order_hash: string;
150
- /** Chain the offer exists on */
151
- chain: string;
152
- /** The protocol data for the order. Only 'seaport' is currently supported. */
153
- protocol_data: ProtocolData;
154
- /** The contract address of the protocol. */
155
- protocol_address: string;
156
- /** The price of the order. */
157
- price: Price;
120
+ export type Order = Camelize<Omit<ApiOrder, "protocol_data">> & {
121
+ protocolData?: ProtocolData;
158
122
  };
159
123
  /**
160
- * Offer type.
124
+ * Offer type. Camelized from `@opensea/api-types`, with `protocolData` narrowed
125
+ * to seaport-js {@link ProtocolData} and `status` narrowed to the
126
+ * {@link OrderStatus} enum (the OpenAPI spec ships status as a string union).
161
127
  * @category API Models
162
128
  */
163
- export type Offer = Order & {
164
- /** The criteria for the offer if it is a collection or trait offer. */
165
- criteria?: Criteria;
166
- /** The status of the offer. */
129
+ export type Offer = Camelize<Omit<ApiOffer, "protocol_data" | "status">> & {
130
+ protocolData?: ProtocolData;
167
131
  status: OrderStatus;
168
132
  };
169
133
  /**
170
- * Collection Offer type.
171
- * @category API Models
172
- */
173
- export type CollectionOffer = Required<Pick<Offer, "criteria">> & Offer;
174
- /**
175
- * Price response.
134
+ * Collection Offer type — an {@link Offer} with `criteria` guaranteed present.
176
135
  * @category API Models
177
136
  */
178
- export type Price = {
179
- currency: string;
180
- decimals: number;
181
- value: string;
137
+ export type CollectionOffer = Offer & {
138
+ criteria: NonNullable<Offer["criteria"]>;
182
139
  };
183
140
  /**
184
- * Listing order type.
141
+ * Listing order type. Camelized from `@opensea/api-types`, with `protocolData`
142
+ * narrowed to seaport-js {@link ProtocolData}, `type` narrowed to the
143
+ * {@link OrderType} enum, and `status` narrowed to the {@link OrderStatus}
144
+ * enum (the OpenAPI spec ships type and status as plain strings).
185
145
  * @category API Models
186
146
  */
187
- export type Listing = Omit<Order, "price"> & {
188
- /** The order type of the listing. */
147
+ export type Listing = Camelize<Omit<ApiListing, "protocol_data" | "type" | "status">> & {
148
+ protocolData?: ProtocolData;
189
149
  type: OrderType;
190
- /** The price of the listing with current price nested. */
191
- price: {
192
- current: Price;
193
- };
194
- /** The remaining quantity available for the listing. This is important for partially filled orders. */
195
- remaining_quantity: number;
196
- /** The status of the listing. */
197
150
  status: OrderStatus;
198
151
  };
199
152
  /**
@@ -216,12 +169,10 @@ export type ListNFTsResponse = {
216
169
  };
217
170
  /**
218
171
  * Response from OpenSea API for fetching a single NFT.
172
+ * Camelized from api-types `NftResponse`.
219
173
  * @category API Response Types
220
174
  */
221
- export type GetNFTResponse = {
222
- /** See {@link NFT} */
223
- nft: NFT;
224
- };
175
+ export type GetNFTResponse = Camelize<NftResponse>;
225
176
  /**
226
177
  * Base query cursors response from OpenSea API.
227
178
  * @category API Response Types
@@ -261,109 +212,54 @@ export type GetBestListingResponse = Listing;
261
212
  export type GetOrderByHashResponse = Offer | Listing;
262
213
  /**
263
214
  * Response from OpenSea API for offchain canceling an order.
215
+ * Camelized from api-types `CancelResponse`.
264
216
  * @category API Response Types
265
217
  */
266
- export type CancelOrderResponse = {
267
- last_signature_issued_valid_until: string | null;
268
- };
218
+ export type CancelOrderResponse = Camelize<ApiCancelResponse>;
269
219
  /**
270
220
  * Request body for sweeping (bulk-buying) items from a collection.
271
221
  * @category API Query Args
272
222
  */
273
- export type SweepCollectionRequest = ApiSweepCollectionRequest;
223
+ export type SweepCollectionRequest = Camelize<ApiSweepCollectionRequest>;
274
224
  /**
275
225
  * Response from sweeping a collection.
276
226
  * @category API Response Types
277
227
  */
278
- export type SweepCollectionResponse = ApiSweepCollectionResponse;
228
+ export type SweepCollectionResponse = Camelize<ApiSweepCollectionResponse>;
279
229
  /**
280
230
  * Request body for executing a token swap.
281
231
  * @category API Query Args
282
232
  */
283
- export type SwapExecuteRequest = ApiSwapExecuteRequest;
233
+ export type SwapExecuteRequest = Camelize<ApiSwapExecuteRequest>;
284
234
  /**
285
235
  * Response from executing a token swap.
286
236
  * @category API Response Types
287
237
  */
288
- export type SwapExecuteResponse = ApiSwapExecuteResponse;
238
+ export type SwapExecuteResponse = Camelize<ApiSwapExecuteResponse>;
289
239
  /**
290
240
  * Request body for fetching a transaction receipt.
291
241
  * @category API Query Args
292
242
  */
293
- export type TransactionReceiptRequest = ApiTransactionReceiptRequest;
243
+ export type TransactionReceiptRequest = Camelize<ApiTransactionReceiptRequest>;
294
244
  /**
295
245
  * Response from fetching a transaction receipt.
296
246
  * @category API Response Types
297
247
  */
298
- export type TransactionReceiptResponse = ApiTransactionReceiptResponse;
248
+ export type TransactionReceiptResponse = Camelize<ApiTransactionReceiptResponse>;
299
249
  /**
300
- * NFT type returned by OpenSea API.
250
+ * NFT type returned by OpenSea API. Sourced from api-types `NftDetailed`.
301
251
  * @category API Models
302
252
  */
303
- export type NFT = {
304
- /** NFT Identifier (also commonly referred to as tokenId) */
305
- identifier: string;
306
- /** Slug identifier of collection */
307
- collection: string;
308
- /** Address of contract */
309
- contract: string;
310
- /** Token standard, i.e. ERC721, ERC1155, etc. */
311
- token_standard: string;
312
- /** Name of NFT */
313
- name: string;
314
- /** Description of NFT */
315
- description: string;
316
- /** URL of image */
317
- image_url: string;
318
- /** URL of metadata */
319
- metadata_url: string;
320
- /** URL on OpenSea */
321
- opensea_url: string;
322
- /** Date of latest NFT update */
323
- updated_at: string;
324
- /** Whether NFT is disabled for trading on OpenSea */
325
- is_disabled: boolean;
326
- /** Whether NFT is NSFW (Not Safe For Work) */
327
- is_nsfw: boolean;
328
- /** Traits for the NFT, returns null if the NFT has than 50 traits */
329
- traits: Trait[] | null;
330
- /** Creator of the NFT */
331
- creator: string;
332
- /** Owners of the NFT */
333
- owners: {
334
- address: string;
335
- quantity: number;
336
- }[];
337
- /** Rarity of the NFT */
338
- rarity: null | {
339
- strategy_id: string | null;
340
- strategy_version: string | null;
341
- rank: number | null;
342
- score: number | null;
343
- calculated_at: string;
344
- max_rank: number | null;
345
- tokens_scored: number | null;
346
- ranking_features: null | {
347
- unique_attribute_count: number;
348
- };
349
- };
350
- };
253
+ export type NFT = Camelize<NftDetailed>;
351
254
  /**
352
- * Trait type returned by OpenSea API.
255
+ * Trait type returned by OpenSea API. Sourced from api-types `Trait`.
256
+ * For numeric traits, `value` arrives as a string — callers parse as needed.
353
257
  * @category API Models
354
258
  */
355
- export type Trait = {
356
- /** The name of the trait category (e.g. 'Background') */
357
- trait_type: string;
358
- /** A field indicating how to display. None is used for string traits. */
359
- display_type: TraitDisplayType;
360
- /** Ceiling for possible numeric trait values */
361
- max_value: string;
362
- /** The value of the trait (e.g. 'Red') */
363
- value: string | number | Date;
364
- };
259
+ export type Trait = Camelize<ApiTrait>;
365
260
  /**
366
- * Trait display type returned by OpenSea API.
261
+ * Trait display type returned by OpenSea API. Kept as an enum value for
262
+ * convenience; api-types models the wire field as a plain string.
367
263
  * @category API Models
368
264
  */
369
265
  export declare enum TraitDisplayType {
@@ -400,48 +296,24 @@ export declare enum OrderEventType {
400
296
  TRAIT_OFFER = "trait_offer"
401
297
  }
402
298
  /**
403
- * Payment information for an event.
299
+ * Payment information for an event. Camelized from api-types `Payment`.
404
300
  * @category API Models
405
301
  */
406
- export type EventPayment = {
407
- /** Quantity of the payment token */
408
- quantity: string;
409
- /** Address of the payment token (0x0...0 for ETH) */
410
- token_address: string;
411
- /** Decimals of the payment token */
412
- decimals: number;
413
- /** Symbol of the payment token */
414
- symbol: string;
415
- };
302
+ export type EventPayment = Camelize<ApiPayment>;
416
303
  /**
417
- * Asset information in an event.
304
+ * Asset information in an event. Camelized from api-types `Nft`.
418
305
  * @category API Models
419
306
  */
420
- export type EventAsset = {
421
- identifier: string;
422
- collection: string;
423
- contract: string;
424
- token_standard: string;
425
- name: string;
426
- description: string;
427
- image_url: string;
428
- display_image_url: string;
429
- display_animation_url: string | null;
430
- metadata_url: string;
431
- opensea_url: string;
432
- updated_at: string;
433
- is_disabled: boolean;
434
- is_nsfw: boolean;
435
- };
307
+ export type EventAsset = Camelize<ApiNft>;
436
308
  /**
437
309
  * Base event type.
438
310
  * @category API Models
439
311
  */
440
312
  type BaseEvent = {
441
313
  /** Type of the event */
442
- event_type: AssetEventType | string;
314
+ eventType: AssetEventType | string;
443
315
  /** Timestamp of the event */
444
- event_timestamp: number;
316
+ eventTimestamp: number;
445
317
  /** Chain the event occurred on */
446
318
  chain: string;
447
319
  /** Quantity involved in the event */
@@ -452,13 +324,13 @@ type BaseEvent = {
452
324
  * @category API Models
453
325
  */
454
326
  export type ListingEvent = BaseEvent & {
455
- event_type: AssetEventType.LISTING | "listing";
327
+ eventType: AssetEventType.LISTING | "listing";
456
328
  /** Payment information */
457
329
  payment: EventPayment;
458
330
  /** Start date of the listing */
459
- start_date: number | null;
331
+ startDate: number | null;
460
332
  /** Expiration date of the listing */
461
- expiration_date: number;
333
+ expirationDate: number;
462
334
  /** Asset involved in the listing */
463
335
  asset: EventAsset;
464
336
  /** Maker of the listing */
@@ -466,24 +338,24 @@ export type ListingEvent = BaseEvent & {
466
338
  /** Taker of the listing */
467
339
  taker: string;
468
340
  /** Whether the listing is private */
469
- is_private_listing: boolean;
341
+ isPrivateListing: boolean;
470
342
  /** Order hash (optional) */
471
- order_hash?: string;
343
+ orderHash?: string;
472
344
  /** Protocol address (optional) */
473
- protocol_address?: string;
345
+ protocolAddress?: string;
474
346
  };
475
347
  /**
476
348
  * Offer event type.
477
349
  * @category API Models
478
350
  */
479
351
  export type OfferEvent = BaseEvent & {
480
- event_type: AssetEventType.OFFER | "offer";
352
+ eventType: AssetEventType.OFFER | "offer";
481
353
  /** Payment information */
482
354
  payment: EventPayment;
483
355
  /** Start date of the offer */
484
- start_date: number | null;
356
+ startDate: number | null;
485
357
  /** Expiration date of the offer */
486
- expiration_date: number;
358
+ expirationDate: number;
487
359
  /** Asset involved in the offer */
488
360
  asset: EventAsset;
489
361
  /** Maker of the offer */
@@ -491,22 +363,22 @@ export type OfferEvent = BaseEvent & {
491
363
  /** Taker of the offer */
492
364
  taker: string;
493
365
  /** Order hash (optional) */
494
- order_hash?: string;
366
+ orderHash?: string;
495
367
  /** Protocol address (optional) */
496
- protocol_address?: string;
368
+ protocolAddress?: string;
497
369
  };
498
370
  /**
499
371
  * Trait offer event type.
500
372
  * @category API Models
501
373
  */
502
374
  export type TraitOfferEvent = BaseEvent & {
503
- event_type: AssetEventType.TRAIT_OFFER | "trait_offer";
375
+ eventType: AssetEventType.TRAIT_OFFER | "trait_offer";
504
376
  /** Payment information */
505
377
  payment: EventPayment;
506
378
  /** Start date of the offer */
507
- start_date: number | null;
379
+ startDate: number | null;
508
380
  /** Expiration date of the offer */
509
- expiration_date: number;
381
+ expirationDate: number;
510
382
  /** Criteria for trait offers */
511
383
  criteria: Record<string, unknown>;
512
384
  /** Maker of the offer */
@@ -514,22 +386,22 @@ export type TraitOfferEvent = BaseEvent & {
514
386
  /** Taker of the offer */
515
387
  taker: string;
516
388
  /** Order hash (optional) */
517
- order_hash?: string;
389
+ orderHash?: string;
518
390
  /** Protocol address (optional) */
519
- protocol_address?: string;
391
+ protocolAddress?: string;
520
392
  };
521
393
  /**
522
394
  * Collection offer event type.
523
395
  * @category API Models
524
396
  */
525
397
  export type CollectionOfferEvent = BaseEvent & {
526
- event_type: AssetEventType.COLLECTION_OFFER | "collection_offer";
398
+ eventType: AssetEventType.COLLECTION_OFFER | "collection_offer";
527
399
  /** Payment information */
528
400
  payment: EventPayment;
529
401
  /** Start date of the offer */
530
- start_date: number | null;
402
+ startDate: number | null;
531
403
  /** Expiration date of the offer */
532
- expiration_date: number;
404
+ expirationDate: number;
533
405
  /** Criteria for collection offers */
534
406
  criteria: Record<string, unknown>;
535
407
  /** Maker of the offer */
@@ -537,9 +409,9 @@ export type CollectionOfferEvent = BaseEvent & {
537
409
  /** Taker of the offer */
538
410
  taker: string;
539
411
  /** Order hash (optional) */
540
- order_hash?: string;
412
+ orderHash?: string;
541
413
  /** Protocol address (optional) */
542
- protocol_address?: string;
414
+ protocolAddress?: string;
543
415
  };
544
416
  /**
545
417
  * Order event type returned by the API for order-related activities
@@ -547,13 +419,13 @@ export type CollectionOfferEvent = BaseEvent & {
547
419
  * @category API Models
548
420
  */
549
421
  export type OrderEvent = BaseEvent & {
550
- event_type: AssetEventType.ORDER | "order";
422
+ eventType: AssetEventType.ORDER | "order";
551
423
  /** Payment information */
552
424
  payment: EventPayment;
553
425
  /** Start date of the order */
554
- start_date: number | null;
426
+ startDate: number | null;
555
427
  /** Expiration date of the order */
556
- expiration_date: number;
428
+ expirationDate: number;
557
429
  /** Asset involved in the order (optional, not present for collection/trait offers) */
558
430
  asset?: EventAsset;
559
431
  /** Criteria for collection/trait offers (optional) */
@@ -563,22 +435,22 @@ export type OrderEvent = BaseEvent & {
563
435
  /** Taker of the order */
564
436
  taker: string;
565
437
  /** Order hash (optional) */
566
- order_hash?: string;
438
+ orderHash?: string;
567
439
  /** Protocol address (optional) */
568
- protocol_address?: string;
440
+ protocolAddress?: string;
569
441
  /** Order type providing more detail */
570
- order_type?: OrderEventType;
442
+ orderType?: OrderEventType;
571
443
  };
572
444
  /**
573
445
  * Mint event type.
574
446
  * @category API Models
575
447
  */
576
448
  export type MintEvent = BaseEvent & {
577
- event_type: AssetEventType.MINT | "mint";
449
+ eventType: AssetEventType.MINT | "mint";
578
450
  /** Transaction hash */
579
451
  transaction: string;
580
452
  /** Address the NFT was minted to */
581
- to_address: string;
453
+ toAddress: string;
582
454
  /** NFT that was minted */
583
455
  nft: EventAsset;
584
456
  };
@@ -587,17 +459,17 @@ export type MintEvent = BaseEvent & {
587
459
  * @category API Models
588
460
  */
589
461
  export type SaleEvent = BaseEvent & {
590
- event_type: AssetEventType.SALE | "sale";
462
+ eventType: AssetEventType.SALE | "sale";
591
463
  /** Transaction hash */
592
464
  transaction: string;
593
465
  /** Order hash */
594
- order_hash: string;
466
+ orderHash: string;
595
467
  /** Protocol address */
596
- protocol_address: string;
468
+ protocolAddress: string;
597
469
  /** Payment information */
598
470
  payment: EventPayment;
599
471
  /** Closing date of the sale */
600
- closing_date: number;
472
+ closingDate: number;
601
473
  /** Seller address */
602
474
  seller: string;
603
475
  /** Buyer address */
@@ -610,13 +482,13 @@ export type SaleEvent = BaseEvent & {
610
482
  * @category API Models
611
483
  */
612
484
  export type TransferEvent = BaseEvent & {
613
- event_type: AssetEventType.TRANSFER | "transfer";
485
+ eventType: AssetEventType.TRANSFER | "transfer";
614
486
  /** Transaction hash */
615
487
  transaction: string;
616
488
  /** Address the NFT was transferred from */
617
- from_address: string;
489
+ fromAddress: string;
618
490
  /** Address the NFT was transferred to */
619
- to_address: string;
491
+ toAddress: string;
620
492
  /** NFT involved in the transfer */
621
493
  nft: EventAsset;
622
494
  };
@@ -635,7 +507,7 @@ export type AssetEvent = ListingEvent | OfferEvent | TraitOfferEvent | Collectio
635
507
  */
636
508
  export interface GetEventsArgs {
637
509
  /** Type of event to filter by */
638
- event_type?: AssetEventType | string;
510
+ eventType?: AssetEventType | string;
639
511
  /** Filter events after this timestamp */
640
512
  after?: number;
641
513
  /** Filter events before this timestamp */
@@ -664,7 +536,7 @@ export interface GetEventsByCollectionArgs extends GetEventsArgs {
664
536
  */
665
537
  export type GetEventsResponse = QueryCursorsV2 & {
666
538
  /** List of {@link AssetEvent} */
667
- asset_events: AssetEvent[];
539
+ assetEvents: AssetEvent[];
668
540
  };
669
541
  /**
670
542
  * Contract information returned by OpenSea API.
@@ -675,12 +547,17 @@ export type Contract = {
675
547
  address: string;
676
548
  /** Chain the contract is deployed on */
677
549
  chain: string;
678
- /** Associated collection slug (if any) */
550
+ /**
551
+ * Associated collection slug. `null` for contracts without an associated
552
+ * collection on OpenSea. TODO(api-types): the OpenAPI spec marks this as
553
+ * required non-null, but the live API returns null for standalone contracts —
554
+ * swap to `Camelize<ContractResponse>` once the spec is updated.
555
+ */
679
556
  collection: string | null;
680
557
  /** Contract name */
681
558
  name: string;
682
559
  /** Contract standard (e.g., erc721, erc1155) */
683
- contract_standard: string;
560
+ contractStandard: string;
684
561
  };
685
562
  /**
686
563
  * Response from OpenSea API for fetching a contract.
@@ -715,6 +592,11 @@ export type GetTraitsResponse = {
715
592
  };
716
593
  /**
717
594
  * Token model returned by OpenSea API.
595
+ *
596
+ * TODO(api-types): swap to `Camelize<TokenResponse>` once the OpenAPI spec
597
+ * marks `image_url` as nullable (the live API returns `null` for tokens
598
+ * without an image). Currently the spec models it as optional non-null.
599
+ *
718
600
  * @category API Models
719
601
  */
720
602
  export type Token = {
@@ -728,10 +610,10 @@ export type Token = {
728
610
  symbol: string;
729
611
  /** Number of decimals */
730
612
  decimals: number;
731
- /** URL of the token image */
732
- image_url: string | null;
613
+ /** URL of the token image (null when the token has no image) */
614
+ imageUrl: string | null;
733
615
  /** URL on OpenSea */
734
- opensea_url: string;
616
+ openseaUrl: string;
735
617
  };
736
618
  /**
737
619
  * Response from OpenSea API for fetching trending tokens.
@@ -765,25 +647,24 @@ export interface GetTokensArgs {
765
647
  */
766
648
  export interface GetSwapQuoteArgs {
767
649
  /** Address of the input token */
768
- token_in: string;
650
+ tokenIn: string;
769
651
  /** Address of the output token */
770
- token_out: string;
652
+ tokenOut: string;
771
653
  /** Amount of input token */
772
654
  amount: string;
773
655
  /** Chain for the swap */
774
656
  chain: string;
775
657
  /** Address of the taker */
776
- taker_address?: string;
658
+ takerAddress?: string;
777
659
  /** Slippage tolerance */
778
660
  slippage?: number;
779
661
  }
780
662
  /**
781
663
  * Response from OpenSea API for fetching a swap quote.
664
+ * Camelized from api-types `SwapQuoteResponse`.
782
665
  * @category API Response Types
783
666
  */
784
- export type GetSwapQuoteResponse = {
785
- [key: string]: unknown;
786
- };
667
+ export type GetSwapQuoteResponse = Camelize<ApiSwapQuoteResponse>;
787
668
  /**
788
669
  * Response from OpenSea API for fetching token details.
789
670
  * @category API Response Types
@@ -793,12 +674,12 @@ export type GetTokenResponse = Token;
793
674
  * Response from OpenSea API for fetching a token group by slug.
794
675
  * @category API Response Types
795
676
  */
796
- export type GetTokenGroupResponse = TokenGroupResponse;
677
+ export type GetTokenGroupResponse = Camelize<TokenGroupResponse>;
797
678
  /**
798
679
  * Response from OpenSea API for fetching a paginated list of token groups.
799
680
  * @category API Response Types
800
681
  */
801
- export type GetTokenGroupsResponse = TokenGroupPaginatedResponse;
682
+ export type GetTokenGroupsResponse = Camelize<TokenGroupPaginatedResponse>;
802
683
  /**
803
684
  * Query args for the Get Token Groups endpoint.
804
685
  * @category API Query Args
@@ -813,7 +694,7 @@ export interface GetTokenGroupsArgs {
813
694
  * Response from OpenSea API for requesting an instant API key.
814
695
  * @category API Response Types
815
696
  */
816
- export type RequestInstantApiKeyResponse = InstantApiKeyResponse;
697
+ export type RequestInstantApiKeyResponse = Camelize<InstantApiKeyResponse>;
817
698
  /**
818
699
  * Query args for the Search endpoint.
819
700
  * @category API Query Args
@@ -824,7 +705,7 @@ export interface SearchArgs {
824
705
  /** Filter by blockchain(s) */
825
706
  chains?: string[];
826
707
  /** Filter by asset type(s): collection, nft, token, account */
827
- asset_types?: string[];
708
+ assetTypes?: string[];
828
709
  /** Number of results to return (default: 20, max: 50) */
829
710
  limit?: number;
830
711
  }
@@ -838,13 +719,13 @@ export type CollectionSearchResult = {
838
719
  /** The collection name */
839
720
  name: string;
840
721
  /** URL of the collection image */
841
- image_url: string | null;
722
+ imageUrl: string | null;
842
723
  /** Whether trading is disabled for this collection */
843
- is_disabled: boolean;
724
+ isDisabled: boolean;
844
725
  /** Whether this collection is marked as NSFW */
845
- is_nsfw: boolean;
726
+ isNsfw: boolean;
846
727
  /** URL to the collection on OpenSea */
847
- opensea_url: string;
728
+ openseaUrl: string;
848
729
  };
849
730
  /**
850
731
  * Token (currency) search result.
@@ -860,13 +741,13 @@ export type TokenSearchResult = {
860
741
  /** Token symbol */
861
742
  symbol: string;
862
743
  /** URL of the token image */
863
- image_url: string | null;
744
+ imageUrl: string | null;
864
745
  /** Current USD price of the token */
865
- usd_price: string;
746
+ usdPrice: string;
866
747
  /** Number of decimal places for the token */
867
748
  decimals: number;
868
749
  /** URL to the token on OpenSea */
869
- opensea_url: string;
750
+ openseaUrl: string;
870
751
  };
871
752
  /**
872
753
  * NFT search result.
@@ -882,9 +763,9 @@ export type NftSearchResult = {
882
763
  /** Name of the NFT */
883
764
  name: string | null;
884
765
  /** URL of the NFT image */
885
- image_url: string | null;
766
+ imageUrl: string | null;
886
767
  /** URL to the NFT on OpenSea */
887
- opensea_url: string;
768
+ openseaUrl: string;
888
769
  };
889
770
  /**
890
771
  * Account search result.
@@ -896,9 +777,9 @@ export type AccountSearchResult = {
896
777
  /** Username of the account */
897
778
  username: string | null;
898
779
  /** URL of the account's profile image */
899
- profile_image_url: string | null;
780
+ profileImageUrl: string | null;
900
781
  /** URL to the account on OpenSea */
901
- opensea_url: string;
782
+ openseaUrl: string;
902
783
  };
903
784
  /**
904
785
  * A single search result with a type discriminator and the corresponding typed object.
@@ -925,23 +806,11 @@ export type SearchResponse = {
925
806
  results: SearchResult[];
926
807
  };
927
808
  /**
928
- * Information about a supported blockchain.
809
+ * Information about a supported blockchain. Sourced from `@opensea/api-types`
810
+ * (the SDK previously hand-rolled this with the same shape).
929
811
  * @category API Models
930
812
  */
931
- export type ChainInfo = {
932
- /** The chain identifier slug used in API paths */
933
- chain: string;
934
- /** Human-readable chain name */
935
- name: string;
936
- /** Native currency symbol */
937
- symbol: string;
938
- /** Whether token swaps are supported on this chain */
939
- supports_swaps: boolean;
940
- /** Block explorer name */
941
- block_explorer: string;
942
- /** Block explorer base URL */
943
- block_explorer_url: string;
944
- };
813
+ export type ChainInfo = Camelize<ChainResponse>;
945
814
  /**
946
815
  * Response from OpenSea API for listing supported chains.
947
816
  * @category API Response Types
@@ -951,31 +820,12 @@ export type GetChainsResponse = {
951
820
  chains: ChainInfo[];
952
821
  };
953
822
  /**
954
- * Token balance for a wallet address.
823
+ * Token balance for a wallet address. Sourced from `@opensea/api-types`
824
+ * (`TokenBalanceResponse`). Gains optional `status`, `base_token_liquidity_usd`,
825
+ * and `quote_token_liquidity_usd` fields the hand-rolled version didn't expose.
955
826
  * @category API Models
956
827
  */
957
- export type TokenBalance = {
958
- /** Token contract address */
959
- address: string;
960
- /** Chain the token is on */
961
- chain: string;
962
- /** Token name */
963
- name: string;
964
- /** Token symbol */
965
- symbol: string;
966
- /** URL of the token image */
967
- image_url?: string;
968
- /** Current price in USD */
969
- usd_price: string;
970
- /** Number of decimals */
971
- decimals: number;
972
- /** Token balance in display units */
973
- quantity: string;
974
- /** Total USD value of the balance */
975
- usd_value: string;
976
- /** URL to the token page on OpenSea */
977
- opensea_url: string;
978
- };
828
+ export type TokenBalance = Camelize<TokenBalanceResponse>;
979
829
  /**
980
830
  * Query args for Get Account Tokens endpoint.
981
831
  * @category API Query Args
@@ -986,11 +836,11 @@ export interface GetAccountTokensArgs {
986
836
  /** Comma-separated chain identifiers to filter by */
987
837
  chains?: string[];
988
838
  /** Field to sort by */
989
- sort_by?: string;
839
+ sortBy?: string;
990
840
  /** Sort direction */
991
- sort_direction?: "asc" | "desc";
841
+ sortDirection?: "asc" | "desc";
992
842
  /** Whether to disable spam filtering */
993
- disable_spam_filtering?: boolean;
843
+ disableSpamFiltering?: boolean;
994
844
  /** Cursor for pagination */
995
845
  cursor?: string;
996
846
  }
@@ -1000,64 +850,24 @@ export interface GetAccountTokensArgs {
1000
850
  */
1001
851
  export type GetAccountTokensResponse = QueryCursorsV2 & {
1002
852
  /** List of token balances */
1003
- token_balances: TokenBalance[];
853
+ tokenBalances: TokenBalance[];
1004
854
  };
1005
855
  /**
1006
- * Drop summary returned by OpenSea API.
856
+ * Drop summary returned by OpenSea API. Sourced from api-types `DropResponse`.
1007
857
  * @category API Models
1008
858
  */
1009
- export type Drop = {
1010
- /** Collection slug */
1011
- collection_slug: string;
1012
- /** Collection name */
1013
- collection_name?: string;
1014
- /** Blockchain the drop is on */
1015
- chain: string;
1016
- /** Contract address */
1017
- contract_address: string;
1018
- /** Drop type */
1019
- drop_type: string;
1020
- /** Whether the drop is currently minting */
1021
- is_minting: boolean;
1022
- /** Collection image URL */
1023
- image_url?: string;
1024
- /** OpenSea URL for the drop */
1025
- opensea_url: string;
1026
- };
859
+ export type Drop = Camelize<DropResponse>;
1027
860
  /**
1028
- * Drop stage information.
861
+ * Drop stage information. Sourced from api-types `DropStageResponse`.
1029
862
  * @category API Models
1030
863
  */
1031
- export type DropStage = {
1032
- /** Stage UUID */
1033
- uuid: string;
1034
- /** Stage type (e.g. public_sale) */
1035
- stage_type: string;
1036
- /** Stage label/name */
1037
- label?: string;
1038
- /** Mint price per token in wei */
1039
- price?: string;
1040
- /** Currency contract address */
1041
- price_currency_address: string;
1042
- /** Stage start time (ISO 8601) */
1043
- start_time: string;
1044
- /** Stage end time (ISO 8601) */
1045
- end_time: string;
1046
- /** Max tokens mintable per wallet in this stage */
1047
- max_per_wallet: string;
1048
- };
864
+ export type DropStage = Camelize<DropStageResponse>;
1049
865
  /**
1050
866
  * Detailed drop information including stages and supply.
867
+ * Sourced from api-types `DropDetailedResponse`.
1051
868
  * @category API Models
1052
869
  */
1053
- export type DropDetailed = Drop & {
1054
- /** Drop stages (public sale, presale, etc.) */
1055
- stages: DropStage[];
1056
- /** Total minted supply */
1057
- total_supply?: string;
1058
- /** Maximum supply */
1059
- max_supply?: string;
1060
- };
870
+ export type DropDetailed = Camelize<DropDetailedResponse>;
1061
871
  /**
1062
872
  * Response from OpenSea API for fetching a list of drops.
1063
873
  * @category API Response Types
@@ -1131,7 +941,7 @@ export interface GetTrendingCollectionsArgs {
1131
941
  */
1132
942
  export interface GetTopCollectionsArgs {
1133
943
  /** Sort by: one_day_volume, seven_days_volume, thirty_days_volume, floor_price, one_day_sales, etc. */
1134
- sort_by?: string;
944
+ sortBy?: string;
1135
945
  /** Blockchain(s) to filter by */
1136
946
  chains?: string[];
1137
947
  /** Category to filter by (e.g. art, gaming, pfps) */
@@ -1158,7 +968,7 @@ export type ResolveAccountResponse = {
1158
968
  /** OpenSea username, if available */
1159
969
  username?: string;
1160
970
  /** Primary ENS name, if available */
1161
- ens_name?: string;
971
+ ensName?: string;
1162
972
  };
1163
973
  /**
1164
974
  * Response from OpenSea API for validating NFT metadata.
@@ -1202,9 +1012,38 @@ export type ValidateMetadataResponse = {
1202
1012
  * Derived from the generated OpenAPI spec type to stay in sync automatically.
1203
1013
  * @category API Response Types
1204
1014
  */
1205
- export type GetNFTMetadataResponse = AssetMetadataResponse;
1206
- export type { CrossChainFulfillmentRequest, CrossChainFulfillmentResponse, CrossChainPaymentToken, FulfillerObject, ListingObject, SwapTransactionResponse, } from "@opensea/api-types";
1207
- export type { BatchCollectionsRequest, BatchNftsRequest, BatchTokensRequest, CollectionBatchResponse, CollectionHoldersPaginatedResponse, CollectionOfferAggregatesPaginatedResponse, CreateListingActionsRequest, CreateListingActionsResponse, DropDeployReceiptResponse, DropDeployRequest, DropDeployResponse, FloorPriceHistoryResponse, NftAnalyticsResponse, NftBatchResponse, OhlcvResponse, OwnersPaginatedResponse, PortfolioHistoryResponse, PortfolioStatsResponse, PriceHistoryResponse, ProfileCollectionsResponse, TokenBatchResponse, TokenSwapActivityPaginatedResponse, TransferRequest, TransferResponse, } from "@opensea/api-types";
1015
+ export type GetNFTMetadataResponse = Camelize<AssetMetadataResponse>;
1016
+ import type { BatchCollectionsRequest as ApiBatchCollectionsRequest, BatchNftsRequest as ApiBatchNftsRequest, BatchTokensRequest as ApiBatchTokensRequest, CollectionBatchResponse as ApiCollectionBatchResponse, CollectionHoldersPaginatedResponse as ApiCollectionHoldersPaginatedResponse, CollectionOfferAggregatesPaginatedResponse as ApiCollectionOfferAggregatesPaginatedResponse, CreateListingActionsRequest as ApiCreateListingActionsRequest, CreateListingActionsResponse as ApiCreateListingActionsResponse, CrossChainFulfillmentRequest as ApiCrossChainFulfillmentRequest, CrossChainFulfillmentResponse as ApiCrossChainFulfillmentResponse, CrossChainPaymentToken as ApiCrossChainPaymentToken, DropDeployReceiptResponse as ApiDropDeployReceiptResponse, DropDeployRequest as ApiDropDeployRequest, DropDeployResponse as ApiDropDeployResponse, FloorPriceHistoryResponse as ApiFloorPriceHistoryResponse, FulfillerObject as ApiFulfillerObject, ListingObject as ApiListingObject, NftAnalyticsResponse as ApiNftAnalyticsResponse, NftBatchResponse as ApiNftBatchResponse, OhlcvResponse as ApiOhlcvResponse, OwnersPaginatedResponse as ApiOwnersPaginatedResponse, PortfolioHistoryResponse as ApiPortfolioHistoryResponse, PortfolioStatsResponse as ApiPortfolioStatsResponse, PriceHistoryResponse as ApiPriceHistoryResponse, ProfileCollectionsResponse as ApiProfileCollectionsResponse, SwapTransactionResponse as ApiSwapTransactionResponse, TokenBatchResponse as ApiTokenBatchResponse, TokenSwapActivityPaginatedResponse as ApiTokenSwapActivityPaginatedResponse, TransferRequest as ApiTransferRequest, TransferResponse as ApiTransferResponse } from "@opensea/api-types";
1017
+ export type BatchCollectionsRequest = Camelize<ApiBatchCollectionsRequest>;
1018
+ export type BatchNftsRequest = Camelize<ApiBatchNftsRequest>;
1019
+ export type BatchTokensRequest = Camelize<ApiBatchTokensRequest>;
1020
+ export type CreateListingActionsRequest = Camelize<ApiCreateListingActionsRequest>;
1021
+ export type CrossChainFulfillmentRequest = Camelize<ApiCrossChainFulfillmentRequest>;
1022
+ export type DropDeployRequest = Camelize<ApiDropDeployRequest>;
1023
+ export type FulfillerObject = Camelize<ApiFulfillerObject>;
1024
+ export type ListingObject = Camelize<ApiListingObject>;
1025
+ export type TransferRequest = Camelize<ApiTransferRequest>;
1026
+ export type CollectionBatchResponse = Camelize<ApiCollectionBatchResponse>;
1027
+ export type CollectionHoldersPaginatedResponse = Camelize<ApiCollectionHoldersPaginatedResponse>;
1028
+ export type CollectionOfferAggregatesPaginatedResponse = Camelize<ApiCollectionOfferAggregatesPaginatedResponse>;
1029
+ export type CreateListingActionsResponse = Camelize<ApiCreateListingActionsResponse>;
1030
+ export type CrossChainFulfillmentResponse = Camelize<ApiCrossChainFulfillmentResponse>;
1031
+ export type CrossChainPaymentToken = Camelize<ApiCrossChainPaymentToken>;
1032
+ export type DropDeployReceiptResponse = Camelize<ApiDropDeployReceiptResponse>;
1033
+ export type DropDeployResponse = Camelize<ApiDropDeployResponse>;
1034
+ export type FloorPriceHistoryResponse = Camelize<ApiFloorPriceHistoryResponse>;
1035
+ export type NftAnalyticsResponse = Camelize<ApiNftAnalyticsResponse>;
1036
+ export type NftBatchResponse = Camelize<ApiNftBatchResponse>;
1037
+ export type OhlcvResponse = Camelize<ApiOhlcvResponse>;
1038
+ export type OwnersPaginatedResponse = Camelize<ApiOwnersPaginatedResponse>;
1039
+ export type PortfolioHistoryResponse = Camelize<ApiPortfolioHistoryResponse>;
1040
+ export type PortfolioStatsResponse = Camelize<ApiPortfolioStatsResponse>;
1041
+ export type PriceHistoryResponse = Camelize<ApiPriceHistoryResponse>;
1042
+ export type ProfileCollectionsResponse = Camelize<ApiProfileCollectionsResponse>;
1043
+ export type SwapTransactionResponse = Camelize<ApiSwapTransactionResponse>;
1044
+ export type TokenBatchResponse = Camelize<ApiTokenBatchResponse>;
1045
+ export type TokenSwapActivityPaginatedResponse = Camelize<ApiTokenSwapActivityPaginatedResponse>;
1046
+ export type TransferResponse = Camelize<ApiTransferResponse>;
1208
1047
  /**
1209
1048
  * Query args for paginated collection-analytics endpoints (offer aggregates,
1210
1049
  * holders). All fields are optional; `cursor` paginates forward.
@@ -1213,7 +1052,7 @@ export type { BatchCollectionsRequest, BatchNftsRequest, BatchTokensRequest, Col
1213
1052
  export interface PaginatedAnalyticsArgs {
1214
1053
  limit?: number;
1215
1054
  cursor?: string;
1216
- sort_direction?: "asc" | "desc";
1055
+ sortDirection?: "asc" | "desc";
1217
1056
  }
1218
1057
  /**
1219
1058
  * Query args for the collection holders endpoint — adds optional `owned_by`
@@ -1221,7 +1060,7 @@ export interface PaginatedAnalyticsArgs {
1221
1060
  * @category API Query Args
1222
1061
  */
1223
1062
  export interface CollectionHoldersArgs extends PaginatedAnalyticsArgs {
1224
- owned_by?: string;
1063
+ ownedBy?: string;
1225
1064
  }
1226
1065
  /**
1227
1066
  * Query args for the collection floor-price history endpoint.
@@ -1239,13 +1078,13 @@ export interface CollectionFloorPricesArgs {
1239
1078
  */
1240
1079
  export interface TokenTimeSeriesArgs {
1241
1080
  /** Start time (ISO 8601, required by the API). */
1242
- start_time: string;
1081
+ startTime: string;
1243
1082
  /** End time (ISO 8601, defaults to now). */
1244
- end_time?: string;
1083
+ endTime?: string;
1245
1084
  /** Candle bucket size: 1s, 1m, 5m, 15m, 1h, 4h, 1d. */
1246
- bucket_size?: string;
1085
+ bucketSize?: string;
1247
1086
  /** Whether to fill empty time windows with zero-volume candles (OHLCV only). */
1248
- fill_time_window?: boolean;
1087
+ fillTimeWindow?: boolean;
1249
1088
  }
1250
1089
  /**
1251
1090
  * Query args for the token swap-activity endpoint.
@@ -1279,10 +1118,10 @@ export interface PortfolioArgs {
1279
1118
  export interface ProfileOrdersArgs {
1280
1119
  after?: string;
1281
1120
  limit?: number;
1282
- collection_slugs?: string[];
1121
+ collectionSlugs?: string[];
1283
1122
  chains?: string[];
1284
- sort_by?: string;
1285
- sort_direction?: "asc" | "desc";
1123
+ sortBy?: string;
1124
+ sortDirection?: "asc" | "desc";
1286
1125
  }
1287
1126
  /**
1288
1127
  * Query args for the account profile favorites endpoint.
@@ -1291,8 +1130,8 @@ export interface ProfileOrdersArgs {
1291
1130
  export interface ProfileFavoritesArgs {
1292
1131
  after?: string;
1293
1132
  limit?: number;
1294
- sort_by?: string;
1295
- sort_direction?: "asc" | "desc";
1133
+ sortBy?: string;
1134
+ sortDirection?: "asc" | "desc";
1296
1135
  chains?: string[];
1297
1136
  }
1298
1137
  /**
@@ -1308,14 +1147,15 @@ export interface ProfileCollectionsArgs {
1308
1147
  * Response from the account favorites endpoint — favorited NFTs.
1309
1148
  * @category API Response Types
1310
1149
  */
1311
- export type ProfileFavoritesResponse = NftListResponse;
1150
+ export type ProfileFavoritesResponse = Camelize<NftListResponse>;
1312
1151
  /**
1313
1152
  * Response from the account profile listings endpoint.
1314
1153
  * @category API Response Types
1315
1154
  */
1316
- export type ProfileListingsResponse = ListingsResponse;
1155
+ export type ProfileListingsResponse = Camelize<ListingsResponse>;
1317
1156
  /**
1318
1157
  * Response from the account profile offers / offers_received endpoints.
1319
1158
  * @category API Response Types
1320
1159
  */
1321
- export type ProfileOffersResponse = OffersResponse;
1160
+ export type ProfileOffersResponse = Camelize<OffersResponse>;
1161
+ export {};