@0xsequence/marketplace-sdk 0.8.10 → 0.8.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/.changeset/fluffy-jokes-lay.md +5 -0
  2. package/.changeset/wise-bugs-boil.md +8 -0
  3. package/CHANGELOG.md +16 -3
  4. package/dist/{chunk-DWTLVJAW.js → chunk-6OPMUCGX.js} +1 -1
  5. package/dist/chunk-6OPMUCGX.js.map +1 -0
  6. package/dist/{chunk-O34GCB47.js → chunk-L6KWLCER.js} +4 -4
  7. package/dist/chunk-L6KWLCER.js.map +1 -0
  8. package/dist/{chunk-Y2HJO2VY.js → chunk-LAP2CKLN.js} +56 -3
  9. package/dist/chunk-LAP2CKLN.js.map +1 -0
  10. package/dist/{chunk-Y63BOO6M.js → chunk-LECCEZAO.js} +1 -1
  11. package/dist/{chunk-WH5BZC7W.js → chunk-N7SQWS2R.js} +3 -3
  12. package/dist/{chunk-7F27CJZW.js → chunk-OAOONM4S.js} +682 -439
  13. package/dist/chunk-OAOONM4S.js.map +1 -0
  14. package/dist/chunk-QY52UADF.js +107 -0
  15. package/dist/chunk-QY52UADF.js.map +1 -0
  16. package/dist/{chunk-UJSF7PSC.js → chunk-TNAR3XEF.js} +3766 -765
  17. package/dist/chunk-TNAR3XEF.js.map +1 -0
  18. package/dist/chunk-XABYNWXO.js +549 -0
  19. package/dist/chunk-XABYNWXO.js.map +1 -0
  20. package/dist/chunk-YB5UUF2G.js +11 -0
  21. package/dist/chunk-YB5UUF2G.js.map +1 -0
  22. package/dist/{chunk-M6NJ73Y5.js → chunk-YWGFI4PN.js} +87 -24
  23. package/dist/chunk-YWGFI4PN.js.map +1 -0
  24. package/dist/{create-config-CAQcvjl6.d.ts → create-config-DLMvMTkZ.d.ts} +2 -2
  25. package/dist/index.css +1 -1
  26. package/dist/index.css.map +1 -1
  27. package/dist/index.d.ts +7 -6
  28. package/dist/index.js +14 -15
  29. package/dist/{listTokenMetadata-DO4ChDjn.d.ts → marketCurrencies-enNVYwBk.d.ts} +77 -3
  30. package/dist/{marketplace.gen-DQzWciwC.d.ts → marketplace.gen-D24veUQs.d.ts} +3 -2
  31. package/dist/marketplaceConfig-BwNAbLPw.d.ts +21 -0
  32. package/dist/new-marketplace-types-BCw19X9S.d.ts +102 -0
  33. package/dist/react/_internal/api/index.d.ts +3 -3
  34. package/dist/react/_internal/api/index.js +1 -1
  35. package/dist/react/_internal/databeat/index.css +2764 -0
  36. package/dist/react/_internal/databeat/index.css.map +1 -0
  37. package/dist/react/_internal/databeat/index.d.ts +1 -1
  38. package/dist/react/_internal/databeat/index.js +12 -12
  39. package/dist/react/_internal/index.d.ts +61 -9
  40. package/dist/react/_internal/index.js +3 -3
  41. package/dist/react/_internal/wagmi/index.d.ts +5 -6
  42. package/dist/react/_internal/wagmi/index.js +1 -1
  43. package/dist/react/hooks/index.css +2764 -0
  44. package/dist/react/hooks/index.css.map +1 -0
  45. package/dist/react/hooks/index.d.ts +71 -222
  46. package/dist/react/hooks/index.js +16 -20
  47. package/dist/react/hooks/options/index.d.ts +5 -4
  48. package/dist/react/hooks/options/index.js +9 -7
  49. package/dist/react/index.css +1 -1
  50. package/dist/react/index.css.map +1 -1
  51. package/dist/react/index.d.ts +9 -9
  52. package/dist/react/index.js +28 -34
  53. package/dist/react/queries/index.d.ts +3 -3
  54. package/dist/react/queries/index.js +15 -4
  55. package/dist/react/ssr/index.d.ts +3 -3
  56. package/dist/react/ssr/index.js +6 -5
  57. package/dist/react/ssr/index.js.map +1 -1
  58. package/dist/react/ui/components/collectible-card/index.css +1 -1
  59. package/dist/react/ui/components/collectible-card/index.css.map +1 -1
  60. package/dist/react/ui/components/collectible-card/index.d.ts +3 -2
  61. package/dist/react/ui/components/collectible-card/index.js +12 -17
  62. package/dist/react/ui/icons/index.js +6 -6
  63. package/dist/react/ui/index.css +1 -1
  64. package/dist/react/ui/index.css.map +1 -1
  65. package/dist/react/ui/index.d.ts +1 -1
  66. package/dist/react/ui/index.js +12 -17
  67. package/dist/react/ui/modals/_internal/components/actionModal/index.css +2764 -0
  68. package/dist/react/ui/modals/_internal/components/actionModal/index.css.map +1 -0
  69. package/dist/react/ui/modals/_internal/components/actionModal/index.js +12 -12
  70. package/dist/sdk-config-qorA0TgF.d.ts +165 -0
  71. package/dist/{services-CMSb9ipU.d.ts → services-WrshxCqc.d.ts} +2 -2
  72. package/dist/types/index.d.ts +5 -4
  73. package/dist/types/index.js +7 -7
  74. package/dist/{index-MlUK9AQE.d.ts → useCollection-YAdXfVO7.d.ts} +1 -2
  75. package/dist/utils/abi/index.js +4 -4
  76. package/dist/utils/index.d.ts +1 -1
  77. package/dist/utils/index.js +8 -7
  78. package/package.json +15 -15
  79. package/src/react/_internal/api/__mocks__/builder.msw.ts +157 -80
  80. package/src/react/_internal/api/builder-api.ts +2 -2
  81. package/src/react/_internal/api/builder.gen.ts +667 -112
  82. package/src/react/_internal/api/marketplace.gen.ts +1981 -1316
  83. package/src/react/_internal/types.ts +1 -13
  84. package/src/react/_internal/wagmi/__tests__/create-config.test.ts +99 -84
  85. package/src/react/_internal/wagmi/create-config.ts +8 -4
  86. package/src/react/_internal/wagmi/get-connectors.ts +24 -19
  87. package/src/react/hooks/__tests__/__snapshots__/useListCollections.test.tsx.snap +114 -0
  88. package/src/react/hooks/__tests__/__snapshots__/useMarketplaceConfig.test.tsx.snap +85 -83
  89. package/src/react/hooks/__tests__/useFilters.test.tsx +0 -16
  90. package/src/react/hooks/__tests__/useInventory.test.tsx +16 -16
  91. package/src/react/hooks/__tests__/useListCollections.test.tsx +23 -56
  92. package/src/react/hooks/__tests__/{useCurrencies.test.tsx → useMarketCurrencies.test.tsx} +21 -15
  93. package/src/react/hooks/__tests__/useMarketplaceConfig.test.tsx +2 -59
  94. package/src/react/hooks/index.ts +2 -1
  95. package/src/react/hooks/useBalanceOfCollectible.tsx +5 -3
  96. package/src/react/hooks/useConvertPriceToUSD.tsx +1 -1
  97. package/src/react/hooks/useFilters.tsx +14 -22
  98. package/src/react/hooks/useGetTokenSuppliesMap.ts +28 -0
  99. package/src/react/hooks/useInventory.tsx +4 -3
  100. package/src/react/hooks/useListBalances.tsx +5 -3
  101. package/src/react/hooks/useListCollectibles.tsx +5 -3
  102. package/src/react/hooks/useListCollections.tsx +14 -76
  103. package/src/react/hooks/useMarketCurrencies.tsx +8 -0
  104. package/src/react/hooks/useMarketplaceConfig.tsx +0 -2
  105. package/src/react/queries/index.ts +1 -0
  106. package/src/react/queries/inventory.ts +1 -1
  107. package/src/react/queries/listCollections.ts +118 -0
  108. package/src/react/queries/marketCurrencies.ts +77 -0
  109. package/src/react/queries/marketplaceConfig.ts +83 -55
  110. package/src/react/ssr/__tests__/__snapshots__/create-ssr-client.test.ts.snap +85 -83
  111. package/src/react/ui/components/collectible-card/__tests__/Media.test.tsx +41 -1
  112. package/src/react/ui/components/collectible-card/media/Media.tsx +11 -6
  113. package/src/react/ui/components/collectible-card/media/MediaSkeleton.tsx +1 -1
  114. package/src/react/ui/components/collectible-card/media/types.ts +1 -0
  115. package/src/react/ui/modals/BuyModal/ERC1155QuantityModal.tsx +9 -3
  116. package/src/react/ui/modals/BuyModal/hooks/__tests__/useFees.test.tsx +31 -21
  117. package/src/react/ui/modals/BuyModal/hooks/useFees.ts +3 -2
  118. package/src/react/ui/modals/CreateListingModal/Modal.tsx +3 -5
  119. package/src/react/ui/modals/CreateListingModal/hooks/useCreateListing.tsx +5 -3
  120. package/src/react/ui/modals/CreateListingModal/hooks/useTransactionSteps.tsx +2 -2
  121. package/src/react/ui/modals/MakeOfferModal/Modal.tsx +2 -3
  122. package/src/react/ui/modals/MakeOfferModal/hooks/useMakeOffer.tsx +4 -3
  123. package/src/react/ui/modals/SellModal/Modal.tsx +0 -1
  124. package/src/react/ui/modals/SellModal/hooks/useTransactionSteps.tsx +2 -2
  125. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/index.tsx +0 -1
  126. package/src/react/ui/modals/TransferModal/index.tsx +0 -1
  127. package/src/react/ui/modals/_internal/components/currencyOptionsSelect/__tests__/index.test.tsx +2 -2
  128. package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +7 -6
  129. package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/__tests__/SelectWaasFeeOptions.test.tsx +13 -7
  130. package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/index.tsx +3 -5
  131. package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/useWaasFeeOptionManager.tsx +5 -3
  132. package/src/react/ui/modals/_internal/components/transactionDetails/index.tsx +2 -2
  133. package/src/react/ui/modals/_internal/hooks/useSelectWaasFeeOptions.ts +2 -12
  134. package/src/types/index.ts +1 -6
  135. package/src/types/new-marketplace-types.ts +119 -0
  136. package/src/types/sdk-config.ts +18 -2
  137. package/src/types/types.ts +1 -0
  138. package/tsconfig.tsbuildinfo +1 -1
  139. package/dist/chunk-7F27CJZW.js.map +0 -1
  140. package/dist/chunk-A7BVFBWB.js +0 -81
  141. package/dist/chunk-A7BVFBWB.js.map +0 -1
  142. package/dist/chunk-D7RVSZAQ.js +0 -332
  143. package/dist/chunk-D7RVSZAQ.js.map +0 -1
  144. package/dist/chunk-DWTLVJAW.js.map +0 -1
  145. package/dist/chunk-FGM57QUU.js +0 -128
  146. package/dist/chunk-FGM57QUU.js.map +0 -1
  147. package/dist/chunk-JKCF7HEA.js +0 -1
  148. package/dist/chunk-JKCF7HEA.js.map +0 -1
  149. package/dist/chunk-KTST7ORH.js +0 -53
  150. package/dist/chunk-KTST7ORH.js.map +0 -1
  151. package/dist/chunk-M6NJ73Y5.js.map +0 -1
  152. package/dist/chunk-N7BPFK46.js +0 -1
  153. package/dist/chunk-N7BPFK46.js.map +0 -1
  154. package/dist/chunk-O34GCB47.js.map +0 -1
  155. package/dist/chunk-RVIUUJTP.js +0 -76
  156. package/dist/chunk-RVIUUJTP.js.map +0 -1
  157. package/dist/chunk-SXVUTSMT.js +0 -2895
  158. package/dist/chunk-SXVUTSMT.js.map +0 -1
  159. package/dist/chunk-UJSF7PSC.js.map +0 -1
  160. package/dist/chunk-Y2HJO2VY.js.map +0 -1
  161. package/dist/marketplaceConfig-D0MXemEl.d.ts +0 -17
  162. package/dist/sdk-config-onSPBxJj.d.ts +0 -134
  163. package/dist/types-B8xzPEKX.d.ts +0 -68
  164. package/src/react/hooks/useCurrencies.tsx +0 -77
  165. /package/dist/{chunk-Y63BOO6M.js.map → chunk-LECCEZAO.js.map} +0 -0
  166. /package/dist/{chunk-WH5BZC7W.js.map → chunk-N7SQWS2R.js.map} +0 -0
@@ -137,6 +137,7 @@ var ContractType = /* @__PURE__ */ ((ContractType2) => {
137
137
  ContractType2["ERC20"] = "ERC20";
138
138
  ContractType2["ERC721"] = "ERC721";
139
139
  ContractType2["ERC1155"] = "ERC1155";
140
+ ContractType2["LAOSERC721"] = "LAOSERC721";
140
141
  return ContractType2;
141
142
  })(ContractType || {});
142
143
  var CollectionPriority = /* @__PURE__ */ ((CollectionPriority2) => {
@@ -253,156 +254,211 @@ var Admin = class {
253
254
  return this.fetch(
254
255
  this.url("CreateCollection"),
255
256
  createHTTPRequest(args, headers, signal)
256
- ).then((res) => {
257
- return buildResponse(res).then((_data) => {
258
- return {
259
- collection: _data.collection
260
- };
261
- });
262
- }, (error) => {
263
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
264
- });
257
+ ).then(
258
+ (res) => {
259
+ return buildResponse(res).then((_data) => {
260
+ return {
261
+ collection: _data.collection
262
+ };
263
+ });
264
+ },
265
+ (error) => {
266
+ throw WebrpcRequestFailedError.new({
267
+ cause: `fetch(): ${error.message || ""}`
268
+ });
269
+ }
270
+ );
265
271
  };
266
272
  getCollection = (args, headers, signal) => {
267
273
  return this.fetch(
268
274
  this.url("GetCollection"),
269
275
  createHTTPRequest(args, headers, signal)
270
- ).then((res) => {
271
- return buildResponse(res).then((_data) => {
272
- return {
273
- collection: _data.collection
274
- };
275
- });
276
- }, (error) => {
277
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
278
- });
276
+ ).then(
277
+ (res) => {
278
+ return buildResponse(res).then((_data) => {
279
+ return {
280
+ collection: _data.collection
281
+ };
282
+ });
283
+ },
284
+ (error) => {
285
+ throw WebrpcRequestFailedError.new({
286
+ cause: `fetch(): ${error.message || ""}`
287
+ });
288
+ }
289
+ );
279
290
  };
280
291
  updateCollection = (args, headers, signal) => {
281
292
  return this.fetch(
282
293
  this.url("UpdateCollection"),
283
294
  createHTTPRequest(args, headers, signal)
284
- ).then((res) => {
285
- return buildResponse(res).then((_data) => {
286
- return {
287
- collection: _data.collection
288
- };
289
- });
290
- }, (error) => {
291
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
292
- });
295
+ ).then(
296
+ (res) => {
297
+ return buildResponse(res).then((_data) => {
298
+ return {
299
+ collection: _data.collection
300
+ };
301
+ });
302
+ },
303
+ (error) => {
304
+ throw WebrpcRequestFailedError.new({
305
+ cause: `fetch(): ${error.message || ""}`
306
+ });
307
+ }
308
+ );
293
309
  };
294
310
  listCollections = (args, headers, signal) => {
295
311
  return this.fetch(
296
312
  this.url("ListCollections"),
297
313
  createHTTPRequest(args, headers, signal)
298
- ).then((res) => {
299
- return buildResponse(res).then((_data) => {
300
- return {
301
- collections: _data.collections,
302
- page: _data.page
303
- };
304
- });
305
- }, (error) => {
306
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
307
- });
314
+ ).then(
315
+ (res) => {
316
+ return buildResponse(res).then((_data) => {
317
+ return {
318
+ collections: _data.collections,
319
+ page: _data.page
320
+ };
321
+ });
322
+ },
323
+ (error) => {
324
+ throw WebrpcRequestFailedError.new({
325
+ cause: `fetch(): ${error.message || ""}`
326
+ });
327
+ }
328
+ );
308
329
  };
309
330
  deleteCollection = (args, headers, signal) => {
310
331
  return this.fetch(
311
332
  this.url("DeleteCollection"),
312
333
  createHTTPRequest(args, headers, signal)
313
- ).then((res) => {
314
- return buildResponse(res).then((_data) => {
315
- return {
316
- collection: _data.collection
317
- };
318
- });
319
- }, (error) => {
320
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
321
- });
334
+ ).then(
335
+ (res) => {
336
+ return buildResponse(res).then((_data) => {
337
+ return {
338
+ collection: _data.collection
339
+ };
340
+ });
341
+ },
342
+ (error) => {
343
+ throw WebrpcRequestFailedError.new({
344
+ cause: `fetch(): ${error.message || ""}`
345
+ });
346
+ }
347
+ );
322
348
  };
323
349
  syncCollection = (args, headers, signal) => {
324
350
  return this.fetch(
325
351
  this.url("SyncCollection"),
326
352
  createHTTPRequest(args, headers, signal)
327
- ).then((res) => {
328
- return buildResponse(res).then((_data) => {
329
- return {
330
- collection: _data.collection
331
- };
332
- });
333
- }, (error) => {
334
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
335
- });
353
+ ).then(
354
+ (res) => {
355
+ return buildResponse(res).then((_data) => {
356
+ return {
357
+ collection: _data.collection
358
+ };
359
+ });
360
+ },
361
+ (error) => {
362
+ throw WebrpcRequestFailedError.new({
363
+ cause: `fetch(): ${error.message || ""}`
364
+ });
365
+ }
366
+ );
336
367
  };
337
368
  createCurrency = (args, headers, signal) => {
338
369
  return this.fetch(
339
370
  this.url("CreateCurrency"),
340
371
  createHTTPRequest(args, headers, signal)
341
- ).then((res) => {
342
- return buildResponse(res).then((_data) => {
343
- return {
344
- currency: _data.currency
345
- };
346
- });
347
- }, (error) => {
348
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
349
- });
372
+ ).then(
373
+ (res) => {
374
+ return buildResponse(res).then((_data) => {
375
+ return {
376
+ currency: _data.currency
377
+ };
378
+ });
379
+ },
380
+ (error) => {
381
+ throw WebrpcRequestFailedError.new({
382
+ cause: `fetch(): ${error.message || ""}`
383
+ });
384
+ }
385
+ );
350
386
  };
351
387
  createCurrencies = (args, headers, signal) => {
352
388
  return this.fetch(
353
389
  this.url("CreateCurrencies"),
354
390
  createHTTPRequest(args, headers, signal)
355
- ).then((res) => {
356
- return buildResponse(res).then((_data) => {
357
- return {
358
- currency: _data.currency
359
- };
360
- });
361
- }, (error) => {
362
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
363
- });
391
+ ).then(
392
+ (res) => {
393
+ return buildResponse(res).then((_data) => {
394
+ return {
395
+ currency: _data.currency
396
+ };
397
+ });
398
+ },
399
+ (error) => {
400
+ throw WebrpcRequestFailedError.new({
401
+ cause: `fetch(): ${error.message || ""}`
402
+ });
403
+ }
404
+ );
364
405
  };
365
406
  updateCurrency = (args, headers, signal) => {
366
407
  return this.fetch(
367
408
  this.url("UpdateCurrency"),
368
409
  createHTTPRequest(args, headers, signal)
369
- ).then((res) => {
370
- return buildResponse(res).then((_data) => {
371
- return {
372
- currency: _data.currency
373
- };
374
- });
375
- }, (error) => {
376
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
377
- });
410
+ ).then(
411
+ (res) => {
412
+ return buildResponse(res).then((_data) => {
413
+ return {
414
+ currency: _data.currency
415
+ };
416
+ });
417
+ },
418
+ (error) => {
419
+ throw WebrpcRequestFailedError.new({
420
+ cause: `fetch(): ${error.message || ""}`
421
+ });
422
+ }
423
+ );
378
424
  };
379
425
  listCurrencies = (headers, signal) => {
380
426
  return this.fetch(
381
427
  this.url("ListCurrencies"),
382
428
  createHTTPRequest({}, headers, signal)
383
- ).then((res) => {
384
- return buildResponse(res).then((_data) => {
385
- return {
386
- currencies: _data.currencies
387
- };
388
- });
389
- }, (error) => {
390
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
391
- });
429
+ ).then(
430
+ (res) => {
431
+ return buildResponse(res).then((_data) => {
432
+ return {
433
+ currencies: _data.currencies
434
+ };
435
+ });
436
+ },
437
+ (error) => {
438
+ throw WebrpcRequestFailedError.new({
439
+ cause: `fetch(): ${error.message || ""}`
440
+ });
441
+ }
442
+ );
392
443
  };
393
444
  deleteCurrency = (args, headers, signal) => {
394
445
  return this.fetch(
395
446
  this.url("DeleteCurrency"),
396
447
  createHTTPRequest(args, headers, signal)
397
- ).then((res) => {
398
- return buildResponse(res).then((_data) => {
399
- return {
400
- currency: _data.currency
401
- };
402
- });
403
- }, (error) => {
404
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
405
- });
448
+ ).then(
449
+ (res) => {
450
+ return buildResponse(res).then((_data) => {
451
+ return {
452
+ currency: _data.currency
453
+ };
454
+ });
455
+ },
456
+ (error) => {
457
+ throw WebrpcRequestFailedError.new({
458
+ cause: `fetch(): ${error.message || ""}`
459
+ });
460
+ }
461
+ );
406
462
  };
407
463
  };
408
464
  var Marketplace = class {
@@ -420,515 +476,698 @@ var Marketplace = class {
420
476
  return this.fetch(
421
477
  this.url("ListCurrencies"),
422
478
  createHTTPRequest({}, headers, signal)
423
- ).then((res) => {
424
- return buildResponse(res).then((_data) => {
425
- return {
426
- currencies: _data.currencies
427
- };
428
- });
429
- }, (error) => {
430
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
431
- });
479
+ ).then(
480
+ (res) => {
481
+ return buildResponse(res).then((_data) => {
482
+ return {
483
+ currencies: _data.currencies
484
+ };
485
+ });
486
+ },
487
+ (error) => {
488
+ throw WebrpcRequestFailedError.new({
489
+ cause: `fetch(): ${error.message || ""}`
490
+ });
491
+ }
492
+ );
432
493
  };
433
494
  getCollectionDetail = (args, headers, signal) => {
434
495
  return this.fetch(
435
496
  this.url("GetCollectionDetail"),
436
497
  createHTTPRequest(args, headers, signal)
437
- ).then((res) => {
438
- return buildResponse(res).then((_data) => {
439
- return {
440
- collection: _data.collection
441
- };
442
- });
443
- }, (error) => {
444
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
445
- });
498
+ ).then(
499
+ (res) => {
500
+ return buildResponse(res).then((_data) => {
501
+ return {
502
+ collection: _data.collection
503
+ };
504
+ });
505
+ },
506
+ (error) => {
507
+ throw WebrpcRequestFailedError.new({
508
+ cause: `fetch(): ${error.message || ""}`
509
+ });
510
+ }
511
+ );
446
512
  };
447
513
  getCollectible = (args, headers, signal) => {
448
514
  return this.fetch(
449
515
  this.url("GetCollectible"),
450
516
  createHTTPRequest(args, headers, signal)
451
- ).then((res) => {
452
- return buildResponse(res).then((_data) => {
453
- return {
454
- metadata: _data.metadata
455
- };
456
- });
457
- }, (error) => {
458
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
459
- });
517
+ ).then(
518
+ (res) => {
519
+ return buildResponse(res).then((_data) => {
520
+ return {
521
+ metadata: _data.metadata
522
+ };
523
+ });
524
+ },
525
+ (error) => {
526
+ throw WebrpcRequestFailedError.new({
527
+ cause: `fetch(): ${error.message || ""}`
528
+ });
529
+ }
530
+ );
460
531
  };
461
532
  getLowestPriceOfferForCollectible = (args, headers, signal) => {
462
533
  return this.fetch(
463
534
  this.url("GetLowestPriceOfferForCollectible"),
464
535
  createHTTPRequest(args, headers, signal)
465
- ).then((res) => {
466
- return buildResponse(res).then((_data) => {
467
- return {
468
- order: _data.order
469
- };
470
- });
471
- }, (error) => {
472
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
473
- });
536
+ ).then(
537
+ (res) => {
538
+ return buildResponse(res).then((_data) => {
539
+ return {
540
+ order: _data.order
541
+ };
542
+ });
543
+ },
544
+ (error) => {
545
+ throw WebrpcRequestFailedError.new({
546
+ cause: `fetch(): ${error.message || ""}`
547
+ });
548
+ }
549
+ );
474
550
  };
475
551
  getHighestPriceOfferForCollectible = (args, headers, signal) => {
476
552
  return this.fetch(
477
553
  this.url("GetHighestPriceOfferForCollectible"),
478
554
  createHTTPRequest(args, headers, signal)
479
- ).then((res) => {
480
- return buildResponse(res).then((_data) => {
481
- return {
482
- order: _data.order
483
- };
484
- });
485
- }, (error) => {
486
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
487
- });
555
+ ).then(
556
+ (res) => {
557
+ return buildResponse(res).then((_data) => {
558
+ return {
559
+ order: _data.order
560
+ };
561
+ });
562
+ },
563
+ (error) => {
564
+ throw WebrpcRequestFailedError.new({
565
+ cause: `fetch(): ${error.message || ""}`
566
+ });
567
+ }
568
+ );
488
569
  };
489
570
  getLowestPriceListingForCollectible = (args, headers, signal) => {
490
571
  return this.fetch(
491
572
  this.url("GetLowestPriceListingForCollectible"),
492
573
  createHTTPRequest(args, headers, signal)
493
- ).then((res) => {
494
- return buildResponse(res).then((_data) => {
495
- return {
496
- order: _data.order
497
- };
498
- });
499
- }, (error) => {
500
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
501
- });
574
+ ).then(
575
+ (res) => {
576
+ return buildResponse(res).then((_data) => {
577
+ return {
578
+ order: _data.order
579
+ };
580
+ });
581
+ },
582
+ (error) => {
583
+ throw WebrpcRequestFailedError.new({
584
+ cause: `fetch(): ${error.message || ""}`
585
+ });
586
+ }
587
+ );
502
588
  };
503
589
  getHighestPriceListingForCollectible = (args, headers, signal) => {
504
590
  return this.fetch(
505
591
  this.url("GetHighestPriceListingForCollectible"),
506
592
  createHTTPRequest(args, headers, signal)
507
- ).then((res) => {
508
- return buildResponse(res).then((_data) => {
509
- return {
510
- order: _data.order
511
- };
512
- });
513
- }, (error) => {
514
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
515
- });
593
+ ).then(
594
+ (res) => {
595
+ return buildResponse(res).then((_data) => {
596
+ return {
597
+ order: _data.order
598
+ };
599
+ });
600
+ },
601
+ (error) => {
602
+ throw WebrpcRequestFailedError.new({
603
+ cause: `fetch(): ${error.message || ""}`
604
+ });
605
+ }
606
+ );
516
607
  };
517
608
  listListingsForCollectible = (args, headers, signal) => {
518
609
  return this.fetch(
519
610
  this.url("ListListingsForCollectible"),
520
611
  createHTTPRequest(args, headers, signal)
521
- ).then((res) => {
522
- return buildResponse(res).then((_data) => {
523
- return {
524
- listings: _data.listings,
525
- page: _data.page
526
- };
527
- });
528
- }, (error) => {
529
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
530
- });
612
+ ).then(
613
+ (res) => {
614
+ return buildResponse(res).then((_data) => {
615
+ return {
616
+ listings: _data.listings,
617
+ page: _data.page
618
+ };
619
+ });
620
+ },
621
+ (error) => {
622
+ throw WebrpcRequestFailedError.new({
623
+ cause: `fetch(): ${error.message || ""}`
624
+ });
625
+ }
626
+ );
531
627
  };
532
628
  listOffersForCollectible = (args, headers, signal) => {
533
629
  return this.fetch(
534
630
  this.url("ListOffersForCollectible"),
535
631
  createHTTPRequest(args, headers, signal)
536
- ).then((res) => {
537
- return buildResponse(res).then((_data) => {
538
- return {
539
- offers: _data.offers,
540
- page: _data.page
541
- };
542
- });
543
- }, (error) => {
544
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
545
- });
632
+ ).then(
633
+ (res) => {
634
+ return buildResponse(res).then((_data) => {
635
+ return {
636
+ offers: _data.offers,
637
+ page: _data.page
638
+ };
639
+ });
640
+ },
641
+ (error) => {
642
+ throw WebrpcRequestFailedError.new({
643
+ cause: `fetch(): ${error.message || ""}`
644
+ });
645
+ }
646
+ );
546
647
  };
547
648
  getCountOfListingsForCollectible = (args, headers, signal) => {
548
649
  return this.fetch(
549
650
  this.url("GetCountOfListingsForCollectible"),
550
651
  createHTTPRequest(args, headers, signal)
551
- ).then((res) => {
552
- return buildResponse(res).then((_data) => {
553
- return {
554
- count: _data.count
555
- };
556
- });
557
- }, (error) => {
558
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
559
- });
652
+ ).then(
653
+ (res) => {
654
+ return buildResponse(res).then((_data) => {
655
+ return {
656
+ count: _data.count
657
+ };
658
+ });
659
+ },
660
+ (error) => {
661
+ throw WebrpcRequestFailedError.new({
662
+ cause: `fetch(): ${error.message || ""}`
663
+ });
664
+ }
665
+ );
560
666
  };
561
667
  getCountOfOffersForCollectible = (args, headers, signal) => {
562
668
  return this.fetch(
563
669
  this.url("GetCountOfOffersForCollectible"),
564
670
  createHTTPRequest(args, headers, signal)
565
- ).then((res) => {
566
- return buildResponse(res).then((_data) => {
567
- return {
568
- count: _data.count
569
- };
570
- });
571
- }, (error) => {
572
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
573
- });
671
+ ).then(
672
+ (res) => {
673
+ return buildResponse(res).then((_data) => {
674
+ return {
675
+ count: _data.count
676
+ };
677
+ });
678
+ },
679
+ (error) => {
680
+ throw WebrpcRequestFailedError.new({
681
+ cause: `fetch(): ${error.message || ""}`
682
+ });
683
+ }
684
+ );
574
685
  };
575
686
  getCollectibleLowestOffer = (args, headers, signal) => {
576
687
  return this.fetch(
577
688
  this.url("GetCollectibleLowestOffer"),
578
689
  createHTTPRequest(args, headers, signal)
579
- ).then((res) => {
580
- return buildResponse(res).then((_data) => {
581
- return {
582
- order: _data.order
583
- };
584
- });
585
- }, (error) => {
586
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
587
- });
690
+ ).then(
691
+ (res) => {
692
+ return buildResponse(res).then((_data) => {
693
+ return {
694
+ order: _data.order
695
+ };
696
+ });
697
+ },
698
+ (error) => {
699
+ throw WebrpcRequestFailedError.new({
700
+ cause: `fetch(): ${error.message || ""}`
701
+ });
702
+ }
703
+ );
588
704
  };
589
705
  getCollectibleHighestOffer = (args, headers, signal) => {
590
706
  return this.fetch(
591
707
  this.url("GetCollectibleHighestOffer"),
592
708
  createHTTPRequest(args, headers, signal)
593
- ).then((res) => {
594
- return buildResponse(res).then((_data) => {
595
- return {
596
- order: _data.order
597
- };
598
- });
599
- }, (error) => {
600
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
601
- });
709
+ ).then(
710
+ (res) => {
711
+ return buildResponse(res).then((_data) => {
712
+ return {
713
+ order: _data.order
714
+ };
715
+ });
716
+ },
717
+ (error) => {
718
+ throw WebrpcRequestFailedError.new({
719
+ cause: `fetch(): ${error.message || ""}`
720
+ });
721
+ }
722
+ );
602
723
  };
603
724
  getCollectibleLowestListing = (args, headers, signal) => {
604
725
  return this.fetch(
605
726
  this.url("GetCollectibleLowestListing"),
606
727
  createHTTPRequest(args, headers, signal)
607
- ).then((res) => {
608
- return buildResponse(res).then((_data) => {
609
- return {
610
- order: _data.order
611
- };
612
- });
613
- }, (error) => {
614
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
615
- });
728
+ ).then(
729
+ (res) => {
730
+ return buildResponse(res).then((_data) => {
731
+ return {
732
+ order: _data.order
733
+ };
734
+ });
735
+ },
736
+ (error) => {
737
+ throw WebrpcRequestFailedError.new({
738
+ cause: `fetch(): ${error.message || ""}`
739
+ });
740
+ }
741
+ );
616
742
  };
617
743
  getCollectibleHighestListing = (args, headers, signal) => {
618
744
  return this.fetch(
619
745
  this.url("GetCollectibleHighestListing"),
620
746
  createHTTPRequest(args, headers, signal)
621
- ).then((res) => {
622
- return buildResponse(res).then((_data) => {
623
- return {
624
- order: _data.order
625
- };
626
- });
627
- }, (error) => {
628
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
629
- });
747
+ ).then(
748
+ (res) => {
749
+ return buildResponse(res).then((_data) => {
750
+ return {
751
+ order: _data.order
752
+ };
753
+ });
754
+ },
755
+ (error) => {
756
+ throw WebrpcRequestFailedError.new({
757
+ cause: `fetch(): ${error.message || ""}`
758
+ });
759
+ }
760
+ );
630
761
  };
631
762
  listCollectibleListings = (args, headers, signal) => {
632
763
  return this.fetch(
633
764
  this.url("ListCollectibleListings"),
634
765
  createHTTPRequest(args, headers, signal)
635
- ).then((res) => {
636
- return buildResponse(res).then((_data) => {
637
- return {
638
- listings: _data.listings,
639
- page: _data.page
640
- };
641
- });
642
- }, (error) => {
643
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
644
- });
766
+ ).then(
767
+ (res) => {
768
+ return buildResponse(res).then((_data) => {
769
+ return {
770
+ listings: _data.listings,
771
+ page: _data.page
772
+ };
773
+ });
774
+ },
775
+ (error) => {
776
+ throw WebrpcRequestFailedError.new({
777
+ cause: `fetch(): ${error.message || ""}`
778
+ });
779
+ }
780
+ );
645
781
  };
646
782
  listCollectibleOffers = (args, headers, signal) => {
647
783
  return this.fetch(
648
784
  this.url("ListCollectibleOffers"),
649
785
  createHTTPRequest(args, headers, signal)
650
- ).then((res) => {
651
- return buildResponse(res).then((_data) => {
652
- return {
653
- offers: _data.offers,
654
- page: _data.page
655
- };
656
- });
657
- }, (error) => {
658
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
659
- });
786
+ ).then(
787
+ (res) => {
788
+ return buildResponse(res).then((_data) => {
789
+ return {
790
+ offers: _data.offers,
791
+ page: _data.page
792
+ };
793
+ });
794
+ },
795
+ (error) => {
796
+ throw WebrpcRequestFailedError.new({
797
+ cause: `fetch(): ${error.message || ""}`
798
+ });
799
+ }
800
+ );
660
801
  };
661
802
  generateBuyTransaction = (args, headers, signal) => {
662
803
  return this.fetch(
663
804
  this.url("GenerateBuyTransaction"),
664
805
  createHTTPRequest(args, headers, signal)
665
- ).then((res) => {
666
- return buildResponse(res).then((_data) => {
667
- return {
668
- steps: _data.steps
669
- };
670
- });
671
- }, (error) => {
672
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
673
- });
806
+ ).then(
807
+ (res) => {
808
+ return buildResponse(res).then((_data) => {
809
+ return {
810
+ steps: _data.steps
811
+ };
812
+ });
813
+ },
814
+ (error) => {
815
+ throw WebrpcRequestFailedError.new({
816
+ cause: `fetch(): ${error.message || ""}`
817
+ });
818
+ }
819
+ );
674
820
  };
675
821
  generateSellTransaction = (args, headers, signal) => {
676
822
  return this.fetch(
677
823
  this.url("GenerateSellTransaction"),
678
824
  createHTTPRequest(args, headers, signal)
679
- ).then((res) => {
680
- return buildResponse(res).then((_data) => {
681
- return {
682
- steps: _data.steps
683
- };
684
- });
685
- }, (error) => {
686
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
687
- });
825
+ ).then(
826
+ (res) => {
827
+ return buildResponse(res).then((_data) => {
828
+ return {
829
+ steps: _data.steps
830
+ };
831
+ });
832
+ },
833
+ (error) => {
834
+ throw WebrpcRequestFailedError.new({
835
+ cause: `fetch(): ${error.message || ""}`
836
+ });
837
+ }
838
+ );
688
839
  };
689
840
  generateListingTransaction = (args, headers, signal) => {
690
841
  return this.fetch(
691
842
  this.url("GenerateListingTransaction"),
692
843
  createHTTPRequest(args, headers, signal)
693
- ).then((res) => {
694
- return buildResponse(res).then((_data) => {
695
- return {
696
- steps: _data.steps
697
- };
698
- });
699
- }, (error) => {
700
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
701
- });
844
+ ).then(
845
+ (res) => {
846
+ return buildResponse(res).then((_data) => {
847
+ return {
848
+ steps: _data.steps
849
+ };
850
+ });
851
+ },
852
+ (error) => {
853
+ throw WebrpcRequestFailedError.new({
854
+ cause: `fetch(): ${error.message || ""}`
855
+ });
856
+ }
857
+ );
702
858
  };
703
859
  generateOfferTransaction = (args, headers, signal) => {
704
860
  return this.fetch(
705
861
  this.url("GenerateOfferTransaction"),
706
862
  createHTTPRequest(args, headers, signal)
707
- ).then((res) => {
708
- return buildResponse(res).then((_data) => {
709
- return {
710
- steps: _data.steps
711
- };
712
- });
713
- }, (error) => {
714
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
715
- });
863
+ ).then(
864
+ (res) => {
865
+ return buildResponse(res).then((_data) => {
866
+ return {
867
+ steps: _data.steps
868
+ };
869
+ });
870
+ },
871
+ (error) => {
872
+ throw WebrpcRequestFailedError.new({
873
+ cause: `fetch(): ${error.message || ""}`
874
+ });
875
+ }
876
+ );
716
877
  };
717
878
  generateCancelTransaction = (args, headers, signal) => {
718
879
  return this.fetch(
719
880
  this.url("GenerateCancelTransaction"),
720
881
  createHTTPRequest(args, headers, signal)
721
- ).then((res) => {
722
- return buildResponse(res).then((_data) => {
723
- return {
724
- steps: _data.steps
725
- };
726
- });
727
- }, (error) => {
728
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
729
- });
882
+ ).then(
883
+ (res) => {
884
+ return buildResponse(res).then((_data) => {
885
+ return {
886
+ steps: _data.steps
887
+ };
888
+ });
889
+ },
890
+ (error) => {
891
+ throw WebrpcRequestFailedError.new({
892
+ cause: `fetch(): ${error.message || ""}`
893
+ });
894
+ }
895
+ );
730
896
  };
731
897
  execute = (args, headers, signal) => {
732
898
  return this.fetch(
733
899
  this.url("Execute"),
734
900
  createHTTPRequest(args, headers, signal)
735
- ).then((res) => {
736
- return buildResponse(res).then((_data) => {
737
- return {
738
- orderId: _data.orderId
739
- };
740
- });
741
- }, (error) => {
742
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
743
- });
901
+ ).then(
902
+ (res) => {
903
+ return buildResponse(res).then((_data) => {
904
+ return {
905
+ orderId: _data.orderId
906
+ };
907
+ });
908
+ },
909
+ (error) => {
910
+ throw WebrpcRequestFailedError.new({
911
+ cause: `fetch(): ${error.message || ""}`
912
+ });
913
+ }
914
+ );
744
915
  };
745
916
  listCollectibles = (args, headers, signal) => {
746
917
  return this.fetch(
747
918
  this.url("ListCollectibles"),
748
919
  createHTTPRequest(args, headers, signal)
749
- ).then((res) => {
750
- return buildResponse(res).then((_data) => {
751
- return {
752
- collectibles: _data.collectibles,
753
- page: _data.page
754
- };
755
- });
756
- }, (error) => {
757
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
758
- });
920
+ ).then(
921
+ (res) => {
922
+ return buildResponse(res).then((_data) => {
923
+ return {
924
+ collectibles: _data.collectibles,
925
+ page: _data.page
926
+ };
927
+ });
928
+ },
929
+ (error) => {
930
+ throw WebrpcRequestFailedError.new({
931
+ cause: `fetch(): ${error.message || ""}`
932
+ });
933
+ }
934
+ );
759
935
  };
760
936
  getCountOfAllCollectibles = (args, headers, signal) => {
761
937
  return this.fetch(
762
938
  this.url("GetCountOfAllCollectibles"),
763
939
  createHTTPRequest(args, headers, signal)
764
- ).then((res) => {
765
- return buildResponse(res).then((_data) => {
766
- return {
767
- count: _data.count
768
- };
769
- });
770
- }, (error) => {
771
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
772
- });
940
+ ).then(
941
+ (res) => {
942
+ return buildResponse(res).then((_data) => {
943
+ return {
944
+ count: _data.count
945
+ };
946
+ });
947
+ },
948
+ (error) => {
949
+ throw WebrpcRequestFailedError.new({
950
+ cause: `fetch(): ${error.message || ""}`
951
+ });
952
+ }
953
+ );
773
954
  };
774
955
  getCountOfFilteredCollectibles = (args, headers, signal) => {
775
956
  return this.fetch(
776
957
  this.url("GetCountOfFilteredCollectibles"),
777
958
  createHTTPRequest(args, headers, signal)
778
- ).then((res) => {
779
- return buildResponse(res).then((_data) => {
780
- return {
781
- count: _data.count
782
- };
783
- });
784
- }, (error) => {
785
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
786
- });
959
+ ).then(
960
+ (res) => {
961
+ return buildResponse(res).then((_data) => {
962
+ return {
963
+ count: _data.count
964
+ };
965
+ });
966
+ },
967
+ (error) => {
968
+ throw WebrpcRequestFailedError.new({
969
+ cause: `fetch(): ${error.message || ""}`
970
+ });
971
+ }
972
+ );
787
973
  };
788
974
  getFloorOrder = (args, headers, signal) => {
789
975
  return this.fetch(
790
976
  this.url("GetFloorOrder"),
791
977
  createHTTPRequest(args, headers, signal)
792
- ).then((res) => {
793
- return buildResponse(res).then((_data) => {
794
- return {
795
- collectible: _data.collectible
796
- };
797
- });
798
- }, (error) => {
799
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
800
- });
978
+ ).then(
979
+ (res) => {
980
+ return buildResponse(res).then((_data) => {
981
+ return {
982
+ collectible: _data.collectible
983
+ };
984
+ });
985
+ },
986
+ (error) => {
987
+ throw WebrpcRequestFailedError.new({
988
+ cause: `fetch(): ${error.message || ""}`
989
+ });
990
+ }
991
+ );
801
992
  };
802
993
  listCollectionActivities = (args, headers, signal) => {
803
994
  return this.fetch(
804
995
  this.url("ListCollectionActivities"),
805
996
  createHTTPRequest(args, headers, signal)
806
- ).then((res) => {
807
- return buildResponse(res).then((_data) => {
808
- return {
809
- activities: _data.activities,
810
- page: _data.page
811
- };
812
- });
813
- }, (error) => {
814
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
815
- });
997
+ ).then(
998
+ (res) => {
999
+ return buildResponse(res).then((_data) => {
1000
+ return {
1001
+ activities: _data.activities,
1002
+ page: _data.page
1003
+ };
1004
+ });
1005
+ },
1006
+ (error) => {
1007
+ throw WebrpcRequestFailedError.new({
1008
+ cause: `fetch(): ${error.message || ""}`
1009
+ });
1010
+ }
1011
+ );
816
1012
  };
817
1013
  listCollectibleActivities = (args, headers, signal) => {
818
1014
  return this.fetch(
819
1015
  this.url("ListCollectibleActivities"),
820
1016
  createHTTPRequest(args, headers, signal)
821
- ).then((res) => {
822
- return buildResponse(res).then((_data) => {
823
- return {
824
- activities: _data.activities,
825
- page: _data.page
826
- };
827
- });
828
- }, (error) => {
829
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
830
- });
1017
+ ).then(
1018
+ (res) => {
1019
+ return buildResponse(res).then((_data) => {
1020
+ return {
1021
+ activities: _data.activities,
1022
+ page: _data.page
1023
+ };
1024
+ });
1025
+ },
1026
+ (error) => {
1027
+ throw WebrpcRequestFailedError.new({
1028
+ cause: `fetch(): ${error.message || ""}`
1029
+ });
1030
+ }
1031
+ );
831
1032
  };
832
1033
  listCollectiblesWithLowestListing = (args, headers, signal) => {
833
1034
  return this.fetch(
834
1035
  this.url("ListCollectiblesWithLowestListing"),
835
1036
  createHTTPRequest(args, headers, signal)
836
- ).then((res) => {
837
- return buildResponse(res).then((_data) => {
838
- return {
839
- collectibles: _data.collectibles,
840
- page: _data.page
841
- };
842
- });
843
- }, (error) => {
844
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
845
- });
1037
+ ).then(
1038
+ (res) => {
1039
+ return buildResponse(res).then((_data) => {
1040
+ return {
1041
+ collectibles: _data.collectibles,
1042
+ page: _data.page
1043
+ };
1044
+ });
1045
+ },
1046
+ (error) => {
1047
+ throw WebrpcRequestFailedError.new({
1048
+ cause: `fetch(): ${error.message || ""}`
1049
+ });
1050
+ }
1051
+ );
846
1052
  };
847
1053
  listCollectiblesWithHighestOffer = (args, headers, signal) => {
848
1054
  return this.fetch(
849
1055
  this.url("ListCollectiblesWithHighestOffer"),
850
1056
  createHTTPRequest(args, headers, signal)
851
- ).then((res) => {
852
- return buildResponse(res).then((_data) => {
853
- return {
854
- collectibles: _data.collectibles,
855
- page: _data.page
856
- };
857
- });
858
- }, (error) => {
859
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
860
- });
1057
+ ).then(
1058
+ (res) => {
1059
+ return buildResponse(res).then((_data) => {
1060
+ return {
1061
+ collectibles: _data.collectibles,
1062
+ page: _data.page
1063
+ };
1064
+ });
1065
+ },
1066
+ (error) => {
1067
+ throw WebrpcRequestFailedError.new({
1068
+ cause: `fetch(): ${error.message || ""}`
1069
+ });
1070
+ }
1071
+ );
861
1072
  };
862
1073
  syncOrder = (args, headers, signal) => {
863
1074
  return this.fetch(
864
1075
  this.url("SyncOrder"),
865
1076
  createHTTPRequest(args, headers, signal)
866
- ).then((res) => {
867
- return buildResponse(res).then((_data) => {
868
- return {};
869
- });
870
- }, (error) => {
871
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
872
- });
1077
+ ).then(
1078
+ (res) => {
1079
+ return buildResponse(res).then((_data) => {
1080
+ return {};
1081
+ });
1082
+ },
1083
+ (error) => {
1084
+ throw WebrpcRequestFailedError.new({
1085
+ cause: `fetch(): ${error.message || ""}`
1086
+ });
1087
+ }
1088
+ );
873
1089
  };
874
1090
  syncOrders = (args, headers, signal) => {
875
1091
  return this.fetch(
876
1092
  this.url("SyncOrders"),
877
1093
  createHTTPRequest(args, headers, signal)
878
- ).then((res) => {
879
- return buildResponse(res).then((_data) => {
880
- return {};
881
- });
882
- }, (error) => {
883
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
884
- });
1094
+ ).then(
1095
+ (res) => {
1096
+ return buildResponse(res).then((_data) => {
1097
+ return {};
1098
+ });
1099
+ },
1100
+ (error) => {
1101
+ throw WebrpcRequestFailedError.new({
1102
+ cause: `fetch(): ${error.message || ""}`
1103
+ });
1104
+ }
1105
+ );
885
1106
  };
886
1107
  getOrders = (args, headers, signal) => {
887
1108
  return this.fetch(
888
1109
  this.url("GetOrders"),
889
1110
  createHTTPRequest(args, headers, signal)
890
- ).then((res) => {
891
- return buildResponse(res).then((_data) => {
892
- return {
893
- orders: _data.orders,
894
- page: _data.page
895
- };
896
- });
897
- }, (error) => {
898
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
899
- });
1111
+ ).then(
1112
+ (res) => {
1113
+ return buildResponse(res).then((_data) => {
1114
+ return {
1115
+ orders: _data.orders,
1116
+ page: _data.page
1117
+ };
1118
+ });
1119
+ },
1120
+ (error) => {
1121
+ throw WebrpcRequestFailedError.new({
1122
+ cause: `fetch(): ${error.message || ""}`
1123
+ });
1124
+ }
1125
+ );
900
1126
  };
901
1127
  checkoutOptionsMarketplace = (args, headers, signal) => {
902
1128
  return this.fetch(
903
1129
  this.url("CheckoutOptionsMarketplace"),
904
1130
  createHTTPRequest(args, headers, signal)
905
- ).then((res) => {
906
- return buildResponse(res).then((_data) => {
907
- return {
908
- options: _data.options
909
- };
910
- });
911
- }, (error) => {
912
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
913
- });
1131
+ ).then(
1132
+ (res) => {
1133
+ return buildResponse(res).then((_data) => {
1134
+ return {
1135
+ options: _data.options
1136
+ };
1137
+ });
1138
+ },
1139
+ (error) => {
1140
+ throw WebrpcRequestFailedError.new({
1141
+ cause: `fetch(): ${error.message || ""}`
1142
+ });
1143
+ }
1144
+ );
914
1145
  };
915
1146
  checkoutOptionsSalesContract = (args, headers, signal) => {
916
1147
  return this.fetch(
917
1148
  this.url("CheckoutOptionsSalesContract"),
918
1149
  createHTTPRequest(args, headers, signal)
919
- ).then((res) => {
920
- return buildResponse(res).then((_data) => {
921
- return {
922
- options: _data.options
923
- };
924
- });
925
- }, (error) => {
926
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ""}` });
927
- });
1150
+ ).then(
1151
+ (res) => {
1152
+ return buildResponse(res).then((_data) => {
1153
+ return {
1154
+ options: _data.options
1155
+ };
1156
+ });
1157
+ },
1158
+ (error) => {
1159
+ throw WebrpcRequestFailedError.new({
1160
+ cause: `fetch(): ${error.message || ""}`
1161
+ });
1162
+ }
1163
+ );
928
1164
  };
929
1165
  };
930
1166
  var createHTTPRequest = (body = {}, headers = {}, signal = null) => {
931
- const reqHeaders = { ...headers, "Content-Type": "application/json" };
1167
+ const reqHeaders = {
1168
+ ...headers,
1169
+ "Content-Type": "application/json"
1170
+ };
932
1171
  reqHeaders[WebrpcHeader] = WebrpcHeaderValue;
933
1172
  return {
934
1173
  method: "POST",
@@ -947,12 +1186,10 @@ var buildResponse = (res) => {
947
1186
  if (error instanceof Error) {
948
1187
  message = error.message;
949
1188
  }
950
- throw WebrpcBadResponseError.new(
951
- {
952
- status: res.status,
953
- cause: `JSON.parse(): ${message}: response text: ${text}`
954
- }
955
- );
1189
+ throw WebrpcBadResponseError.new({
1190
+ status: res.status,
1191
+ cause: `JSON.parse(): ${message}: response text: ${text}`
1192
+ });
956
1193
  }
957
1194
  if (!res.ok) {
958
1195
  const code = typeof data.code === "number" ? data.code : 0;
@@ -980,7 +1217,13 @@ var WebrpcError = class _WebrpcError extends Error {
980
1217
  Object.setPrototypeOf(this, _WebrpcError.prototype);
981
1218
  }
982
1219
  static new(payload) {
983
- return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause);
1220
+ return new this(
1221
+ payload.error,
1222
+ payload.code,
1223
+ payload.message || payload.msg,
1224
+ payload.status,
1225
+ payload.cause
1226
+ );
984
1227
  }
985
1228
  };
986
1229
  var WebrpcEndpointError = class _WebrpcEndpointError extends WebrpcError {
@@ -1541,4 +1784,4 @@ export {
1541
1784
  getSequenceApiClient,
1542
1785
  LaosAPI
1543
1786
  };
1544
- //# sourceMappingURL=chunk-7F27CJZW.js.map
1787
+ //# sourceMappingURL=chunk-OAOONM4S.js.map