@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.
- package/.changeset/fluffy-jokes-lay.md +5 -0
- package/.changeset/wise-bugs-boil.md +8 -0
- package/CHANGELOG.md +16 -3
- package/dist/{chunk-DWTLVJAW.js → chunk-6OPMUCGX.js} +1 -1
- package/dist/chunk-6OPMUCGX.js.map +1 -0
- package/dist/{chunk-O34GCB47.js → chunk-L6KWLCER.js} +4 -4
- package/dist/chunk-L6KWLCER.js.map +1 -0
- package/dist/{chunk-Y2HJO2VY.js → chunk-LAP2CKLN.js} +56 -3
- package/dist/chunk-LAP2CKLN.js.map +1 -0
- package/dist/{chunk-Y63BOO6M.js → chunk-LECCEZAO.js} +1 -1
- package/dist/{chunk-WH5BZC7W.js → chunk-N7SQWS2R.js} +3 -3
- package/dist/{chunk-7F27CJZW.js → chunk-OAOONM4S.js} +682 -439
- package/dist/chunk-OAOONM4S.js.map +1 -0
- package/dist/chunk-QY52UADF.js +107 -0
- package/dist/chunk-QY52UADF.js.map +1 -0
- package/dist/{chunk-UJSF7PSC.js → chunk-TNAR3XEF.js} +3766 -765
- package/dist/chunk-TNAR3XEF.js.map +1 -0
- package/dist/chunk-XABYNWXO.js +549 -0
- package/dist/chunk-XABYNWXO.js.map +1 -0
- package/dist/chunk-YB5UUF2G.js +11 -0
- package/dist/chunk-YB5UUF2G.js.map +1 -0
- package/dist/{chunk-M6NJ73Y5.js → chunk-YWGFI4PN.js} +87 -24
- package/dist/chunk-YWGFI4PN.js.map +1 -0
- package/dist/{create-config-CAQcvjl6.d.ts → create-config-DLMvMTkZ.d.ts} +2 -2
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/index.js +14 -15
- package/dist/{listTokenMetadata-DO4ChDjn.d.ts → marketCurrencies-enNVYwBk.d.ts} +77 -3
- package/dist/{marketplace.gen-DQzWciwC.d.ts → marketplace.gen-D24veUQs.d.ts} +3 -2
- package/dist/marketplaceConfig-BwNAbLPw.d.ts +21 -0
- package/dist/new-marketplace-types-BCw19X9S.d.ts +102 -0
- package/dist/react/_internal/api/index.d.ts +3 -3
- package/dist/react/_internal/api/index.js +1 -1
- package/dist/react/_internal/databeat/index.css +2764 -0
- package/dist/react/_internal/databeat/index.css.map +1 -0
- package/dist/react/_internal/databeat/index.d.ts +1 -1
- package/dist/react/_internal/databeat/index.js +12 -12
- package/dist/react/_internal/index.d.ts +61 -9
- package/dist/react/_internal/index.js +3 -3
- package/dist/react/_internal/wagmi/index.d.ts +5 -6
- package/dist/react/_internal/wagmi/index.js +1 -1
- package/dist/react/hooks/index.css +2764 -0
- package/dist/react/hooks/index.css.map +1 -0
- package/dist/react/hooks/index.d.ts +71 -222
- package/dist/react/hooks/index.js +16 -20
- package/dist/react/hooks/options/index.d.ts +5 -4
- package/dist/react/hooks/options/index.js +9 -7
- package/dist/react/index.css +1 -1
- package/dist/react/index.css.map +1 -1
- package/dist/react/index.d.ts +9 -9
- package/dist/react/index.js +28 -34
- package/dist/react/queries/index.d.ts +3 -3
- package/dist/react/queries/index.js +15 -4
- package/dist/react/ssr/index.d.ts +3 -3
- package/dist/react/ssr/index.js +6 -5
- package/dist/react/ssr/index.js.map +1 -1
- package/dist/react/ui/components/collectible-card/index.css +1 -1
- package/dist/react/ui/components/collectible-card/index.css.map +1 -1
- package/dist/react/ui/components/collectible-card/index.d.ts +3 -2
- package/dist/react/ui/components/collectible-card/index.js +12 -17
- package/dist/react/ui/icons/index.js +6 -6
- package/dist/react/ui/index.css +1 -1
- package/dist/react/ui/index.css.map +1 -1
- package/dist/react/ui/index.d.ts +1 -1
- package/dist/react/ui/index.js +12 -17
- package/dist/react/ui/modals/_internal/components/actionModal/index.css +2764 -0
- package/dist/react/ui/modals/_internal/components/actionModal/index.css.map +1 -0
- package/dist/react/ui/modals/_internal/components/actionModal/index.js +12 -12
- package/dist/sdk-config-qorA0TgF.d.ts +165 -0
- package/dist/{services-CMSb9ipU.d.ts → services-WrshxCqc.d.ts} +2 -2
- package/dist/types/index.d.ts +5 -4
- package/dist/types/index.js +7 -7
- package/dist/{index-MlUK9AQE.d.ts → useCollection-YAdXfVO7.d.ts} +1 -2
- package/dist/utils/abi/index.js +4 -4
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +8 -7
- package/package.json +15 -15
- package/src/react/_internal/api/__mocks__/builder.msw.ts +157 -80
- package/src/react/_internal/api/builder-api.ts +2 -2
- package/src/react/_internal/api/builder.gen.ts +667 -112
- package/src/react/_internal/api/marketplace.gen.ts +1981 -1316
- package/src/react/_internal/types.ts +1 -13
- package/src/react/_internal/wagmi/__tests__/create-config.test.ts +99 -84
- package/src/react/_internal/wagmi/create-config.ts +8 -4
- package/src/react/_internal/wagmi/get-connectors.ts +24 -19
- package/src/react/hooks/__tests__/__snapshots__/useListCollections.test.tsx.snap +114 -0
- package/src/react/hooks/__tests__/__snapshots__/useMarketplaceConfig.test.tsx.snap +85 -83
- package/src/react/hooks/__tests__/useFilters.test.tsx +0 -16
- package/src/react/hooks/__tests__/useInventory.test.tsx +16 -16
- package/src/react/hooks/__tests__/useListCollections.test.tsx +23 -56
- package/src/react/hooks/__tests__/{useCurrencies.test.tsx → useMarketCurrencies.test.tsx} +21 -15
- package/src/react/hooks/__tests__/useMarketplaceConfig.test.tsx +2 -59
- package/src/react/hooks/index.ts +2 -1
- package/src/react/hooks/useBalanceOfCollectible.tsx +5 -3
- package/src/react/hooks/useConvertPriceToUSD.tsx +1 -1
- package/src/react/hooks/useFilters.tsx +14 -22
- package/src/react/hooks/useGetTokenSuppliesMap.ts +28 -0
- package/src/react/hooks/useInventory.tsx +4 -3
- package/src/react/hooks/useListBalances.tsx +5 -3
- package/src/react/hooks/useListCollectibles.tsx +5 -3
- package/src/react/hooks/useListCollections.tsx +14 -76
- package/src/react/hooks/useMarketCurrencies.tsx +8 -0
- package/src/react/hooks/useMarketplaceConfig.tsx +0 -2
- package/src/react/queries/index.ts +1 -0
- package/src/react/queries/inventory.ts +1 -1
- package/src/react/queries/listCollections.ts +118 -0
- package/src/react/queries/marketCurrencies.ts +77 -0
- package/src/react/queries/marketplaceConfig.ts +83 -55
- package/src/react/ssr/__tests__/__snapshots__/create-ssr-client.test.ts.snap +85 -83
- package/src/react/ui/components/collectible-card/__tests__/Media.test.tsx +41 -1
- package/src/react/ui/components/collectible-card/media/Media.tsx +11 -6
- package/src/react/ui/components/collectible-card/media/MediaSkeleton.tsx +1 -1
- package/src/react/ui/components/collectible-card/media/types.ts +1 -0
- package/src/react/ui/modals/BuyModal/ERC1155QuantityModal.tsx +9 -3
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useFees.test.tsx +31 -21
- package/src/react/ui/modals/BuyModal/hooks/useFees.ts +3 -2
- package/src/react/ui/modals/CreateListingModal/Modal.tsx +3 -5
- package/src/react/ui/modals/CreateListingModal/hooks/useCreateListing.tsx +5 -3
- package/src/react/ui/modals/CreateListingModal/hooks/useTransactionSteps.tsx +2 -2
- package/src/react/ui/modals/MakeOfferModal/Modal.tsx +2 -3
- package/src/react/ui/modals/MakeOfferModal/hooks/useMakeOffer.tsx +4 -3
- package/src/react/ui/modals/SellModal/Modal.tsx +0 -1
- package/src/react/ui/modals/SellModal/hooks/useTransactionSteps.tsx +2 -2
- package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/index.tsx +0 -1
- package/src/react/ui/modals/TransferModal/index.tsx +0 -1
- package/src/react/ui/modals/_internal/components/currencyOptionsSelect/__tests__/index.test.tsx +2 -2
- package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +7 -6
- package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/__tests__/SelectWaasFeeOptions.test.tsx +13 -7
- package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/index.tsx +3 -5
- package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/useWaasFeeOptionManager.tsx +5 -3
- package/src/react/ui/modals/_internal/components/transactionDetails/index.tsx +2 -2
- package/src/react/ui/modals/_internal/hooks/useSelectWaasFeeOptions.ts +2 -12
- package/src/types/index.ts +1 -6
- package/src/types/new-marketplace-types.ts +119 -0
- package/src/types/sdk-config.ts +18 -2
- package/src/types/types.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/chunk-7F27CJZW.js.map +0 -1
- package/dist/chunk-A7BVFBWB.js +0 -81
- package/dist/chunk-A7BVFBWB.js.map +0 -1
- package/dist/chunk-D7RVSZAQ.js +0 -332
- package/dist/chunk-D7RVSZAQ.js.map +0 -1
- package/dist/chunk-DWTLVJAW.js.map +0 -1
- package/dist/chunk-FGM57QUU.js +0 -128
- package/dist/chunk-FGM57QUU.js.map +0 -1
- package/dist/chunk-JKCF7HEA.js +0 -1
- package/dist/chunk-JKCF7HEA.js.map +0 -1
- package/dist/chunk-KTST7ORH.js +0 -53
- package/dist/chunk-KTST7ORH.js.map +0 -1
- package/dist/chunk-M6NJ73Y5.js.map +0 -1
- package/dist/chunk-N7BPFK46.js +0 -1
- package/dist/chunk-N7BPFK46.js.map +0 -1
- package/dist/chunk-O34GCB47.js.map +0 -1
- package/dist/chunk-RVIUUJTP.js +0 -76
- package/dist/chunk-RVIUUJTP.js.map +0 -1
- package/dist/chunk-SXVUTSMT.js +0 -2895
- package/dist/chunk-SXVUTSMT.js.map +0 -1
- package/dist/chunk-UJSF7PSC.js.map +0 -1
- package/dist/chunk-Y2HJO2VY.js.map +0 -1
- package/dist/marketplaceConfig-D0MXemEl.d.ts +0 -17
- package/dist/sdk-config-onSPBxJj.d.ts +0 -134
- package/dist/types-B8xzPEKX.d.ts +0 -68
- package/src/react/hooks/useCurrencies.tsx +0 -77
- /package/dist/{chunk-Y63BOO6M.js.map → chunk-LECCEZAO.js.map} +0 -0
- /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(
|
|
257
|
-
|
|
258
|
-
return {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
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(
|
|
271
|
-
|
|
272
|
-
return {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
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(
|
|
285
|
-
|
|
286
|
-
return {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
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(
|
|
299
|
-
|
|
300
|
-
return {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
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(
|
|
314
|
-
|
|
315
|
-
return {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
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(
|
|
328
|
-
|
|
329
|
-
return {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
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(
|
|
342
|
-
|
|
343
|
-
return {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
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(
|
|
356
|
-
|
|
357
|
-
return {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
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(
|
|
370
|
-
|
|
371
|
-
return {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
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(
|
|
384
|
-
|
|
385
|
-
return {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
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(
|
|
398
|
-
|
|
399
|
-
return {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
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(
|
|
424
|
-
|
|
425
|
-
return {
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
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(
|
|
438
|
-
|
|
439
|
-
return {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
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(
|
|
452
|
-
|
|
453
|
-
return {
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
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(
|
|
466
|
-
|
|
467
|
-
return {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
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(
|
|
480
|
-
|
|
481
|
-
return {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
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(
|
|
494
|
-
|
|
495
|
-
return {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
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(
|
|
508
|
-
|
|
509
|
-
return {
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
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(
|
|
522
|
-
|
|
523
|
-
return {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
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(
|
|
537
|
-
|
|
538
|
-
return {
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
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(
|
|
552
|
-
|
|
553
|
-
return {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
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(
|
|
566
|
-
|
|
567
|
-
return {
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
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(
|
|
580
|
-
|
|
581
|
-
return {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
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(
|
|
594
|
-
|
|
595
|
-
return {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
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(
|
|
608
|
-
|
|
609
|
-
return {
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
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(
|
|
622
|
-
|
|
623
|
-
return {
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
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(
|
|
636
|
-
|
|
637
|
-
return {
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
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(
|
|
651
|
-
|
|
652
|
-
return {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
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(
|
|
666
|
-
|
|
667
|
-
return {
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
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(
|
|
680
|
-
|
|
681
|
-
return {
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
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(
|
|
694
|
-
|
|
695
|
-
return {
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
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(
|
|
708
|
-
|
|
709
|
-
return {
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
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(
|
|
722
|
-
|
|
723
|
-
return {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
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(
|
|
736
|
-
|
|
737
|
-
return {
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
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(
|
|
750
|
-
|
|
751
|
-
return {
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
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(
|
|
765
|
-
|
|
766
|
-
return {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
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(
|
|
779
|
-
|
|
780
|
-
return {
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
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(
|
|
793
|
-
|
|
794
|
-
return {
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
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(
|
|
807
|
-
|
|
808
|
-
return {
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
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(
|
|
822
|
-
|
|
823
|
-
return {
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
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(
|
|
837
|
-
|
|
838
|
-
return {
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
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(
|
|
852
|
-
|
|
853
|
-
return {
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
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(
|
|
867
|
-
|
|
868
|
-
return {
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
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(
|
|
879
|
-
|
|
880
|
-
return {
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
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(
|
|
891
|
-
|
|
892
|
-
return {
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
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(
|
|
906
|
-
|
|
907
|
-
return {
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
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(
|
|
920
|
-
|
|
921
|
-
return {
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
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 = {
|
|
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
|
-
|
|
953
|
-
|
|
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(
|
|
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-
|
|
1787
|
+
//# sourceMappingURL=chunk-OAOONM4S.js.map
|