@eluvio/elv-client-js 3.2.6 → 3.2.7

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.
@@ -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
- * <b><i>Requires login</i></b>
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 accountId, nftInfo;
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
- if (this.loggedIn) {
225
- _context2.next = 2;
226
- break;
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 5:
238
+ case 4:
240
239
  this.profileData = _context2.sent;
241
240
 
242
241
  if (!(!this.profileData || !this.profileData.NFTs)) {
243
- _context2.next = 8;
242
+ _context2.next = 7;
244
243
  break;
245
244
  }
246
245
 
247
246
  return _context2.abrupt("return", {});
248
247
 
249
- case 8:
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 12:
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 _ref5,
337
- _ref5$sortBy,
335
+ var _ref6,
336
+ _ref6$sortBy,
338
337
  sortBy,
339
- _ref5$sortDesc,
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
- _ref5 = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {}, _ref5$sortBy = _ref5.sortBy, sortBy = _ref5$sortBy === void 0 ? "created" : _ref5$sortBy, _ref5$sortDesc = _ref5.sortDesc, sortDesc = _ref5$sortDesc === void 0 ? false : _ref5$sortDesc, contractAddress = _ref5.contractAddress, tokenId = _ref5.tokenId, marketplaceParams = _ref5.marketplaceParams;
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 _ref7,
391
- _ref7$sortBy,
389
+ var _ref8,
390
+ _ref8$sortBy,
392
391
  sortBy,
393
- _ref7$sortDesc,
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
- _ref7 = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {}, _ref7$sortBy = _ref7.sortBy, sortBy = _ref7$sortBy === void 0 ? "created" : _ref7$sortBy, _ref7$sortDesc = _ref7.sortDesc, sortDesc = _ref7$sortDesc === void 0 ? false : _ref7$sortDesc, contractAddress = _ref7.contractAddress, tokenId = _ref7.tokenId, marketplaceParams = _ref7.marketplaceParams;
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 _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(_ref8) {
497
+ var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_ref11) {
445
498
  var tenantId, contractAddress;
446
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
499
+ return _regeneratorRuntime.wrap(function _callee7$(_context7) {
447
500
  while (1) {
448
- switch (_context6.prev = _context6.next) {
501
+ switch (_context7.prev = _context7.next) {
449
502
  case 0:
450
- tenantId = _ref8.tenantId, contractAddress = _ref8.contractAddress;
451
- _context6.prev = 1;
452
- _context6.next = 4;
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 _context6.abrupt("return", _context6.sent);
512
+ return _context7.abrupt("return", _context7.sent);
460
513
 
461
514
  case 7:
462
- _context6.prev = 7;
463
- _context6.t0 = _context6["catch"](1);
515
+ _context7.prev = 7;
516
+ _context7.t0 = _context7["catch"](1);
464
517
  this.Log("Failed to load tenant configuration", true);
465
- this.Log(_context6.t0, true);
466
- return _context6.abrupt("return", {});
518
+ this.Log(_context7.t0, true);
519
+ return _context7.abrupt("return", {});
467
520
 
468
521
  case 12:
469
522
  case "end":
470
- return _context6.stop();
523
+ return _context7.stop();
471
524
  }
472
525
  }
473
- }, _callee6, this, [[1, 7]]);
526
+ }, _callee7, this, [[1, 7]]);
474
527
  }));
475
528
 
476
529
  return function (_x) {
477
- return _ref9.apply(this, arguments);
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 _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_ref10) {
549
+ var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(_ref13) {
497
550
  var marketplaceParams, tenantId, marketplaceInfo;
498
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
551
+ return _regeneratorRuntime.wrap(function _callee8$(_context8) {
499
552
  while (1) {
500
- switch (_context7.prev = _context7.next) {
553
+ switch (_context8.prev = _context8.next) {
501
554
  case 0:
502
- marketplaceParams = _ref10.marketplaceParams, tenantId = _ref10.tenantId;
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
- _context7.next = 6;
565
+ _context8.next = 6;
513
566
  break;
514
567
  }
515
568
 
516
- _context7.next = 5;
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 _context7.abrupt("return", _context7.sent);
579
+ return _context8.abrupt("return", _context8.sent);
527
580
 
528
581
  case 6:
529
- _context7.next = 8;
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 _context7.abrupt("return", _context7.sent);
589
+ return _context8.abrupt("return", _context8.sent);
537
590
 
538
591
  case 9:
539
592
  case "end":
540
- return _context7.stop();
593
+ return _context8.stop();
541
594
  }
542
595
  }
543
- }, _callee7, this);
596
+ }, _callee8, this);
544
597
  }));
545
598
 
546
599
  return function (_x2) {
547
- return _ref11.apply(this, arguments);
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 (_ref12) {
566
- var marketplaceParams = _ref12.marketplaceParams;
618
+ exports.MarketplaceInfo = function (_ref15) {
619
+ var marketplaceParams = _ref15.marketplaceParams;
567
620
 
568
- var _ref13 = marketplaceParams || {},
569
- tenantSlug = _ref13.tenantSlug,
570
- marketplaceSlug = _ref13.marketplaceSlug,
571
- marketplaceId = _ref13.marketplaceId,
572
- marketplaceHash = _ref13.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 _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(_ref14) {
654
+ var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(_ref17) {
602
655
  var marketplaceParams, marketplaceInfo, marketplaceHash;
603
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
656
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
604
657
  while (1) {
605
- switch (_context8.prev = _context8.next) {
658
+ switch (_context9.prev = _context9.next) {
606
659
  case 0:
607
- marketplaceParams = _ref14.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
- _context8.next = 7;
667
+ _context9.next = 7;
615
668
  break;
616
669
  }
617
670
 
618
- _context8.next = 6;
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] = _context8.sent;
680
+ this.cachedCSS[marketplaceHash] = _context9.sent;
628
681
 
629
682
  case 7:
630
- return _context8.abrupt("return", this.cachedCSS[marketplaceHash] || "");
683
+ return _context9.abrupt("return", this.cachedCSS[marketplaceHash] || "");
631
684
 
632
685
  case 8:
633
686
  case "end":
634
- return _context8.stop();
687
+ return _context9.stop();
635
688
  }
636
689
  }
637
- }, _callee8, this);
690
+ }, _callee9, this);
638
691
  }));
639
692
 
640
693
  return function (_x3) {
641
- return _ref15.apply(this, arguments);
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 _callee9() {
657
- var _ref17,
709
+ exports.AvailableMarketplaces = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {
710
+ var _ref20,
658
711
  organizeById,
659
- _ref17$forceReload,
712
+ _ref20$forceReload,
660
713
  forceReload,
661
- _args9 = arguments;
714
+ _args10 = arguments;
662
715
 
663
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
716
+ return _regeneratorRuntime.wrap(function _callee10$(_context10) {
664
717
  while (1) {
665
- switch (_context9.prev = _context9.next) {
718
+ switch (_context10.prev = _context10.next) {
666
719
  case 0:
667
- _ref17 = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {}, organizeById = _ref17.organizeById, _ref17$forceReload = _ref17.forceReload, forceReload = _ref17$forceReload === void 0 ? false : _ref17$forceReload;
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
- _context9.next = 4;
723
+ _context10.next = 4;
671
724
  break;
672
725
  }
673
726
 
674
- _context9.next = 4;
727
+ _context10.next = 4;
675
728
  return this.LoadAvailableMarketplaces(true);
676
729
 
677
730
  case 4:
678
- return _context9.abrupt("return", _objectSpread({}, organizeById ? this.availableMarketplacesById : this.availableMarketplaces));
731
+ return _context10.abrupt("return", _objectSpread({}, organizeById ? this.availableMarketplacesById : this.availableMarketplaces));
679
732
 
680
733
  case 5:
681
734
  case "end":
682
- return _context9.stop();
735
+ return _context10.stop();
683
736
  }
684
737
  }
685
- }, _callee9, this);
738
+ }, _callee10, this);
686
739
  }));
687
740
  /**
688
741
  * Retrieve full information about the specified marketplace
@@ -697,25 +750,25 @@ exports.AvailableMarketplaces = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_re
697
750
  */
698
751
 
699
752
  exports.Marketplace = /*#__PURE__*/function () {
700
- var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(_ref18) {
753
+ var _ref22 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref21) {
701
754
  var marketplaceParams;
702
- return _regeneratorRuntime.wrap(function _callee10$(_context10) {
755
+ return _regeneratorRuntime.wrap(function _callee11$(_context11) {
703
756
  while (1) {
704
- switch (_context10.prev = _context10.next) {
757
+ switch (_context11.prev = _context11.next) {
705
758
  case 0:
706
- marketplaceParams = _ref18.marketplaceParams;
707
- return _context10.abrupt("return", this.LoadMarketplace(marketplaceParams));
759
+ marketplaceParams = _ref21.marketplaceParams;
760
+ return _context11.abrupt("return", this.LoadMarketplace(marketplaceParams));
708
761
 
709
762
  case 2:
710
763
  case "end":
711
- return _context10.stop();
764
+ return _context11.stop();
712
765
  }
713
766
  }
714
- }, _callee10, this);
767
+ }, _callee11, this);
715
768
  }));
716
769
 
717
770
  return function (_x4) {
718
- return _ref19.apply(this, arguments);
771
+ return _ref22.apply(this, arguments);
719
772
  };
720
773
  }();
721
774
  /* NFTS */
@@ -731,27 +784,27 @@ exports.Marketplace = /*#__PURE__*/function () {
731
784
 
732
785
 
733
786
  exports.NFT = /*#__PURE__*/function () {
734
- var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref20) {
787
+ var _ref24 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(_ref23) {
735
788
  var tokenId, contractAddress, nft;
736
- return _regeneratorRuntime.wrap(function _callee11$(_context11) {
789
+ return _regeneratorRuntime.wrap(function _callee12$(_context12) {
737
790
  while (1) {
738
- switch (_context11.prev = _context11.next) {
791
+ switch (_context12.prev = _context12.next) {
739
792
  case 0:
740
- tokenId = _ref20.tokenId, contractAddress = _ref20.contractAddress;
741
- _context11.t0 = FormatNFTDetails;
742
- _context11.next = 4;
793
+ tokenId = _ref23.tokenId, contractAddress = _ref23.contractAddress;
794
+ _context12.t0 = FormatNFTDetails;
795
+ _context12.next = 4;
743
796
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
744
797
  path: UrlJoin("as", "nft", "info", contractAddress, tokenId),
745
798
  method: "GET"
746
799
  }));
747
800
 
748
801
  case 4:
749
- _context11.t1 = _context11.sent;
750
- nft = (0, _context11.t0)(_context11.t1);
751
- _context11.t2 = _objectSpread;
752
- _context11.t3 = _objectSpread;
753
- _context11.t4 = {};
754
- _context11.next = 11;
802
+ _context12.t1 = _context12.sent;
803
+ nft = (0, _context12.t0)(_context12.t1);
804
+ _context12.t2 = _objectSpread;
805
+ _context12.t3 = _objectSpread;
806
+ _context12.t4 = {};
807
+ _context12.next = 11;
755
808
  return this.client.ContentObjectMetadata({
756
809
  versionHash: nft.details.VersionHash,
757
810
  metadataSubtree: "public/asset_metadata/nft",
@@ -759,39 +812,39 @@ exports.NFT = /*#__PURE__*/function () {
759
812
  });
760
813
 
761
814
  case 11:
762
- _context11.t5 = _context11.sent;
815
+ _context12.t5 = _context12.sent;
763
816
 
764
- if (_context11.t5) {
765
- _context11.next = 14;
817
+ if (_context12.t5) {
818
+ _context12.next = 14;
766
819
  break;
767
820
  }
768
821
 
769
- _context11.t5 = {};
822
+ _context12.t5 = {};
770
823
 
771
824
  case 14:
772
- _context11.t6 = _context11.t5;
773
- _context11.t7 = (0, _context11.t3)(_context11.t4, _context11.t6);
774
- _context11.t8 = nft.metadata || {};
775
- nft.metadata = (0, _context11.t2)(_context11.t7, _context11.t8);
776
- _context11.next = 20;
825
+ _context12.t6 = _context12.t5;
826
+ _context12.t7 = (0, _context12.t3)(_context12.t4, _context12.t6);
827
+ _context12.t8 = nft.metadata || {};
828
+ nft.metadata = (0, _context12.t2)(_context12.t7, _context12.t8);
829
+ _context12.next = 20;
777
830
  return this.TenantConfiguration({
778
831
  contractAddress: contractAddress
779
832
  });
780
833
 
781
834
  case 20:
782
- nft.config = _context11.sent;
783
- return _context11.abrupt("return", FormatNFTMetadata(nft));
835
+ nft.config = _context12.sent;
836
+ return _context12.abrupt("return", FormatNFTMetadata(nft));
784
837
 
785
838
  case 22:
786
839
  case "end":
787
- return _context11.stop();
840
+ return _context12.stop();
788
841
  }
789
842
  }
790
- }, _callee11, this);
843
+ }, _callee12, this);
791
844
  }));
792
845
 
793
846
  return function (_x5) {
794
- return _ref21.apply(this, arguments);
847
+ return _ref24.apply(this, arguments);
795
848
  };
796
849
  }();
797
850
  /**
@@ -808,23 +861,23 @@ exports.NFT = /*#__PURE__*/function () {
808
861
 
809
862
 
810
863
  exports.TransferNFT = /*#__PURE__*/function () {
811
- var _ref23 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(_ref22) {
864
+ var _ref26 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref25) {
812
865
  var contractAddress, tokenId, targetAddress;
813
- return _regeneratorRuntime.wrap(function _callee12$(_context12) {
866
+ return _regeneratorRuntime.wrap(function _callee13$(_context13) {
814
867
  while (1) {
815
- switch (_context12.prev = _context12.next) {
868
+ switch (_context13.prev = _context13.next) {
816
869
  case 0:
817
- contractAddress = _ref22.contractAddress, tokenId = _ref22.tokenId, targetAddress = _ref22.targetAddress;
870
+ contractAddress = _ref25.contractAddress, tokenId = _ref25.tokenId, targetAddress = _ref25.targetAddress;
818
871
 
819
872
  if (!(!targetAddress || !Utils.ValidAddress(targetAddress))) {
820
- _context12.next = 3;
873
+ _context13.next = 3;
821
874
  break;
822
875
  }
823
876
 
824
877
  throw Error("Eluvio Wallet Client: Invalid or missing target address in UserTransferNFT");
825
878
 
826
879
  case 3:
827
- _context12.next = 5;
880
+ _context13.next = 5;
828
881
  return this.client.authClient.MakeAuthServiceRequest({
829
882
  path: UrlJoin("as", "wlt", "mkt", "xfer"),
830
883
  method: "POST",
@@ -839,18 +892,18 @@ exports.TransferNFT = /*#__PURE__*/function () {
839
892
  });
840
893
 
841
894
  case 5:
842
- return _context12.abrupt("return", _context12.sent);
895
+ return _context13.abrupt("return", _context13.sent);
843
896
 
844
897
  case 6:
845
898
  case "end":
846
- return _context12.stop();
899
+ return _context13.stop();
847
900
  }
848
901
  }
849
- }, _callee12, this);
902
+ }, _callee13, this);
850
903
  }));
851
904
 
852
905
  return function (_x6) {
853
- return _ref23.apply(this, arguments);
906
+ return _ref26.apply(this, arguments);
854
907
  };
855
908
  }();
856
909
  /** LISTINGS */
@@ -867,53 +920,53 @@ exports.TransferNFT = /*#__PURE__*/function () {
867
920
 
868
921
 
869
922
  exports.ListingStatus = /*#__PURE__*/function () {
870
- var _ref25 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref24) {
923
+ var _ref28 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref27) {
871
924
  var listingId;
872
- return _regeneratorRuntime.wrap(function _callee13$(_context13) {
925
+ return _regeneratorRuntime.wrap(function _callee14$(_context14) {
873
926
  while (1) {
874
- switch (_context13.prev = _context13.next) {
927
+ switch (_context14.prev = _context14.next) {
875
928
  case 0:
876
- listingId = _ref24.listingId;
877
- _context13.prev = 1;
878
- _context13.t0 = Utils;
879
- _context13.next = 5;
929
+ listingId = _ref27.listingId;
930
+ _context14.prev = 1;
931
+ _context14.t0 = Utils;
932
+ _context14.next = 5;
880
933
  return this.client.authClient.MakeAuthServiceRequest({
881
934
  path: UrlJoin("as", "mkt", "status", listingId),
882
935
  method: "GET"
883
936
  });
884
937
 
885
938
  case 5:
886
- _context13.t1 = _context13.sent;
887
- _context13.next = 8;
888
- return _context13.t0.ResponseToJson.call(_context13.t0, _context13.t1);
939
+ _context14.t1 = _context14.sent;
940
+ _context14.next = 8;
941
+ return _context14.t0.ResponseToJson.call(_context14.t0, _context14.t1);
889
942
 
890
943
  case 8:
891
- return _context13.abrupt("return", _context13.sent);
944
+ return _context14.abrupt("return", _context14.sent);
892
945
 
893
946
  case 11:
894
- _context13.prev = 11;
895
- _context13.t2 = _context13["catch"](1);
947
+ _context14.prev = 11;
948
+ _context14.t2 = _context14["catch"](1);
896
949
 
897
- if (!(_context13.t2.status === 404)) {
898
- _context13.next = 15;
950
+ if (!(_context14.t2.status === 404)) {
951
+ _context14.next = 15;
899
952
  break;
900
953
  }
901
954
 
902
- return _context13.abrupt("return");
955
+ return _context14.abrupt("return");
903
956
 
904
957
  case 15:
905
- throw _context13.t2;
958
+ throw _context14.t2;
906
959
 
907
960
  case 16:
908
961
  case "end":
909
- return _context13.stop();
962
+ return _context14.stop();
910
963
  }
911
964
  }
912
- }, _callee13, this, [[1, 11]]);
965
+ }, _callee14, this, [[1, 11]]);
913
966
  }));
914
967
 
915
968
  return function (_x7) {
916
- return _ref25.apply(this, arguments);
969
+ return _ref28.apply(this, arguments);
917
970
  };
918
971
  }();
919
972
  /**
@@ -930,40 +983,40 @@ exports.ListingStatus = /*#__PURE__*/function () {
930
983
 
931
984
 
932
985
  exports.Listing = /*#__PURE__*/function () {
933
- var _ref27 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref26) {
986
+ var _ref30 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(_ref29) {
934
987
  var listingId;
935
- return _regeneratorRuntime.wrap(function _callee14$(_context14) {
988
+ return _regeneratorRuntime.wrap(function _callee15$(_context15) {
936
989
  while (1) {
937
- switch (_context14.prev = _context14.next) {
990
+ switch (_context15.prev = _context15.next) {
938
991
  case 0:
939
- listingId = _ref26.listingId;
940
- _context14.t0 = FormatNFT;
941
- _context14.t1 = Utils;
942
- _context14.next = 5;
992
+ listingId = _ref29.listingId;
993
+ _context15.t0 = FormatNFT;
994
+ _context15.t1 = Utils;
995
+ _context15.next = 5;
943
996
  return this.client.authClient.MakeAuthServiceRequest({
944
997
  path: UrlJoin("as", "mkt", "l", listingId),
945
998
  method: "GET"
946
999
  });
947
1000
 
948
1001
  case 5:
949
- _context14.t2 = _context14.sent;
950
- _context14.next = 8;
951
- return _context14.t1.ResponseToJson.call(_context14.t1, _context14.t2);
1002
+ _context15.t2 = _context15.sent;
1003
+ _context15.next = 8;
1004
+ return _context15.t1.ResponseToJson.call(_context15.t1, _context15.t2);
952
1005
 
953
1006
  case 8:
954
- _context14.t3 = _context14.sent;
955
- return _context14.abrupt("return", (0, _context14.t0)(_context14.t3));
1007
+ _context15.t3 = _context15.sent;
1008
+ return _context15.abrupt("return", (0, _context15.t0)(_context15.t3));
956
1009
 
957
1010
  case 10:
958
1011
  case "end":
959
- return _context14.stop();
1012
+ return _context15.stop();
960
1013
  }
961
1014
  }
962
- }, _callee14, this);
1015
+ }, _callee15, this);
963
1016
  }));
964
1017
 
965
1018
  return function (_x8) {
966
- return _ref27.apply(this, arguments);
1019
+ return _ref30.apply(this, arguments);
967
1020
  };
968
1021
  }();
969
1022
  /**
@@ -999,22 +1052,22 @@ exports.Listing = /*#__PURE__*/function () {
999
1052
  */
1000
1053
 
1001
1054
 
1002
- exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15() {
1003
- var _args15 = arguments;
1004
- return _regeneratorRuntime.wrap(function _callee15$(_context15) {
1055
+ exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16() {
1056
+ var _args16 = arguments;
1057
+ return _regeneratorRuntime.wrap(function _callee16$(_context16) {
1005
1058
  while (1) {
1006
- switch (_context15.prev = _context15.next) {
1059
+ switch (_context16.prev = _context16.next) {
1007
1060
  case 0:
1008
- return _context15.abrupt("return", this.FilteredQuery(_objectSpread({
1061
+ return _context16.abrupt("return", this.FilteredQuery(_objectSpread({
1009
1062
  mode: "listings"
1010
- }, _args15[0] || {})));
1063
+ }, _args16[0] || {})));
1011
1064
 
1012
1065
  case 1:
1013
1066
  case "end":
1014
- return _context15.stop();
1067
+ return _context16.stop();
1015
1068
  }
1016
1069
  }
1017
- }, _callee15, this);
1070
+ }, _callee16, this);
1018
1071
  }));
1019
1072
  /**
1020
1073
  * Retrieve stats for listings matching the specified parameters.
@@ -1048,22 +1101,22 @@ exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRunt
1048
1101
  * @returns {Promise<Object>} - Statistics about listings. All prices in USD.
1049
1102
  */
1050
1103
 
1051
- exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16() {
1052
- var _args16 = arguments;
1053
- return _regeneratorRuntime.wrap(function _callee16$(_context16) {
1104
+ exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17() {
1105
+ var _args17 = arguments;
1106
+ return _regeneratorRuntime.wrap(function _callee17$(_context17) {
1054
1107
  while (1) {
1055
- switch (_context16.prev = _context16.next) {
1108
+ switch (_context17.prev = _context17.next) {
1056
1109
  case 0:
1057
- return _context16.abrupt("return", this.FilteredQuery(_objectSpread({
1110
+ return _context17.abrupt("return", this.FilteredQuery(_objectSpread({
1058
1111
  mode: "listing-stats"
1059
- }, _args16[0] || {})));
1112
+ }, _args17[0] || {})));
1060
1113
 
1061
1114
  case 1:
1062
1115
  case "end":
1063
- return _context16.stop();
1116
+ return _context17.stop();
1064
1117
  }
1065
1118
  }
1066
- }, _callee16, this);
1119
+ }, _callee17, this);
1067
1120
  }));
1068
1121
  /**
1069
1122
  * Retrieve sales matching the specified parameters.
@@ -1097,22 +1150,71 @@ exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
1097
1150
  * @returns {Promise<Object>} - Results of the query and pagination info
1098
1151
  */
1099
1152
 
1100
- exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17() {
1101
- var _args17 = arguments;
1102
- return _regeneratorRuntime.wrap(function _callee17$(_context17) {
1153
+ exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18() {
1154
+ var _args18 = arguments;
1155
+ return _regeneratorRuntime.wrap(function _callee18$(_context18) {
1103
1156
  while (1) {
1104
- switch (_context17.prev = _context17.next) {
1157
+ switch (_context18.prev = _context18.next) {
1105
1158
  case 0:
1106
- return _context17.abrupt("return", this.FilteredQuery(_objectSpread({
1159
+ return _context18.abrupt("return", this.FilteredQuery(_objectSpread({
1107
1160
  mode: "sales"
1108
- }, _args17[0] || {})));
1161
+ }, _args18[0] || {})));
1109
1162
 
1110
1163
  case 1:
1111
1164
  case "end":
1112
- return _context17.stop();
1165
+ return _context18.stop();
1113
1166
  }
1114
1167
  }
1115
- }, _callee17, this);
1168
+ }, _callee18, this);
1169
+ }));
1170
+ /**
1171
+ * Retrieve sales and transfers matching the specified parameters.
1172
+ *
1173
+ * @methodGroup Listings
1174
+ * @namedParams
1175
+ * @param {integer=} start=0 - PAGINATION: Index from which the results should start
1176
+ * @param {integer=} limit=50 - PAGINATION: Maximum number of results to return
1177
+ * @param {string=} sortBy="created" - Sort order. Options: `created`, `price`, `name`
1178
+ * @param {boolean=} sortDesc=false - Sort results descending instead of ascending
1179
+ * @param {string=} filter - Filter results by item name.
1180
+ * <br /><br />
1181
+ * NOTE: This string must be an <b>exact match</b> on the item name.
1182
+ * You can retrieve all available item names from the <a href="#.ListingNames">ListingNames method</a>.
1183
+ * @param {string=} editionFilter - Filter results by item edition.
1184
+ * <br /><br />
1185
+ * NOTE: This string must be an <b>exact match</b> on the edition name.
1186
+ * You can retrieve all available item edition names from the <a href="#.ListingEditionNames">ListingEditionNames method</a>.
1187
+ * @param {Array<Object>} attributeFilters - Filter results by item attributes. Each entry should include name and value (e.g. `[{name: "attribute-name", value: "attribute-value"}]`)
1188
+ * <br /><br />
1189
+ * NOTE: These filters must be an <b>exact match</b> on the attribute name and value.
1190
+ * You can retrieve all available item attributes from the <a href="#.ListingAttributes">ListingAttributes method</a>.
1191
+ * @param {string=} sellerAddress - Filter by a specific seller
1192
+ * @param {string=} contractAddress - Filter results by the address of the NFT contract
1193
+ * @param {string=} tokenId - Filter by token ID (if filtering by contract address)
1194
+ * @param {string=} currency - Filter results by purchase currency. Available options: `usdc`
1195
+ * @param {Object=} marketplaceParams - Filter results by marketplace
1196
+ * @param {integer=} collectionIndex - If filtering by marketplace, filter by collection. The index refers to the index in the array `marketplace.collections`
1197
+ * @param {integer=} lastNDays - Filter by results listed in the past N days
1198
+ *
1199
+ * @returns {Promise<Object>} - Results of the query and pagination info
1200
+ */
1201
+
1202
+ exports.Transfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19() {
1203
+ var _args19 = arguments;
1204
+ return _regeneratorRuntime.wrap(function _callee19$(_context19) {
1205
+ while (1) {
1206
+ switch (_context19.prev = _context19.next) {
1207
+ case 0:
1208
+ return _context19.abrupt("return", this.FilteredQuery(_objectSpread({
1209
+ mode: "transfers"
1210
+ }, _args19[0] || {})));
1211
+
1212
+ case 1:
1213
+ case "end":
1214
+ return _context19.stop();
1215
+ }
1216
+ }
1217
+ }, _callee19, this);
1116
1218
  }));
1117
1219
  /**
1118
1220
  * Retrieve stats for listings matching the specified parameters.
@@ -1146,22 +1248,22 @@ exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
1146
1248
  * @returns {Promise<Object>} - Statistics about sales. All prices in USD.
1147
1249
  */
1148
1250
 
1149
- exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18() {
1150
- var _args18 = arguments;
1151
- return _regeneratorRuntime.wrap(function _callee18$(_context18) {
1251
+ exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20() {
1252
+ var _args20 = arguments;
1253
+ return _regeneratorRuntime.wrap(function _callee20$(_context20) {
1152
1254
  while (1) {
1153
- switch (_context18.prev = _context18.next) {
1255
+ switch (_context20.prev = _context20.next) {
1154
1256
  case 0:
1155
- return _context18.abrupt("return", this.FilteredQuery(_objectSpread({
1257
+ return _context20.abrupt("return", this.FilteredQuery(_objectSpread({
1156
1258
  mode: "sales-stats"
1157
- }, _args18[0] || {})));
1259
+ }, _args20[0] || {})));
1158
1260
 
1159
1261
  case 1:
1160
1262
  case "end":
1161
- return _context18.stop();
1263
+ return _context20.stop();
1162
1264
  }
1163
1265
  }
1164
- }, _callee18, this);
1266
+ }, _callee20, this);
1165
1267
  }));
1166
1268
  /**
1167
1269
  * <b><i>Requires login</i></b>
@@ -1179,22 +1281,22 @@ exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRu
1179
1281
  */
1180
1282
 
1181
1283
  exports.CreateListing = /*#__PURE__*/function () {
1182
- var _ref33 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(_ref32) {
1284
+ var _ref37 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(_ref36) {
1183
1285
  var contractAddress, tokenId, price, listingId;
1184
- return _regeneratorRuntime.wrap(function _callee19$(_context19) {
1286
+ return _regeneratorRuntime.wrap(function _callee21$(_context21) {
1185
1287
  while (1) {
1186
- switch (_context19.prev = _context19.next) {
1288
+ switch (_context21.prev = _context21.next) {
1187
1289
  case 0:
1188
- contractAddress = _ref32.contractAddress, tokenId = _ref32.tokenId, price = _ref32.price, listingId = _ref32.listingId;
1290
+ contractAddress = _ref36.contractAddress, tokenId = _ref36.tokenId, price = _ref36.price, listingId = _ref36.listingId;
1189
1291
  contractAddress = Utils.FormatAddress(contractAddress);
1190
1292
 
1191
1293
  if (!listingId) {
1192
- _context19.next = 12;
1294
+ _context21.next = 12;
1193
1295
  break;
1194
1296
  }
1195
1297
 
1196
- _context19.t0 = Utils;
1197
- _context19.next = 6;
1298
+ _context21.t0 = Utils;
1299
+ _context21.next = 6;
1198
1300
  return this.client.authClient.MakeAuthServiceRequest({
1199
1301
  path: UrlJoin("as", "wlt", "mkt"),
1200
1302
  method: "PUT",
@@ -1208,16 +1310,16 @@ exports.CreateListing = /*#__PURE__*/function () {
1208
1310
  });
1209
1311
 
1210
1312
  case 6:
1211
- _context19.t1 = _context19.sent;
1212
- _context19.next = 9;
1213
- return _context19.t0.ResponseToFormat.call(_context19.t0, "text", _context19.t1);
1313
+ _context21.t1 = _context21.sent;
1314
+ _context21.next = 9;
1315
+ return _context21.t0.ResponseToFormat.call(_context21.t0, "text", _context21.t1);
1214
1316
 
1215
1317
  case 9:
1216
- return _context19.abrupt("return", _context19.sent);
1318
+ return _context21.abrupt("return", _context21.sent);
1217
1319
 
1218
1320
  case 12:
1219
- _context19.t2 = Utils;
1220
- _context19.next = 15;
1321
+ _context21.t2 = Utils;
1322
+ _context21.next = 15;
1221
1323
  return this.client.authClient.MakeAuthServiceRequest({
1222
1324
  path: UrlJoin("as", "wlt", "mkt"),
1223
1325
  method: "POST",
@@ -1232,23 +1334,23 @@ exports.CreateListing = /*#__PURE__*/function () {
1232
1334
  });
1233
1335
 
1234
1336
  case 15:
1235
- _context19.t3 = _context19.sent;
1236
- _context19.next = 18;
1237
- return _context19.t2.ResponseToJson.call(_context19.t2, _context19.t3);
1337
+ _context21.t3 = _context21.sent;
1338
+ _context21.next = 18;
1339
+ return _context21.t2.ResponseToJson.call(_context21.t2, _context21.t3);
1238
1340
 
1239
1341
  case 18:
1240
- return _context19.abrupt("return", _context19.sent);
1342
+ return _context21.abrupt("return", _context21.sent);
1241
1343
 
1242
1344
  case 19:
1243
1345
  case "end":
1244
- return _context19.stop();
1346
+ return _context21.stop();
1245
1347
  }
1246
1348
  }
1247
- }, _callee19, this);
1349
+ }, _callee21, this);
1248
1350
  }));
1249
1351
 
1250
1352
  return function (_x9) {
1251
- return _ref33.apply(this, arguments);
1353
+ return _ref37.apply(this, arguments);
1252
1354
  };
1253
1355
  }();
1254
1356
  /**
@@ -1263,14 +1365,14 @@ exports.CreateListing = /*#__PURE__*/function () {
1263
1365
 
1264
1366
 
1265
1367
  exports.RemoveListing = /*#__PURE__*/function () {
1266
- var _ref35 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(_ref34) {
1368
+ var _ref39 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(_ref38) {
1267
1369
  var listingId;
1268
- return _regeneratorRuntime.wrap(function _callee20$(_context20) {
1370
+ return _regeneratorRuntime.wrap(function _callee22$(_context22) {
1269
1371
  while (1) {
1270
- switch (_context20.prev = _context20.next) {
1372
+ switch (_context22.prev = _context22.next) {
1271
1373
  case 0:
1272
- listingId = _ref34.listingId;
1273
- _context20.next = 3;
1374
+ listingId = _ref38.listingId;
1375
+ _context22.next = 3;
1274
1376
  return this.client.authClient.MakeAuthServiceRequest({
1275
1377
  path: UrlJoin("as", "wlt", "mkt", listingId),
1276
1378
  method: "DELETE",
@@ -1281,14 +1383,14 @@ exports.RemoveListing = /*#__PURE__*/function () {
1281
1383
 
1282
1384
  case 3:
1283
1385
  case "end":
1284
- return _context20.stop();
1386
+ return _context22.stop();
1285
1387
  }
1286
1388
  }
1287
- }, _callee20, this);
1389
+ }, _callee22, this);
1288
1390
  }));
1289
1391
 
1290
1392
  return function (_x10) {
1291
- return _ref35.apply(this, arguments);
1393
+ return _ref39.apply(this, arguments);
1292
1394
  };
1293
1395
  }();
1294
1396
  /**
@@ -1305,30 +1407,30 @@ exports.RemoveListing = /*#__PURE__*/function () {
1305
1407
 
1306
1408
 
1307
1409
  exports.ListingNames = /*#__PURE__*/function () {
1308
- var _ref37 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(_ref36) {
1410
+ var _ref41 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(_ref40) {
1309
1411
  var marketplaceParams, tenantId;
1310
- return _regeneratorRuntime.wrap(function _callee21$(_context21) {
1412
+ return _regeneratorRuntime.wrap(function _callee23$(_context23) {
1311
1413
  while (1) {
1312
- switch (_context21.prev = _context21.next) {
1414
+ switch (_context23.prev = _context23.next) {
1313
1415
  case 0:
1314
- marketplaceParams = _ref36.marketplaceParams;
1416
+ marketplaceParams = _ref40.marketplaceParams;
1315
1417
 
1316
1418
  if (!marketplaceParams) {
1317
- _context21.next = 5;
1419
+ _context23.next = 5;
1318
1420
  break;
1319
1421
  }
1320
1422
 
1321
- _context21.next = 4;
1423
+ _context23.next = 4;
1322
1424
  return this.MarketplaceInfo({
1323
1425
  marketplaceParams: marketplaceParams
1324
1426
  });
1325
1427
 
1326
1428
  case 4:
1327
- tenantId = _context21.sent.tenantId;
1429
+ tenantId = _context23.sent.tenantId;
1328
1430
 
1329
1431
  case 5:
1330
- _context21.t0 = Utils;
1331
- _context21.next = 8;
1432
+ _context23.t0 = Utils;
1433
+ _context23.next = 8;
1332
1434
  return this.client.authClient.MakeAuthServiceRequest({
1333
1435
  path: UrlJoin("as", "mkt", "names"),
1334
1436
  method: "GET",
@@ -1338,23 +1440,23 @@ exports.ListingNames = /*#__PURE__*/function () {
1338
1440
  });
1339
1441
 
1340
1442
  case 8:
1341
- _context21.t1 = _context21.sent;
1342
- _context21.next = 11;
1343
- return _context21.t0.ResponseToJson.call(_context21.t0, _context21.t1);
1443
+ _context23.t1 = _context23.sent;
1444
+ _context23.next = 11;
1445
+ return _context23.t0.ResponseToJson.call(_context23.t0, _context23.t1);
1344
1446
 
1345
1447
  case 11:
1346
- return _context21.abrupt("return", _context21.sent);
1448
+ return _context23.abrupt("return", _context23.sent);
1347
1449
 
1348
1450
  case 12:
1349
1451
  case "end":
1350
- return _context21.stop();
1452
+ return _context23.stop();
1351
1453
  }
1352
1454
  }
1353
- }, _callee21, this);
1455
+ }, _callee23, this);
1354
1456
  }));
1355
1457
 
1356
1458
  return function (_x11) {
1357
- return _ref37.apply(this, arguments);
1459
+ return _ref41.apply(this, arguments);
1358
1460
  };
1359
1461
  }();
1360
1462
  /**
@@ -1369,15 +1471,15 @@ exports.ListingNames = /*#__PURE__*/function () {
1369
1471
 
1370
1472
 
1371
1473
  exports.ListingEditionNames = /*#__PURE__*/function () {
1372
- var _ref39 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(_ref38) {
1474
+ var _ref43 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(_ref42) {
1373
1475
  var displayName;
1374
- return _regeneratorRuntime.wrap(function _callee22$(_context22) {
1476
+ return _regeneratorRuntime.wrap(function _callee24$(_context24) {
1375
1477
  while (1) {
1376
- switch (_context22.prev = _context22.next) {
1478
+ switch (_context24.prev = _context24.next) {
1377
1479
  case 0:
1378
- displayName = _ref38.displayName;
1379
- _context22.t0 = Utils;
1380
- _context22.next = 4;
1480
+ displayName = _ref42.displayName;
1481
+ _context24.t0 = Utils;
1482
+ _context24.next = 4;
1381
1483
  return this.client.authClient.MakeAuthServiceRequest({
1382
1484
  path: UrlJoin("as", "mkt", "editions"),
1383
1485
  queryParams: {
@@ -1387,23 +1489,23 @@ exports.ListingEditionNames = /*#__PURE__*/function () {
1387
1489
  });
1388
1490
 
1389
1491
  case 4:
1390
- _context22.t1 = _context22.sent;
1391
- _context22.next = 7;
1392
- return _context22.t0.ResponseToJson.call(_context22.t0, _context22.t1);
1492
+ _context24.t1 = _context24.sent;
1493
+ _context24.next = 7;
1494
+ return _context24.t0.ResponseToJson.call(_context24.t0, _context24.t1);
1393
1495
 
1394
1496
  case 7:
1395
- return _context22.abrupt("return", _context22.sent);
1497
+ return _context24.abrupt("return", _context24.sent);
1396
1498
 
1397
1499
  case 8:
1398
1500
  case "end":
1399
- return _context22.stop();
1501
+ return _context24.stop();
1400
1502
  }
1401
1503
  }
1402
- }, _callee22, this);
1504
+ }, _callee24, this);
1403
1505
  }));
1404
1506
 
1405
1507
  return function (_x12) {
1406
- return _ref39.apply(this, arguments);
1508
+ return _ref43.apply(this, arguments);
1407
1509
  };
1408
1510
  }();
1409
1511
  /**
@@ -1420,46 +1522,46 @@ exports.ListingEditionNames = /*#__PURE__*/function () {
1420
1522
  */
1421
1523
 
1422
1524
 
1423
- exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23() {
1424
- var _ref41,
1525
+ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25() {
1526
+ var _ref45,
1425
1527
  marketplaceParams,
1426
1528
  displayName,
1427
1529
  filters,
1428
1530
  attributes,
1429
- _args23 = arguments;
1531
+ _args25 = arguments;
1430
1532
 
1431
- return _regeneratorRuntime.wrap(function _callee23$(_context23) {
1533
+ return _regeneratorRuntime.wrap(function _callee25$(_context25) {
1432
1534
  while (1) {
1433
- switch (_context23.prev = _context23.next) {
1535
+ switch (_context25.prev = _context25.next) {
1434
1536
  case 0:
1435
- _ref41 = _args23.length > 0 && _args23[0] !== undefined ? _args23[0] : {}, marketplaceParams = _ref41.marketplaceParams, displayName = _ref41.displayName;
1537
+ _ref45 = _args25.length > 0 && _args25[0] !== undefined ? _args25[0] : {}, marketplaceParams = _ref45.marketplaceParams, displayName = _ref45.displayName;
1436
1538
  filters = [];
1437
1539
 
1438
1540
  if (!marketplaceParams) {
1439
- _context23.next = 10;
1541
+ _context25.next = 10;
1440
1542
  break;
1441
1543
  }
1442
1544
 
1443
- _context23.t0 = filters;
1444
- _context23.t1 = "tenant:eq:";
1445
- _context23.next = 7;
1545
+ _context25.t0 = filters;
1546
+ _context25.t1 = "tenant:eq:";
1547
+ _context25.next = 7;
1446
1548
  return this.MarketplaceInfo({
1447
1549
  marketplaceParams: marketplaceParams
1448
1550
  });
1449
1551
 
1450
1552
  case 7:
1451
- _context23.t2 = _context23.sent.tenantId;
1452
- _context23.t3 = _context23.t1.concat.call(_context23.t1, _context23.t2);
1553
+ _context25.t2 = _context25.sent.tenantId;
1554
+ _context25.t3 = _context25.t1.concat.call(_context25.t1, _context25.t2);
1453
1555
 
1454
- _context23.t0.push.call(_context23.t0, _context23.t3);
1556
+ _context25.t0.push.call(_context25.t0, _context25.t3);
1455
1557
 
1456
1558
  case 10:
1457
1559
  if (displayName) {
1458
1560
  filters.push("nft/display_name:eq:".concat(displayName));
1459
1561
  }
1460
1562
 
1461
- _context23.t4 = Utils;
1462
- _context23.next = 14;
1563
+ _context25.t4 = Utils;
1564
+ _context25.next = 14;
1463
1565
  return this.client.authClient.MakeAuthServiceRequest({
1464
1566
  path: UrlJoin("as", "mkt", "attributes"),
1465
1567
  method: "GET",
@@ -1469,30 +1571,30 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
1469
1571
  });
1470
1572
 
1471
1573
  case 14:
1472
- _context23.t5 = _context23.sent;
1473
- _context23.next = 17;
1474
- return _context23.t4.ResponseToJson.call(_context23.t4, _context23.t5);
1574
+ _context25.t5 = _context25.sent;
1575
+ _context25.next = 17;
1576
+ return _context25.t4.ResponseToJson.call(_context25.t4, _context25.t5);
1475
1577
 
1476
1578
  case 17:
1477
- attributes = _context23.sent;
1478
- return _context23.abrupt("return", attributes.map(function (_ref42) {
1479
- var trait_type = _ref42.trait_type,
1480
- values = _ref42.values;
1579
+ attributes = _context25.sent;
1580
+ return _context25.abrupt("return", attributes.map(function (_ref46) {
1581
+ var trait_type = _ref46.trait_type,
1582
+ values = _ref46.values;
1481
1583
  return {
1482
1584
  name: trait_type,
1483
1585
  values: values
1484
1586
  };
1485
- }).filter(function (_ref43) {
1486
- var name = _ref43.name;
1587
+ }).filter(function (_ref47) {
1588
+ var name = _ref47.name;
1487
1589
  return !["Content Fabric Hash", "Total Minted Supply", "Creator"].includes(name);
1488
1590
  }));
1489
1591
 
1490
1592
  case 19:
1491
1593
  case "end":
1492
- return _context23.stop();
1594
+ return _context25.stop();
1493
1595
  }
1494
1596
  }
1495
- }, _callee23, this);
1597
+ }, _callee25, this);
1496
1598
  }));
1497
1599
  /* MINTING STATUS */
1498
1600
 
@@ -1508,61 +1610,61 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
1508
1610
  */
1509
1611
 
1510
1612
  exports.ListingPurchaseStatus = /*#__PURE__*/function () {
1511
- var _ref45 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(_ref44) {
1613
+ var _ref49 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(_ref48) {
1512
1614
  var listingId, confirmationId, listingStatus, statuses;
1513
- return _regeneratorRuntime.wrap(function _callee24$(_context24) {
1615
+ return _regeneratorRuntime.wrap(function _callee26$(_context26) {
1514
1616
  while (1) {
1515
- switch (_context24.prev = _context24.next) {
1617
+ switch (_context26.prev = _context26.next) {
1516
1618
  case 0:
1517
- listingId = _ref44.listingId, confirmationId = _ref44.confirmationId;
1518
- _context24.prev = 1;
1519
- _context24.next = 4;
1619
+ listingId = _ref48.listingId, confirmationId = _ref48.confirmationId;
1620
+ _context26.prev = 1;
1621
+ _context26.next = 4;
1520
1622
  return this.ListingStatus({
1521
1623
  listingId: listingId
1522
1624
  });
1523
1625
 
1524
1626
  case 4:
1525
- listingStatus = _context24.sent;
1627
+ listingStatus = _context26.sent;
1526
1628
 
1527
1629
  if (listingStatus) {
1528
- _context24.next = 7;
1630
+ _context26.next = 7;
1529
1631
  break;
1530
1632
  }
1531
1633
 
1532
1634
  throw Error("Unable to find info for listing " + listingId);
1533
1635
 
1534
1636
  case 7:
1535
- _context24.next = 9;
1637
+ _context26.next = 9;
1536
1638
  return this.MintingStatus({
1537
1639
  tenantId: listingStatus.tenant
1538
1640
  });
1539
1641
 
1540
1642
  case 9:
1541
- statuses = _context24.sent;
1542
- return _context24.abrupt("return", statuses.find(function (status) {
1643
+ statuses = _context26.sent;
1644
+ return _context26.abrupt("return", statuses.find(function (status) {
1543
1645
  return status.op === "nft-transfer" && status.extra && status.extra[0] === confirmationId;
1544
1646
  }) || {
1545
1647
  status: "none"
1546
1648
  });
1547
1649
 
1548
1650
  case 13:
1549
- _context24.prev = 13;
1550
- _context24.t0 = _context24["catch"](1);
1551
- this.Log(_context24.t0, true);
1552
- return _context24.abrupt("return", {
1651
+ _context26.prev = 13;
1652
+ _context26.t0 = _context26["catch"](1);
1653
+ this.Log(_context26.t0, true);
1654
+ return _context26.abrupt("return", {
1553
1655
  status: "unknown"
1554
1656
  });
1555
1657
 
1556
1658
  case 17:
1557
1659
  case "end":
1558
- return _context24.stop();
1660
+ return _context26.stop();
1559
1661
  }
1560
1662
  }
1561
- }, _callee24, this, [[1, 13]]);
1663
+ }, _callee26, this, [[1, 13]]);
1562
1664
  }));
1563
1665
 
1564
1666
  return function (_x13) {
1565
- return _ref45.apply(this, arguments);
1667
+ return _ref49.apply(this, arguments);
1566
1668
  };
1567
1669
  }();
1568
1670
  /**
@@ -1578,52 +1680,52 @@ exports.ListingPurchaseStatus = /*#__PURE__*/function () {
1578
1680
 
1579
1681
 
1580
1682
  exports.PurchaseStatus = /*#__PURE__*/function () {
1581
- var _ref47 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(_ref46) {
1683
+ var _ref51 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(_ref50) {
1582
1684
  var marketplaceParams, confirmationId, marketplaceInfo, statuses;
1583
- return _regeneratorRuntime.wrap(function _callee25$(_context25) {
1685
+ return _regeneratorRuntime.wrap(function _callee27$(_context27) {
1584
1686
  while (1) {
1585
- switch (_context25.prev = _context25.next) {
1687
+ switch (_context27.prev = _context27.next) {
1586
1688
  case 0:
1587
- marketplaceParams = _ref46.marketplaceParams, confirmationId = _ref46.confirmationId;
1588
- _context25.prev = 1;
1589
- _context25.next = 4;
1689
+ marketplaceParams = _ref50.marketplaceParams, confirmationId = _ref50.confirmationId;
1690
+ _context27.prev = 1;
1691
+ _context27.next = 4;
1590
1692
  return this.MarketplaceInfo({
1591
1693
  marketplaceParams: marketplaceParams
1592
1694
  });
1593
1695
 
1594
1696
  case 4:
1595
- marketplaceInfo = _context25.sent;
1596
- _context25.next = 7;
1697
+ marketplaceInfo = _context27.sent;
1698
+ _context27.next = 7;
1597
1699
  return this.MintingStatus({
1598
1700
  tenantId: marketplaceInfo.tenant_id
1599
1701
  });
1600
1702
 
1601
1703
  case 7:
1602
- statuses = _context25.sent;
1603
- return _context25.abrupt("return", statuses.find(function (status) {
1704
+ statuses = _context27.sent;
1705
+ return _context27.abrupt("return", statuses.find(function (status) {
1604
1706
  return status.op === "nft-buy" && status.confirmationId === confirmationId;
1605
1707
  }) || {
1606
1708
  status: "none"
1607
1709
  });
1608
1710
 
1609
1711
  case 11:
1610
- _context25.prev = 11;
1611
- _context25.t0 = _context25["catch"](1);
1612
- this.Log(_context25.t0, true);
1613
- return _context25.abrupt("return", {
1712
+ _context27.prev = 11;
1713
+ _context27.t0 = _context27["catch"](1);
1714
+ this.Log(_context27.t0, true);
1715
+ return _context27.abrupt("return", {
1614
1716
  status: "unknown"
1615
1717
  });
1616
1718
 
1617
1719
  case 15:
1618
1720
  case "end":
1619
- return _context25.stop();
1721
+ return _context27.stop();
1620
1722
  }
1621
1723
  }
1622
- }, _callee25, this, [[1, 11]]);
1724
+ }, _callee27, this, [[1, 11]]);
1623
1725
  }));
1624
1726
 
1625
1727
  return function (_x14) {
1626
- return _ref47.apply(this, arguments);
1728
+ return _ref51.apply(this, arguments);
1627
1729
  };
1628
1730
  }();
1629
1731
  /**
@@ -1639,52 +1741,52 @@ exports.PurchaseStatus = /*#__PURE__*/function () {
1639
1741
 
1640
1742
 
1641
1743
  exports.ClaimStatus = /*#__PURE__*/function () {
1642
- var _ref49 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(_ref48) {
1744
+ var _ref53 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref52) {
1643
1745
  var marketplaceParams, sku, marketplaceInfo, statuses;
1644
- return _regeneratorRuntime.wrap(function _callee26$(_context26) {
1746
+ return _regeneratorRuntime.wrap(function _callee28$(_context28) {
1645
1747
  while (1) {
1646
- switch (_context26.prev = _context26.next) {
1748
+ switch (_context28.prev = _context28.next) {
1647
1749
  case 0:
1648
- marketplaceParams = _ref48.marketplaceParams, sku = _ref48.sku;
1649
- _context26.prev = 1;
1650
- _context26.next = 4;
1750
+ marketplaceParams = _ref52.marketplaceParams, sku = _ref52.sku;
1751
+ _context28.prev = 1;
1752
+ _context28.next = 4;
1651
1753
  return this.MarketplaceInfo({
1652
1754
  marketplaceParams: marketplaceParams
1653
1755
  });
1654
1756
 
1655
1757
  case 4:
1656
- marketplaceInfo = _context26.sent;
1657
- _context26.next = 7;
1758
+ marketplaceInfo = _context28.sent;
1759
+ _context28.next = 7;
1658
1760
  return this.MintingStatus({
1659
1761
  tenantId: marketplaceInfo.tenantId
1660
1762
  });
1661
1763
 
1662
1764
  case 7:
1663
- statuses = _context26.sent;
1664
- return _context26.abrupt("return", statuses.find(function (status) {
1765
+ statuses = _context28.sent;
1766
+ return _context28.abrupt("return", statuses.find(function (status) {
1665
1767
  return status.op === "nft-claim" && status.marketplaceId === marketplaceInfo.marketplaceId && status.confirmationId === sku;
1666
1768
  }) || {
1667
1769
  status: "none"
1668
1770
  });
1669
1771
 
1670
1772
  case 11:
1671
- _context26.prev = 11;
1672
- _context26.t0 = _context26["catch"](1);
1673
- this.Log(_context26.t0, true);
1674
- return _context26.abrupt("return", {
1773
+ _context28.prev = 11;
1774
+ _context28.t0 = _context28["catch"](1);
1775
+ this.Log(_context28.t0, true);
1776
+ return _context28.abrupt("return", {
1675
1777
  status: "unknown"
1676
1778
  });
1677
1779
 
1678
1780
  case 15:
1679
1781
  case "end":
1680
- return _context26.stop();
1782
+ return _context28.stop();
1681
1783
  }
1682
1784
  }
1683
- }, _callee26, this, [[1, 11]]);
1785
+ }, _callee28, this, [[1, 11]]);
1684
1786
  }));
1685
1787
 
1686
1788
  return function (_x15) {
1687
- return _ref49.apply(this, arguments);
1789
+ return _ref53.apply(this, arguments);
1688
1790
  };
1689
1791
  }();
1690
1792
  /**
@@ -1700,52 +1802,52 @@ exports.ClaimStatus = /*#__PURE__*/function () {
1700
1802
 
1701
1803
 
1702
1804
  exports.PackOpenStatus = /*#__PURE__*/function () {
1703
- var _ref51 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(_ref50) {
1805
+ var _ref55 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref54) {
1704
1806
  var contractAddress, tokenId, tenantConfig, statuses;
1705
- return _regeneratorRuntime.wrap(function _callee27$(_context27) {
1807
+ return _regeneratorRuntime.wrap(function _callee29$(_context29) {
1706
1808
  while (1) {
1707
- switch (_context27.prev = _context27.next) {
1809
+ switch (_context29.prev = _context29.next) {
1708
1810
  case 0:
1709
- contractAddress = _ref50.contractAddress, tokenId = _ref50.tokenId;
1710
- _context27.prev = 1;
1711
- _context27.next = 4;
1811
+ contractAddress = _ref54.contractAddress, tokenId = _ref54.tokenId;
1812
+ _context29.prev = 1;
1813
+ _context29.next = 4;
1712
1814
  return this.TenantConfiguration({
1713
1815
  contractAddress: contractAddress
1714
1816
  });
1715
1817
 
1716
1818
  case 4:
1717
- tenantConfig = _context27.sent;
1718
- _context27.next = 7;
1819
+ tenantConfig = _context29.sent;
1820
+ _context29.next = 7;
1719
1821
  return this.MintingStatus({
1720
1822
  tenantId: tenantConfig.tenant
1721
1823
  });
1722
1824
 
1723
1825
  case 7:
1724
- statuses = _context27.sent;
1725
- return _context27.abrupt("return", statuses.find(function (status) {
1826
+ statuses = _context29.sent;
1827
+ return _context29.abrupt("return", statuses.find(function (status) {
1726
1828
  return status.op === "nft-open" && Utils.EqualAddress(contractAddress, status.address) && status.tokenId === tokenId;
1727
1829
  }) || {
1728
1830
  status: "none"
1729
1831
  });
1730
1832
 
1731
1833
  case 11:
1732
- _context27.prev = 11;
1733
- _context27.t0 = _context27["catch"](1);
1734
- this.Log(_context27.t0, true);
1735
- return _context27.abrupt("return", {
1834
+ _context29.prev = 11;
1835
+ _context29.t0 = _context29["catch"](1);
1836
+ this.Log(_context29.t0, true);
1837
+ return _context29.abrupt("return", {
1736
1838
  status: "unknown"
1737
1839
  });
1738
1840
 
1739
1841
  case 15:
1740
1842
  case "end":
1741
- return _context27.stop();
1843
+ return _context29.stop();
1742
1844
  }
1743
1845
  }
1744
- }, _callee27, this, [[1, 11]]);
1846
+ }, _callee29, this, [[1, 11]]);
1745
1847
  }));
1746
1848
 
1747
1849
  return function (_x16) {
1748
- return _ref51.apply(this, arguments);
1850
+ return _ref55.apply(this, arguments);
1749
1851
  };
1750
1852
  }();
1751
1853
  /**
@@ -1761,60 +1863,60 @@ exports.PackOpenStatus = /*#__PURE__*/function () {
1761
1863
 
1762
1864
 
1763
1865
  exports.CollectionRedemptionStatus = /*#__PURE__*/function () {
1764
- var _ref53 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref52) {
1866
+ var _ref57 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(_ref56) {
1765
1867
  var marketplaceParams, confirmationId, statuses;
1766
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
1868
+ return _regeneratorRuntime.wrap(function _callee30$(_context30) {
1767
1869
  while (1) {
1768
- switch (_context28.prev = _context28.next) {
1870
+ switch (_context30.prev = _context30.next) {
1769
1871
  case 0:
1770
- marketplaceParams = _ref52.marketplaceParams, confirmationId = _ref52.confirmationId;
1771
- _context28.prev = 1;
1772
- _context28.next = 4;
1872
+ marketplaceParams = _ref56.marketplaceParams, confirmationId = _ref56.confirmationId;
1873
+ _context30.prev = 1;
1874
+ _context30.next = 4;
1773
1875
  return this.MintingStatus({
1774
1876
  marketplaceParams: marketplaceParams
1775
1877
  });
1776
1878
 
1777
1879
  case 4:
1778
- statuses = _context28.sent;
1779
- return _context28.abrupt("return", statuses.find(function (status) {
1880
+ statuses = _context30.sent;
1881
+ return _context30.abrupt("return", statuses.find(function (status) {
1780
1882
  return status.op === "nft-redeem" && status.confirmationId === confirmationId;
1781
1883
  }) || {
1782
1884
  status: "none"
1783
1885
  });
1784
1886
 
1785
1887
  case 8:
1786
- _context28.prev = 8;
1787
- _context28.t0 = _context28["catch"](1);
1788
- this.Log(_context28.t0, true);
1789
- return _context28.abrupt("return", {
1888
+ _context30.prev = 8;
1889
+ _context30.t0 = _context30["catch"](1);
1890
+ this.Log(_context30.t0, true);
1891
+ return _context30.abrupt("return", {
1790
1892
  status: "unknown"
1791
1893
  });
1792
1894
 
1793
1895
  case 12:
1794
1896
  case "end":
1795
- return _context28.stop();
1897
+ return _context30.stop();
1796
1898
  }
1797
1899
  }
1798
- }, _callee28, this, [[1, 8]]);
1900
+ }, _callee30, this, [[1, 8]]);
1799
1901
  }));
1800
1902
 
1801
1903
  return function (_x17) {
1802
- return _ref53.apply(this, arguments);
1904
+ return _ref57.apply(this, arguments);
1803
1905
  };
1804
1906
  }();
1805
1907
  /* EVENTS */
1806
1908
 
1807
1909
 
1808
1910
  exports.LoadDrop = /*#__PURE__*/function () {
1809
- var _ref55 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref54) {
1911
+ var _ref59 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(_ref58) {
1810
1912
  var _this2 = this;
1811
1913
 
1812
1914
  var tenantSlug, eventSlug, dropId, mainSiteHash, event, eventId;
1813
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
1915
+ return _regeneratorRuntime.wrap(function _callee31$(_context31) {
1814
1916
  while (1) {
1815
- switch (_context29.prev = _context29.next) {
1917
+ switch (_context31.prev = _context31.next) {
1816
1918
  case 0:
1817
- tenantSlug = _ref54.tenantSlug, eventSlug = _ref54.eventSlug, dropId = _ref54.dropId;
1919
+ tenantSlug = _ref58.tenantSlug, eventSlug = _ref58.eventSlug, dropId = _ref58.dropId;
1818
1920
 
1819
1921
  if (!this.drops) {
1820
1922
  this.drops = {};
@@ -1829,18 +1931,18 @@ exports.LoadDrop = /*#__PURE__*/function () {
1829
1931
  }
1830
1932
 
1831
1933
  if (this.drops[tenantSlug][eventSlug][dropId]) {
1832
- _context29.next = 16;
1934
+ _context31.next = 16;
1833
1935
  break;
1834
1936
  }
1835
1937
 
1836
- _context29.next = 7;
1938
+ _context31.next = 7;
1837
1939
  return this.client.LatestVersionHash({
1838
1940
  objectId: this.mainSiteId
1839
1941
  });
1840
1942
 
1841
1943
  case 7:
1842
- mainSiteHash = _context29.sent;
1843
- _context29.next = 10;
1944
+ mainSiteHash = _context31.sent;
1945
+ _context31.next = 10;
1844
1946
  return this.client.ContentObjectMetadata({
1845
1947
  versionHash: mainSiteHash,
1846
1948
  metadataSubtree: UrlJoin("public", "asset_metadata", "tenants", tenantSlug, "sites", eventSlug, "info"),
@@ -1853,17 +1955,17 @@ exports.LoadDrop = /*#__PURE__*/function () {
1853
1955
  });
1854
1956
 
1855
1957
  case 10:
1856
- _context29.t0 = _context29.sent;
1958
+ _context31.t0 = _context31.sent;
1857
1959
 
1858
- if (_context29.t0) {
1859
- _context29.next = 13;
1960
+ if (_context31.t0) {
1961
+ _context31.next = 13;
1860
1962
  break;
1861
1963
  }
1862
1964
 
1863
- _context29.t0 = [];
1965
+ _context31.t0 = [];
1864
1966
 
1865
1967
  case 13:
1866
- event = _context29.t0;
1968
+ event = _context31.t0;
1867
1969
  eventId = Utils.DecodeVersionHash(event["."].source).objectId;
1868
1970
  event.drops.forEach(function (drop) {
1869
1971
  drop = _objectSpread(_objectSpread({}, drop), {}, {
@@ -1874,37 +1976,37 @@ exports.LoadDrop = /*#__PURE__*/function () {
1874
1976
  });
1875
1977
 
1876
1978
  case 16:
1877
- return _context29.abrupt("return", this.drops[dropId]);
1979
+ return _context31.abrupt("return", this.drops[dropId]);
1878
1980
 
1879
1981
  case 17:
1880
1982
  case "end":
1881
- return _context29.stop();
1983
+ return _context31.stop();
1882
1984
  }
1883
1985
  }
1884
- }, _callee29, this);
1986
+ }, _callee31, this);
1885
1987
  }));
1886
1988
 
1887
1989
  return function (_x18) {
1888
- return _ref55.apply(this, arguments);
1990
+ return _ref59.apply(this, arguments);
1889
1991
  };
1890
1992
  }();
1891
1993
 
1892
1994
  exports.SubmitDropVote = /*#__PURE__*/function () {
1893
- var _ref57 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(_ref56) {
1995
+ var _ref61 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(_ref60) {
1894
1996
  var marketplaceParams, eventId, dropId, sku, marketplaceInfo;
1895
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
1997
+ return _regeneratorRuntime.wrap(function _callee32$(_context32) {
1896
1998
  while (1) {
1897
- switch (_context30.prev = _context30.next) {
1999
+ switch (_context32.prev = _context32.next) {
1898
2000
  case 0:
1899
- marketplaceParams = _ref56.marketplaceParams, eventId = _ref56.eventId, dropId = _ref56.dropId, sku = _ref56.sku;
1900
- _context30.next = 3;
2001
+ marketplaceParams = _ref60.marketplaceParams, eventId = _ref60.eventId, dropId = _ref60.dropId, sku = _ref60.sku;
2002
+ _context32.next = 3;
1901
2003
  return this.MarketplaceInfo({
1902
2004
  marketplaceParams: marketplaceParams
1903
2005
  });
1904
2006
 
1905
2007
  case 3:
1906
- marketplaceInfo = _context30.sent;
1907
- _context30.next = 6;
2008
+ marketplaceInfo = _context32.sent;
2009
+ _context32.next = 6;
1908
2010
  return this.client.authClient.MakeAuthServiceRequest({
1909
2011
  path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
1910
2012
  method: "POST",
@@ -1921,27 +2023,27 @@ exports.SubmitDropVote = /*#__PURE__*/function () {
1921
2023
 
1922
2024
  case 6:
1923
2025
  case "end":
1924
- return _context30.stop();
2026
+ return _context32.stop();
1925
2027
  }
1926
2028
  }
1927
- }, _callee30, this);
2029
+ }, _callee32, this);
1928
2030
  }));
1929
2031
 
1930
2032
  return function (_x19) {
1931
- return _ref57.apply(this, arguments);
2033
+ return _ref61.apply(this, arguments);
1932
2034
  };
1933
2035
  }();
1934
2036
 
1935
2037
  exports.DropStatus = /*#__PURE__*/function () {
1936
- var _ref59 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(_ref58) {
2038
+ var _ref63 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(_ref62) {
1937
2039
  var marketplace, eventId, dropId, response;
1938
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
2040
+ return _regeneratorRuntime.wrap(function _callee33$(_context33) {
1939
2041
  while (1) {
1940
- switch (_context31.prev = _context31.next) {
2042
+ switch (_context33.prev = _context33.next) {
1941
2043
  case 0:
1942
- marketplace = _ref58.marketplace, eventId = _ref58.eventId, dropId = _ref58.dropId;
1943
- _context31.prev = 1;
1944
- _context31.next = 4;
2044
+ marketplace = _ref62.marketplace, eventId = _ref62.eventId, dropId = _ref62.dropId;
2045
+ _context33.prev = 1;
2046
+ _context33.next = 4;
1945
2047
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
1946
2048
  path: UrlJoin("as", "wlt", "act", marketplace.tenant_id, eventId, dropId),
1947
2049
  method: "GET",
@@ -1951,28 +2053,28 @@ exports.DropStatus = /*#__PURE__*/function () {
1951
2053
  }));
1952
2054
 
1953
2055
  case 4:
1954
- response = _context31.sent;
1955
- return _context31.abrupt("return", response.sort(function (a, b) {
2056
+ response = _context33.sent;
2057
+ return _context33.abrupt("return", response.sort(function (a, b) {
1956
2058
  return a.ts > b.ts ? 1 : -1;
1957
2059
  })[0] || {
1958
2060
  status: "none"
1959
2061
  });
1960
2062
 
1961
2063
  case 8:
1962
- _context31.prev = 8;
1963
- _context31.t0 = _context31["catch"](1);
1964
- this.Log(_context31.t0, true);
1965
- return _context31.abrupt("return", "");
2064
+ _context33.prev = 8;
2065
+ _context33.t0 = _context33["catch"](1);
2066
+ this.Log(_context33.t0, true);
2067
+ return _context33.abrupt("return", "");
1966
2068
 
1967
2069
  case 12:
1968
2070
  case "end":
1969
- return _context31.stop();
2071
+ return _context33.stop();
1970
2072
  }
1971
2073
  }
1972
- }, _callee31, this, [[1, 8]]);
2074
+ }, _callee33, this, [[1, 8]]);
1973
2075
  }));
1974
2076
 
1975
2077
  return function (_x20) {
1976
- return _ref59.apply(this, arguments);
2078
+ return _ref63.apply(this, arguments);
1977
2079
  };
1978
2080
  }();