@eluvio/elv-client-js 3.2.6 → 3.2.9
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/dist/ElvClient-min.js +1 -1
- package/dist/ElvClient-node-min.js +1 -1
- package/dist/ElvWalletClient-min.js +5 -5
- package/dist/ElvWalletClient-node-min.js +9 -9
- package/dist/src/ElvClient.js +25 -12
- package/dist/src/walletClient/ClientMethods.js +562 -420
- package/dist/src/walletClient/index.js +494 -299
- package/package.json +1 -1
- package/src/ElvClient.js +1 -1
- package/src/walletClient/ClientMethods.js +90 -9
- package/src/walletClient/README.md +6 -0
- package/src/walletClient/index.js +98 -3
|
@@ -41,6 +41,7 @@ exports.UserInfo = function () {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
return {
|
|
44
|
+
name: this.__authorization.email || this.UserAddress(),
|
|
44
45
|
address: this.UserAddress(),
|
|
45
46
|
email: this.__authorization.email,
|
|
46
47
|
walletType: this.__authorization.walletType,
|
|
@@ -202,13 +203,13 @@ exports.UserWalletBalance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
|
|
|
202
203
|
}, _callee, this);
|
|
203
204
|
}));
|
|
204
205
|
/**
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
* Returns basic contract info about the items the current user owns, organized by contract address + token ID
|
|
206
|
+
* Returns basic contract info about the items the specified/current user owns, organized by contract address + token ID
|
|
208
207
|
*
|
|
209
208
|
* This method is significantly faster than <a href="#.UserItems">UserItems</a>, but does not include any NFT metadata.
|
|
210
209
|
*
|
|
211
210
|
* @methodGroup User
|
|
211
|
+
* @namedParams
|
|
212
|
+
* @param {string=} userAddress - Address of the user to query for. If unspecified, will use the currently logged in user.
|
|
212
213
|
*
|
|
213
214
|
* @returns {Promise<Object>} - Basic info about all owned items.
|
|
214
215
|
*/
|
|
@@ -216,37 +217,35 @@ exports.UserWalletBalance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
|
|
|
216
217
|
exports.UserItemInfo = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
217
218
|
var _this = this;
|
|
218
219
|
|
|
219
|
-
var
|
|
220
|
+
var _ref3,
|
|
221
|
+
userAddress,
|
|
222
|
+
accountId,
|
|
223
|
+
nftInfo,
|
|
224
|
+
_args2 = arguments;
|
|
225
|
+
|
|
220
226
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
221
227
|
while (1) {
|
|
222
228
|
switch (_context2.prev = _context2.next) {
|
|
223
229
|
case 0:
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
return _context2.abrupt("return", {});
|
|
230
|
-
|
|
231
|
-
case 2:
|
|
232
|
-
accountId = "iusr".concat(Utils.AddressToHash(this.UserAddress()));
|
|
233
|
-
_context2.next = 5;
|
|
230
|
+
_ref3 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, userAddress = _ref3.userAddress;
|
|
231
|
+
accountId = "iusr".concat(Utils.AddressToHash(userAddress || this.UserAddress()));
|
|
232
|
+
_context2.next = 4;
|
|
234
233
|
return this.client.ethClient.MakeProviderCall({
|
|
235
234
|
methodName: "send",
|
|
236
235
|
args: ["elv_getAccountProfile", [this.client.contentSpaceId, accountId]]
|
|
237
236
|
});
|
|
238
237
|
|
|
239
|
-
case
|
|
238
|
+
case 4:
|
|
240
239
|
this.profileData = _context2.sent;
|
|
241
240
|
|
|
242
241
|
if (!(!this.profileData || !this.profileData.NFTs)) {
|
|
243
|
-
_context2.next =
|
|
242
|
+
_context2.next = 7;
|
|
244
243
|
break;
|
|
245
244
|
}
|
|
246
245
|
|
|
247
246
|
return _context2.abrupt("return", {});
|
|
248
247
|
|
|
249
|
-
case
|
|
248
|
+
case 7:
|
|
250
249
|
nftInfo = {};
|
|
251
250
|
Object.keys(this.profileData.NFTs).map(function (tenantId) {
|
|
252
251
|
return _this.profileData.NFTs[tenantId].forEach(function (details) {
|
|
@@ -274,7 +273,7 @@ exports.UserItemInfo = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
|
|
|
274
273
|
this.nftInfo = nftInfo;
|
|
275
274
|
return _context2.abrupt("return", this.nftInfo);
|
|
276
275
|
|
|
277
|
-
case
|
|
276
|
+
case 11:
|
|
278
277
|
case "end":
|
|
279
278
|
return _context2.stop();
|
|
280
279
|
}
|
|
@@ -333,10 +332,10 @@ exports.UserItems = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
|
|
|
333
332
|
*/
|
|
334
333
|
|
|
335
334
|
exports.UserListings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
336
|
-
var
|
|
337
|
-
|
|
335
|
+
var _ref6,
|
|
336
|
+
_ref6$sortBy,
|
|
338
337
|
sortBy,
|
|
339
|
-
|
|
338
|
+
_ref6$sortDesc,
|
|
340
339
|
sortDesc,
|
|
341
340
|
contractAddress,
|
|
342
341
|
tokenId,
|
|
@@ -347,7 +346,7 @@ exports.UserListings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
|
|
|
347
346
|
while (1) {
|
|
348
347
|
switch (_context4.prev = _context4.next) {
|
|
349
348
|
case 0:
|
|
350
|
-
|
|
349
|
+
_ref6 = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {}, _ref6$sortBy = _ref6.sortBy, sortBy = _ref6$sortBy === void 0 ? "created" : _ref6$sortBy, _ref6$sortDesc = _ref6.sortDesc, sortDesc = _ref6$sortDesc === void 0 ? false : _ref6$sortDesc, contractAddress = _ref6.contractAddress, tokenId = _ref6.tokenId, marketplaceParams = _ref6.marketplaceParams;
|
|
351
350
|
_context4.next = 3;
|
|
352
351
|
return this.FilteredQuery({
|
|
353
352
|
mode: "listings",
|
|
@@ -387,10 +386,10 @@ exports.UserListings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
|
|
|
387
386
|
*/
|
|
388
387
|
|
|
389
388
|
exports.UserSales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
|
|
390
|
-
var
|
|
391
|
-
|
|
389
|
+
var _ref8,
|
|
390
|
+
_ref8$sortBy,
|
|
392
391
|
sortBy,
|
|
393
|
-
|
|
392
|
+
_ref8$sortDesc,
|
|
394
393
|
sortDesc,
|
|
395
394
|
contractAddress,
|
|
396
395
|
tokenId,
|
|
@@ -401,7 +400,7 @@ exports.UserSales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
|
|
|
401
400
|
while (1) {
|
|
402
401
|
switch (_context5.prev = _context5.next) {
|
|
403
402
|
case 0:
|
|
404
|
-
|
|
403
|
+
_ref8 = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {}, _ref8$sortBy = _ref8.sortBy, sortBy = _ref8$sortBy === void 0 ? "created" : _ref8$sortBy, _ref8$sortDesc = _ref8.sortDesc, sortDesc = _ref8$sortDesc === void 0 ? false : _ref8$sortDesc, contractAddress = _ref8.contractAddress, tokenId = _ref8.tokenId, marketplaceParams = _ref8.marketplaceParams;
|
|
405
404
|
_context5.next = 3;
|
|
406
405
|
return this.FilteredQuery({
|
|
407
406
|
mode: "sales",
|
|
@@ -425,6 +424,60 @@ exports.UserSales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
|
|
|
425
424
|
}
|
|
426
425
|
}, _callee5, this);
|
|
427
426
|
}));
|
|
427
|
+
/**
|
|
428
|
+
* Return all transfers and sales for the current user. Not paginated.
|
|
429
|
+
*
|
|
430
|
+
* @methodGroup User
|
|
431
|
+
* @namedParams
|
|
432
|
+
* @param {string=} sortBy="created" - Sort order. Options: `created`, `price`, `name`
|
|
433
|
+
* @param {boolean=} sortDesc=false - Sort results descending instead of ascending
|
|
434
|
+
* @param {Object=} marketplaceParams - Filter results by marketplace
|
|
435
|
+
* @param {string=} contractAddress - Filter results by the address of the NFT contract
|
|
436
|
+
* @param {string=} tokenId - Filter by token ID (if filtering by contract address)
|
|
437
|
+
* @param {integer=} lastNDays - Filter by results listed in the past N days
|
|
438
|
+
*
|
|
439
|
+
* @returns {Promise<Array<Object>>} - List of current user's sales
|
|
440
|
+
*/
|
|
441
|
+
|
|
442
|
+
exports.UserTransfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
|
443
|
+
var _ref10,
|
|
444
|
+
_ref10$sortBy,
|
|
445
|
+
sortBy,
|
|
446
|
+
_ref10$sortDesc,
|
|
447
|
+
sortDesc,
|
|
448
|
+
contractAddress,
|
|
449
|
+
tokenId,
|
|
450
|
+
marketplaceParams,
|
|
451
|
+
_args6 = arguments;
|
|
452
|
+
|
|
453
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
454
|
+
while (1) {
|
|
455
|
+
switch (_context6.prev = _context6.next) {
|
|
456
|
+
case 0:
|
|
457
|
+
_ref10 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, _ref10$sortBy = _ref10.sortBy, sortBy = _ref10$sortBy === void 0 ? "created" : _ref10$sortBy, _ref10$sortDesc = _ref10.sortDesc, sortDesc = _ref10$sortDesc === void 0 ? false : _ref10$sortDesc, contractAddress = _ref10.contractAddress, tokenId = _ref10.tokenId, marketplaceParams = _ref10.marketplaceParams;
|
|
458
|
+
_context6.next = 3;
|
|
459
|
+
return this.FilteredQuery({
|
|
460
|
+
mode: "transfers",
|
|
461
|
+
start: 0,
|
|
462
|
+
limit: 10000,
|
|
463
|
+
sortBy: sortBy,
|
|
464
|
+
sortDesc: sortDesc,
|
|
465
|
+
sellerAddress: this.UserAddress(),
|
|
466
|
+
marketplaceParams: marketplaceParams,
|
|
467
|
+
contractAddress: contractAddress,
|
|
468
|
+
tokenId: tokenId
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
case 3:
|
|
472
|
+
return _context6.abrupt("return", _context6.sent.results);
|
|
473
|
+
|
|
474
|
+
case 4:
|
|
475
|
+
case "end":
|
|
476
|
+
return _context6.stop();
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}, _callee6, this);
|
|
480
|
+
}));
|
|
428
481
|
/* TENANT */
|
|
429
482
|
|
|
430
483
|
/**
|
|
@@ -441,40 +494,40 @@ exports.UserSales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
|
|
|
441
494
|
*/
|
|
442
495
|
|
|
443
496
|
exports.TenantConfiguration = /*#__PURE__*/function () {
|
|
444
|
-
var
|
|
497
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_ref11) {
|
|
445
498
|
var tenantId, contractAddress;
|
|
446
|
-
return _regeneratorRuntime.wrap(function
|
|
499
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
447
500
|
while (1) {
|
|
448
|
-
switch (
|
|
501
|
+
switch (_context7.prev = _context7.next) {
|
|
449
502
|
case 0:
|
|
450
|
-
tenantId =
|
|
451
|
-
|
|
452
|
-
|
|
503
|
+
tenantId = _ref11.tenantId, contractAddress = _ref11.contractAddress;
|
|
504
|
+
_context7.prev = 1;
|
|
505
|
+
_context7.next = 4;
|
|
453
506
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
454
507
|
path: contractAddress ? UrlJoin("as", "config", "nft", contractAddress) : UrlJoin("as", "config", "tnt", tenantId),
|
|
455
508
|
method: "GET"
|
|
456
509
|
}));
|
|
457
510
|
|
|
458
511
|
case 4:
|
|
459
|
-
return
|
|
512
|
+
return _context7.abrupt("return", _context7.sent);
|
|
460
513
|
|
|
461
514
|
case 7:
|
|
462
|
-
|
|
463
|
-
|
|
515
|
+
_context7.prev = 7;
|
|
516
|
+
_context7.t0 = _context7["catch"](1);
|
|
464
517
|
this.Log("Failed to load tenant configuration", true);
|
|
465
|
-
this.Log(
|
|
466
|
-
return
|
|
518
|
+
this.Log(_context7.t0, true);
|
|
519
|
+
return _context7.abrupt("return", {});
|
|
467
520
|
|
|
468
521
|
case 12:
|
|
469
522
|
case "end":
|
|
470
|
-
return
|
|
523
|
+
return _context7.stop();
|
|
471
524
|
}
|
|
472
525
|
}
|
|
473
|
-
},
|
|
526
|
+
}, _callee7, this, [[1, 7]]);
|
|
474
527
|
}));
|
|
475
528
|
|
|
476
529
|
return function (_x) {
|
|
477
|
-
return
|
|
530
|
+
return _ref12.apply(this, arguments);
|
|
478
531
|
};
|
|
479
532
|
}();
|
|
480
533
|
/* MARKETPLACE */
|
|
@@ -493,13 +546,13 @@ exports.TenantConfiguration = /*#__PURE__*/function () {
|
|
|
493
546
|
|
|
494
547
|
|
|
495
548
|
exports.MarketplaceStock = /*#__PURE__*/function () {
|
|
496
|
-
var
|
|
549
|
+
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(_ref13) {
|
|
497
550
|
var marketplaceParams, tenantId, marketplaceInfo;
|
|
498
|
-
return _regeneratorRuntime.wrap(function
|
|
551
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
499
552
|
while (1) {
|
|
500
|
-
switch (
|
|
553
|
+
switch (_context8.prev = _context8.next) {
|
|
501
554
|
case 0:
|
|
502
|
-
marketplaceParams =
|
|
555
|
+
marketplaceParams = _ref13.marketplaceParams, tenantId = _ref13.tenantId;
|
|
503
556
|
|
|
504
557
|
if (!tenantId) {
|
|
505
558
|
marketplaceInfo = this.MarketplaceInfo({
|
|
@@ -509,11 +562,11 @@ exports.MarketplaceStock = /*#__PURE__*/function () {
|
|
|
509
562
|
}
|
|
510
563
|
|
|
511
564
|
if (!this.loggedIn) {
|
|
512
|
-
|
|
565
|
+
_context8.next = 6;
|
|
513
566
|
break;
|
|
514
567
|
}
|
|
515
568
|
|
|
516
|
-
|
|
569
|
+
_context8.next = 5;
|
|
517
570
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
518
571
|
path: UrlJoin("as", "wlt", "nft", "info", tenantId),
|
|
519
572
|
method: "GET",
|
|
@@ -523,28 +576,28 @@ exports.MarketplaceStock = /*#__PURE__*/function () {
|
|
|
523
576
|
}));
|
|
524
577
|
|
|
525
578
|
case 5:
|
|
526
|
-
return
|
|
579
|
+
return _context8.abrupt("return", _context8.sent);
|
|
527
580
|
|
|
528
581
|
case 6:
|
|
529
|
-
|
|
582
|
+
_context8.next = 8;
|
|
530
583
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
531
584
|
path: UrlJoin("as", "nft", "stock", tenantId),
|
|
532
585
|
method: "GET"
|
|
533
586
|
}));
|
|
534
587
|
|
|
535
588
|
case 8:
|
|
536
|
-
return
|
|
589
|
+
return _context8.abrupt("return", _context8.sent);
|
|
537
590
|
|
|
538
591
|
case 9:
|
|
539
592
|
case "end":
|
|
540
|
-
return
|
|
593
|
+
return _context8.stop();
|
|
541
594
|
}
|
|
542
595
|
}
|
|
543
|
-
},
|
|
596
|
+
}, _callee8, this);
|
|
544
597
|
}));
|
|
545
598
|
|
|
546
599
|
return function (_x2) {
|
|
547
|
-
return
|
|
600
|
+
return _ref14.apply(this, arguments);
|
|
548
601
|
};
|
|
549
602
|
}();
|
|
550
603
|
/**
|
|
@@ -562,14 +615,14 @@ exports.MarketplaceStock = /*#__PURE__*/function () {
|
|
|
562
615
|
*/
|
|
563
616
|
|
|
564
617
|
|
|
565
|
-
exports.MarketplaceInfo = function (
|
|
566
|
-
var marketplaceParams =
|
|
618
|
+
exports.MarketplaceInfo = function (_ref15) {
|
|
619
|
+
var marketplaceParams = _ref15.marketplaceParams;
|
|
567
620
|
|
|
568
|
-
var
|
|
569
|
-
tenantSlug =
|
|
570
|
-
marketplaceSlug =
|
|
571
|
-
marketplaceId =
|
|
572
|
-
marketplaceHash =
|
|
621
|
+
var _ref16 = marketplaceParams || {},
|
|
622
|
+
tenantSlug = _ref16.tenantSlug,
|
|
623
|
+
marketplaceSlug = _ref16.marketplaceSlug,
|
|
624
|
+
marketplaceId = _ref16.marketplaceId,
|
|
625
|
+
marketplaceHash = _ref16.marketplaceHash;
|
|
573
626
|
|
|
574
627
|
var marketplaceInfo;
|
|
575
628
|
|
|
@@ -598,24 +651,24 @@ exports.MarketplaceInfo = function (_ref12) {
|
|
|
598
651
|
|
|
599
652
|
|
|
600
653
|
exports.MarketplaceCSS = /*#__PURE__*/function () {
|
|
601
|
-
var
|
|
654
|
+
var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(_ref17) {
|
|
602
655
|
var marketplaceParams, marketplaceInfo, marketplaceHash;
|
|
603
|
-
return _regeneratorRuntime.wrap(function
|
|
656
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
604
657
|
while (1) {
|
|
605
|
-
switch (
|
|
658
|
+
switch (_context9.prev = _context9.next) {
|
|
606
659
|
case 0:
|
|
607
|
-
marketplaceParams =
|
|
660
|
+
marketplaceParams = _ref17.marketplaceParams;
|
|
608
661
|
marketplaceInfo = this.MarketplaceInfo({
|
|
609
662
|
marketplaceParams: marketplaceParams
|
|
610
663
|
});
|
|
611
664
|
marketplaceHash = marketplaceInfo.marketplaceHash;
|
|
612
665
|
|
|
613
666
|
if (this.cachedCSS[marketplaceHash]) {
|
|
614
|
-
|
|
667
|
+
_context9.next = 7;
|
|
615
668
|
break;
|
|
616
669
|
}
|
|
617
670
|
|
|
618
|
-
|
|
671
|
+
_context9.next = 6;
|
|
619
672
|
return this.client.ContentObjectMetadata({
|
|
620
673
|
versionHash: marketplaceHash,
|
|
621
674
|
metadataSubtree: "public/asset_metadata/info/branding/custom_css",
|
|
@@ -624,21 +677,21 @@ exports.MarketplaceCSS = /*#__PURE__*/function () {
|
|
|
624
677
|
});
|
|
625
678
|
|
|
626
679
|
case 6:
|
|
627
|
-
this.cachedCSS[marketplaceHash] =
|
|
680
|
+
this.cachedCSS[marketplaceHash] = _context9.sent;
|
|
628
681
|
|
|
629
682
|
case 7:
|
|
630
|
-
return
|
|
683
|
+
return _context9.abrupt("return", this.cachedCSS[marketplaceHash] || "");
|
|
631
684
|
|
|
632
685
|
case 8:
|
|
633
686
|
case "end":
|
|
634
|
-
return
|
|
687
|
+
return _context9.stop();
|
|
635
688
|
}
|
|
636
689
|
}
|
|
637
|
-
},
|
|
690
|
+
}, _callee9, this);
|
|
638
691
|
}));
|
|
639
692
|
|
|
640
693
|
return function (_x3) {
|
|
641
|
-
return
|
|
694
|
+
return _ref18.apply(this, arguments);
|
|
642
695
|
};
|
|
643
696
|
}();
|
|
644
697
|
/**
|
|
@@ -653,36 +706,36 @@ exports.MarketplaceCSS = /*#__PURE__*/function () {
|
|
|
653
706
|
*/
|
|
654
707
|
|
|
655
708
|
|
|
656
|
-
exports.AvailableMarketplaces = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
657
|
-
var
|
|
709
|
+
exports.AvailableMarketplaces = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {
|
|
710
|
+
var _ref20,
|
|
658
711
|
organizeById,
|
|
659
|
-
|
|
712
|
+
_ref20$forceReload,
|
|
660
713
|
forceReload,
|
|
661
|
-
|
|
714
|
+
_args10 = arguments;
|
|
662
715
|
|
|
663
|
-
return _regeneratorRuntime.wrap(function
|
|
716
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
664
717
|
while (1) {
|
|
665
|
-
switch (
|
|
718
|
+
switch (_context10.prev = _context10.next) {
|
|
666
719
|
case 0:
|
|
667
|
-
|
|
720
|
+
_ref20 = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {}, organizeById = _ref20.organizeById, _ref20$forceReload = _ref20.forceReload, forceReload = _ref20$forceReload === void 0 ? false : _ref20$forceReload;
|
|
668
721
|
|
|
669
722
|
if (!forceReload) {
|
|
670
|
-
|
|
723
|
+
_context10.next = 4;
|
|
671
724
|
break;
|
|
672
725
|
}
|
|
673
726
|
|
|
674
|
-
|
|
727
|
+
_context10.next = 4;
|
|
675
728
|
return this.LoadAvailableMarketplaces(true);
|
|
676
729
|
|
|
677
730
|
case 4:
|
|
678
|
-
return
|
|
731
|
+
return _context10.abrupt("return", _objectSpread({}, organizeById ? this.availableMarketplacesById : this.availableMarketplaces));
|
|
679
732
|
|
|
680
733
|
case 5:
|
|
681
734
|
case "end":
|
|
682
|
-
return
|
|
735
|
+
return _context10.stop();
|
|
683
736
|
}
|
|
684
737
|
}
|
|
685
|
-
},
|
|
738
|
+
}, _callee10, this);
|
|
686
739
|
}));
|
|
687
740
|
/**
|
|
688
741
|
* Retrieve full information about the specified marketplace
|
|
@@ -697,33 +750,73 @@ exports.AvailableMarketplaces = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_re
|
|
|
697
750
|
*/
|
|
698
751
|
|
|
699
752
|
exports.Marketplace = /*#__PURE__*/function () {
|
|
700
|
-
var
|
|
753
|
+
var _ref22 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref21) {
|
|
701
754
|
var marketplaceParams;
|
|
702
|
-
return _regeneratorRuntime.wrap(function
|
|
755
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
703
756
|
while (1) {
|
|
704
|
-
switch (
|
|
757
|
+
switch (_context11.prev = _context11.next) {
|
|
705
758
|
case 0:
|
|
706
|
-
marketplaceParams =
|
|
707
|
-
return
|
|
759
|
+
marketplaceParams = _ref21.marketplaceParams;
|
|
760
|
+
return _context11.abrupt("return", this.LoadMarketplace(marketplaceParams));
|
|
708
761
|
|
|
709
762
|
case 2:
|
|
710
763
|
case "end":
|
|
711
|
-
return
|
|
764
|
+
return _context11.stop();
|
|
712
765
|
}
|
|
713
766
|
}
|
|
714
|
-
},
|
|
767
|
+
}, _callee11, this);
|
|
715
768
|
}));
|
|
716
769
|
|
|
717
770
|
return function (_x4) {
|
|
718
|
-
return
|
|
771
|
+
return _ref22.apply(this, arguments);
|
|
719
772
|
};
|
|
720
773
|
}();
|
|
721
774
|
/* NFTS */
|
|
722
775
|
|
|
776
|
+
/**
|
|
777
|
+
* Return info about the specified NFT contract, including the cap, current total supply, and total minted and burned.
|
|
778
|
+
*
|
|
779
|
+
* @methodGroup NFTs
|
|
780
|
+
* @namedParams
|
|
781
|
+
* @param {string} contractAddress - The contract address of the NFT
|
|
782
|
+
*
|
|
783
|
+
* @returns {Promise<Object>} - Information about the specified contract
|
|
784
|
+
*/
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
exports.NFTContractStats = /*#__PURE__*/function () {
|
|
788
|
+
var _ref24 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(_ref23) {
|
|
789
|
+
var contractAddress;
|
|
790
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
791
|
+
while (1) {
|
|
792
|
+
switch (_context12.prev = _context12.next) {
|
|
793
|
+
case 0:
|
|
794
|
+
contractAddress = _ref23.contractAddress;
|
|
795
|
+
_context12.next = 3;
|
|
796
|
+
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
797
|
+
path: UrlJoin("as", "nft", "info", contractAddress),
|
|
798
|
+
method: "GET"
|
|
799
|
+
}));
|
|
800
|
+
|
|
801
|
+
case 3:
|
|
802
|
+
return _context12.abrupt("return", _context12.sent);
|
|
803
|
+
|
|
804
|
+
case 4:
|
|
805
|
+
case "end":
|
|
806
|
+
return _context12.stop();
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
}, _callee12, this);
|
|
810
|
+
}));
|
|
811
|
+
|
|
812
|
+
return function (_x5) {
|
|
813
|
+
return _ref24.apply(this, arguments);
|
|
814
|
+
};
|
|
815
|
+
}();
|
|
723
816
|
/**
|
|
724
817
|
* Load full info for the specified NFT
|
|
725
818
|
*
|
|
726
|
-
* @methodGroup
|
|
819
|
+
* @methodGroup NFTs
|
|
727
820
|
* @namedParams
|
|
728
821
|
* @param {string} contractAddress - The contract address of the NFT
|
|
729
822
|
* @param {string} tokenId - The token ID of the NFT
|
|
@@ -731,27 +824,27 @@ exports.Marketplace = /*#__PURE__*/function () {
|
|
|
731
824
|
|
|
732
825
|
|
|
733
826
|
exports.NFT = /*#__PURE__*/function () {
|
|
734
|
-
var
|
|
827
|
+
var _ref26 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref25) {
|
|
735
828
|
var tokenId, contractAddress, nft;
|
|
736
|
-
return _regeneratorRuntime.wrap(function
|
|
829
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
737
830
|
while (1) {
|
|
738
|
-
switch (
|
|
831
|
+
switch (_context13.prev = _context13.next) {
|
|
739
832
|
case 0:
|
|
740
|
-
tokenId =
|
|
741
|
-
|
|
742
|
-
|
|
833
|
+
tokenId = _ref25.tokenId, contractAddress = _ref25.contractAddress;
|
|
834
|
+
_context13.t0 = FormatNFTDetails;
|
|
835
|
+
_context13.next = 4;
|
|
743
836
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
744
837
|
path: UrlJoin("as", "nft", "info", contractAddress, tokenId),
|
|
745
838
|
method: "GET"
|
|
746
839
|
}));
|
|
747
840
|
|
|
748
841
|
case 4:
|
|
749
|
-
|
|
750
|
-
nft = (0,
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
842
|
+
_context13.t1 = _context13.sent;
|
|
843
|
+
nft = (0, _context13.t0)(_context13.t1);
|
|
844
|
+
_context13.t2 = _objectSpread;
|
|
845
|
+
_context13.t3 = _objectSpread;
|
|
846
|
+
_context13.t4 = {};
|
|
847
|
+
_context13.next = 11;
|
|
755
848
|
return this.client.ContentObjectMetadata({
|
|
756
849
|
versionHash: nft.details.VersionHash,
|
|
757
850
|
metadataSubtree: "public/asset_metadata/nft",
|
|
@@ -759,39 +852,39 @@ exports.NFT = /*#__PURE__*/function () {
|
|
|
759
852
|
});
|
|
760
853
|
|
|
761
854
|
case 11:
|
|
762
|
-
|
|
855
|
+
_context13.t5 = _context13.sent;
|
|
763
856
|
|
|
764
|
-
if (
|
|
765
|
-
|
|
857
|
+
if (_context13.t5) {
|
|
858
|
+
_context13.next = 14;
|
|
766
859
|
break;
|
|
767
860
|
}
|
|
768
861
|
|
|
769
|
-
|
|
862
|
+
_context13.t5 = {};
|
|
770
863
|
|
|
771
864
|
case 14:
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
nft.metadata = (0,
|
|
776
|
-
|
|
865
|
+
_context13.t6 = _context13.t5;
|
|
866
|
+
_context13.t7 = (0, _context13.t3)(_context13.t4, _context13.t6);
|
|
867
|
+
_context13.t8 = nft.metadata || {};
|
|
868
|
+
nft.metadata = (0, _context13.t2)(_context13.t7, _context13.t8);
|
|
869
|
+
_context13.next = 20;
|
|
777
870
|
return this.TenantConfiguration({
|
|
778
871
|
contractAddress: contractAddress
|
|
779
872
|
});
|
|
780
873
|
|
|
781
874
|
case 20:
|
|
782
|
-
nft.config =
|
|
783
|
-
return
|
|
875
|
+
nft.config = _context13.sent;
|
|
876
|
+
return _context13.abrupt("return", FormatNFTMetadata(nft));
|
|
784
877
|
|
|
785
878
|
case 22:
|
|
786
879
|
case "end":
|
|
787
|
-
return
|
|
880
|
+
return _context13.stop();
|
|
788
881
|
}
|
|
789
882
|
}
|
|
790
|
-
},
|
|
883
|
+
}, _callee13, this);
|
|
791
884
|
}));
|
|
792
885
|
|
|
793
|
-
return function (
|
|
794
|
-
return
|
|
886
|
+
return function (_x6) {
|
|
887
|
+
return _ref26.apply(this, arguments);
|
|
795
888
|
};
|
|
796
889
|
}();
|
|
797
890
|
/**
|
|
@@ -799,7 +892,7 @@ exports.NFT = /*#__PURE__*/function () {
|
|
|
799
892
|
*
|
|
800
893
|
* Transfer the specified NFT owned by the current user to the specified address
|
|
801
894
|
*
|
|
802
|
-
* @methodGroup
|
|
895
|
+
* @methodGroup NFTs
|
|
803
896
|
* @namedParams
|
|
804
897
|
* @param {string} contractAddress - The contract address of the NFT
|
|
805
898
|
* @param {string} tokenId - The token ID of the NFT
|
|
@@ -808,23 +901,23 @@ exports.NFT = /*#__PURE__*/function () {
|
|
|
808
901
|
|
|
809
902
|
|
|
810
903
|
exports.TransferNFT = /*#__PURE__*/function () {
|
|
811
|
-
var
|
|
904
|
+
var _ref28 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref27) {
|
|
812
905
|
var contractAddress, tokenId, targetAddress;
|
|
813
|
-
return _regeneratorRuntime.wrap(function
|
|
906
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
814
907
|
while (1) {
|
|
815
|
-
switch (
|
|
908
|
+
switch (_context14.prev = _context14.next) {
|
|
816
909
|
case 0:
|
|
817
|
-
contractAddress =
|
|
910
|
+
contractAddress = _ref27.contractAddress, tokenId = _ref27.tokenId, targetAddress = _ref27.targetAddress;
|
|
818
911
|
|
|
819
912
|
if (!(!targetAddress || !Utils.ValidAddress(targetAddress))) {
|
|
820
|
-
|
|
913
|
+
_context14.next = 3;
|
|
821
914
|
break;
|
|
822
915
|
}
|
|
823
916
|
|
|
824
917
|
throw Error("Eluvio Wallet Client: Invalid or missing target address in UserTransferNFT");
|
|
825
918
|
|
|
826
919
|
case 3:
|
|
827
|
-
|
|
920
|
+
_context14.next = 5;
|
|
828
921
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
829
922
|
path: UrlJoin("as", "wlt", "mkt", "xfer"),
|
|
830
923
|
method: "POST",
|
|
@@ -839,18 +932,18 @@ exports.TransferNFT = /*#__PURE__*/function () {
|
|
|
839
932
|
});
|
|
840
933
|
|
|
841
934
|
case 5:
|
|
842
|
-
return
|
|
935
|
+
return _context14.abrupt("return", _context14.sent);
|
|
843
936
|
|
|
844
937
|
case 6:
|
|
845
938
|
case "end":
|
|
846
|
-
return
|
|
939
|
+
return _context14.stop();
|
|
847
940
|
}
|
|
848
941
|
}
|
|
849
|
-
},
|
|
942
|
+
}, _callee14, this);
|
|
850
943
|
}));
|
|
851
944
|
|
|
852
|
-
return function (
|
|
853
|
-
return
|
|
945
|
+
return function (_x7) {
|
|
946
|
+
return _ref28.apply(this, arguments);
|
|
854
947
|
};
|
|
855
948
|
}();
|
|
856
949
|
/** LISTINGS */
|
|
@@ -867,53 +960,53 @@ exports.TransferNFT = /*#__PURE__*/function () {
|
|
|
867
960
|
|
|
868
961
|
|
|
869
962
|
exports.ListingStatus = /*#__PURE__*/function () {
|
|
870
|
-
var
|
|
963
|
+
var _ref30 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(_ref29) {
|
|
871
964
|
var listingId;
|
|
872
|
-
return _regeneratorRuntime.wrap(function
|
|
965
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
873
966
|
while (1) {
|
|
874
|
-
switch (
|
|
967
|
+
switch (_context15.prev = _context15.next) {
|
|
875
968
|
case 0:
|
|
876
|
-
listingId =
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
969
|
+
listingId = _ref29.listingId;
|
|
970
|
+
_context15.prev = 1;
|
|
971
|
+
_context15.t0 = Utils;
|
|
972
|
+
_context15.next = 5;
|
|
880
973
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
881
974
|
path: UrlJoin("as", "mkt", "status", listingId),
|
|
882
975
|
method: "GET"
|
|
883
976
|
});
|
|
884
977
|
|
|
885
978
|
case 5:
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
return
|
|
979
|
+
_context15.t1 = _context15.sent;
|
|
980
|
+
_context15.next = 8;
|
|
981
|
+
return _context15.t0.ResponseToJson.call(_context15.t0, _context15.t1);
|
|
889
982
|
|
|
890
983
|
case 8:
|
|
891
|
-
return
|
|
984
|
+
return _context15.abrupt("return", _context15.sent);
|
|
892
985
|
|
|
893
986
|
case 11:
|
|
894
|
-
|
|
895
|
-
|
|
987
|
+
_context15.prev = 11;
|
|
988
|
+
_context15.t2 = _context15["catch"](1);
|
|
896
989
|
|
|
897
|
-
if (!(
|
|
898
|
-
|
|
990
|
+
if (!(_context15.t2.status === 404)) {
|
|
991
|
+
_context15.next = 15;
|
|
899
992
|
break;
|
|
900
993
|
}
|
|
901
994
|
|
|
902
|
-
return
|
|
995
|
+
return _context15.abrupt("return");
|
|
903
996
|
|
|
904
997
|
case 15:
|
|
905
|
-
throw
|
|
998
|
+
throw _context15.t2;
|
|
906
999
|
|
|
907
1000
|
case 16:
|
|
908
1001
|
case "end":
|
|
909
|
-
return
|
|
1002
|
+
return _context15.stop();
|
|
910
1003
|
}
|
|
911
1004
|
}
|
|
912
|
-
},
|
|
1005
|
+
}, _callee15, this, [[1, 11]]);
|
|
913
1006
|
}));
|
|
914
1007
|
|
|
915
|
-
return function (
|
|
916
|
-
return
|
|
1008
|
+
return function (_x8) {
|
|
1009
|
+
return _ref30.apply(this, arguments);
|
|
917
1010
|
};
|
|
918
1011
|
}();
|
|
919
1012
|
/**
|
|
@@ -930,40 +1023,40 @@ exports.ListingStatus = /*#__PURE__*/function () {
|
|
|
930
1023
|
|
|
931
1024
|
|
|
932
1025
|
exports.Listing = /*#__PURE__*/function () {
|
|
933
|
-
var
|
|
1026
|
+
var _ref32 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(_ref31) {
|
|
934
1027
|
var listingId;
|
|
935
|
-
return _regeneratorRuntime.wrap(function
|
|
1028
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
936
1029
|
while (1) {
|
|
937
|
-
switch (
|
|
1030
|
+
switch (_context16.prev = _context16.next) {
|
|
938
1031
|
case 0:
|
|
939
|
-
listingId =
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
1032
|
+
listingId = _ref31.listingId;
|
|
1033
|
+
_context16.t0 = FormatNFT;
|
|
1034
|
+
_context16.t1 = Utils;
|
|
1035
|
+
_context16.next = 5;
|
|
943
1036
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
944
1037
|
path: UrlJoin("as", "mkt", "l", listingId),
|
|
945
1038
|
method: "GET"
|
|
946
1039
|
});
|
|
947
1040
|
|
|
948
1041
|
case 5:
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
return
|
|
1042
|
+
_context16.t2 = _context16.sent;
|
|
1043
|
+
_context16.next = 8;
|
|
1044
|
+
return _context16.t1.ResponseToJson.call(_context16.t1, _context16.t2);
|
|
952
1045
|
|
|
953
1046
|
case 8:
|
|
954
|
-
|
|
955
|
-
return
|
|
1047
|
+
_context16.t3 = _context16.sent;
|
|
1048
|
+
return _context16.abrupt("return", (0, _context16.t0)(_context16.t3));
|
|
956
1049
|
|
|
957
1050
|
case 10:
|
|
958
1051
|
case "end":
|
|
959
|
-
return
|
|
1052
|
+
return _context16.stop();
|
|
960
1053
|
}
|
|
961
1054
|
}
|
|
962
|
-
},
|
|
1055
|
+
}, _callee16, this);
|
|
963
1056
|
}));
|
|
964
1057
|
|
|
965
|
-
return function (
|
|
966
|
-
return
|
|
1058
|
+
return function (_x9) {
|
|
1059
|
+
return _ref32.apply(this, arguments);
|
|
967
1060
|
};
|
|
968
1061
|
}();
|
|
969
1062
|
/**
|
|
@@ -999,22 +1092,22 @@ exports.Listing = /*#__PURE__*/function () {
|
|
|
999
1092
|
*/
|
|
1000
1093
|
|
|
1001
1094
|
|
|
1002
|
-
exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1003
|
-
var
|
|
1004
|
-
return _regeneratorRuntime.wrap(function
|
|
1095
|
+
exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17() {
|
|
1096
|
+
var _args17 = arguments;
|
|
1097
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
1005
1098
|
while (1) {
|
|
1006
|
-
switch (
|
|
1099
|
+
switch (_context17.prev = _context17.next) {
|
|
1007
1100
|
case 0:
|
|
1008
|
-
return
|
|
1101
|
+
return _context17.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1009
1102
|
mode: "listings"
|
|
1010
|
-
},
|
|
1103
|
+
}, _args17[0] || {})));
|
|
1011
1104
|
|
|
1012
1105
|
case 1:
|
|
1013
1106
|
case "end":
|
|
1014
|
-
return
|
|
1107
|
+
return _context17.stop();
|
|
1015
1108
|
}
|
|
1016
1109
|
}
|
|
1017
|
-
},
|
|
1110
|
+
}, _callee17, this);
|
|
1018
1111
|
}));
|
|
1019
1112
|
/**
|
|
1020
1113
|
* Retrieve stats for listings matching the specified parameters.
|
|
@@ -1048,22 +1141,22 @@ exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRunt
|
|
|
1048
1141
|
* @returns {Promise<Object>} - Statistics about listings. All prices in USD.
|
|
1049
1142
|
*/
|
|
1050
1143
|
|
|
1051
|
-
exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1052
|
-
var
|
|
1053
|
-
return _regeneratorRuntime.wrap(function
|
|
1144
|
+
exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18() {
|
|
1145
|
+
var _args18 = arguments;
|
|
1146
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
1054
1147
|
while (1) {
|
|
1055
|
-
switch (
|
|
1148
|
+
switch (_context18.prev = _context18.next) {
|
|
1056
1149
|
case 0:
|
|
1057
|
-
return
|
|
1150
|
+
return _context18.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1058
1151
|
mode: "listing-stats"
|
|
1059
|
-
},
|
|
1152
|
+
}, _args18[0] || {})));
|
|
1060
1153
|
|
|
1061
1154
|
case 1:
|
|
1062
1155
|
case "end":
|
|
1063
|
-
return
|
|
1156
|
+
return _context18.stop();
|
|
1064
1157
|
}
|
|
1065
1158
|
}
|
|
1066
|
-
},
|
|
1159
|
+
}, _callee18, this);
|
|
1067
1160
|
}));
|
|
1068
1161
|
/**
|
|
1069
1162
|
* Retrieve sales matching the specified parameters.
|
|
@@ -1097,22 +1190,71 @@ exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
|
|
|
1097
1190
|
* @returns {Promise<Object>} - Results of the query and pagination info
|
|
1098
1191
|
*/
|
|
1099
1192
|
|
|
1100
|
-
exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1101
|
-
var
|
|
1102
|
-
return _regeneratorRuntime.wrap(function
|
|
1193
|
+
exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19() {
|
|
1194
|
+
var _args19 = arguments;
|
|
1195
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
1103
1196
|
while (1) {
|
|
1104
|
-
switch (
|
|
1197
|
+
switch (_context19.prev = _context19.next) {
|
|
1105
1198
|
case 0:
|
|
1106
|
-
return
|
|
1199
|
+
return _context19.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1107
1200
|
mode: "sales"
|
|
1108
|
-
},
|
|
1201
|
+
}, _args19[0] || {})));
|
|
1109
1202
|
|
|
1110
1203
|
case 1:
|
|
1111
1204
|
case "end":
|
|
1112
|
-
return
|
|
1205
|
+
return _context19.stop();
|
|
1113
1206
|
}
|
|
1114
1207
|
}
|
|
1115
|
-
},
|
|
1208
|
+
}, _callee19, this);
|
|
1209
|
+
}));
|
|
1210
|
+
/**
|
|
1211
|
+
* Retrieve sales and transfers matching the specified parameters.
|
|
1212
|
+
*
|
|
1213
|
+
* @methodGroup Listings
|
|
1214
|
+
* @namedParams
|
|
1215
|
+
* @param {integer=} start=0 - PAGINATION: Index from which the results should start
|
|
1216
|
+
* @param {integer=} limit=50 - PAGINATION: Maximum number of results to return
|
|
1217
|
+
* @param {string=} sortBy="created" - Sort order. Options: `created`, `price`, `name`
|
|
1218
|
+
* @param {boolean=} sortDesc=false - Sort results descending instead of ascending
|
|
1219
|
+
* @param {string=} filter - Filter results by item name.
|
|
1220
|
+
* <br /><br />
|
|
1221
|
+
* NOTE: This string must be an <b>exact match</b> on the item name.
|
|
1222
|
+
* You can retrieve all available item names from the <a href="#.ListingNames">ListingNames method</a>.
|
|
1223
|
+
* @param {string=} editionFilter - Filter results by item edition.
|
|
1224
|
+
* <br /><br />
|
|
1225
|
+
* NOTE: This string must be an <b>exact match</b> on the edition name.
|
|
1226
|
+
* You can retrieve all available item edition names from the <a href="#.ListingEditionNames">ListingEditionNames method</a>.
|
|
1227
|
+
* @param {Array<Object>} attributeFilters - Filter results by item attributes. Each entry should include name and value (e.g. `[{name: "attribute-name", value: "attribute-value"}]`)
|
|
1228
|
+
* <br /><br />
|
|
1229
|
+
* NOTE: These filters must be an <b>exact match</b> on the attribute name and value.
|
|
1230
|
+
* You can retrieve all available item attributes from the <a href="#.ListingAttributes">ListingAttributes method</a>.
|
|
1231
|
+
* @param {string=} sellerAddress - Filter by a specific seller
|
|
1232
|
+
* @param {string=} contractAddress - Filter results by the address of the NFT contract
|
|
1233
|
+
* @param {string=} tokenId - Filter by token ID (if filtering by contract address)
|
|
1234
|
+
* @param {string=} currency - Filter results by purchase currency. Available options: `usdc`
|
|
1235
|
+
* @param {Object=} marketplaceParams - Filter results by marketplace
|
|
1236
|
+
* @param {integer=} collectionIndex - If filtering by marketplace, filter by collection. The index refers to the index in the array `marketplace.collections`
|
|
1237
|
+
* @param {integer=} lastNDays - Filter by results listed in the past N days
|
|
1238
|
+
*
|
|
1239
|
+
* @returns {Promise<Object>} - Results of the query and pagination info
|
|
1240
|
+
*/
|
|
1241
|
+
|
|
1242
|
+
exports.Transfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20() {
|
|
1243
|
+
var _args20 = arguments;
|
|
1244
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
1245
|
+
while (1) {
|
|
1246
|
+
switch (_context20.prev = _context20.next) {
|
|
1247
|
+
case 0:
|
|
1248
|
+
return _context20.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1249
|
+
mode: "transfers"
|
|
1250
|
+
}, _args20[0] || {})));
|
|
1251
|
+
|
|
1252
|
+
case 1:
|
|
1253
|
+
case "end":
|
|
1254
|
+
return _context20.stop();
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
}, _callee20, this);
|
|
1116
1258
|
}));
|
|
1117
1259
|
/**
|
|
1118
1260
|
* Retrieve stats for listings matching the specified parameters.
|
|
@@ -1146,22 +1288,22 @@ exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
|
|
1146
1288
|
* @returns {Promise<Object>} - Statistics about sales. All prices in USD.
|
|
1147
1289
|
*/
|
|
1148
1290
|
|
|
1149
|
-
exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1150
|
-
var
|
|
1151
|
-
return _regeneratorRuntime.wrap(function
|
|
1291
|
+
exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21() {
|
|
1292
|
+
var _args21 = arguments;
|
|
1293
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
1152
1294
|
while (1) {
|
|
1153
|
-
switch (
|
|
1295
|
+
switch (_context21.prev = _context21.next) {
|
|
1154
1296
|
case 0:
|
|
1155
|
-
return
|
|
1297
|
+
return _context21.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1156
1298
|
mode: "sales-stats"
|
|
1157
|
-
},
|
|
1299
|
+
}, _args21[0] || {})));
|
|
1158
1300
|
|
|
1159
1301
|
case 1:
|
|
1160
1302
|
case "end":
|
|
1161
|
-
return
|
|
1303
|
+
return _context21.stop();
|
|
1162
1304
|
}
|
|
1163
1305
|
}
|
|
1164
|
-
},
|
|
1306
|
+
}, _callee21, this);
|
|
1165
1307
|
}));
|
|
1166
1308
|
/**
|
|
1167
1309
|
* <b><i>Requires login</i></b>
|
|
@@ -1179,22 +1321,22 @@ exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRu
|
|
|
1179
1321
|
*/
|
|
1180
1322
|
|
|
1181
1323
|
exports.CreateListing = /*#__PURE__*/function () {
|
|
1182
|
-
var
|
|
1324
|
+
var _ref39 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(_ref38) {
|
|
1183
1325
|
var contractAddress, tokenId, price, listingId;
|
|
1184
|
-
return _regeneratorRuntime.wrap(function
|
|
1326
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
1185
1327
|
while (1) {
|
|
1186
|
-
switch (
|
|
1328
|
+
switch (_context22.prev = _context22.next) {
|
|
1187
1329
|
case 0:
|
|
1188
|
-
contractAddress =
|
|
1330
|
+
contractAddress = _ref38.contractAddress, tokenId = _ref38.tokenId, price = _ref38.price, listingId = _ref38.listingId;
|
|
1189
1331
|
contractAddress = Utils.FormatAddress(contractAddress);
|
|
1190
1332
|
|
|
1191
1333
|
if (!listingId) {
|
|
1192
|
-
|
|
1334
|
+
_context22.next = 12;
|
|
1193
1335
|
break;
|
|
1194
1336
|
}
|
|
1195
1337
|
|
|
1196
|
-
|
|
1197
|
-
|
|
1338
|
+
_context22.t0 = Utils;
|
|
1339
|
+
_context22.next = 6;
|
|
1198
1340
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1199
1341
|
path: UrlJoin("as", "wlt", "mkt"),
|
|
1200
1342
|
method: "PUT",
|
|
@@ -1208,16 +1350,16 @@ exports.CreateListing = /*#__PURE__*/function () {
|
|
|
1208
1350
|
});
|
|
1209
1351
|
|
|
1210
1352
|
case 6:
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
return
|
|
1353
|
+
_context22.t1 = _context22.sent;
|
|
1354
|
+
_context22.next = 9;
|
|
1355
|
+
return _context22.t0.ResponseToFormat.call(_context22.t0, "text", _context22.t1);
|
|
1214
1356
|
|
|
1215
1357
|
case 9:
|
|
1216
|
-
return
|
|
1358
|
+
return _context22.abrupt("return", _context22.sent);
|
|
1217
1359
|
|
|
1218
1360
|
case 12:
|
|
1219
|
-
|
|
1220
|
-
|
|
1361
|
+
_context22.t2 = Utils;
|
|
1362
|
+
_context22.next = 15;
|
|
1221
1363
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1222
1364
|
path: UrlJoin("as", "wlt", "mkt"),
|
|
1223
1365
|
method: "POST",
|
|
@@ -1232,23 +1374,23 @@ exports.CreateListing = /*#__PURE__*/function () {
|
|
|
1232
1374
|
});
|
|
1233
1375
|
|
|
1234
1376
|
case 15:
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
return
|
|
1377
|
+
_context22.t3 = _context22.sent;
|
|
1378
|
+
_context22.next = 18;
|
|
1379
|
+
return _context22.t2.ResponseToJson.call(_context22.t2, _context22.t3);
|
|
1238
1380
|
|
|
1239
1381
|
case 18:
|
|
1240
|
-
return
|
|
1382
|
+
return _context22.abrupt("return", _context22.sent);
|
|
1241
1383
|
|
|
1242
1384
|
case 19:
|
|
1243
1385
|
case "end":
|
|
1244
|
-
return
|
|
1386
|
+
return _context22.stop();
|
|
1245
1387
|
}
|
|
1246
1388
|
}
|
|
1247
|
-
},
|
|
1389
|
+
}, _callee22, this);
|
|
1248
1390
|
}));
|
|
1249
1391
|
|
|
1250
|
-
return function (
|
|
1251
|
-
return
|
|
1392
|
+
return function (_x10) {
|
|
1393
|
+
return _ref39.apply(this, arguments);
|
|
1252
1394
|
};
|
|
1253
1395
|
}();
|
|
1254
1396
|
/**
|
|
@@ -1263,14 +1405,14 @@ exports.CreateListing = /*#__PURE__*/function () {
|
|
|
1263
1405
|
|
|
1264
1406
|
|
|
1265
1407
|
exports.RemoveListing = /*#__PURE__*/function () {
|
|
1266
|
-
var
|
|
1408
|
+
var _ref41 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(_ref40) {
|
|
1267
1409
|
var listingId;
|
|
1268
|
-
return _regeneratorRuntime.wrap(function
|
|
1410
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
1269
1411
|
while (1) {
|
|
1270
|
-
switch (
|
|
1412
|
+
switch (_context23.prev = _context23.next) {
|
|
1271
1413
|
case 0:
|
|
1272
|
-
listingId =
|
|
1273
|
-
|
|
1414
|
+
listingId = _ref40.listingId;
|
|
1415
|
+
_context23.next = 3;
|
|
1274
1416
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1275
1417
|
path: UrlJoin("as", "wlt", "mkt", listingId),
|
|
1276
1418
|
method: "DELETE",
|
|
@@ -1281,14 +1423,14 @@ exports.RemoveListing = /*#__PURE__*/function () {
|
|
|
1281
1423
|
|
|
1282
1424
|
case 3:
|
|
1283
1425
|
case "end":
|
|
1284
|
-
return
|
|
1426
|
+
return _context23.stop();
|
|
1285
1427
|
}
|
|
1286
1428
|
}
|
|
1287
|
-
},
|
|
1429
|
+
}, _callee23, this);
|
|
1288
1430
|
}));
|
|
1289
1431
|
|
|
1290
|
-
return function (
|
|
1291
|
-
return
|
|
1432
|
+
return function (_x11) {
|
|
1433
|
+
return _ref41.apply(this, arguments);
|
|
1292
1434
|
};
|
|
1293
1435
|
}();
|
|
1294
1436
|
/**
|
|
@@ -1305,30 +1447,30 @@ exports.RemoveListing = /*#__PURE__*/function () {
|
|
|
1305
1447
|
|
|
1306
1448
|
|
|
1307
1449
|
exports.ListingNames = /*#__PURE__*/function () {
|
|
1308
|
-
var
|
|
1450
|
+
var _ref43 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(_ref42) {
|
|
1309
1451
|
var marketplaceParams, tenantId;
|
|
1310
|
-
return _regeneratorRuntime.wrap(function
|
|
1452
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
1311
1453
|
while (1) {
|
|
1312
|
-
switch (
|
|
1454
|
+
switch (_context24.prev = _context24.next) {
|
|
1313
1455
|
case 0:
|
|
1314
|
-
marketplaceParams =
|
|
1456
|
+
marketplaceParams = _ref42.marketplaceParams;
|
|
1315
1457
|
|
|
1316
1458
|
if (!marketplaceParams) {
|
|
1317
|
-
|
|
1459
|
+
_context24.next = 5;
|
|
1318
1460
|
break;
|
|
1319
1461
|
}
|
|
1320
1462
|
|
|
1321
|
-
|
|
1463
|
+
_context24.next = 4;
|
|
1322
1464
|
return this.MarketplaceInfo({
|
|
1323
1465
|
marketplaceParams: marketplaceParams
|
|
1324
1466
|
});
|
|
1325
1467
|
|
|
1326
1468
|
case 4:
|
|
1327
|
-
tenantId =
|
|
1469
|
+
tenantId = _context24.sent.tenantId;
|
|
1328
1470
|
|
|
1329
1471
|
case 5:
|
|
1330
|
-
|
|
1331
|
-
|
|
1472
|
+
_context24.t0 = Utils;
|
|
1473
|
+
_context24.next = 8;
|
|
1332
1474
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1333
1475
|
path: UrlJoin("as", "mkt", "names"),
|
|
1334
1476
|
method: "GET",
|
|
@@ -1338,23 +1480,23 @@ exports.ListingNames = /*#__PURE__*/function () {
|
|
|
1338
1480
|
});
|
|
1339
1481
|
|
|
1340
1482
|
case 8:
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
return
|
|
1483
|
+
_context24.t1 = _context24.sent;
|
|
1484
|
+
_context24.next = 11;
|
|
1485
|
+
return _context24.t0.ResponseToJson.call(_context24.t0, _context24.t1);
|
|
1344
1486
|
|
|
1345
1487
|
case 11:
|
|
1346
|
-
return
|
|
1488
|
+
return _context24.abrupt("return", _context24.sent);
|
|
1347
1489
|
|
|
1348
1490
|
case 12:
|
|
1349
1491
|
case "end":
|
|
1350
|
-
return
|
|
1492
|
+
return _context24.stop();
|
|
1351
1493
|
}
|
|
1352
1494
|
}
|
|
1353
|
-
},
|
|
1495
|
+
}, _callee24, this);
|
|
1354
1496
|
}));
|
|
1355
1497
|
|
|
1356
|
-
return function (
|
|
1357
|
-
return
|
|
1498
|
+
return function (_x12) {
|
|
1499
|
+
return _ref43.apply(this, arguments);
|
|
1358
1500
|
};
|
|
1359
1501
|
}();
|
|
1360
1502
|
/**
|
|
@@ -1369,15 +1511,15 @@ exports.ListingNames = /*#__PURE__*/function () {
|
|
|
1369
1511
|
|
|
1370
1512
|
|
|
1371
1513
|
exports.ListingEditionNames = /*#__PURE__*/function () {
|
|
1372
|
-
var
|
|
1514
|
+
var _ref45 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(_ref44) {
|
|
1373
1515
|
var displayName;
|
|
1374
|
-
return _regeneratorRuntime.wrap(function
|
|
1516
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
1375
1517
|
while (1) {
|
|
1376
|
-
switch (
|
|
1518
|
+
switch (_context25.prev = _context25.next) {
|
|
1377
1519
|
case 0:
|
|
1378
|
-
displayName =
|
|
1379
|
-
|
|
1380
|
-
|
|
1520
|
+
displayName = _ref44.displayName;
|
|
1521
|
+
_context25.t0 = Utils;
|
|
1522
|
+
_context25.next = 4;
|
|
1381
1523
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1382
1524
|
path: UrlJoin("as", "mkt", "editions"),
|
|
1383
1525
|
queryParams: {
|
|
@@ -1387,23 +1529,23 @@ exports.ListingEditionNames = /*#__PURE__*/function () {
|
|
|
1387
1529
|
});
|
|
1388
1530
|
|
|
1389
1531
|
case 4:
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
return
|
|
1532
|
+
_context25.t1 = _context25.sent;
|
|
1533
|
+
_context25.next = 7;
|
|
1534
|
+
return _context25.t0.ResponseToJson.call(_context25.t0, _context25.t1);
|
|
1393
1535
|
|
|
1394
1536
|
case 7:
|
|
1395
|
-
return
|
|
1537
|
+
return _context25.abrupt("return", _context25.sent);
|
|
1396
1538
|
|
|
1397
1539
|
case 8:
|
|
1398
1540
|
case "end":
|
|
1399
|
-
return
|
|
1541
|
+
return _context25.stop();
|
|
1400
1542
|
}
|
|
1401
1543
|
}
|
|
1402
|
-
},
|
|
1544
|
+
}, _callee25, this);
|
|
1403
1545
|
}));
|
|
1404
1546
|
|
|
1405
|
-
return function (
|
|
1406
|
-
return
|
|
1547
|
+
return function (_x13) {
|
|
1548
|
+
return _ref45.apply(this, arguments);
|
|
1407
1549
|
};
|
|
1408
1550
|
}();
|
|
1409
1551
|
/**
|
|
@@ -1420,46 +1562,46 @@ exports.ListingEditionNames = /*#__PURE__*/function () {
|
|
|
1420
1562
|
*/
|
|
1421
1563
|
|
|
1422
1564
|
|
|
1423
|
-
exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1424
|
-
var
|
|
1565
|
+
exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26() {
|
|
1566
|
+
var _ref47,
|
|
1425
1567
|
marketplaceParams,
|
|
1426
1568
|
displayName,
|
|
1427
1569
|
filters,
|
|
1428
1570
|
attributes,
|
|
1429
|
-
|
|
1571
|
+
_args26 = arguments;
|
|
1430
1572
|
|
|
1431
|
-
return _regeneratorRuntime.wrap(function
|
|
1573
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
1432
1574
|
while (1) {
|
|
1433
|
-
switch (
|
|
1575
|
+
switch (_context26.prev = _context26.next) {
|
|
1434
1576
|
case 0:
|
|
1435
|
-
|
|
1577
|
+
_ref47 = _args26.length > 0 && _args26[0] !== undefined ? _args26[0] : {}, marketplaceParams = _ref47.marketplaceParams, displayName = _ref47.displayName;
|
|
1436
1578
|
filters = [];
|
|
1437
1579
|
|
|
1438
1580
|
if (!marketplaceParams) {
|
|
1439
|
-
|
|
1581
|
+
_context26.next = 10;
|
|
1440
1582
|
break;
|
|
1441
1583
|
}
|
|
1442
1584
|
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1585
|
+
_context26.t0 = filters;
|
|
1586
|
+
_context26.t1 = "tenant:eq:";
|
|
1587
|
+
_context26.next = 7;
|
|
1446
1588
|
return this.MarketplaceInfo({
|
|
1447
1589
|
marketplaceParams: marketplaceParams
|
|
1448
1590
|
});
|
|
1449
1591
|
|
|
1450
1592
|
case 7:
|
|
1451
|
-
|
|
1452
|
-
|
|
1593
|
+
_context26.t2 = _context26.sent.tenantId;
|
|
1594
|
+
_context26.t3 = _context26.t1.concat.call(_context26.t1, _context26.t2);
|
|
1453
1595
|
|
|
1454
|
-
|
|
1596
|
+
_context26.t0.push.call(_context26.t0, _context26.t3);
|
|
1455
1597
|
|
|
1456
1598
|
case 10:
|
|
1457
1599
|
if (displayName) {
|
|
1458
1600
|
filters.push("nft/display_name:eq:".concat(displayName));
|
|
1459
1601
|
}
|
|
1460
1602
|
|
|
1461
|
-
|
|
1462
|
-
|
|
1603
|
+
_context26.t4 = Utils;
|
|
1604
|
+
_context26.next = 14;
|
|
1463
1605
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1464
1606
|
path: UrlJoin("as", "mkt", "attributes"),
|
|
1465
1607
|
method: "GET",
|
|
@@ -1469,30 +1611,30 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
|
|
|
1469
1611
|
});
|
|
1470
1612
|
|
|
1471
1613
|
case 14:
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
return
|
|
1614
|
+
_context26.t5 = _context26.sent;
|
|
1615
|
+
_context26.next = 17;
|
|
1616
|
+
return _context26.t4.ResponseToJson.call(_context26.t4, _context26.t5);
|
|
1475
1617
|
|
|
1476
1618
|
case 17:
|
|
1477
|
-
attributes =
|
|
1478
|
-
return
|
|
1479
|
-
var trait_type =
|
|
1480
|
-
values =
|
|
1619
|
+
attributes = _context26.sent;
|
|
1620
|
+
return _context26.abrupt("return", attributes.map(function (_ref48) {
|
|
1621
|
+
var trait_type = _ref48.trait_type,
|
|
1622
|
+
values = _ref48.values;
|
|
1481
1623
|
return {
|
|
1482
1624
|
name: trait_type,
|
|
1483
1625
|
values: values
|
|
1484
1626
|
};
|
|
1485
|
-
}).filter(function (
|
|
1486
|
-
var name =
|
|
1627
|
+
}).filter(function (_ref49) {
|
|
1628
|
+
var name = _ref49.name;
|
|
1487
1629
|
return !["Content Fabric Hash", "Total Minted Supply", "Creator"].includes(name);
|
|
1488
1630
|
}));
|
|
1489
1631
|
|
|
1490
1632
|
case 19:
|
|
1491
1633
|
case "end":
|
|
1492
|
-
return
|
|
1634
|
+
return _context26.stop();
|
|
1493
1635
|
}
|
|
1494
1636
|
}
|
|
1495
|
-
},
|
|
1637
|
+
}, _callee26, this);
|
|
1496
1638
|
}));
|
|
1497
1639
|
/* MINTING STATUS */
|
|
1498
1640
|
|
|
@@ -1508,61 +1650,61 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
|
|
|
1508
1650
|
*/
|
|
1509
1651
|
|
|
1510
1652
|
exports.ListingPurchaseStatus = /*#__PURE__*/function () {
|
|
1511
|
-
var
|
|
1653
|
+
var _ref51 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(_ref50) {
|
|
1512
1654
|
var listingId, confirmationId, listingStatus, statuses;
|
|
1513
|
-
return _regeneratorRuntime.wrap(function
|
|
1655
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
1514
1656
|
while (1) {
|
|
1515
|
-
switch (
|
|
1657
|
+
switch (_context27.prev = _context27.next) {
|
|
1516
1658
|
case 0:
|
|
1517
|
-
listingId =
|
|
1518
|
-
|
|
1519
|
-
|
|
1659
|
+
listingId = _ref50.listingId, confirmationId = _ref50.confirmationId;
|
|
1660
|
+
_context27.prev = 1;
|
|
1661
|
+
_context27.next = 4;
|
|
1520
1662
|
return this.ListingStatus({
|
|
1521
1663
|
listingId: listingId
|
|
1522
1664
|
});
|
|
1523
1665
|
|
|
1524
1666
|
case 4:
|
|
1525
|
-
listingStatus =
|
|
1667
|
+
listingStatus = _context27.sent;
|
|
1526
1668
|
|
|
1527
1669
|
if (listingStatus) {
|
|
1528
|
-
|
|
1670
|
+
_context27.next = 7;
|
|
1529
1671
|
break;
|
|
1530
1672
|
}
|
|
1531
1673
|
|
|
1532
1674
|
throw Error("Unable to find info for listing " + listingId);
|
|
1533
1675
|
|
|
1534
1676
|
case 7:
|
|
1535
|
-
|
|
1677
|
+
_context27.next = 9;
|
|
1536
1678
|
return this.MintingStatus({
|
|
1537
1679
|
tenantId: listingStatus.tenant
|
|
1538
1680
|
});
|
|
1539
1681
|
|
|
1540
1682
|
case 9:
|
|
1541
|
-
statuses =
|
|
1542
|
-
return
|
|
1683
|
+
statuses = _context27.sent;
|
|
1684
|
+
return _context27.abrupt("return", statuses.find(function (status) {
|
|
1543
1685
|
return status.op === "nft-transfer" && status.extra && status.extra[0] === confirmationId;
|
|
1544
1686
|
}) || {
|
|
1545
1687
|
status: "none"
|
|
1546
1688
|
});
|
|
1547
1689
|
|
|
1548
1690
|
case 13:
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
this.Log(
|
|
1552
|
-
return
|
|
1691
|
+
_context27.prev = 13;
|
|
1692
|
+
_context27.t0 = _context27["catch"](1);
|
|
1693
|
+
this.Log(_context27.t0, true);
|
|
1694
|
+
return _context27.abrupt("return", {
|
|
1553
1695
|
status: "unknown"
|
|
1554
1696
|
});
|
|
1555
1697
|
|
|
1556
1698
|
case 17:
|
|
1557
1699
|
case "end":
|
|
1558
|
-
return
|
|
1700
|
+
return _context27.stop();
|
|
1559
1701
|
}
|
|
1560
1702
|
}
|
|
1561
|
-
},
|
|
1703
|
+
}, _callee27, this, [[1, 13]]);
|
|
1562
1704
|
}));
|
|
1563
1705
|
|
|
1564
|
-
return function (
|
|
1565
|
-
return
|
|
1706
|
+
return function (_x14) {
|
|
1707
|
+
return _ref51.apply(this, arguments);
|
|
1566
1708
|
};
|
|
1567
1709
|
}();
|
|
1568
1710
|
/**
|
|
@@ -1578,52 +1720,52 @@ exports.ListingPurchaseStatus = /*#__PURE__*/function () {
|
|
|
1578
1720
|
|
|
1579
1721
|
|
|
1580
1722
|
exports.PurchaseStatus = /*#__PURE__*/function () {
|
|
1581
|
-
var
|
|
1723
|
+
var _ref53 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref52) {
|
|
1582
1724
|
var marketplaceParams, confirmationId, marketplaceInfo, statuses;
|
|
1583
|
-
return _regeneratorRuntime.wrap(function
|
|
1725
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
1584
1726
|
while (1) {
|
|
1585
|
-
switch (
|
|
1727
|
+
switch (_context28.prev = _context28.next) {
|
|
1586
1728
|
case 0:
|
|
1587
|
-
marketplaceParams =
|
|
1588
|
-
|
|
1589
|
-
|
|
1729
|
+
marketplaceParams = _ref52.marketplaceParams, confirmationId = _ref52.confirmationId;
|
|
1730
|
+
_context28.prev = 1;
|
|
1731
|
+
_context28.next = 4;
|
|
1590
1732
|
return this.MarketplaceInfo({
|
|
1591
1733
|
marketplaceParams: marketplaceParams
|
|
1592
1734
|
});
|
|
1593
1735
|
|
|
1594
1736
|
case 4:
|
|
1595
|
-
marketplaceInfo =
|
|
1596
|
-
|
|
1737
|
+
marketplaceInfo = _context28.sent;
|
|
1738
|
+
_context28.next = 7;
|
|
1597
1739
|
return this.MintingStatus({
|
|
1598
1740
|
tenantId: marketplaceInfo.tenant_id
|
|
1599
1741
|
});
|
|
1600
1742
|
|
|
1601
1743
|
case 7:
|
|
1602
|
-
statuses =
|
|
1603
|
-
return
|
|
1744
|
+
statuses = _context28.sent;
|
|
1745
|
+
return _context28.abrupt("return", statuses.find(function (status) {
|
|
1604
1746
|
return status.op === "nft-buy" && status.confirmationId === confirmationId;
|
|
1605
1747
|
}) || {
|
|
1606
1748
|
status: "none"
|
|
1607
1749
|
});
|
|
1608
1750
|
|
|
1609
1751
|
case 11:
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
this.Log(
|
|
1613
|
-
return
|
|
1752
|
+
_context28.prev = 11;
|
|
1753
|
+
_context28.t0 = _context28["catch"](1);
|
|
1754
|
+
this.Log(_context28.t0, true);
|
|
1755
|
+
return _context28.abrupt("return", {
|
|
1614
1756
|
status: "unknown"
|
|
1615
1757
|
});
|
|
1616
1758
|
|
|
1617
1759
|
case 15:
|
|
1618
1760
|
case "end":
|
|
1619
|
-
return
|
|
1761
|
+
return _context28.stop();
|
|
1620
1762
|
}
|
|
1621
1763
|
}
|
|
1622
|
-
},
|
|
1764
|
+
}, _callee28, this, [[1, 11]]);
|
|
1623
1765
|
}));
|
|
1624
1766
|
|
|
1625
|
-
return function (
|
|
1626
|
-
return
|
|
1767
|
+
return function (_x15) {
|
|
1768
|
+
return _ref53.apply(this, arguments);
|
|
1627
1769
|
};
|
|
1628
1770
|
}();
|
|
1629
1771
|
/**
|
|
@@ -1639,52 +1781,52 @@ exports.PurchaseStatus = /*#__PURE__*/function () {
|
|
|
1639
1781
|
|
|
1640
1782
|
|
|
1641
1783
|
exports.ClaimStatus = /*#__PURE__*/function () {
|
|
1642
|
-
var
|
|
1784
|
+
var _ref55 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref54) {
|
|
1643
1785
|
var marketplaceParams, sku, marketplaceInfo, statuses;
|
|
1644
|
-
return _regeneratorRuntime.wrap(function
|
|
1786
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
1645
1787
|
while (1) {
|
|
1646
|
-
switch (
|
|
1788
|
+
switch (_context29.prev = _context29.next) {
|
|
1647
1789
|
case 0:
|
|
1648
|
-
marketplaceParams =
|
|
1649
|
-
|
|
1650
|
-
|
|
1790
|
+
marketplaceParams = _ref54.marketplaceParams, sku = _ref54.sku;
|
|
1791
|
+
_context29.prev = 1;
|
|
1792
|
+
_context29.next = 4;
|
|
1651
1793
|
return this.MarketplaceInfo({
|
|
1652
1794
|
marketplaceParams: marketplaceParams
|
|
1653
1795
|
});
|
|
1654
1796
|
|
|
1655
1797
|
case 4:
|
|
1656
|
-
marketplaceInfo =
|
|
1657
|
-
|
|
1798
|
+
marketplaceInfo = _context29.sent;
|
|
1799
|
+
_context29.next = 7;
|
|
1658
1800
|
return this.MintingStatus({
|
|
1659
1801
|
tenantId: marketplaceInfo.tenantId
|
|
1660
1802
|
});
|
|
1661
1803
|
|
|
1662
1804
|
case 7:
|
|
1663
|
-
statuses =
|
|
1664
|
-
return
|
|
1805
|
+
statuses = _context29.sent;
|
|
1806
|
+
return _context29.abrupt("return", statuses.find(function (status) {
|
|
1665
1807
|
return status.op === "nft-claim" && status.marketplaceId === marketplaceInfo.marketplaceId && status.confirmationId === sku;
|
|
1666
1808
|
}) || {
|
|
1667
1809
|
status: "none"
|
|
1668
1810
|
});
|
|
1669
1811
|
|
|
1670
1812
|
case 11:
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
this.Log(
|
|
1674
|
-
return
|
|
1813
|
+
_context29.prev = 11;
|
|
1814
|
+
_context29.t0 = _context29["catch"](1);
|
|
1815
|
+
this.Log(_context29.t0, true);
|
|
1816
|
+
return _context29.abrupt("return", {
|
|
1675
1817
|
status: "unknown"
|
|
1676
1818
|
});
|
|
1677
1819
|
|
|
1678
1820
|
case 15:
|
|
1679
1821
|
case "end":
|
|
1680
|
-
return
|
|
1822
|
+
return _context29.stop();
|
|
1681
1823
|
}
|
|
1682
1824
|
}
|
|
1683
|
-
},
|
|
1825
|
+
}, _callee29, this, [[1, 11]]);
|
|
1684
1826
|
}));
|
|
1685
1827
|
|
|
1686
|
-
return function (
|
|
1687
|
-
return
|
|
1828
|
+
return function (_x16) {
|
|
1829
|
+
return _ref55.apply(this, arguments);
|
|
1688
1830
|
};
|
|
1689
1831
|
}();
|
|
1690
1832
|
/**
|
|
@@ -1700,52 +1842,52 @@ exports.ClaimStatus = /*#__PURE__*/function () {
|
|
|
1700
1842
|
|
|
1701
1843
|
|
|
1702
1844
|
exports.PackOpenStatus = /*#__PURE__*/function () {
|
|
1703
|
-
var
|
|
1845
|
+
var _ref57 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(_ref56) {
|
|
1704
1846
|
var contractAddress, tokenId, tenantConfig, statuses;
|
|
1705
|
-
return _regeneratorRuntime.wrap(function
|
|
1847
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
1706
1848
|
while (1) {
|
|
1707
|
-
switch (
|
|
1849
|
+
switch (_context30.prev = _context30.next) {
|
|
1708
1850
|
case 0:
|
|
1709
|
-
contractAddress =
|
|
1710
|
-
|
|
1711
|
-
|
|
1851
|
+
contractAddress = _ref56.contractAddress, tokenId = _ref56.tokenId;
|
|
1852
|
+
_context30.prev = 1;
|
|
1853
|
+
_context30.next = 4;
|
|
1712
1854
|
return this.TenantConfiguration({
|
|
1713
1855
|
contractAddress: contractAddress
|
|
1714
1856
|
});
|
|
1715
1857
|
|
|
1716
1858
|
case 4:
|
|
1717
|
-
tenantConfig =
|
|
1718
|
-
|
|
1859
|
+
tenantConfig = _context30.sent;
|
|
1860
|
+
_context30.next = 7;
|
|
1719
1861
|
return this.MintingStatus({
|
|
1720
1862
|
tenantId: tenantConfig.tenant
|
|
1721
1863
|
});
|
|
1722
1864
|
|
|
1723
1865
|
case 7:
|
|
1724
|
-
statuses =
|
|
1725
|
-
return
|
|
1866
|
+
statuses = _context30.sent;
|
|
1867
|
+
return _context30.abrupt("return", statuses.find(function (status) {
|
|
1726
1868
|
return status.op === "nft-open" && Utils.EqualAddress(contractAddress, status.address) && status.tokenId === tokenId;
|
|
1727
1869
|
}) || {
|
|
1728
1870
|
status: "none"
|
|
1729
1871
|
});
|
|
1730
1872
|
|
|
1731
1873
|
case 11:
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
this.Log(
|
|
1735
|
-
return
|
|
1874
|
+
_context30.prev = 11;
|
|
1875
|
+
_context30.t0 = _context30["catch"](1);
|
|
1876
|
+
this.Log(_context30.t0, true);
|
|
1877
|
+
return _context30.abrupt("return", {
|
|
1736
1878
|
status: "unknown"
|
|
1737
1879
|
});
|
|
1738
1880
|
|
|
1739
1881
|
case 15:
|
|
1740
1882
|
case "end":
|
|
1741
|
-
return
|
|
1883
|
+
return _context30.stop();
|
|
1742
1884
|
}
|
|
1743
1885
|
}
|
|
1744
|
-
},
|
|
1886
|
+
}, _callee30, this, [[1, 11]]);
|
|
1745
1887
|
}));
|
|
1746
1888
|
|
|
1747
|
-
return function (
|
|
1748
|
-
return
|
|
1889
|
+
return function (_x17) {
|
|
1890
|
+
return _ref57.apply(this, arguments);
|
|
1749
1891
|
};
|
|
1750
1892
|
}();
|
|
1751
1893
|
/**
|
|
@@ -1761,60 +1903,60 @@ exports.PackOpenStatus = /*#__PURE__*/function () {
|
|
|
1761
1903
|
|
|
1762
1904
|
|
|
1763
1905
|
exports.CollectionRedemptionStatus = /*#__PURE__*/function () {
|
|
1764
|
-
var
|
|
1906
|
+
var _ref59 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(_ref58) {
|
|
1765
1907
|
var marketplaceParams, confirmationId, statuses;
|
|
1766
|
-
return _regeneratorRuntime.wrap(function
|
|
1908
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
1767
1909
|
while (1) {
|
|
1768
|
-
switch (
|
|
1910
|
+
switch (_context31.prev = _context31.next) {
|
|
1769
1911
|
case 0:
|
|
1770
|
-
marketplaceParams =
|
|
1771
|
-
|
|
1772
|
-
|
|
1912
|
+
marketplaceParams = _ref58.marketplaceParams, confirmationId = _ref58.confirmationId;
|
|
1913
|
+
_context31.prev = 1;
|
|
1914
|
+
_context31.next = 4;
|
|
1773
1915
|
return this.MintingStatus({
|
|
1774
1916
|
marketplaceParams: marketplaceParams
|
|
1775
1917
|
});
|
|
1776
1918
|
|
|
1777
1919
|
case 4:
|
|
1778
|
-
statuses =
|
|
1779
|
-
return
|
|
1920
|
+
statuses = _context31.sent;
|
|
1921
|
+
return _context31.abrupt("return", statuses.find(function (status) {
|
|
1780
1922
|
return status.op === "nft-redeem" && status.confirmationId === confirmationId;
|
|
1781
1923
|
}) || {
|
|
1782
1924
|
status: "none"
|
|
1783
1925
|
});
|
|
1784
1926
|
|
|
1785
1927
|
case 8:
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
this.Log(
|
|
1789
|
-
return
|
|
1928
|
+
_context31.prev = 8;
|
|
1929
|
+
_context31.t0 = _context31["catch"](1);
|
|
1930
|
+
this.Log(_context31.t0, true);
|
|
1931
|
+
return _context31.abrupt("return", {
|
|
1790
1932
|
status: "unknown"
|
|
1791
1933
|
});
|
|
1792
1934
|
|
|
1793
1935
|
case 12:
|
|
1794
1936
|
case "end":
|
|
1795
|
-
return
|
|
1937
|
+
return _context31.stop();
|
|
1796
1938
|
}
|
|
1797
1939
|
}
|
|
1798
|
-
},
|
|
1940
|
+
}, _callee31, this, [[1, 8]]);
|
|
1799
1941
|
}));
|
|
1800
1942
|
|
|
1801
|
-
return function (
|
|
1802
|
-
return
|
|
1943
|
+
return function (_x18) {
|
|
1944
|
+
return _ref59.apply(this, arguments);
|
|
1803
1945
|
};
|
|
1804
1946
|
}();
|
|
1805
1947
|
/* EVENTS */
|
|
1806
1948
|
|
|
1807
1949
|
|
|
1808
1950
|
exports.LoadDrop = /*#__PURE__*/function () {
|
|
1809
|
-
var
|
|
1951
|
+
var _ref61 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(_ref60) {
|
|
1810
1952
|
var _this2 = this;
|
|
1811
1953
|
|
|
1812
1954
|
var tenantSlug, eventSlug, dropId, mainSiteHash, event, eventId;
|
|
1813
|
-
return _regeneratorRuntime.wrap(function
|
|
1955
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
1814
1956
|
while (1) {
|
|
1815
|
-
switch (
|
|
1957
|
+
switch (_context32.prev = _context32.next) {
|
|
1816
1958
|
case 0:
|
|
1817
|
-
tenantSlug =
|
|
1959
|
+
tenantSlug = _ref60.tenantSlug, eventSlug = _ref60.eventSlug, dropId = _ref60.dropId;
|
|
1818
1960
|
|
|
1819
1961
|
if (!this.drops) {
|
|
1820
1962
|
this.drops = {};
|
|
@@ -1829,18 +1971,18 @@ exports.LoadDrop = /*#__PURE__*/function () {
|
|
|
1829
1971
|
}
|
|
1830
1972
|
|
|
1831
1973
|
if (this.drops[tenantSlug][eventSlug][dropId]) {
|
|
1832
|
-
|
|
1974
|
+
_context32.next = 16;
|
|
1833
1975
|
break;
|
|
1834
1976
|
}
|
|
1835
1977
|
|
|
1836
|
-
|
|
1978
|
+
_context32.next = 7;
|
|
1837
1979
|
return this.client.LatestVersionHash({
|
|
1838
1980
|
objectId: this.mainSiteId
|
|
1839
1981
|
});
|
|
1840
1982
|
|
|
1841
1983
|
case 7:
|
|
1842
|
-
mainSiteHash =
|
|
1843
|
-
|
|
1984
|
+
mainSiteHash = _context32.sent;
|
|
1985
|
+
_context32.next = 10;
|
|
1844
1986
|
return this.client.ContentObjectMetadata({
|
|
1845
1987
|
versionHash: mainSiteHash,
|
|
1846
1988
|
metadataSubtree: UrlJoin("public", "asset_metadata", "tenants", tenantSlug, "sites", eventSlug, "info"),
|
|
@@ -1853,17 +1995,17 @@ exports.LoadDrop = /*#__PURE__*/function () {
|
|
|
1853
1995
|
});
|
|
1854
1996
|
|
|
1855
1997
|
case 10:
|
|
1856
|
-
|
|
1998
|
+
_context32.t0 = _context32.sent;
|
|
1857
1999
|
|
|
1858
|
-
if (
|
|
1859
|
-
|
|
2000
|
+
if (_context32.t0) {
|
|
2001
|
+
_context32.next = 13;
|
|
1860
2002
|
break;
|
|
1861
2003
|
}
|
|
1862
2004
|
|
|
1863
|
-
|
|
2005
|
+
_context32.t0 = [];
|
|
1864
2006
|
|
|
1865
2007
|
case 13:
|
|
1866
|
-
event =
|
|
2008
|
+
event = _context32.t0;
|
|
1867
2009
|
eventId = Utils.DecodeVersionHash(event["."].source).objectId;
|
|
1868
2010
|
event.drops.forEach(function (drop) {
|
|
1869
2011
|
drop = _objectSpread(_objectSpread({}, drop), {}, {
|
|
@@ -1874,37 +2016,37 @@ exports.LoadDrop = /*#__PURE__*/function () {
|
|
|
1874
2016
|
});
|
|
1875
2017
|
|
|
1876
2018
|
case 16:
|
|
1877
|
-
return
|
|
2019
|
+
return _context32.abrupt("return", this.drops[dropId]);
|
|
1878
2020
|
|
|
1879
2021
|
case 17:
|
|
1880
2022
|
case "end":
|
|
1881
|
-
return
|
|
2023
|
+
return _context32.stop();
|
|
1882
2024
|
}
|
|
1883
2025
|
}
|
|
1884
|
-
},
|
|
2026
|
+
}, _callee32, this);
|
|
1885
2027
|
}));
|
|
1886
2028
|
|
|
1887
|
-
return function (
|
|
1888
|
-
return
|
|
2029
|
+
return function (_x19) {
|
|
2030
|
+
return _ref61.apply(this, arguments);
|
|
1889
2031
|
};
|
|
1890
2032
|
}();
|
|
1891
2033
|
|
|
1892
2034
|
exports.SubmitDropVote = /*#__PURE__*/function () {
|
|
1893
|
-
var
|
|
2035
|
+
var _ref63 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(_ref62) {
|
|
1894
2036
|
var marketplaceParams, eventId, dropId, sku, marketplaceInfo;
|
|
1895
|
-
return _regeneratorRuntime.wrap(function
|
|
2037
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
1896
2038
|
while (1) {
|
|
1897
|
-
switch (
|
|
2039
|
+
switch (_context33.prev = _context33.next) {
|
|
1898
2040
|
case 0:
|
|
1899
|
-
marketplaceParams =
|
|
1900
|
-
|
|
2041
|
+
marketplaceParams = _ref62.marketplaceParams, eventId = _ref62.eventId, dropId = _ref62.dropId, sku = _ref62.sku;
|
|
2042
|
+
_context33.next = 3;
|
|
1901
2043
|
return this.MarketplaceInfo({
|
|
1902
2044
|
marketplaceParams: marketplaceParams
|
|
1903
2045
|
});
|
|
1904
2046
|
|
|
1905
2047
|
case 3:
|
|
1906
|
-
marketplaceInfo =
|
|
1907
|
-
|
|
2048
|
+
marketplaceInfo = _context33.sent;
|
|
2049
|
+
_context33.next = 6;
|
|
1908
2050
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1909
2051
|
path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
|
|
1910
2052
|
method: "POST",
|
|
@@ -1921,27 +2063,27 @@ exports.SubmitDropVote = /*#__PURE__*/function () {
|
|
|
1921
2063
|
|
|
1922
2064
|
case 6:
|
|
1923
2065
|
case "end":
|
|
1924
|
-
return
|
|
2066
|
+
return _context33.stop();
|
|
1925
2067
|
}
|
|
1926
2068
|
}
|
|
1927
|
-
},
|
|
2069
|
+
}, _callee33, this);
|
|
1928
2070
|
}));
|
|
1929
2071
|
|
|
1930
|
-
return function (
|
|
1931
|
-
return
|
|
2072
|
+
return function (_x20) {
|
|
2073
|
+
return _ref63.apply(this, arguments);
|
|
1932
2074
|
};
|
|
1933
2075
|
}();
|
|
1934
2076
|
|
|
1935
2077
|
exports.DropStatus = /*#__PURE__*/function () {
|
|
1936
|
-
var
|
|
2078
|
+
var _ref65 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(_ref64) {
|
|
1937
2079
|
var marketplace, eventId, dropId, response;
|
|
1938
|
-
return _regeneratorRuntime.wrap(function
|
|
2080
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
1939
2081
|
while (1) {
|
|
1940
|
-
switch (
|
|
2082
|
+
switch (_context34.prev = _context34.next) {
|
|
1941
2083
|
case 0:
|
|
1942
|
-
marketplace =
|
|
1943
|
-
|
|
1944
|
-
|
|
2084
|
+
marketplace = _ref64.marketplace, eventId = _ref64.eventId, dropId = _ref64.dropId;
|
|
2085
|
+
_context34.prev = 1;
|
|
2086
|
+
_context34.next = 4;
|
|
1945
2087
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
1946
2088
|
path: UrlJoin("as", "wlt", "act", marketplace.tenant_id, eventId, dropId),
|
|
1947
2089
|
method: "GET",
|
|
@@ -1951,28 +2093,28 @@ exports.DropStatus = /*#__PURE__*/function () {
|
|
|
1951
2093
|
}));
|
|
1952
2094
|
|
|
1953
2095
|
case 4:
|
|
1954
|
-
response =
|
|
1955
|
-
return
|
|
2096
|
+
response = _context34.sent;
|
|
2097
|
+
return _context34.abrupt("return", response.sort(function (a, b) {
|
|
1956
2098
|
return a.ts > b.ts ? 1 : -1;
|
|
1957
2099
|
})[0] || {
|
|
1958
2100
|
status: "none"
|
|
1959
2101
|
});
|
|
1960
2102
|
|
|
1961
2103
|
case 8:
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
this.Log(
|
|
1965
|
-
return
|
|
2104
|
+
_context34.prev = 8;
|
|
2105
|
+
_context34.t0 = _context34["catch"](1);
|
|
2106
|
+
this.Log(_context34.t0, true);
|
|
2107
|
+
return _context34.abrupt("return", "");
|
|
1966
2108
|
|
|
1967
2109
|
case 12:
|
|
1968
2110
|
case "end":
|
|
1969
|
-
return
|
|
2111
|
+
return _context34.stop();
|
|
1970
2112
|
}
|
|
1971
2113
|
}
|
|
1972
|
-
},
|
|
2114
|
+
}, _callee34, this, [[1, 8]]);
|
|
1973
2115
|
}));
|
|
1974
2116
|
|
|
1975
|
-
return function (
|
|
1976
|
-
return
|
|
2117
|
+
return function (_x21) {
|
|
2118
|
+
return _ref65.apply(this, arguments);
|
|
1977
2119
|
};
|
|
1978
2120
|
}();
|