@eluvio/elv-client-js 4.0.38 → 4.0.39

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.
@@ -651,6 +651,48 @@ exports.ExchangeRate = /*#__PURE__*/function () {
651
651
  };
652
652
  }();
653
653
 
654
+ /**
655
+ * Retrieve custom CSS for the specified tenant
656
+ *
657
+ * @methodGroup Tenants
658
+ * @namedParams
659
+ * @param {Object} tenantSlug
660
+ *
661
+ * @returns {Promise<string>} - The CSS of the tenant
662
+ */
663
+ exports.TenantCSS = /*#__PURE__*/function () {
664
+ var _ref23 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref22) {
665
+ var tenantSlug;
666
+ return _regeneratorRuntime.wrap(function _callee11$(_context11) {
667
+ while (1) switch (_context11.prev = _context11.next) {
668
+ case 0:
669
+ tenantSlug = _ref22.tenantSlug;
670
+ if (this.cachedCSS[tenantSlug]) {
671
+ _context11.next = 5;
672
+ break;
673
+ }
674
+ _context11.next = 4;
675
+ return this.client.ContentObjectMetadata({
676
+ libraryId: this.mainSiteLibraryId,
677
+ objectId: this.mainSiteId,
678
+ metadataSubtree: UrlJoin("/public", "asset_metadata", "tenants", tenantSlug, "info", "branding", "wallet_css"),
679
+ authorizationToken: this.publicStaticToken
680
+ });
681
+ case 4:
682
+ this.cachedCSS[tenantSlug] = _context11.sent;
683
+ case 5:
684
+ return _context11.abrupt("return", this.cachedCSS[tenantSlug] || "");
685
+ case 6:
686
+ case "end":
687
+ return _context11.stop();
688
+ }
689
+ }, _callee11, this);
690
+ }));
691
+ return function (_x4) {
692
+ return _ref23.apply(this, arguments);
693
+ };
694
+ }();
695
+
654
696
  /* MARKETPLACE */
655
697
 
656
698
  /**
@@ -665,12 +707,12 @@ exports.ExchangeRate = /*#__PURE__*/function () {
665
707
  * @returns {Promise<Object>} - Stock info for items in the marketplace
666
708
  */
667
709
  exports.MarketplaceStock = /*#__PURE__*/function () {
668
- var _ref23 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref22) {
710
+ var _ref25 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(_ref24) {
669
711
  var marketplaceParams, tenantId, marketplaceInfo;
670
- return _regeneratorRuntime.wrap(function _callee11$(_context11) {
671
- while (1) switch (_context11.prev = _context11.next) {
712
+ return _regeneratorRuntime.wrap(function _callee12$(_context12) {
713
+ while (1) switch (_context12.prev = _context12.next) {
672
714
  case 0:
673
- marketplaceParams = _ref22.marketplaceParams, tenantId = _ref22.tenantId;
715
+ marketplaceParams = _ref24.marketplaceParams, tenantId = _ref24.tenantId;
674
716
  if (!tenantId) {
675
717
  marketplaceInfo = this.MarketplaceInfo({
676
718
  marketplaceParams: marketplaceParams
@@ -678,10 +720,10 @@ exports.MarketplaceStock = /*#__PURE__*/function () {
678
720
  tenantId = marketplaceInfo.tenantId;
679
721
  }
680
722
  if (!this.loggedIn) {
681
- _context11.next = 6;
723
+ _context12.next = 6;
682
724
  break;
683
725
  }
684
- _context11.next = 5;
726
+ _context12.next = 5;
685
727
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
686
728
  path: UrlJoin("as", "wlt", "nft", "info", tenantId),
687
729
  method: "GET",
@@ -690,23 +732,23 @@ exports.MarketplaceStock = /*#__PURE__*/function () {
690
732
  }
691
733
  }));
692
734
  case 5:
693
- return _context11.abrupt("return", _context11.sent);
735
+ return _context12.abrupt("return", _context12.sent);
694
736
  case 6:
695
- _context11.next = 8;
737
+ _context12.next = 8;
696
738
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
697
739
  path: UrlJoin("as", "nft", "stock", tenantId),
698
740
  method: "GET"
699
741
  }));
700
742
  case 8:
701
- return _context11.abrupt("return", _context11.sent);
743
+ return _context12.abrupt("return", _context12.sent);
702
744
  case 9:
703
745
  case "end":
704
- return _context11.stop();
746
+ return _context12.stop();
705
747
  }
706
- }, _callee11, this);
748
+ }, _callee12, this);
707
749
  }));
708
- return function (_x4) {
709
- return _ref23.apply(this, arguments);
750
+ return function (_x5) {
751
+ return _ref25.apply(this, arguments);
710
752
  };
711
753
  }();
712
754
 
@@ -723,13 +765,13 @@ exports.MarketplaceStock = /*#__PURE__*/function () {
723
765
  *
724
766
  * @returns {Promise<Object>} - Info about the marketplace
725
767
  */
726
- exports.MarketplaceInfo = function (_ref24) {
727
- var marketplaceParams = _ref24.marketplaceParams;
728
- var _ref25 = marketplaceParams || {},
729
- tenantSlug = _ref25.tenantSlug,
730
- marketplaceSlug = _ref25.marketplaceSlug,
731
- marketplaceId = _ref25.marketplaceId,
732
- marketplaceHash = _ref25.marketplaceHash;
768
+ exports.MarketplaceInfo = function (_ref26) {
769
+ var marketplaceParams = _ref26.marketplaceParams;
770
+ var _ref27 = marketplaceParams || {},
771
+ tenantSlug = _ref27.tenantSlug,
772
+ marketplaceSlug = _ref27.marketplaceSlug,
773
+ marketplaceId = _ref27.marketplaceId,
774
+ marketplaceHash = _ref27.marketplaceHash;
733
775
  var marketplaceInfo;
734
776
  if (tenantSlug && marketplaceSlug) {
735
777
  marketplaceInfo = (this.availableMarketplaces[tenantSlug] || {})[marketplaceSlug];
@@ -753,21 +795,21 @@ exports.MarketplaceInfo = function (_ref24) {
753
795
  * @returns {Promise<string>} - The CSS of the marketplace
754
796
  */
755
797
  exports.MarketplaceCSS = /*#__PURE__*/function () {
756
- var _ref27 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(_ref26) {
798
+ var _ref29 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref28) {
757
799
  var marketplaceParams, marketplaceInfo, marketplaceHash;
758
- return _regeneratorRuntime.wrap(function _callee12$(_context12) {
759
- while (1) switch (_context12.prev = _context12.next) {
800
+ return _regeneratorRuntime.wrap(function _callee13$(_context13) {
801
+ while (1) switch (_context13.prev = _context13.next) {
760
802
  case 0:
761
- marketplaceParams = _ref26.marketplaceParams;
803
+ marketplaceParams = _ref28.marketplaceParams;
762
804
  marketplaceInfo = this.MarketplaceInfo({
763
805
  marketplaceParams: marketplaceParams
764
806
  });
765
807
  marketplaceHash = marketplaceInfo.marketplaceHash;
766
808
  if (this.cachedCSS[marketplaceHash]) {
767
- _context12.next = 7;
809
+ _context13.next = 7;
768
810
  break;
769
811
  }
770
- _context12.next = 6;
812
+ _context13.next = 6;
771
813
  return this.client.ContentObjectMetadata({
772
814
  versionHash: marketplaceHash,
773
815
  metadataSubtree: "public/asset_metadata/info/branding/custom_css",
@@ -775,17 +817,17 @@ exports.MarketplaceCSS = /*#__PURE__*/function () {
775
817
  noAuth: true
776
818
  });
777
819
  case 6:
778
- this.cachedCSS[marketplaceHash] = _context12.sent;
820
+ this.cachedCSS[marketplaceHash] = _context13.sent;
779
821
  case 7:
780
- return _context12.abrupt("return", this.cachedCSS[marketplaceHash] || "");
822
+ return _context13.abrupt("return", this.cachedCSS[marketplaceHash] || "");
781
823
  case 8:
782
824
  case "end":
783
- return _context12.stop();
825
+ return _context13.stop();
784
826
  }
785
- }, _callee12, this);
827
+ }, _callee13, this);
786
828
  }));
787
- return function (_x5) {
788
- return _ref27.apply(this, arguments);
829
+ return function (_x6) {
830
+ return _ref29.apply(this, arguments);
789
831
  };
790
832
  }();
791
833
 
@@ -799,29 +841,29 @@ exports.MarketplaceCSS = /*#__PURE__*/function () {
799
841
  *
800
842
  * @returns {Promise<Object>} - Info about available marketplaces
801
843
  */
802
- exports.AvailableMarketplaces = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
803
- var _ref29,
844
+ exports.AvailableMarketplaces = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
845
+ var _ref31,
804
846
  organizeById,
805
- _ref29$forceReload,
847
+ _ref31$forceReload,
806
848
  forceReload,
807
- _args13 = arguments;
808
- return _regeneratorRuntime.wrap(function _callee13$(_context13) {
809
- while (1) switch (_context13.prev = _context13.next) {
849
+ _args14 = arguments;
850
+ return _regeneratorRuntime.wrap(function _callee14$(_context14) {
851
+ while (1) switch (_context14.prev = _context14.next) {
810
852
  case 0:
811
- _ref29 = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {}, organizeById = _ref29.organizeById, _ref29$forceReload = _ref29.forceReload, forceReload = _ref29$forceReload === void 0 ? false : _ref29$forceReload;
853
+ _ref31 = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {}, organizeById = _ref31.organizeById, _ref31$forceReload = _ref31.forceReload, forceReload = _ref31$forceReload === void 0 ? false : _ref31$forceReload;
812
854
  if (!forceReload) {
813
- _context13.next = 4;
855
+ _context14.next = 4;
814
856
  break;
815
857
  }
816
- _context13.next = 4;
858
+ _context14.next = 4;
817
859
  return this.LoadAvailableMarketplaces(true);
818
860
  case 4:
819
- return _context13.abrupt("return", _objectSpread({}, organizeById ? this.availableMarketplacesById : this.availableMarketplaces));
861
+ return _context14.abrupt("return", _objectSpread({}, organizeById ? this.availableMarketplacesById : this.availableMarketplaces));
820
862
  case 5:
821
863
  case "end":
822
- return _context13.stop();
864
+ return _context14.stop();
823
865
  }
824
- }, _callee13, this);
866
+ }, _callee14, this);
825
867
  }));
826
868
 
827
869
  /**
@@ -836,21 +878,21 @@ exports.AvailableMarketplaces = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_re
836
878
  * @returns {Promise<Object>} - The full information for the marketplace
837
879
  */
838
880
  exports.Marketplace = /*#__PURE__*/function () {
839
- var _ref31 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref30) {
881
+ var _ref33 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(_ref32) {
840
882
  var marketplaceParams;
841
- return _regeneratorRuntime.wrap(function _callee14$(_context14) {
842
- while (1) switch (_context14.prev = _context14.next) {
883
+ return _regeneratorRuntime.wrap(function _callee15$(_context15) {
884
+ while (1) switch (_context15.prev = _context15.next) {
843
885
  case 0:
844
- marketplaceParams = _ref30.marketplaceParams;
845
- return _context14.abrupt("return", this.LoadMarketplace(marketplaceParams));
886
+ marketplaceParams = _ref32.marketplaceParams;
887
+ return _context15.abrupt("return", this.LoadMarketplace(marketplaceParams));
846
888
  case 2:
847
889
  case "end":
848
- return _context14.stop();
890
+ return _context15.stop();
849
891
  }
850
- }, _callee14, this);
892
+ }, _callee15, this);
851
893
  }));
852
- return function (_x6) {
853
- return _ref31.apply(this, arguments);
894
+ return function (_x7) {
895
+ return _ref33.apply(this, arguments);
854
896
  };
855
897
  }();
856
898
 
@@ -866,27 +908,27 @@ exports.Marketplace = /*#__PURE__*/function () {
866
908
  * @returns {Promise<Object>} - Information about the specified contract
867
909
  */
868
910
  exports.NFTContractStats = /*#__PURE__*/function () {
869
- var _ref33 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(_ref32) {
911
+ var _ref35 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(_ref34) {
870
912
  var contractAddress;
871
- return _regeneratorRuntime.wrap(function _callee15$(_context15) {
872
- while (1) switch (_context15.prev = _context15.next) {
913
+ return _regeneratorRuntime.wrap(function _callee16$(_context16) {
914
+ while (1) switch (_context16.prev = _context16.next) {
873
915
  case 0:
874
- contractAddress = _ref32.contractAddress;
875
- _context15.next = 3;
916
+ contractAddress = _ref34.contractAddress;
917
+ _context16.next = 3;
876
918
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
877
919
  path: UrlJoin("as", "nft", "info", contractAddress),
878
920
  method: "GET"
879
921
  }));
880
922
  case 3:
881
- return _context15.abrupt("return", _context15.sent);
923
+ return _context16.abrupt("return", _context16.sent);
882
924
  case 4:
883
925
  case "end":
884
- return _context15.stop();
926
+ return _context16.stop();
885
927
  }
886
- }, _callee15, this);
928
+ }, _callee16, this);
887
929
  }));
888
- return function (_x7) {
889
- return _ref33.apply(this, arguments);
930
+ return function (_x8) {
931
+ return _ref35.apply(this, arguments);
890
932
  };
891
933
  }();
892
934
 
@@ -899,77 +941,77 @@ exports.NFTContractStats = /*#__PURE__*/function () {
899
941
  * @param {string} tokenId - The token ID of the NFT
900
942
  */
901
943
  exports.NFT = /*#__PURE__*/function () {
902
- var _ref35 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(_ref34) {
944
+ var _ref37 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(_ref36) {
903
945
  var tokenId, contractAddress, nft, assetMetadata, localizedMetadata;
904
- return _regeneratorRuntime.wrap(function _callee16$(_context16) {
905
- while (1) switch (_context16.prev = _context16.next) {
946
+ return _regeneratorRuntime.wrap(function _callee17$(_context17) {
947
+ while (1) switch (_context17.prev = _context17.next) {
906
948
  case 0:
907
- tokenId = _ref34.tokenId, contractAddress = _ref34.contractAddress;
908
- _context16.t0 = FormatNFTDetails;
909
- _context16.next = 4;
949
+ tokenId = _ref36.tokenId, contractAddress = _ref36.contractAddress;
950
+ _context17.t0 = FormatNFTDetails;
951
+ _context17.next = 4;
910
952
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
911
953
  path: UrlJoin("as", "nft", "info", contractAddress, tokenId),
912
954
  method: "GET"
913
955
  }));
914
956
  case 4:
915
- _context16.t1 = _context16.sent;
916
- nft = (0, _context16.t0)(_context16.t1);
917
- _context16.next = 8;
957
+ _context17.t1 = _context17.sent;
958
+ nft = (0, _context17.t0)(_context17.t1);
959
+ _context17.next = 8;
918
960
  return this.client.ContentObjectMetadata({
919
961
  versionHash: nft.details.VersionHash,
920
962
  metadataSubtree: "public/asset_metadata/nft",
921
963
  produceLinkUrls: true
922
964
  });
923
965
  case 8:
924
- _context16.t2 = _context16.sent;
925
- if (_context16.t2) {
926
- _context16.next = 11;
966
+ _context17.t2 = _context17.sent;
967
+ if (_context17.t2) {
968
+ _context17.next = 11;
927
969
  break;
928
970
  }
929
- _context16.t2 = {};
971
+ _context17.t2 = {};
930
972
  case 11:
931
- assetMetadata = _context16.t2;
973
+ assetMetadata = _context17.t2;
932
974
  nft.metadata = MergeWith({}, assetMetadata, nft.metadata, function (a, b) {
933
975
  return b === null || b === "" ? a : undefined;
934
976
  });
935
977
  if (!this.localization) {
936
- _context16.next = 21;
978
+ _context17.next = 21;
937
979
  break;
938
980
  }
939
- _context16.next = 16;
981
+ _context17.next = 16;
940
982
  return this.client.ContentObjectMetadata({
941
983
  versionHash: nft.details.VersionHash,
942
984
  metadataSubtree: UrlJoin("public", "asset_metadata", "localizations", this.localization, "nft"),
943
985
  produceLinkUrls: true
944
986
  });
945
987
  case 16:
946
- _context16.t3 = _context16.sent;
947
- if (_context16.t3) {
948
- _context16.next = 19;
988
+ _context17.t3 = _context17.sent;
989
+ if (_context17.t3) {
990
+ _context17.next = 19;
949
991
  break;
950
992
  }
951
- _context16.t3 = {};
993
+ _context17.t3 = {};
952
994
  case 19:
953
- localizedMetadata = _context16.t3;
995
+ localizedMetadata = _context17.t3;
954
996
  nft.metadata = MergeWith({}, nft.metadata, localizedMetadata, function (a, b) {
955
997
  return b === null || b === "" ? a : undefined;
956
998
  });
957
999
  case 21:
958
- _context16.next = 23;
1000
+ _context17.next = 23;
959
1001
  return this.TenantConfiguration({
960
1002
  contractAddress: contractAddress
961
1003
  });
962
1004
  case 23:
963
- nft.config = _context16.sent;
964
- return _context16.abrupt("return", FormatNFTMetadata(this, nft));
1005
+ nft.config = _context17.sent;
1006
+ return _context17.abrupt("return", FormatNFTMetadata(this, nft));
965
1007
  case 25:
966
1008
  case "end":
967
- return _context16.stop();
1009
+ return _context17.stop();
968
1010
  }
969
- }, _callee16, this);
1011
+ }, _callee17, this);
970
1012
  }));
971
- return function (_x8) {
972
- return _ref35.apply(this, arguments);
1013
+ return function (_x9) {
1014
+ return _ref37.apply(this, arguments);
973
1015
  };
974
1016
  }();
975
1017
 
@@ -985,19 +1027,19 @@ exports.NFT = /*#__PURE__*/function () {
985
1027
  * @param {string} targetAddress - The address to which to transfer the NFT
986
1028
  */
987
1029
  exports.TransferNFT = /*#__PURE__*/function () {
988
- var _ref37 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(_ref36) {
1030
+ var _ref39 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(_ref38) {
989
1031
  var contractAddress, tokenId, targetAddress;
990
- return _regeneratorRuntime.wrap(function _callee17$(_context17) {
991
- while (1) switch (_context17.prev = _context17.next) {
1032
+ return _regeneratorRuntime.wrap(function _callee18$(_context18) {
1033
+ while (1) switch (_context18.prev = _context18.next) {
992
1034
  case 0:
993
- contractAddress = _ref36.contractAddress, tokenId = _ref36.tokenId, targetAddress = _ref36.targetAddress;
1035
+ contractAddress = _ref38.contractAddress, tokenId = _ref38.tokenId, targetAddress = _ref38.targetAddress;
994
1036
  if (!(!targetAddress || !Utils.ValidAddress(targetAddress))) {
995
- _context17.next = 3;
1037
+ _context18.next = 3;
996
1038
  break;
997
1039
  }
998
1040
  throw Error("Eluvio Wallet Client: Invalid or missing target address in UserTransferNFT");
999
1041
  case 3:
1000
- _context17.next = 5;
1042
+ _context18.next = 5;
1001
1043
  return this.client.authClient.MakeAuthServiceRequest({
1002
1044
  path: UrlJoin("as", "wlt", "mkt", "xfer"),
1003
1045
  method: "POST",
@@ -1011,15 +1053,15 @@ exports.TransferNFT = /*#__PURE__*/function () {
1011
1053
  }
1012
1054
  });
1013
1055
  case 5:
1014
- return _context17.abrupt("return", _context17.sent);
1056
+ return _context18.abrupt("return", _context18.sent);
1015
1057
  case 6:
1016
1058
  case "end":
1017
- return _context17.stop();
1059
+ return _context18.stop();
1018
1060
  }
1019
- }, _callee17, this);
1061
+ }, _callee18, this);
1020
1062
  }));
1021
- return function (_x9) {
1022
- return _ref37.apply(this, arguments);
1063
+ return function (_x10) {
1064
+ return _ref39.apply(this, arguments);
1023
1065
  };
1024
1066
  }();
1025
1067
 
@@ -1035,43 +1077,43 @@ exports.TransferNFT = /*#__PURE__*/function () {
1035
1077
  * @returns {Promise<Object>} - The status of the listing
1036
1078
  */
1037
1079
  exports.ListingStatus = /*#__PURE__*/function () {
1038
- var _ref39 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(_ref38) {
1080
+ var _ref41 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(_ref40) {
1039
1081
  var listingId;
1040
- return _regeneratorRuntime.wrap(function _callee18$(_context18) {
1041
- while (1) switch (_context18.prev = _context18.next) {
1082
+ return _regeneratorRuntime.wrap(function _callee19$(_context19) {
1083
+ while (1) switch (_context19.prev = _context19.next) {
1042
1084
  case 0:
1043
- listingId = _ref38.listingId;
1044
- _context18.prev = 1;
1045
- _context18.t0 = Utils;
1046
- _context18.next = 5;
1085
+ listingId = _ref40.listingId;
1086
+ _context19.prev = 1;
1087
+ _context19.t0 = Utils;
1088
+ _context19.next = 5;
1047
1089
  return this.client.authClient.MakeAuthServiceRequest({
1048
1090
  path: UrlJoin("as", "mkt", "status", listingId),
1049
1091
  method: "GET"
1050
1092
  });
1051
1093
  case 5:
1052
- _context18.t1 = _context18.sent;
1053
- _context18.next = 8;
1054
- return _context18.t0.ResponseToJson.call(_context18.t0, _context18.t1);
1094
+ _context19.t1 = _context19.sent;
1095
+ _context19.next = 8;
1096
+ return _context19.t0.ResponseToJson.call(_context19.t0, _context19.t1);
1055
1097
  case 8:
1056
- return _context18.abrupt("return", _context18.sent);
1098
+ return _context19.abrupt("return", _context19.sent);
1057
1099
  case 11:
1058
- _context18.prev = 11;
1059
- _context18.t2 = _context18["catch"](1);
1060
- if (!(_context18.t2.status === 404)) {
1061
- _context18.next = 15;
1100
+ _context19.prev = 11;
1101
+ _context19.t2 = _context19["catch"](1);
1102
+ if (!(_context19.t2.status === 404)) {
1103
+ _context19.next = 15;
1062
1104
  break;
1063
1105
  }
1064
- return _context18.abrupt("return");
1106
+ return _context19.abrupt("return");
1065
1107
  case 15:
1066
- throw _context18.t2;
1108
+ throw _context19.t2;
1067
1109
  case 16:
1068
1110
  case "end":
1069
- return _context18.stop();
1111
+ return _context19.stop();
1070
1112
  }
1071
- }, _callee18, this, [[1, 11]]);
1113
+ }, _callee19, this, [[1, 11]]);
1072
1114
  }));
1073
- return function (_x10) {
1074
- return _ref39.apply(this, arguments);
1115
+ return function (_x11) {
1116
+ return _ref41.apply(this, arguments);
1075
1117
  };
1076
1118
  }();
1077
1119
 
@@ -1087,35 +1129,35 @@ exports.ListingStatus = /*#__PURE__*/function () {
1087
1129
  * @returns {Promise<Object>} - The listing
1088
1130
  */
1089
1131
  exports.Listing = /*#__PURE__*/function () {
1090
- var _ref41 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(_ref40) {
1132
+ var _ref43 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(_ref42) {
1091
1133
  var listingId;
1092
- return _regeneratorRuntime.wrap(function _callee19$(_context19) {
1093
- while (1) switch (_context19.prev = _context19.next) {
1134
+ return _regeneratorRuntime.wrap(function _callee20$(_context20) {
1135
+ while (1) switch (_context20.prev = _context20.next) {
1094
1136
  case 0:
1095
- listingId = _ref40.listingId;
1096
- _context19.t0 = FormatNFT;
1097
- _context19.t1 = this;
1098
- _context19.t2 = Utils;
1099
- _context19.next = 6;
1137
+ listingId = _ref42.listingId;
1138
+ _context20.t0 = FormatNFT;
1139
+ _context20.t1 = this;
1140
+ _context20.t2 = Utils;
1141
+ _context20.next = 6;
1100
1142
  return this.client.authClient.MakeAuthServiceRequest({
1101
1143
  path: UrlJoin("as", "mkt", "l", listingId),
1102
1144
  method: "GET"
1103
1145
  });
1104
1146
  case 6:
1105
- _context19.t3 = _context19.sent;
1106
- _context19.next = 9;
1107
- return _context19.t2.ResponseToJson.call(_context19.t2, _context19.t3);
1147
+ _context20.t3 = _context20.sent;
1148
+ _context20.next = 9;
1149
+ return _context20.t2.ResponseToJson.call(_context20.t2, _context20.t3);
1108
1150
  case 9:
1109
- _context19.t4 = _context19.sent;
1110
- return _context19.abrupt("return", (0, _context19.t0)(_context19.t1, _context19.t4));
1151
+ _context20.t4 = _context20.sent;
1152
+ return _context20.abrupt("return", (0, _context20.t0)(_context20.t1, _context20.t4));
1111
1153
  case 11:
1112
1154
  case "end":
1113
- return _context19.stop();
1155
+ return _context20.stop();
1114
1156
  }
1115
- }, _callee19, this);
1157
+ }, _callee20, this);
1116
1158
  }));
1117
- return function (_x11) {
1118
- return _ref41.apply(this, arguments);
1159
+ return function (_x12) {
1160
+ return _ref43.apply(this, arguments);
1119
1161
  };
1120
1162
  }();
1121
1163
 
@@ -1152,19 +1194,19 @@ exports.Listing = /*#__PURE__*/function () {
1152
1194
  *
1153
1195
  * @returns {Promise<Object>} - Results of the query and pagination info
1154
1196
  */
1155
- exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20() {
1156
- var _args20 = arguments;
1157
- return _regeneratorRuntime.wrap(function _callee20$(_context20) {
1158
- while (1) switch (_context20.prev = _context20.next) {
1197
+ exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21() {
1198
+ var _args21 = arguments;
1199
+ return _regeneratorRuntime.wrap(function _callee21$(_context21) {
1200
+ while (1) switch (_context21.prev = _context21.next) {
1159
1201
  case 0:
1160
- return _context20.abrupt("return", this.FilteredQuery(_objectSpread({
1202
+ return _context21.abrupt("return", this.FilteredQuery(_objectSpread({
1161
1203
  mode: "listings"
1162
- }, _args20[0] || {})));
1204
+ }, _args21[0] || {})));
1163
1205
  case 1:
1164
1206
  case "end":
1165
- return _context20.stop();
1207
+ return _context21.stop();
1166
1208
  }
1167
- }, _callee20, this);
1209
+ }, _callee21, this);
1168
1210
  }));
1169
1211
 
1170
1212
  /**
@@ -1199,19 +1241,19 @@ exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRunt
1199
1241
  *
1200
1242
  * @returns {Promise<Object>} - Statistics about listings. All prices in USD.
1201
1243
  */
1202
- exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21() {
1203
- var _args21 = arguments;
1204
- return _regeneratorRuntime.wrap(function _callee21$(_context21) {
1205
- while (1) switch (_context21.prev = _context21.next) {
1244
+ exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22() {
1245
+ var _args22 = arguments;
1246
+ return _regeneratorRuntime.wrap(function _callee22$(_context22) {
1247
+ while (1) switch (_context22.prev = _context22.next) {
1206
1248
  case 0:
1207
- return _context21.abrupt("return", this.FilteredQuery(_objectSpread({
1249
+ return _context22.abrupt("return", this.FilteredQuery(_objectSpread({
1208
1250
  mode: "listing-stats"
1209
- }, _args21[0] || {})));
1251
+ }, _args22[0] || {})));
1210
1252
  case 1:
1211
1253
  case "end":
1212
- return _context21.stop();
1254
+ return _context22.stop();
1213
1255
  }
1214
- }, _callee21, this);
1256
+ }, _callee22, this);
1215
1257
  }));
1216
1258
 
1217
1259
  /**
@@ -1245,19 +1287,19 @@ exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
1245
1287
  *
1246
1288
  * @returns {Promise<Object>} - Results of the query and pagination info
1247
1289
  */
1248
- exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22() {
1249
- var _args22 = arguments;
1250
- return _regeneratorRuntime.wrap(function _callee22$(_context22) {
1251
- while (1) switch (_context22.prev = _context22.next) {
1290
+ exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23() {
1291
+ var _args23 = arguments;
1292
+ return _regeneratorRuntime.wrap(function _callee23$(_context23) {
1293
+ while (1) switch (_context23.prev = _context23.next) {
1252
1294
  case 0:
1253
- return _context22.abrupt("return", this.FilteredQuery(_objectSpread({
1295
+ return _context23.abrupt("return", this.FilteredQuery(_objectSpread({
1254
1296
  mode: "sales"
1255
- }, _args22[0] || {})));
1297
+ }, _args23[0] || {})));
1256
1298
  case 1:
1257
1299
  case "end":
1258
- return _context22.stop();
1300
+ return _context23.stop();
1259
1301
  }
1260
- }, _callee22, this);
1302
+ }, _callee23, this);
1261
1303
  }));
1262
1304
 
1263
1305
  /**
@@ -1291,19 +1333,19 @@ exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
1291
1333
  *
1292
1334
  * @returns {Promise<Object>} - Results of the query and pagination info
1293
1335
  */
1294
- exports.Transfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23() {
1295
- var _args23 = arguments;
1296
- return _regeneratorRuntime.wrap(function _callee23$(_context23) {
1297
- while (1) switch (_context23.prev = _context23.next) {
1336
+ exports.Transfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24() {
1337
+ var _args24 = arguments;
1338
+ return _regeneratorRuntime.wrap(function _callee24$(_context24) {
1339
+ while (1) switch (_context24.prev = _context24.next) {
1298
1340
  case 0:
1299
- return _context23.abrupt("return", this.FilteredQuery(_objectSpread({
1341
+ return _context24.abrupt("return", this.FilteredQuery(_objectSpread({
1300
1342
  mode: "transfers"
1301
- }, _args23[0] || {})));
1343
+ }, _args24[0] || {})));
1302
1344
  case 1:
1303
1345
  case "end":
1304
- return _context23.stop();
1346
+ return _context24.stop();
1305
1347
  }
1306
- }, _callee23, this);
1348
+ }, _callee24, this);
1307
1349
  }));
1308
1350
 
1309
1351
  /**
@@ -1337,19 +1379,19 @@ exports.Transfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
1337
1379
  *
1338
1380
  * @returns {Promise<Object>} - Statistics about sales. All prices in USD.
1339
1381
  */
1340
- exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24() {
1341
- var _args24 = arguments;
1342
- return _regeneratorRuntime.wrap(function _callee24$(_context24) {
1343
- while (1) switch (_context24.prev = _context24.next) {
1382
+ exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25() {
1383
+ var _args25 = arguments;
1384
+ return _regeneratorRuntime.wrap(function _callee25$(_context25) {
1385
+ while (1) switch (_context25.prev = _context25.next) {
1344
1386
  case 0:
1345
- return _context24.abrupt("return", this.FilteredQuery(_objectSpread({
1387
+ return _context25.abrupt("return", this.FilteredQuery(_objectSpread({
1346
1388
  mode: "sales-stats"
1347
- }, _args24[0] || {})));
1389
+ }, _args25[0] || {})));
1348
1390
  case 1:
1349
1391
  case "end":
1350
- return _context24.stop();
1392
+ return _context25.stop();
1351
1393
  }
1352
- }, _callee24, this);
1394
+ }, _callee25, this);
1353
1395
  }));
1354
1396
 
1355
1397
  /**
@@ -1365,68 +1407,68 @@ exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRu
1365
1407
  * @returns {Promise<Array|Object>} - Returns a list of leaderboard rankings or, if userAddress is specified, ranking for that user.
1366
1408
  */
1367
1409
  exports.Leaderboard = /*#__PURE__*/function () {
1368
- var _ref48 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(_ref47) {
1410
+ var _ref50 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(_ref49) {
1369
1411
  var userAddress,
1370
1412
  marketplaceParams,
1371
1413
  params,
1372
- _args25 = arguments;
1373
- return _regeneratorRuntime.wrap(function _callee25$(_context25) {
1374
- while (1) switch (_context25.prev = _context25.next) {
1414
+ _args26 = arguments;
1415
+ return _regeneratorRuntime.wrap(function _callee26$(_context26) {
1416
+ while (1) switch (_context26.prev = _context26.next) {
1375
1417
  case 0:
1376
- userAddress = _ref47.userAddress, marketplaceParams = _ref47.marketplaceParams;
1418
+ userAddress = _ref49.userAddress, marketplaceParams = _ref49.marketplaceParams;
1377
1419
  if (!userAddress) {
1378
- _context25.next = 20;
1420
+ _context26.next = 20;
1379
1421
  break;
1380
1422
  }
1381
1423
  params = {
1382
1424
  addr: Utils.FormatAddress(userAddress)
1383
1425
  };
1384
1426
  if (!marketplaceParams) {
1385
- _context25.next = 10;
1427
+ _context26.next = 10;
1386
1428
  break;
1387
1429
  }
1388
- _context25.t0 = "tenant:eq:";
1389
- _context25.next = 7;
1430
+ _context26.t0 = "tenant:eq:";
1431
+ _context26.next = 7;
1390
1432
  return this.MarketplaceInfo({
1391
1433
  marketplaceParams: marketplaceParams
1392
1434
  });
1393
1435
  case 7:
1394
- _context25.t1 = _context25.sent.tenantId;
1395
- _context25.t2 = _context25.t0.concat.call(_context25.t0, _context25.t1);
1396
- params.filter = [_context25.t2];
1436
+ _context26.t1 = _context26.sent.tenantId;
1437
+ _context26.t2 = _context26.t0.concat.call(_context26.t0, _context26.t1);
1438
+ params.filter = [_context26.t2];
1397
1439
  case 10:
1398
- _context25.t4 = Utils;
1399
- _context25.next = 13;
1440
+ _context26.t4 = Utils;
1441
+ _context26.next = 13;
1400
1442
  return this.client.authClient.MakeAuthServiceRequest({
1401
1443
  path: UrlJoin("as", "wlt", "ranks"),
1402
1444
  method: "GET",
1403
1445
  queryParams: params
1404
1446
  });
1405
1447
  case 13:
1406
- _context25.t5 = _context25.sent;
1407
- _context25.next = 16;
1408
- return _context25.t4.ResponseToJson.call(_context25.t4, _context25.t5);
1448
+ _context26.t5 = _context26.sent;
1449
+ _context26.next = 16;
1450
+ return _context26.t4.ResponseToJson.call(_context26.t4, _context26.t5);
1409
1451
  case 16:
1410
- _context25.t3 = _context25.sent;
1411
- if (_context25.t3) {
1412
- _context25.next = 19;
1452
+ _context26.t3 = _context26.sent;
1453
+ if (_context26.t3) {
1454
+ _context26.next = 19;
1413
1455
  break;
1414
1456
  }
1415
- _context25.t3 = [];
1457
+ _context26.t3 = [];
1416
1458
  case 19:
1417
- return _context25.abrupt("return", _context25.t3[0]);
1459
+ return _context26.abrupt("return", _context26.t3[0]);
1418
1460
  case 20:
1419
- return _context25.abrupt("return", this.FilteredQuery(_objectSpread({
1461
+ return _context26.abrupt("return", this.FilteredQuery(_objectSpread({
1420
1462
  mode: "leaderboard"
1421
- }, _args25[0] || {})));
1463
+ }, _args26[0] || {})));
1422
1464
  case 21:
1423
1465
  case "end":
1424
- return _context25.stop();
1466
+ return _context26.stop();
1425
1467
  }
1426
- }, _callee25, this);
1468
+ }, _callee26, this);
1427
1469
  }));
1428
- return function (_x12) {
1429
- return _ref48.apply(this, arguments);
1470
+ return function (_x13) {
1471
+ return _ref50.apply(this, arguments);
1430
1472
  };
1431
1473
  }();
1432
1474
 
@@ -1445,19 +1487,19 @@ exports.Leaderboard = /*#__PURE__*/function () {
1445
1487
  * @returns {Promise<string>} - The listing ID of the created listing
1446
1488
  */
1447
1489
  exports.CreateListing = /*#__PURE__*/function () {
1448
- var _ref50 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(_ref49) {
1490
+ var _ref52 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(_ref51) {
1449
1491
  var contractAddress, tokenId, price, listingId;
1450
- return _regeneratorRuntime.wrap(function _callee26$(_context26) {
1451
- while (1) switch (_context26.prev = _context26.next) {
1492
+ return _regeneratorRuntime.wrap(function _callee27$(_context27) {
1493
+ while (1) switch (_context27.prev = _context27.next) {
1452
1494
  case 0:
1453
- contractAddress = _ref49.contractAddress, tokenId = _ref49.tokenId, price = _ref49.price, listingId = _ref49.listingId;
1495
+ contractAddress = _ref51.contractAddress, tokenId = _ref51.tokenId, price = _ref51.price, listingId = _ref51.listingId;
1454
1496
  contractAddress = Utils.FormatAddress(contractAddress);
1455
1497
  if (!listingId) {
1456
- _context26.next = 12;
1498
+ _context27.next = 12;
1457
1499
  break;
1458
1500
  }
1459
- _context26.t0 = Utils;
1460
- _context26.next = 6;
1501
+ _context27.t0 = Utils;
1502
+ _context27.next = 6;
1461
1503
  return this.client.authClient.MakeAuthServiceRequest({
1462
1504
  path: UrlJoin("as", "wlt", "mkt"),
1463
1505
  method: "PUT",
@@ -1470,14 +1512,14 @@ exports.CreateListing = /*#__PURE__*/function () {
1470
1512
  }
1471
1513
  });
1472
1514
  case 6:
1473
- _context26.t1 = _context26.sent;
1474
- _context26.next = 9;
1475
- return _context26.t0.ResponseToFormat.call(_context26.t0, "text", _context26.t1);
1515
+ _context27.t1 = _context27.sent;
1516
+ _context27.next = 9;
1517
+ return _context27.t0.ResponseToFormat.call(_context27.t0, "text", _context27.t1);
1476
1518
  case 9:
1477
- return _context26.abrupt("return", _context26.sent);
1519
+ return _context27.abrupt("return", _context27.sent);
1478
1520
  case 12:
1479
- _context26.t2 = Utils;
1480
- _context26.next = 15;
1521
+ _context27.t2 = Utils;
1522
+ _context27.next = 15;
1481
1523
  return this.client.authClient.MakeAuthServiceRequest({
1482
1524
  path: UrlJoin("as", "wlt", "mkt"),
1483
1525
  method: "POST",
@@ -1491,19 +1533,19 @@ exports.CreateListing = /*#__PURE__*/function () {
1491
1533
  }
1492
1534
  });
1493
1535
  case 15:
1494
- _context26.t3 = _context26.sent;
1495
- _context26.next = 18;
1496
- return _context26.t2.ResponseToJson.call(_context26.t2, _context26.t3);
1536
+ _context27.t3 = _context27.sent;
1537
+ _context27.next = 18;
1538
+ return _context27.t2.ResponseToJson.call(_context27.t2, _context27.t3);
1497
1539
  case 18:
1498
- return _context26.abrupt("return", _context26.sent);
1540
+ return _context27.abrupt("return", _context27.sent);
1499
1541
  case 19:
1500
1542
  case "end":
1501
- return _context26.stop();
1543
+ return _context27.stop();
1502
1544
  }
1503
- }, _callee26, this);
1545
+ }, _callee27, this);
1504
1546
  }));
1505
- return function (_x13) {
1506
- return _ref50.apply(this, arguments);
1547
+ return function (_x14) {
1548
+ return _ref52.apply(this, arguments);
1507
1549
  };
1508
1550
  }();
1509
1551
 
@@ -1517,13 +1559,13 @@ exports.CreateListing = /*#__PURE__*/function () {
1517
1559
  * @param {string} listingId - The ID of the listing to remove
1518
1560
  */
1519
1561
  exports.RemoveListing = /*#__PURE__*/function () {
1520
- var _ref52 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(_ref51) {
1562
+ var _ref54 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref53) {
1521
1563
  var listingId;
1522
- return _regeneratorRuntime.wrap(function _callee27$(_context27) {
1523
- while (1) switch (_context27.prev = _context27.next) {
1564
+ return _regeneratorRuntime.wrap(function _callee28$(_context28) {
1565
+ while (1) switch (_context28.prev = _context28.next) {
1524
1566
  case 0:
1525
- listingId = _ref51.listingId;
1526
- _context27.next = 3;
1567
+ listingId = _ref53.listingId;
1568
+ _context28.next = 3;
1527
1569
  return this.client.authClient.MakeAuthServiceRequest({
1528
1570
  path: UrlJoin("as", "wlt", "mkt", listingId),
1529
1571
  method: "DELETE",
@@ -1533,12 +1575,12 @@ exports.RemoveListing = /*#__PURE__*/function () {
1533
1575
  });
1534
1576
  case 3:
1535
1577
  case "end":
1536
- return _context27.stop();
1578
+ return _context28.stop();
1537
1579
  }
1538
- }, _callee27, this);
1580
+ }, _callee28, this);
1539
1581
  }));
1540
- return function (_x14) {
1541
- return _ref52.apply(this, arguments);
1582
+ return function (_x15) {
1583
+ return _ref54.apply(this, arguments);
1542
1584
  };
1543
1585
  }();
1544
1586
 
@@ -1554,25 +1596,25 @@ exports.RemoveListing = /*#__PURE__*/function () {
1554
1596
  * @returns {Promise<Array<String>>} - A list of item names
1555
1597
  */
1556
1598
  exports.SalesNames = /*#__PURE__*/function () {
1557
- var _ref54 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref53) {
1599
+ var _ref56 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref55) {
1558
1600
  var marketplaceParams, tenantId;
1559
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
1560
- while (1) switch (_context28.prev = _context28.next) {
1601
+ return _regeneratorRuntime.wrap(function _callee29$(_context29) {
1602
+ while (1) switch (_context29.prev = _context29.next) {
1561
1603
  case 0:
1562
- marketplaceParams = _ref53.marketplaceParams;
1604
+ marketplaceParams = _ref55.marketplaceParams;
1563
1605
  if (!marketplaceParams) {
1564
- _context28.next = 5;
1606
+ _context29.next = 5;
1565
1607
  break;
1566
1608
  }
1567
- _context28.next = 4;
1609
+ _context29.next = 4;
1568
1610
  return this.MarketplaceInfo({
1569
1611
  marketplaceParams: marketplaceParams
1570
1612
  });
1571
1613
  case 4:
1572
- tenantId = _context28.sent.tenantId;
1614
+ tenantId = _context29.sent.tenantId;
1573
1615
  case 5:
1574
- _context28.t0 = Utils;
1575
- _context28.next = 8;
1616
+ _context29.t0 = Utils;
1617
+ _context29.next = 8;
1576
1618
  return this.client.authClient.MakeAuthServiceRequest({
1577
1619
  path: UrlJoin("as", "mkt", "names", "hst"),
1578
1620
  method: "GET",
@@ -1581,19 +1623,19 @@ exports.SalesNames = /*#__PURE__*/function () {
1581
1623
  } : {}
1582
1624
  });
1583
1625
  case 8:
1584
- _context28.t1 = _context28.sent;
1585
- _context28.next = 11;
1586
- return _context28.t0.ResponseToJson.call(_context28.t0, _context28.t1);
1626
+ _context29.t1 = _context29.sent;
1627
+ _context29.next = 11;
1628
+ return _context29.t0.ResponseToJson.call(_context29.t0, _context29.t1);
1587
1629
  case 11:
1588
- return _context28.abrupt("return", _context28.sent);
1630
+ return _context29.abrupt("return", _context29.sent);
1589
1631
  case 12:
1590
1632
  case "end":
1591
- return _context28.stop();
1633
+ return _context29.stop();
1592
1634
  }
1593
- }, _callee28, this);
1635
+ }, _callee29, this);
1594
1636
  }));
1595
- return function (_x15) {
1596
- return _ref54.apply(this, arguments);
1637
+ return function (_x16) {
1638
+ return _ref56.apply(this, arguments);
1597
1639
  };
1598
1640
  }();
1599
1641
 
@@ -1609,25 +1651,25 @@ exports.SalesNames = /*#__PURE__*/function () {
1609
1651
  * @returns {Promise<Array<String>>} - A list of item names
1610
1652
  */
1611
1653
  exports.ListingNames = /*#__PURE__*/function () {
1612
- var _ref56 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref55) {
1654
+ var _ref58 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(_ref57) {
1613
1655
  var marketplaceParams, tenantId;
1614
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
1615
- while (1) switch (_context29.prev = _context29.next) {
1656
+ return _regeneratorRuntime.wrap(function _callee30$(_context30) {
1657
+ while (1) switch (_context30.prev = _context30.next) {
1616
1658
  case 0:
1617
- marketplaceParams = _ref55.marketplaceParams;
1659
+ marketplaceParams = _ref57.marketplaceParams;
1618
1660
  if (!marketplaceParams) {
1619
- _context29.next = 5;
1661
+ _context30.next = 5;
1620
1662
  break;
1621
1663
  }
1622
- _context29.next = 4;
1664
+ _context30.next = 4;
1623
1665
  return this.MarketplaceInfo({
1624
1666
  marketplaceParams: marketplaceParams
1625
1667
  });
1626
1668
  case 4:
1627
- tenantId = _context29.sent.tenantId;
1669
+ tenantId = _context30.sent.tenantId;
1628
1670
  case 5:
1629
- _context29.t0 = Utils;
1630
- _context29.next = 8;
1671
+ _context30.t0 = Utils;
1672
+ _context30.next = 8;
1631
1673
  return this.client.authClient.MakeAuthServiceRequest({
1632
1674
  path: UrlJoin("as", "mkt", "names"),
1633
1675
  method: "GET",
@@ -1636,19 +1678,19 @@ exports.ListingNames = /*#__PURE__*/function () {
1636
1678
  } : {}
1637
1679
  });
1638
1680
  case 8:
1639
- _context29.t1 = _context29.sent;
1640
- _context29.next = 11;
1641
- return _context29.t0.ResponseToJson.call(_context29.t0, _context29.t1);
1681
+ _context30.t1 = _context30.sent;
1682
+ _context30.next = 11;
1683
+ return _context30.t0.ResponseToJson.call(_context30.t0, _context30.t1);
1642
1684
  case 11:
1643
- return _context29.abrupt("return", _context29.sent);
1685
+ return _context30.abrupt("return", _context30.sent);
1644
1686
  case 12:
1645
1687
  case "end":
1646
- return _context29.stop();
1688
+ return _context30.stop();
1647
1689
  }
1648
- }, _callee29, this);
1690
+ }, _callee30, this);
1649
1691
  }));
1650
- return function (_x16) {
1651
- return _ref56.apply(this, arguments);
1692
+ return function (_x17) {
1693
+ return _ref58.apply(this, arguments);
1652
1694
  };
1653
1695
  }();
1654
1696
 
@@ -1662,14 +1704,14 @@ exports.ListingNames = /*#__PURE__*/function () {
1662
1704
  * @returns {Promise<Array<String>>} - A list of item editions
1663
1705
  */
1664
1706
  exports.ListingEditionNames = /*#__PURE__*/function () {
1665
- var _ref58 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(_ref57) {
1707
+ var _ref60 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(_ref59) {
1666
1708
  var displayName;
1667
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
1668
- while (1) switch (_context30.prev = _context30.next) {
1709
+ return _regeneratorRuntime.wrap(function _callee31$(_context31) {
1710
+ while (1) switch (_context31.prev = _context31.next) {
1669
1711
  case 0:
1670
- displayName = _ref57.displayName;
1671
- _context30.t0 = Utils;
1672
- _context30.next = 4;
1712
+ displayName = _ref59.displayName;
1713
+ _context31.t0 = Utils;
1714
+ _context31.next = 4;
1673
1715
  return this.client.authClient.MakeAuthServiceRequest({
1674
1716
  path: UrlJoin("as", "mkt", "editions"),
1675
1717
  queryParams: {
@@ -1678,19 +1720,19 @@ exports.ListingEditionNames = /*#__PURE__*/function () {
1678
1720
  method: "GET"
1679
1721
  });
1680
1722
  case 4:
1681
- _context30.t1 = _context30.sent;
1682
- _context30.next = 7;
1683
- return _context30.t0.ResponseToJson.call(_context30.t0, _context30.t1);
1723
+ _context31.t1 = _context31.sent;
1724
+ _context31.next = 7;
1725
+ return _context31.t0.ResponseToJson.call(_context31.t0, _context31.t1);
1684
1726
  case 7:
1685
- return _context30.abrupt("return", _context30.sent);
1727
+ return _context31.abrupt("return", _context31.sent);
1686
1728
  case 8:
1687
1729
  case "end":
1688
- return _context30.stop();
1730
+ return _context31.stop();
1689
1731
  }
1690
- }, _callee30, this);
1732
+ }, _callee31, this);
1691
1733
  }));
1692
- return function (_x17) {
1693
- return _ref58.apply(this, arguments);
1734
+ return function (_x18) {
1735
+ return _ref60.apply(this, arguments);
1694
1736
  };
1695
1737
  }();
1696
1738
 
@@ -1706,38 +1748,38 @@ exports.ListingEditionNames = /*#__PURE__*/function () {
1706
1748
  *
1707
1749
  * @returns {Promise<Array<String>>} - A list of valid attributes
1708
1750
  */
1709
- exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
1710
- var _ref60,
1751
+ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32() {
1752
+ var _ref62,
1711
1753
  marketplaceParams,
1712
1754
  displayName,
1713
1755
  filters,
1714
1756
  attributes,
1715
- _args31 = arguments;
1716
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
1717
- while (1) switch (_context31.prev = _context31.next) {
1757
+ _args32 = arguments;
1758
+ return _regeneratorRuntime.wrap(function _callee32$(_context32) {
1759
+ while (1) switch (_context32.prev = _context32.next) {
1718
1760
  case 0:
1719
- _ref60 = _args31.length > 0 && _args31[0] !== undefined ? _args31[0] : {}, marketplaceParams = _ref60.marketplaceParams, displayName = _ref60.displayName;
1761
+ _ref62 = _args32.length > 0 && _args32[0] !== undefined ? _args32[0] : {}, marketplaceParams = _ref62.marketplaceParams, displayName = _ref62.displayName;
1720
1762
  filters = [];
1721
1763
  if (!marketplaceParams) {
1722
- _context31.next = 10;
1764
+ _context32.next = 10;
1723
1765
  break;
1724
1766
  }
1725
- _context31.t0 = filters;
1726
- _context31.t1 = "tenant:eq:";
1727
- _context31.next = 7;
1767
+ _context32.t0 = filters;
1768
+ _context32.t1 = "tenant:eq:";
1769
+ _context32.next = 7;
1728
1770
  return this.MarketplaceInfo({
1729
1771
  marketplaceParams: marketplaceParams
1730
1772
  });
1731
1773
  case 7:
1732
- _context31.t2 = _context31.sent.tenantId;
1733
- _context31.t3 = _context31.t1.concat.call(_context31.t1, _context31.t2);
1734
- _context31.t0.push.call(_context31.t0, _context31.t3);
1774
+ _context32.t2 = _context32.sent.tenantId;
1775
+ _context32.t3 = _context32.t1.concat.call(_context32.t1, _context32.t2);
1776
+ _context32.t0.push.call(_context32.t0, _context32.t3);
1735
1777
  case 10:
1736
1778
  if (displayName) {
1737
1779
  filters.push("nft/display_name:eq:".concat(displayName));
1738
1780
  }
1739
- _context31.t4 = Utils;
1740
- _context31.next = 14;
1781
+ _context32.t4 = Utils;
1782
+ _context32.next = 14;
1741
1783
  return this.client.authClient.MakeAuthServiceRequest({
1742
1784
  path: UrlJoin("as", "mkt", "attributes"),
1743
1785
  method: "GET",
@@ -1746,27 +1788,27 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
1746
1788
  }
1747
1789
  });
1748
1790
  case 14:
1749
- _context31.t5 = _context31.sent;
1750
- _context31.next = 17;
1751
- return _context31.t4.ResponseToJson.call(_context31.t4, _context31.t5);
1791
+ _context32.t5 = _context32.sent;
1792
+ _context32.next = 17;
1793
+ return _context32.t4.ResponseToJson.call(_context32.t4, _context32.t5);
1752
1794
  case 17:
1753
- attributes = _context31.sent;
1754
- return _context31.abrupt("return", attributes.map(function (_ref61) {
1755
- var trait_type = _ref61.trait_type,
1756
- values = _ref61.values;
1795
+ attributes = _context32.sent;
1796
+ return _context32.abrupt("return", attributes.map(function (_ref63) {
1797
+ var trait_type = _ref63.trait_type,
1798
+ values = _ref63.values;
1757
1799
  return {
1758
1800
  name: trait_type,
1759
1801
  values: values
1760
1802
  };
1761
- }).filter(function (_ref62) {
1762
- var name = _ref62.name;
1803
+ }).filter(function (_ref64) {
1804
+ var name = _ref64.name;
1763
1805
  return !["Content Fabric Hash", "Total Minted Supply", "Creator"].includes(name);
1764
1806
  }));
1765
1807
  case 19:
1766
1808
  case "end":
1767
- return _context31.stop();
1809
+ return _context32.stop();
1768
1810
  }
1769
- }, _callee31, this);
1811
+ }, _callee32, this);
1770
1812
  }));
1771
1813
 
1772
1814
  /* PURCHASE / CLAIM */
@@ -1783,19 +1825,19 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
1783
1825
  * @param {string=} email - Email address of the user. If specified, this will bind the user to the tenant of the specified marketplace
1784
1826
  */
1785
1827
  exports.ClaimItem = /*#__PURE__*/function () {
1786
- var _ref64 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(_ref63) {
1828
+ var _ref66 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(_ref65) {
1787
1829
  var marketplaceParams, sku, email, marketplaceInfo;
1788
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
1789
- while (1) switch (_context32.prev = _context32.next) {
1830
+ return _regeneratorRuntime.wrap(function _callee33$(_context33) {
1831
+ while (1) switch (_context33.prev = _context33.next) {
1790
1832
  case 0:
1791
- marketplaceParams = _ref63.marketplaceParams, sku = _ref63.sku, email = _ref63.email;
1792
- _context32.next = 3;
1833
+ marketplaceParams = _ref65.marketplaceParams, sku = _ref65.sku, email = _ref65.email;
1834
+ _context33.next = 3;
1793
1835
  return this.MarketplaceInfo({
1794
1836
  marketplaceParams: marketplaceParams
1795
1837
  });
1796
1838
  case 3:
1797
- marketplaceInfo = _context32.sent;
1798
- _context32.next = 6;
1839
+ marketplaceInfo = _context33.sent;
1840
+ _context33.next = 6;
1799
1841
  return this.client.authClient.MakeAuthServiceRequest({
1800
1842
  method: "POST",
1801
1843
  path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
@@ -1811,12 +1853,117 @@ exports.ClaimItem = /*#__PURE__*/function () {
1811
1853
  });
1812
1854
  case 6:
1813
1855
  case "end":
1814
- return _context32.stop();
1856
+ return _context33.stop();
1815
1857
  }
1816
- }, _callee32, this);
1858
+ }, _callee33, this);
1817
1859
  }));
1818
- return function (_x18) {
1819
- return _ref64.apply(this, arguments);
1860
+ return function (_x19) {
1861
+ return _ref66.apply(this, arguments);
1862
+ };
1863
+ }();
1864
+
1865
+ /**
1866
+ * Redirect to the wallet app to purchase the specified item from the specified marketplace
1867
+ *
1868
+ * Use the <a href="#.PurchaseStatus">PurchaseStatus</a> method to check minting status after purchasing
1869
+ *
1870
+ * @methodGroup Purchase
1871
+ * @namedParams
1872
+ * @param {Object} marketplaceParams - Parameters of the marketplace
1873
+ * @param {string} sku - The SKU of the item to claim
1874
+ * @param {string=} confirmationId - Confirmation ID with which to reference this purchase. If not specified, a confirmation ID will be automatically generated. On success, the user will be returned to `successUrl` with the `confirmationId` as a URL parameter.
1875
+ * @param {string} successUrl - The URL to redirect back to upon successful purchase
1876
+ * @param {string} cancelUrl - The URL to redirect back to upon cancellation of purchase
1877
+ */
1878
+ exports.PurchaseItem = /*#__PURE__*/function () {
1879
+ var _ref68 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(_ref67) {
1880
+ var marketplaceParams, sku, confirmationId, successUrl, cancelUrl, marketplaceInfo;
1881
+ return _regeneratorRuntime.wrap(function _callee34$(_context34) {
1882
+ while (1) switch (_context34.prev = _context34.next) {
1883
+ case 0:
1884
+ marketplaceParams = _ref67.marketplaceParams, sku = _ref67.sku, confirmationId = _ref67.confirmationId, successUrl = _ref67.successUrl, cancelUrl = _ref67.cancelUrl;
1885
+ _context34.next = 3;
1886
+ return this.MarketplaceInfo({
1887
+ marketplaceParams: marketplaceParams
1888
+ });
1889
+ case 3:
1890
+ marketplaceInfo = _context34.sent;
1891
+ window.location.href = this.FlowURL({
1892
+ type: "action",
1893
+ flow: "purchase",
1894
+ marketplaceId: marketplaceInfo.marketplaceId,
1895
+ parameters: {
1896
+ sku: sku,
1897
+ confirmationId: confirmationId,
1898
+ successUrl: successUrl,
1899
+ cancelUrl: cancelUrl,
1900
+ login: true,
1901
+ auth: this.ClientAuthToken()
1902
+ }
1903
+ });
1904
+ case 5:
1905
+ case "end":
1906
+ return _context34.stop();
1907
+ }
1908
+ }, _callee34, this);
1909
+ }));
1910
+ return function (_x20) {
1911
+ return _ref68.apply(this, arguments);
1912
+ };
1913
+ }();
1914
+
1915
+ /**
1916
+ * Redirect to the wallet app to purchase the specified listing
1917
+ *
1918
+ * Use the <a href="#.PurchaseStatus">ListingPurchaseStatus</a> method to check minting status after purchasing
1919
+ *
1920
+ * @methodGroup Purchase
1921
+ * @namedParams
1922
+ * @param {Object=} marketplaceParams - Parameters of the marketplace
1923
+ * @param {string} listingId - The SKU of the item to claim
1924
+ * @param {string=} confirmationId - Confirmation ID with which to reference this purchase. If not specified, a confirmation ID will be automatically generated. On success, the user will be returned to `successUrl` with the `confirmationId` as a URL parameter.
1925
+ * @param {string} successUrl - The URL to redirect back to upon successful purchase
1926
+ * @param {string} cancelUrl - The URL to redirect back to upon cancellation of purchase
1927
+ */
1928
+ exports.PurchaseListing = /*#__PURE__*/function () {
1929
+ var _ref70 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(_ref69) {
1930
+ var marketplaceParams, listingId, confirmationId, successUrl, cancelUrl, marketplaceInfo;
1931
+ return _regeneratorRuntime.wrap(function _callee35$(_context35) {
1932
+ while (1) switch (_context35.prev = _context35.next) {
1933
+ case 0:
1934
+ marketplaceParams = _ref69.marketplaceParams, listingId = _ref69.listingId, confirmationId = _ref69.confirmationId, successUrl = _ref69.successUrl, cancelUrl = _ref69.cancelUrl;
1935
+ if (!marketplaceParams) {
1936
+ _context35.next = 5;
1937
+ break;
1938
+ }
1939
+ _context35.next = 4;
1940
+ return this.MarketplaceInfo({
1941
+ marketplaceParams: marketplaceParams
1942
+ });
1943
+ case 4:
1944
+ marketplaceInfo = _context35.sent;
1945
+ case 5:
1946
+ window.location.href = this.FlowURL({
1947
+ type: "action",
1948
+ flow: "purchase",
1949
+ marketplaceId: marketplaceInfo && marketplaceInfo.marketplaceId,
1950
+ parameters: {
1951
+ listingId: listingId,
1952
+ confirmationId: confirmationId,
1953
+ successUrl: successUrl,
1954
+ cancelUrl: cancelUrl,
1955
+ login: true,
1956
+ auth: this.ClientAuthToken()
1957
+ }
1958
+ });
1959
+ case 6:
1960
+ case "end":
1961
+ return _context35.stop();
1962
+ }
1963
+ }, _callee35, this);
1964
+ }));
1965
+ return function (_x21) {
1966
+ return _ref70.apply(this, arguments);
1820
1967
  };
1821
1968
  }();
1822
1969
 
@@ -1833,51 +1980,51 @@ exports.ClaimItem = /*#__PURE__*/function () {
1833
1980
  * @returns {Promise<Object>} - The status of the purchase
1834
1981
  */
1835
1982
  exports.ListingPurchaseStatus = /*#__PURE__*/function () {
1836
- var _ref66 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(_ref65) {
1983
+ var _ref72 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(_ref71) {
1837
1984
  var listingId, confirmationId, listingStatus, statuses;
1838
- return _regeneratorRuntime.wrap(function _callee33$(_context33) {
1839
- while (1) switch (_context33.prev = _context33.next) {
1985
+ return _regeneratorRuntime.wrap(function _callee36$(_context36) {
1986
+ while (1) switch (_context36.prev = _context36.next) {
1840
1987
  case 0:
1841
- listingId = _ref65.listingId, confirmationId = _ref65.confirmationId;
1842
- _context33.prev = 1;
1843
- _context33.next = 4;
1988
+ listingId = _ref71.listingId, confirmationId = _ref71.confirmationId;
1989
+ _context36.prev = 1;
1990
+ _context36.next = 4;
1844
1991
  return this.ListingStatus({
1845
1992
  listingId: listingId
1846
1993
  });
1847
1994
  case 4:
1848
- listingStatus = _context33.sent;
1995
+ listingStatus = _context36.sent;
1849
1996
  if (listingStatus) {
1850
- _context33.next = 7;
1997
+ _context36.next = 7;
1851
1998
  break;
1852
1999
  }
1853
2000
  throw Error("Unable to find info for listing " + listingId);
1854
2001
  case 7:
1855
- _context33.next = 9;
2002
+ _context36.next = 9;
1856
2003
  return this.MintingStatus({
1857
2004
  tenantId: listingStatus.tenant
1858
2005
  });
1859
2006
  case 9:
1860
- statuses = _context33.sent;
1861
- return _context33.abrupt("return", statuses.find(function (status) {
2007
+ statuses = _context36.sent;
2008
+ return _context36.abrupt("return", statuses.find(function (status) {
1862
2009
  return status.op === "nft-transfer" && status.extra && status.extra[0] === confirmationId;
1863
2010
  }) || {
1864
2011
  status: "none"
1865
2012
  });
1866
2013
  case 13:
1867
- _context33.prev = 13;
1868
- _context33.t0 = _context33["catch"](1);
1869
- this.Log(_context33.t0, true);
1870
- return _context33.abrupt("return", {
2014
+ _context36.prev = 13;
2015
+ _context36.t0 = _context36["catch"](1);
2016
+ this.Log(_context36.t0, true);
2017
+ return _context36.abrupt("return", {
1871
2018
  status: "unknown"
1872
2019
  });
1873
2020
  case 17:
1874
2021
  case "end":
1875
- return _context33.stop();
2022
+ return _context36.stop();
1876
2023
  }
1877
- }, _callee33, this, [[1, 13]]);
2024
+ }, _callee36, this, [[1, 13]]);
1878
2025
  }));
1879
- return function (_x19) {
1880
- return _ref66.apply(this, arguments);
2026
+ return function (_x22) {
2027
+ return _ref72.apply(this, arguments);
1881
2028
  };
1882
2029
  }();
1883
2030
 
@@ -1892,45 +2039,45 @@ exports.ListingPurchaseStatus = /*#__PURE__*/function () {
1892
2039
  * @returns {Promise<Object>} - The minting status of the purchaseed item(s)
1893
2040
  */
1894
2041
  exports.PurchaseStatus = /*#__PURE__*/function () {
1895
- var _ref68 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(_ref67) {
2042
+ var _ref74 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(_ref73) {
1896
2043
  var marketplaceParams, confirmationId, marketplaceInfo, statuses;
1897
- return _regeneratorRuntime.wrap(function _callee34$(_context34) {
1898
- while (1) switch (_context34.prev = _context34.next) {
2044
+ return _regeneratorRuntime.wrap(function _callee37$(_context37) {
2045
+ while (1) switch (_context37.prev = _context37.next) {
1899
2046
  case 0:
1900
- marketplaceParams = _ref67.marketplaceParams, confirmationId = _ref67.confirmationId;
1901
- _context34.prev = 1;
1902
- _context34.next = 4;
2047
+ marketplaceParams = _ref73.marketplaceParams, confirmationId = _ref73.confirmationId;
2048
+ _context37.prev = 1;
2049
+ _context37.next = 4;
1903
2050
  return this.MarketplaceInfo({
1904
2051
  marketplaceParams: marketplaceParams
1905
2052
  });
1906
2053
  case 4:
1907
- marketplaceInfo = _context34.sent;
1908
- _context34.next = 7;
2054
+ marketplaceInfo = _context37.sent;
2055
+ _context37.next = 7;
1909
2056
  return this.MintingStatus({
1910
2057
  tenantId: marketplaceInfo.tenant_id
1911
2058
  });
1912
2059
  case 7:
1913
- statuses = _context34.sent;
1914
- return _context34.abrupt("return", statuses.find(function (status) {
2060
+ statuses = _context37.sent;
2061
+ return _context37.abrupt("return", statuses.find(function (status) {
1915
2062
  return status.op === "nft-buy" && status.confirmationId === confirmationId;
1916
2063
  }) || {
1917
2064
  status: "none"
1918
2065
  });
1919
2066
  case 11:
1920
- _context34.prev = 11;
1921
- _context34.t0 = _context34["catch"](1);
1922
- this.Log(_context34.t0, true);
1923
- return _context34.abrupt("return", {
2067
+ _context37.prev = 11;
2068
+ _context37.t0 = _context37["catch"](1);
2069
+ this.Log(_context37.t0, true);
2070
+ return _context37.abrupt("return", {
1924
2071
  status: "unknown"
1925
2072
  });
1926
2073
  case 15:
1927
2074
  case "end":
1928
- return _context34.stop();
2075
+ return _context37.stop();
1929
2076
  }
1930
- }, _callee34, this, [[1, 11]]);
2077
+ }, _callee37, this, [[1, 11]]);
1931
2078
  }));
1932
- return function (_x20) {
1933
- return _ref68.apply(this, arguments);
2079
+ return function (_x23) {
2080
+ return _ref74.apply(this, arguments);
1934
2081
  };
1935
2082
  }();
1936
2083
 
@@ -1945,45 +2092,45 @@ exports.PurchaseStatus = /*#__PURE__*/function () {
1945
2092
  * @returns {Promise<Object>} - The minting status of the claim
1946
2093
  */
1947
2094
  exports.ClaimStatus = /*#__PURE__*/function () {
1948
- var _ref70 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(_ref69) {
2095
+ var _ref76 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(_ref75) {
1949
2096
  var marketplaceParams, sku, marketplaceInfo, statuses;
1950
- return _regeneratorRuntime.wrap(function _callee35$(_context35) {
1951
- while (1) switch (_context35.prev = _context35.next) {
2097
+ return _regeneratorRuntime.wrap(function _callee38$(_context38) {
2098
+ while (1) switch (_context38.prev = _context38.next) {
1952
2099
  case 0:
1953
- marketplaceParams = _ref69.marketplaceParams, sku = _ref69.sku;
1954
- _context35.prev = 1;
1955
- _context35.next = 4;
2100
+ marketplaceParams = _ref75.marketplaceParams, sku = _ref75.sku;
2101
+ _context38.prev = 1;
2102
+ _context38.next = 4;
1956
2103
  return this.MarketplaceInfo({
1957
2104
  marketplaceParams: marketplaceParams
1958
2105
  });
1959
2106
  case 4:
1960
- marketplaceInfo = _context35.sent;
1961
- _context35.next = 7;
2107
+ marketplaceInfo = _context38.sent;
2108
+ _context38.next = 7;
1962
2109
  return this.MintingStatus({
1963
2110
  tenantId: marketplaceInfo.tenantId
1964
2111
  });
1965
2112
  case 7:
1966
- statuses = _context35.sent;
1967
- return _context35.abrupt("return", statuses.find(function (status) {
2113
+ statuses = _context38.sent;
2114
+ return _context38.abrupt("return", statuses.find(function (status) {
1968
2115
  return status.op === "nft-claim" && status.marketplaceId === marketplaceInfo.marketplaceId && status.confirmationId === sku;
1969
2116
  }) || {
1970
2117
  status: "none"
1971
2118
  });
1972
2119
  case 11:
1973
- _context35.prev = 11;
1974
- _context35.t0 = _context35["catch"](1);
1975
- this.Log(_context35.t0, true);
1976
- return _context35.abrupt("return", {
2120
+ _context38.prev = 11;
2121
+ _context38.t0 = _context38["catch"](1);
2122
+ this.Log(_context38.t0, true);
2123
+ return _context38.abrupt("return", {
1977
2124
  status: "unknown"
1978
2125
  });
1979
2126
  case 15:
1980
2127
  case "end":
1981
- return _context35.stop();
2128
+ return _context38.stop();
1982
2129
  }
1983
- }, _callee35, this, [[1, 11]]);
2130
+ }, _callee38, this, [[1, 11]]);
1984
2131
  }));
1985
- return function (_x21) {
1986
- return _ref70.apply(this, arguments);
2132
+ return function (_x24) {
2133
+ return _ref76.apply(this, arguments);
1987
2134
  };
1988
2135
  }();
1989
2136
 
@@ -1998,45 +2145,45 @@ exports.ClaimStatus = /*#__PURE__*/function () {
1998
2145
  * @returns {Promise<Object>} - The status of the pack opening
1999
2146
  */
2000
2147
  exports.PackOpenStatus = /*#__PURE__*/function () {
2001
- var _ref72 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(_ref71) {
2148
+ var _ref78 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(_ref77) {
2002
2149
  var contractAddress, tokenId, tenantConfig, statuses;
2003
- return _regeneratorRuntime.wrap(function _callee36$(_context36) {
2004
- while (1) switch (_context36.prev = _context36.next) {
2150
+ return _regeneratorRuntime.wrap(function _callee39$(_context39) {
2151
+ while (1) switch (_context39.prev = _context39.next) {
2005
2152
  case 0:
2006
- contractAddress = _ref71.contractAddress, tokenId = _ref71.tokenId;
2007
- _context36.prev = 1;
2008
- _context36.next = 4;
2153
+ contractAddress = _ref77.contractAddress, tokenId = _ref77.tokenId;
2154
+ _context39.prev = 1;
2155
+ _context39.next = 4;
2009
2156
  return this.TenantConfiguration({
2010
2157
  contractAddress: contractAddress
2011
2158
  });
2012
2159
  case 4:
2013
- tenantConfig = _context36.sent;
2014
- _context36.next = 7;
2160
+ tenantConfig = _context39.sent;
2161
+ _context39.next = 7;
2015
2162
  return this.MintingStatus({
2016
2163
  tenantId: tenantConfig.tenant
2017
2164
  });
2018
2165
  case 7:
2019
- statuses = _context36.sent;
2020
- return _context36.abrupt("return", statuses.find(function (status) {
2166
+ statuses = _context39.sent;
2167
+ return _context39.abrupt("return", statuses.find(function (status) {
2021
2168
  return status.op === "nft-open" && Utils.EqualAddress(contractAddress, status.address) && status.tokenId === tokenId;
2022
2169
  }) || {
2023
2170
  status: "none"
2024
2171
  });
2025
2172
  case 11:
2026
- _context36.prev = 11;
2027
- _context36.t0 = _context36["catch"](1);
2028
- this.Log(_context36.t0, true);
2029
- return _context36.abrupt("return", {
2173
+ _context39.prev = 11;
2174
+ _context39.t0 = _context39["catch"](1);
2175
+ this.Log(_context39.t0, true);
2176
+ return _context39.abrupt("return", {
2030
2177
  status: "unknown"
2031
2178
  });
2032
2179
  case 15:
2033
2180
  case "end":
2034
- return _context36.stop();
2181
+ return _context39.stop();
2035
2182
  }
2036
- }, _callee36, this, [[1, 11]]);
2183
+ }, _callee39, this, [[1, 11]]);
2037
2184
  }));
2038
- return function (_x22) {
2039
- return _ref72.apply(this, arguments);
2185
+ return function (_x25) {
2186
+ return _ref78.apply(this, arguments);
2040
2187
  };
2041
2188
  }();
2042
2189
 
@@ -2051,39 +2198,39 @@ exports.PackOpenStatus = /*#__PURE__*/function () {
2051
2198
  * @returns {Promise<Object>} - The status of the collection redemption
2052
2199
  */
2053
2200
  exports.CollectionRedemptionStatus = /*#__PURE__*/function () {
2054
- var _ref74 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(_ref73) {
2201
+ var _ref80 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(_ref79) {
2055
2202
  var marketplaceParams, confirmationId, statuses;
2056
- return _regeneratorRuntime.wrap(function _callee37$(_context37) {
2057
- while (1) switch (_context37.prev = _context37.next) {
2203
+ return _regeneratorRuntime.wrap(function _callee40$(_context40) {
2204
+ while (1) switch (_context40.prev = _context40.next) {
2058
2205
  case 0:
2059
- marketplaceParams = _ref73.marketplaceParams, confirmationId = _ref73.confirmationId;
2060
- _context37.prev = 1;
2061
- _context37.next = 4;
2206
+ marketplaceParams = _ref79.marketplaceParams, confirmationId = _ref79.confirmationId;
2207
+ _context40.prev = 1;
2208
+ _context40.next = 4;
2062
2209
  return this.MintingStatus({
2063
2210
  marketplaceParams: marketplaceParams
2064
2211
  });
2065
2212
  case 4:
2066
- statuses = _context37.sent;
2067
- return _context37.abrupt("return", statuses.find(function (status) {
2213
+ statuses = _context40.sent;
2214
+ return _context40.abrupt("return", statuses.find(function (status) {
2068
2215
  return status.op === "nft-redeem" && status.confirmationId === confirmationId;
2069
2216
  }) || {
2070
2217
  status: "none"
2071
2218
  });
2072
2219
  case 8:
2073
- _context37.prev = 8;
2074
- _context37.t0 = _context37["catch"](1);
2075
- this.Log(_context37.t0, true);
2076
- return _context37.abrupt("return", {
2220
+ _context40.prev = 8;
2221
+ _context40.t0 = _context40["catch"](1);
2222
+ this.Log(_context40.t0, true);
2223
+ return _context40.abrupt("return", {
2077
2224
  status: "unknown"
2078
2225
  });
2079
2226
  case 12:
2080
2227
  case "end":
2081
- return _context37.stop();
2228
+ return _context40.stop();
2082
2229
  }
2083
- }, _callee37, this, [[1, 8]]);
2230
+ }, _callee40, this, [[1, 8]]);
2084
2231
  }));
2085
- return function (_x23) {
2086
- return _ref74.apply(this, arguments);
2232
+ return function (_x26) {
2233
+ return _ref80.apply(this, arguments);
2087
2234
  };
2088
2235
  }();
2089
2236
 
@@ -2101,51 +2248,51 @@ exports.CollectionRedemptionStatus = /*#__PURE__*/function () {
2101
2248
  * @returns {Promise<Object>} - The status of the offer redemption
2102
2249
  */
2103
2250
  exports.RedeemableOfferStatus = /*#__PURE__*/function () {
2104
- var _ref76 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(_ref75) {
2251
+ var _ref82 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(_ref81) {
2105
2252
  var tenantId, marketplaceParams, contractAddress, tokenId, offerId, statuses;
2106
- return _regeneratorRuntime.wrap(function _callee38$(_context38) {
2107
- while (1) switch (_context38.prev = _context38.next) {
2253
+ return _regeneratorRuntime.wrap(function _callee41$(_context41) {
2254
+ while (1) switch (_context41.prev = _context41.next) {
2108
2255
  case 0:
2109
- tenantId = _ref75.tenantId, marketplaceParams = _ref75.marketplaceParams, contractAddress = _ref75.contractAddress, tokenId = _ref75.tokenId, offerId = _ref75.offerId;
2110
- _context38.prev = 1;
2111
- _context38.next = 4;
2256
+ tenantId = _ref81.tenantId, marketplaceParams = _ref81.marketplaceParams, contractAddress = _ref81.contractAddress, tokenId = _ref81.tokenId, offerId = _ref81.offerId;
2257
+ _context41.prev = 1;
2258
+ _context41.next = 4;
2112
2259
  return this.MintingStatus({
2113
2260
  marketplaceParams: marketplaceParams,
2114
2261
  tenantId: tenantId
2115
2262
  });
2116
2263
  case 4:
2117
- statuses = _context38.sent;
2264
+ statuses = _context41.sent;
2118
2265
  contractAddress = Utils.FormatAddress(contractAddress);
2119
- return _context38.abrupt("return", statuses.find(function (status) {
2266
+ return _context41.abrupt("return", statuses.find(function (status) {
2120
2267
  return status.op === "nft-offer-redeem" && Utils.EqualAddress(status.address, contractAddress) && status.tokenId === (tokenId || "").toString() && status.extra && typeof status.extra[0] !== "undefined" && status.extra[0].toString() === (offerId || "").toString();
2121
2268
  }) || {
2122
2269
  status: "none"
2123
2270
  });
2124
2271
  case 9:
2125
- _context38.prev = 9;
2126
- _context38.t0 = _context38["catch"](1);
2127
- this.Log(_context38.t0, true);
2128
- return _context38.abrupt("return", {
2272
+ _context41.prev = 9;
2273
+ _context41.t0 = _context41["catch"](1);
2274
+ this.Log(_context41.t0, true);
2275
+ return _context41.abrupt("return", {
2129
2276
  status: "unknown"
2130
2277
  });
2131
2278
  case 13:
2132
2279
  case "end":
2133
- return _context38.stop();
2280
+ return _context41.stop();
2134
2281
  }
2135
- }, _callee38, this, [[1, 9]]);
2282
+ }, _callee41, this, [[1, 9]]);
2136
2283
  }));
2137
- return function (_x24) {
2138
- return _ref76.apply(this, arguments);
2284
+ return function (_x27) {
2285
+ return _ref82.apply(this, arguments);
2139
2286
  };
2140
2287
  }();
2141
2288
  exports.RedeemableCustomFulfillmentInfo = /*#__PURE__*/function () {
2142
- var _ref78 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(_ref77) {
2289
+ var _ref84 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(_ref83) {
2143
2290
  var redeemableTransactionId;
2144
- return _regeneratorRuntime.wrap(function _callee39$(_context39) {
2145
- while (1) switch (_context39.prev = _context39.next) {
2291
+ return _regeneratorRuntime.wrap(function _callee42$(_context42) {
2292
+ while (1) switch (_context42.prev = _context42.next) {
2146
2293
  case 0:
2147
- redeemableTransactionId = _ref77.redeemableTransactionId;
2148
- _context39.next = 3;
2294
+ redeemableTransactionId = _ref83.redeemableTransactionId;
2295
+ _context42.next = 3;
2149
2296
  return Utils.ResponseToJson(this.stateStoreClient.Request({
2150
2297
  method: "GET",
2151
2298
  path: UrlJoin("code-fulfillment", this.network === "main" ? "main" : "demov3", "fulfill", redeemableTransactionId),
@@ -2154,28 +2301,28 @@ exports.RedeemableCustomFulfillmentInfo = /*#__PURE__*/function () {
2154
2301
  }
2155
2302
  }));
2156
2303
  case 3:
2157
- return _context39.abrupt("return", _context39.sent);
2304
+ return _context42.abrupt("return", _context42.sent);
2158
2305
  case 4:
2159
2306
  case "end":
2160
- return _context39.stop();
2307
+ return _context42.stop();
2161
2308
  }
2162
- }, _callee39, this);
2309
+ }, _callee42, this);
2163
2310
  }));
2164
- return function (_x25) {
2165
- return _ref78.apply(this, arguments);
2311
+ return function (_x28) {
2312
+ return _ref84.apply(this, arguments);
2166
2313
  };
2167
2314
  }();
2168
2315
 
2169
2316
  /* EVENTS */
2170
2317
 
2171
2318
  exports.LoadDrop = /*#__PURE__*/function () {
2172
- var _ref80 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(_ref79) {
2319
+ var _ref86 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(_ref85) {
2173
2320
  var _this = this;
2174
2321
  var tenantSlug, eventSlug, dropId, event, eventId;
2175
- return _regeneratorRuntime.wrap(function _callee40$(_context40) {
2176
- while (1) switch (_context40.prev = _context40.next) {
2322
+ return _regeneratorRuntime.wrap(function _callee43$(_context43) {
2323
+ while (1) switch (_context43.prev = _context43.next) {
2177
2324
  case 0:
2178
- tenantSlug = _ref79.tenantSlug, eventSlug = _ref79.eventSlug, dropId = _ref79.dropId;
2325
+ tenantSlug = _ref85.tenantSlug, eventSlug = _ref85.eventSlug, dropId = _ref85.dropId;
2179
2326
  if (!this.drops) {
2180
2327
  this.drops = {};
2181
2328
  }
@@ -2186,10 +2333,10 @@ exports.LoadDrop = /*#__PURE__*/function () {
2186
2333
  this.drops[tenantSlug][eventSlug] = {};
2187
2334
  }
2188
2335
  if (this.drops[tenantSlug][eventSlug][dropId]) {
2189
- _context40.next = 13;
2336
+ _context43.next = 13;
2190
2337
  break;
2191
2338
  }
2192
- _context40.next = 7;
2339
+ _context43.next = 7;
2193
2340
  return this.client.ContentObjectMetadata({
2194
2341
  libraryId: this.mainSiteLibraryId,
2195
2342
  objectId: this.mainSiteId,
@@ -2202,14 +2349,14 @@ exports.LoadDrop = /*#__PURE__*/function () {
2202
2349
  noAuth: true
2203
2350
  });
2204
2351
  case 7:
2205
- _context40.t0 = _context40.sent;
2206
- if (_context40.t0) {
2207
- _context40.next = 10;
2352
+ _context43.t0 = _context43.sent;
2353
+ if (_context43.t0) {
2354
+ _context43.next = 10;
2208
2355
  break;
2209
2356
  }
2210
- _context40.t0 = [];
2357
+ _context43.t0 = [];
2211
2358
  case 10:
2212
- event = _context40.t0;
2359
+ event = _context43.t0;
2213
2360
  eventId = Utils.DecodeVersionHash(event["."].source).objectId;
2214
2361
  event.drops.forEach(function (drop) {
2215
2362
  drop = _objectSpread(_objectSpread({}, drop), {}, {
@@ -2219,31 +2366,31 @@ exports.LoadDrop = /*#__PURE__*/function () {
2219
2366
  _this.drops[drop.uuid] = drop;
2220
2367
  });
2221
2368
  case 13:
2222
- return _context40.abrupt("return", this.drops[dropId]);
2369
+ return _context43.abrupt("return", this.drops[dropId]);
2223
2370
  case 14:
2224
2371
  case "end":
2225
- return _context40.stop();
2372
+ return _context43.stop();
2226
2373
  }
2227
- }, _callee40, this);
2374
+ }, _callee43, this);
2228
2375
  }));
2229
- return function (_x26) {
2230
- return _ref80.apply(this, arguments);
2376
+ return function (_x29) {
2377
+ return _ref86.apply(this, arguments);
2231
2378
  };
2232
2379
  }();
2233
2380
  exports.SubmitDropVote = /*#__PURE__*/function () {
2234
- var _ref82 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(_ref81) {
2381
+ var _ref88 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(_ref87) {
2235
2382
  var marketplaceParams, eventId, dropId, sku, marketplaceInfo;
2236
- return _regeneratorRuntime.wrap(function _callee41$(_context41) {
2237
- while (1) switch (_context41.prev = _context41.next) {
2383
+ return _regeneratorRuntime.wrap(function _callee44$(_context44) {
2384
+ while (1) switch (_context44.prev = _context44.next) {
2238
2385
  case 0:
2239
- marketplaceParams = _ref81.marketplaceParams, eventId = _ref81.eventId, dropId = _ref81.dropId, sku = _ref81.sku;
2240
- _context41.next = 3;
2386
+ marketplaceParams = _ref87.marketplaceParams, eventId = _ref87.eventId, dropId = _ref87.dropId, sku = _ref87.sku;
2387
+ _context44.next = 3;
2241
2388
  return this.MarketplaceInfo({
2242
2389
  marketplaceParams: marketplaceParams
2243
2390
  });
2244
2391
  case 3:
2245
- marketplaceInfo = _context41.sent;
2246
- _context41.next = 6;
2392
+ marketplaceInfo = _context44.sent;
2393
+ _context44.next = 6;
2247
2394
  return this.client.authClient.MakeAuthServiceRequest({
2248
2395
  path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
2249
2396
  method: "POST",
@@ -2259,23 +2406,23 @@ exports.SubmitDropVote = /*#__PURE__*/function () {
2259
2406
  });
2260
2407
  case 6:
2261
2408
  case "end":
2262
- return _context41.stop();
2409
+ return _context44.stop();
2263
2410
  }
2264
- }, _callee41, this);
2411
+ }, _callee44, this);
2265
2412
  }));
2266
- return function (_x27) {
2267
- return _ref82.apply(this, arguments);
2413
+ return function (_x30) {
2414
+ return _ref88.apply(this, arguments);
2268
2415
  };
2269
2416
  }();
2270
2417
  exports.DropStatus = /*#__PURE__*/function () {
2271
- var _ref84 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(_ref83) {
2418
+ var _ref90 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(_ref89) {
2272
2419
  var marketplace, eventId, dropId, response;
2273
- return _regeneratorRuntime.wrap(function _callee42$(_context42) {
2274
- while (1) switch (_context42.prev = _context42.next) {
2420
+ return _regeneratorRuntime.wrap(function _callee45$(_context45) {
2421
+ while (1) switch (_context45.prev = _context45.next) {
2275
2422
  case 0:
2276
- marketplace = _ref83.marketplace, eventId = _ref83.eventId, dropId = _ref83.dropId;
2277
- _context42.prev = 1;
2278
- _context42.next = 4;
2423
+ marketplace = _ref89.marketplace, eventId = _ref89.eventId, dropId = _ref89.dropId;
2424
+ _context45.prev = 1;
2425
+ _context45.next = 4;
2279
2426
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2280
2427
  path: UrlJoin("as", "wlt", "act", marketplace.tenant_id, eventId, dropId),
2281
2428
  method: "GET",
@@ -2284,25 +2431,25 @@ exports.DropStatus = /*#__PURE__*/function () {
2284
2431
  }
2285
2432
  }));
2286
2433
  case 4:
2287
- response = _context42.sent;
2288
- return _context42.abrupt("return", response.sort(function (a, b) {
2434
+ response = _context45.sent;
2435
+ return _context45.abrupt("return", response.sort(function (a, b) {
2289
2436
  return a.ts > b.ts ? 1 : -1;
2290
2437
  })[0] || {
2291
2438
  status: "none"
2292
2439
  });
2293
2440
  case 8:
2294
- _context42.prev = 8;
2295
- _context42.t0 = _context42["catch"](1);
2296
- this.Log(_context42.t0, true);
2297
- return _context42.abrupt("return", "");
2441
+ _context45.prev = 8;
2442
+ _context45.t0 = _context45["catch"](1);
2443
+ this.Log(_context45.t0, true);
2444
+ return _context45.abrupt("return", "");
2298
2445
  case 12:
2299
2446
  case "end":
2300
- return _context42.stop();
2447
+ return _context45.stop();
2301
2448
  }
2302
- }, _callee42, this, [[1, 8]]);
2449
+ }, _callee45, this, [[1, 8]]);
2303
2450
  }));
2304
- return function (_x28) {
2305
- return _ref84.apply(this, arguments);
2451
+ return function (_x31) {
2452
+ return _ref90.apply(this, arguments);
2306
2453
  };
2307
2454
  }();
2308
2455
 
@@ -2324,12 +2471,12 @@ exports.DropStatus = /*#__PURE__*/function () {
2324
2471
  * @returns {Promise<Array<Object>>} - Offers matching the specified filters
2325
2472
  */
2326
2473
  exports.MarketplaceOffers = /*#__PURE__*/function () {
2327
- var _ref86 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(_ref85) {
2328
- var contractAddress, tokenId, buyerAddress, sellerAddress, statuses, _ref85$start, start, _ref85$limit, limit, path, queryParams, offers;
2329
- return _regeneratorRuntime.wrap(function _callee43$(_context43) {
2330
- while (1) switch (_context43.prev = _context43.next) {
2474
+ var _ref92 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(_ref91) {
2475
+ var contractAddress, tokenId, buyerAddress, sellerAddress, statuses, _ref91$start, start, _ref91$limit, limit, path, queryParams, offers;
2476
+ return _regeneratorRuntime.wrap(function _callee46$(_context46) {
2477
+ while (1) switch (_context46.prev = _context46.next) {
2331
2478
  case 0:
2332
- contractAddress = _ref85.contractAddress, tokenId = _ref85.tokenId, buyerAddress = _ref85.buyerAddress, sellerAddress = _ref85.sellerAddress, statuses = _ref85.statuses, _ref85$start = _ref85.start, start = _ref85$start === void 0 ? 0 : _ref85$start, _ref85$limit = _ref85.limit, limit = _ref85$limit === void 0 ? 10 : _ref85$limit;
2479
+ contractAddress = _ref91.contractAddress, tokenId = _ref91.tokenId, buyerAddress = _ref91.buyerAddress, sellerAddress = _ref91.sellerAddress, statuses = _ref91.statuses, _ref91$start = _ref91.start, start = _ref91$start === void 0 ? 0 : _ref91$start, _ref91$limit = _ref91.limit, limit = _ref91$limit === void 0 ? 10 : _ref91$limit;
2333
2480
  path = UrlJoin("as", "mkt", "offers", "ls");
2334
2481
  if (buyerAddress) {
2335
2482
  path = UrlJoin(path, "b", Utils.FormatAddress(buyerAddress));
@@ -2349,15 +2496,15 @@ exports.MarketplaceOffers = /*#__PURE__*/function () {
2349
2496
  if (statuses && statuses.length > 0) {
2350
2497
  queryParams.include = statuses.join(",");
2351
2498
  }
2352
- _context43.next = 8;
2499
+ _context46.next = 8;
2353
2500
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2354
2501
  path: path,
2355
2502
  method: "GET",
2356
2503
  queryParams: queryParams
2357
2504
  }));
2358
2505
  case 8:
2359
- offers = _context43.sent;
2360
- return _context43.abrupt("return", offers.map(function (offer) {
2506
+ offers = _context46.sent;
2507
+ return _context46.abrupt("return", offers.map(function (offer) {
2361
2508
  return _objectSpread(_objectSpread({}, offer), {}, {
2362
2509
  created: offer.created * 1000,
2363
2510
  updated: offer.updated * 1000,
@@ -2366,12 +2513,12 @@ exports.MarketplaceOffers = /*#__PURE__*/function () {
2366
2513
  }));
2367
2514
  case 10:
2368
2515
  case "end":
2369
- return _context43.stop();
2516
+ return _context46.stop();
2370
2517
  }
2371
- }, _callee43, this);
2518
+ }, _callee46, this);
2372
2519
  }));
2373
- return function (_x29) {
2374
- return _ref86.apply(this, arguments);
2520
+ return function (_x32) {
2521
+ return _ref92.apply(this, arguments);
2375
2522
  };
2376
2523
  }();
2377
2524
 
@@ -2391,17 +2538,17 @@ exports.MarketplaceOffers = /*#__PURE__*/function () {
2391
2538
  * @returns {Promise<Object>} - Info about the created/updated offer
2392
2539
  */
2393
2540
  exports.CreateMarketplaceOffer = /*#__PURE__*/function () {
2394
- var _ref88 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(_ref87) {
2541
+ var _ref94 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(_ref93) {
2395
2542
  var contractAddress, tokenId, offerId, price, expiresAt, response;
2396
- return _regeneratorRuntime.wrap(function _callee44$(_context44) {
2397
- while (1) switch (_context44.prev = _context44.next) {
2543
+ return _regeneratorRuntime.wrap(function _callee47$(_context47) {
2544
+ while (1) switch (_context47.prev = _context47.next) {
2398
2545
  case 0:
2399
- contractAddress = _ref87.contractAddress, tokenId = _ref87.tokenId, offerId = _ref87.offerId, price = _ref87.price, expiresAt = _ref87.expiresAt;
2546
+ contractAddress = _ref93.contractAddress, tokenId = _ref93.tokenId, offerId = _ref93.offerId, price = _ref93.price, expiresAt = _ref93.expiresAt;
2400
2547
  if (!offerId) {
2401
- _context44.next = 7;
2548
+ _context47.next = 7;
2402
2549
  break;
2403
2550
  }
2404
- _context44.next = 4;
2551
+ _context47.next = 4;
2405
2552
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2406
2553
  path: UrlJoin("as", "wlt", "mkt", "offers", offerId),
2407
2554
  method: "PUT",
@@ -2414,11 +2561,11 @@ exports.CreateMarketplaceOffer = /*#__PURE__*/function () {
2414
2561
  }
2415
2562
  }));
2416
2563
  case 4:
2417
- response = _context44.sent;
2418
- _context44.next = 10;
2564
+ response = _context47.sent;
2565
+ _context47.next = 10;
2419
2566
  break;
2420
2567
  case 7:
2421
- _context44.next = 9;
2568
+ _context47.next = 9;
2422
2569
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2423
2570
  path: UrlJoin("as", "wlt", "mkt", "offers", contractAddress, tokenId),
2424
2571
  method: "POST",
@@ -2433,17 +2580,17 @@ exports.CreateMarketplaceOffer = /*#__PURE__*/function () {
2433
2580
  }
2434
2581
  }));
2435
2582
  case 9:
2436
- response = _context44.sent;
2583
+ response = _context47.sent;
2437
2584
  case 10:
2438
- return _context44.abrupt("return", response.offer_id);
2585
+ return _context47.abrupt("return", response.offer_id);
2439
2586
  case 11:
2440
2587
  case "end":
2441
- return _context44.stop();
2588
+ return _context47.stop();
2442
2589
  }
2443
- }, _callee44, this);
2590
+ }, _callee47, this);
2444
2591
  }));
2445
- return function (_x30) {
2446
- return _ref88.apply(this, arguments);
2592
+ return function (_x33) {
2593
+ return _ref94.apply(this, arguments);
2447
2594
  };
2448
2595
  }();
2449
2596
 
@@ -2457,13 +2604,13 @@ exports.CreateMarketplaceOffer = /*#__PURE__*/function () {
2457
2604
  * @param {string} offerId - The ID of the offer
2458
2605
  */
2459
2606
  exports.RemoveMarketplaceOffer = /*#__PURE__*/function () {
2460
- var _ref90 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(_ref89) {
2607
+ var _ref96 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(_ref95) {
2461
2608
  var offerId;
2462
- return _regeneratorRuntime.wrap(function _callee45$(_context45) {
2463
- while (1) switch (_context45.prev = _context45.next) {
2609
+ return _regeneratorRuntime.wrap(function _callee48$(_context48) {
2610
+ while (1) switch (_context48.prev = _context48.next) {
2464
2611
  case 0:
2465
- offerId = _ref89.offerId;
2466
- _context45.next = 3;
2612
+ offerId = _ref95.offerId;
2613
+ _context48.next = 3;
2467
2614
  return this.client.authClient.MakeAuthServiceRequest({
2468
2615
  path: UrlJoin("as", "wlt", "mkt", "offers", offerId),
2469
2616
  method: "DELETE",
@@ -2472,15 +2619,15 @@ exports.RemoveMarketplaceOffer = /*#__PURE__*/function () {
2472
2619
  }
2473
2620
  });
2474
2621
  case 3:
2475
- return _context45.abrupt("return", _context45.sent);
2622
+ return _context48.abrupt("return", _context48.sent);
2476
2623
  case 4:
2477
2624
  case "end":
2478
- return _context45.stop();
2625
+ return _context48.stop();
2479
2626
  }
2480
- }, _callee45, this);
2627
+ }, _callee48, this);
2481
2628
  }));
2482
- return function (_x31) {
2483
- return _ref90.apply(this, arguments);
2629
+ return function (_x34) {
2630
+ return _ref96.apply(this, arguments);
2484
2631
  };
2485
2632
  }();
2486
2633
 
@@ -2494,13 +2641,13 @@ exports.RemoveMarketplaceOffer = /*#__PURE__*/function () {
2494
2641
  * @param {string} offerId - The ID of the offer
2495
2642
  */
2496
2643
  exports.AcceptMarketplaceOffer = /*#__PURE__*/function () {
2497
- var _ref92 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(_ref91) {
2644
+ var _ref98 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(_ref97) {
2498
2645
  var offerId;
2499
- return _regeneratorRuntime.wrap(function _callee46$(_context46) {
2500
- while (1) switch (_context46.prev = _context46.next) {
2646
+ return _regeneratorRuntime.wrap(function _callee49$(_context49) {
2647
+ while (1) switch (_context49.prev = _context49.next) {
2501
2648
  case 0:
2502
- offerId = _ref91.offerId;
2503
- _context46.next = 3;
2649
+ offerId = _ref97.offerId;
2650
+ _context49.next = 3;
2504
2651
  return this.client.authClient.MakeAuthServiceRequest({
2505
2652
  path: UrlJoin("as", "wlt", "mkt", "offers", "accept", offerId),
2506
2653
  method: "PUT",
@@ -2509,15 +2656,15 @@ exports.AcceptMarketplaceOffer = /*#__PURE__*/function () {
2509
2656
  }
2510
2657
  });
2511
2658
  case 3:
2512
- return _context46.abrupt("return", _context46.sent);
2659
+ return _context49.abrupt("return", _context49.sent);
2513
2660
  case 4:
2514
2661
  case "end":
2515
- return _context46.stop();
2662
+ return _context49.stop();
2516
2663
  }
2517
- }, _callee46, this);
2664
+ }, _callee49, this);
2518
2665
  }));
2519
- return function (_x32) {
2520
- return _ref92.apply(this, arguments);
2666
+ return function (_x35) {
2667
+ return _ref98.apply(this, arguments);
2521
2668
  };
2522
2669
  }();
2523
2670
 
@@ -2531,13 +2678,13 @@ exports.AcceptMarketplaceOffer = /*#__PURE__*/function () {
2531
2678
  * @param {string} offerId - The ID of the offer
2532
2679
  */
2533
2680
  exports.RejectMarketplaceOffer = /*#__PURE__*/function () {
2534
- var _ref94 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(_ref93) {
2681
+ var _ref100 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(_ref99) {
2535
2682
  var offerId;
2536
- return _regeneratorRuntime.wrap(function _callee47$(_context47) {
2537
- while (1) switch (_context47.prev = _context47.next) {
2683
+ return _regeneratorRuntime.wrap(function _callee50$(_context50) {
2684
+ while (1) switch (_context50.prev = _context50.next) {
2538
2685
  case 0:
2539
- offerId = _ref93.offerId;
2540
- _context47.next = 3;
2686
+ offerId = _ref99.offerId;
2687
+ _context50.next = 3;
2541
2688
  return this.client.authClient.MakeAuthServiceRequest({
2542
2689
  path: UrlJoin("as", "wlt", "mkt", "offers", "decline", offerId),
2543
2690
  method: "PUT",
@@ -2546,15 +2693,15 @@ exports.RejectMarketplaceOffer = /*#__PURE__*/function () {
2546
2693
  }
2547
2694
  });
2548
2695
  case 3:
2549
- return _context47.abrupt("return", _context47.sent);
2696
+ return _context50.abrupt("return", _context50.sent);
2550
2697
  case 4:
2551
2698
  case "end":
2552
- return _context47.stop();
2699
+ return _context50.stop();
2553
2700
  }
2554
- }, _callee47, this);
2701
+ }, _callee50, this);
2555
2702
  }));
2556
- return function (_x33) {
2557
- return _ref94.apply(this, arguments);
2703
+ return function (_x36) {
2704
+ return _ref100.apply(this, arguments);
2558
2705
  };
2559
2706
  }();
2560
2707
 
@@ -2571,13 +2718,13 @@ exports.RejectMarketplaceOffer = /*#__PURE__*/function () {
2571
2718
  * @returns {Promise<Object>} - Info about the voting event, including the current user's votes and the current total voting tally
2572
2719
  */
2573
2720
  exports.VoteStatus = /*#__PURE__*/function () {
2574
- var _ref96 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(_ref95) {
2721
+ var _ref102 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(_ref101) {
2575
2722
  var tenantId, votingEventId;
2576
- return _regeneratorRuntime.wrap(function _callee48$(_context48) {
2577
- while (1) switch (_context48.prev = _context48.next) {
2723
+ return _regeneratorRuntime.wrap(function _callee51$(_context51) {
2724
+ while (1) switch (_context51.prev = _context51.next) {
2578
2725
  case 0:
2579
- tenantId = _ref95.tenantId, votingEventId = _ref95.votingEventId;
2580
- _context48.next = 3;
2726
+ tenantId = _ref101.tenantId, votingEventId = _ref101.votingEventId;
2727
+ _context51.next = 3;
2581
2728
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2582
2729
  path: UrlJoin("as", "votes", tenantId, votingEventId),
2583
2730
  headers: {
@@ -2585,15 +2732,15 @@ exports.VoteStatus = /*#__PURE__*/function () {
2585
2732
  }
2586
2733
  }));
2587
2734
  case 3:
2588
- return _context48.abrupt("return", _context48.sent);
2735
+ return _context51.abrupt("return", _context51.sent);
2589
2736
  case 4:
2590
2737
  case "end":
2591
- return _context48.stop();
2738
+ return _context51.stop();
2592
2739
  }
2593
- }, _callee48, this);
2740
+ }, _callee51, this);
2594
2741
  }));
2595
- return function (_x34) {
2596
- return _ref96.apply(this, arguments);
2742
+ return function (_x37) {
2743
+ return _ref102.apply(this, arguments);
2597
2744
  };
2598
2745
  }();
2599
2746
 
@@ -2611,13 +2758,13 @@ exports.VoteStatus = /*#__PURE__*/function () {
2611
2758
  * @returns {Promise<Object>} - Info about the voting event, including the current user's votes and the current total voting tally
2612
2759
  */
2613
2760
  exports.CastVote = /*#__PURE__*/function () {
2614
- var _ref98 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(_ref97) {
2761
+ var _ref104 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(_ref103) {
2615
2762
  var tenantId, votingEventId, sku;
2616
- return _regeneratorRuntime.wrap(function _callee49$(_context49) {
2617
- while (1) switch (_context49.prev = _context49.next) {
2763
+ return _regeneratorRuntime.wrap(function _callee52$(_context52) {
2764
+ while (1) switch (_context52.prev = _context52.next) {
2618
2765
  case 0:
2619
- tenantId = _ref97.tenantId, votingEventId = _ref97.votingEventId, sku = _ref97.sku;
2620
- _context49.next = 3;
2766
+ tenantId = _ref103.tenantId, votingEventId = _ref103.votingEventId, sku = _ref103.sku;
2767
+ _context52.next = 3;
2621
2768
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2622
2769
  path: UrlJoin("as", "votes", tenantId, votingEventId, sku),
2623
2770
  method: "POST",
@@ -2626,15 +2773,15 @@ exports.CastVote = /*#__PURE__*/function () {
2626
2773
  }
2627
2774
  }));
2628
2775
  case 3:
2629
- return _context49.abrupt("return", _context49.sent);
2776
+ return _context52.abrupt("return", _context52.sent);
2630
2777
  case 4:
2631
2778
  case "end":
2632
- return _context49.stop();
2779
+ return _context52.stop();
2633
2780
  }
2634
- }, _callee49, this);
2781
+ }, _callee52, this);
2635
2782
  }));
2636
- return function (_x35) {
2637
- return _ref98.apply(this, arguments);
2783
+ return function (_x38) {
2784
+ return _ref104.apply(this, arguments);
2638
2785
  };
2639
2786
  }();
2640
2787
 
@@ -2652,13 +2799,13 @@ exports.CastVote = /*#__PURE__*/function () {
2652
2799
  * @returns {Promise<Object>} - Info about the voting event, including the current user's votes and the current total voting tally
2653
2800
  */
2654
2801
  exports.RevokeVote = /*#__PURE__*/function () {
2655
- var _ref100 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(_ref99) {
2802
+ var _ref106 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(_ref105) {
2656
2803
  var tenantId, votingEventId, sku;
2657
- return _regeneratorRuntime.wrap(function _callee50$(_context50) {
2658
- while (1) switch (_context50.prev = _context50.next) {
2804
+ return _regeneratorRuntime.wrap(function _callee53$(_context53) {
2805
+ while (1) switch (_context53.prev = _context53.next) {
2659
2806
  case 0:
2660
- tenantId = _ref99.tenantId, votingEventId = _ref99.votingEventId, sku = _ref99.sku;
2661
- _context50.next = 3;
2807
+ tenantId = _ref105.tenantId, votingEventId = _ref105.votingEventId, sku = _ref105.sku;
2808
+ _context53.next = 3;
2662
2809
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2663
2810
  path: UrlJoin("as", "votes", tenantId, votingEventId, sku),
2664
2811
  method: "DELETE",
@@ -2667,14 +2814,14 @@ exports.RevokeVote = /*#__PURE__*/function () {
2667
2814
  }
2668
2815
  }));
2669
2816
  case 3:
2670
- return _context50.abrupt("return", _context50.sent);
2817
+ return _context53.abrupt("return", _context53.sent);
2671
2818
  case 4:
2672
2819
  case "end":
2673
- return _context50.stop();
2820
+ return _context53.stop();
2674
2821
  }
2675
- }, _callee50, this);
2822
+ }, _callee53, this);
2676
2823
  }));
2677
- return function (_x36) {
2678
- return _ref100.apply(this, arguments);
2824
+ return function (_x39) {
2825
+ return _ref106.apply(this, arguments);
2679
2826
  };
2680
2827
  }();