@eluvio/elv-client-js 3.2.7 → 3.2.8
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.
|
@@ -773,10 +773,50 @@ exports.Marketplace = /*#__PURE__*/function () {
|
|
|
773
773
|
}();
|
|
774
774
|
/* NFTS */
|
|
775
775
|
|
|
776
|
+
/**
|
|
777
|
+
* Return info about the specified NFT contract, including the cap, current total supply, and total minted and burned.
|
|
778
|
+
*
|
|
779
|
+
* @methodGroup NFTs
|
|
780
|
+
* @namedParams
|
|
781
|
+
* @param {string} contractAddress - The contract address of the NFT
|
|
782
|
+
*
|
|
783
|
+
* @returns {Promise<Object>} - Information about the specified contract
|
|
784
|
+
*/
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
exports.NFTContractStats = /*#__PURE__*/function () {
|
|
788
|
+
var _ref24 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(_ref23) {
|
|
789
|
+
var contractAddress;
|
|
790
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
791
|
+
while (1) {
|
|
792
|
+
switch (_context12.prev = _context12.next) {
|
|
793
|
+
case 0:
|
|
794
|
+
contractAddress = _ref23.contractAddress;
|
|
795
|
+
_context12.next = 3;
|
|
796
|
+
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
797
|
+
path: UrlJoin("as", "nft", "info", contractAddress),
|
|
798
|
+
method: "GET"
|
|
799
|
+
}));
|
|
800
|
+
|
|
801
|
+
case 3:
|
|
802
|
+
return _context12.abrupt("return", _context12.sent);
|
|
803
|
+
|
|
804
|
+
case 4:
|
|
805
|
+
case "end":
|
|
806
|
+
return _context12.stop();
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
}, _callee12, this);
|
|
810
|
+
}));
|
|
811
|
+
|
|
812
|
+
return function (_x5) {
|
|
813
|
+
return _ref24.apply(this, arguments);
|
|
814
|
+
};
|
|
815
|
+
}();
|
|
776
816
|
/**
|
|
777
817
|
* Load full info for the specified NFT
|
|
778
818
|
*
|
|
779
|
-
* @methodGroup
|
|
819
|
+
* @methodGroup NFTs
|
|
780
820
|
* @namedParams
|
|
781
821
|
* @param {string} contractAddress - The contract address of the NFT
|
|
782
822
|
* @param {string} tokenId - The token ID of the NFT
|
|
@@ -784,27 +824,27 @@ exports.Marketplace = /*#__PURE__*/function () {
|
|
|
784
824
|
|
|
785
825
|
|
|
786
826
|
exports.NFT = /*#__PURE__*/function () {
|
|
787
|
-
var
|
|
827
|
+
var _ref26 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref25) {
|
|
788
828
|
var tokenId, contractAddress, nft;
|
|
789
|
-
return _regeneratorRuntime.wrap(function
|
|
829
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
790
830
|
while (1) {
|
|
791
|
-
switch (
|
|
831
|
+
switch (_context13.prev = _context13.next) {
|
|
792
832
|
case 0:
|
|
793
|
-
tokenId =
|
|
794
|
-
|
|
795
|
-
|
|
833
|
+
tokenId = _ref25.tokenId, contractAddress = _ref25.contractAddress;
|
|
834
|
+
_context13.t0 = FormatNFTDetails;
|
|
835
|
+
_context13.next = 4;
|
|
796
836
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
797
837
|
path: UrlJoin("as", "nft", "info", contractAddress, tokenId),
|
|
798
838
|
method: "GET"
|
|
799
839
|
}));
|
|
800
840
|
|
|
801
841
|
case 4:
|
|
802
|
-
|
|
803
|
-
nft = (0,
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
842
|
+
_context13.t1 = _context13.sent;
|
|
843
|
+
nft = (0, _context13.t0)(_context13.t1);
|
|
844
|
+
_context13.t2 = _objectSpread;
|
|
845
|
+
_context13.t3 = _objectSpread;
|
|
846
|
+
_context13.t4 = {};
|
|
847
|
+
_context13.next = 11;
|
|
808
848
|
return this.client.ContentObjectMetadata({
|
|
809
849
|
versionHash: nft.details.VersionHash,
|
|
810
850
|
metadataSubtree: "public/asset_metadata/nft",
|
|
@@ -812,39 +852,39 @@ exports.NFT = /*#__PURE__*/function () {
|
|
|
812
852
|
});
|
|
813
853
|
|
|
814
854
|
case 11:
|
|
815
|
-
|
|
855
|
+
_context13.t5 = _context13.sent;
|
|
816
856
|
|
|
817
|
-
if (
|
|
818
|
-
|
|
857
|
+
if (_context13.t5) {
|
|
858
|
+
_context13.next = 14;
|
|
819
859
|
break;
|
|
820
860
|
}
|
|
821
861
|
|
|
822
|
-
|
|
862
|
+
_context13.t5 = {};
|
|
823
863
|
|
|
824
864
|
case 14:
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
nft.metadata = (0,
|
|
829
|
-
|
|
865
|
+
_context13.t6 = _context13.t5;
|
|
866
|
+
_context13.t7 = (0, _context13.t3)(_context13.t4, _context13.t6);
|
|
867
|
+
_context13.t8 = nft.metadata || {};
|
|
868
|
+
nft.metadata = (0, _context13.t2)(_context13.t7, _context13.t8);
|
|
869
|
+
_context13.next = 20;
|
|
830
870
|
return this.TenantConfiguration({
|
|
831
871
|
contractAddress: contractAddress
|
|
832
872
|
});
|
|
833
873
|
|
|
834
874
|
case 20:
|
|
835
|
-
nft.config =
|
|
836
|
-
return
|
|
875
|
+
nft.config = _context13.sent;
|
|
876
|
+
return _context13.abrupt("return", FormatNFTMetadata(nft));
|
|
837
877
|
|
|
838
878
|
case 22:
|
|
839
879
|
case "end":
|
|
840
|
-
return
|
|
880
|
+
return _context13.stop();
|
|
841
881
|
}
|
|
842
882
|
}
|
|
843
|
-
},
|
|
883
|
+
}, _callee13, this);
|
|
844
884
|
}));
|
|
845
885
|
|
|
846
|
-
return function (
|
|
847
|
-
return
|
|
886
|
+
return function (_x6) {
|
|
887
|
+
return _ref26.apply(this, arguments);
|
|
848
888
|
};
|
|
849
889
|
}();
|
|
850
890
|
/**
|
|
@@ -852,7 +892,7 @@ exports.NFT = /*#__PURE__*/function () {
|
|
|
852
892
|
*
|
|
853
893
|
* Transfer the specified NFT owned by the current user to the specified address
|
|
854
894
|
*
|
|
855
|
-
* @methodGroup
|
|
895
|
+
* @methodGroup NFTs
|
|
856
896
|
* @namedParams
|
|
857
897
|
* @param {string} contractAddress - The contract address of the NFT
|
|
858
898
|
* @param {string} tokenId - The token ID of the NFT
|
|
@@ -861,23 +901,23 @@ exports.NFT = /*#__PURE__*/function () {
|
|
|
861
901
|
|
|
862
902
|
|
|
863
903
|
exports.TransferNFT = /*#__PURE__*/function () {
|
|
864
|
-
var
|
|
904
|
+
var _ref28 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref27) {
|
|
865
905
|
var contractAddress, tokenId, targetAddress;
|
|
866
|
-
return _regeneratorRuntime.wrap(function
|
|
906
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
867
907
|
while (1) {
|
|
868
|
-
switch (
|
|
908
|
+
switch (_context14.prev = _context14.next) {
|
|
869
909
|
case 0:
|
|
870
|
-
contractAddress =
|
|
910
|
+
contractAddress = _ref27.contractAddress, tokenId = _ref27.tokenId, targetAddress = _ref27.targetAddress;
|
|
871
911
|
|
|
872
912
|
if (!(!targetAddress || !Utils.ValidAddress(targetAddress))) {
|
|
873
|
-
|
|
913
|
+
_context14.next = 3;
|
|
874
914
|
break;
|
|
875
915
|
}
|
|
876
916
|
|
|
877
917
|
throw Error("Eluvio Wallet Client: Invalid or missing target address in UserTransferNFT");
|
|
878
918
|
|
|
879
919
|
case 3:
|
|
880
|
-
|
|
920
|
+
_context14.next = 5;
|
|
881
921
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
882
922
|
path: UrlJoin("as", "wlt", "mkt", "xfer"),
|
|
883
923
|
method: "POST",
|
|
@@ -892,18 +932,18 @@ exports.TransferNFT = /*#__PURE__*/function () {
|
|
|
892
932
|
});
|
|
893
933
|
|
|
894
934
|
case 5:
|
|
895
|
-
return
|
|
935
|
+
return _context14.abrupt("return", _context14.sent);
|
|
896
936
|
|
|
897
937
|
case 6:
|
|
898
938
|
case "end":
|
|
899
|
-
return
|
|
939
|
+
return _context14.stop();
|
|
900
940
|
}
|
|
901
941
|
}
|
|
902
|
-
},
|
|
942
|
+
}, _callee14, this);
|
|
903
943
|
}));
|
|
904
944
|
|
|
905
|
-
return function (
|
|
906
|
-
return
|
|
945
|
+
return function (_x7) {
|
|
946
|
+
return _ref28.apply(this, arguments);
|
|
907
947
|
};
|
|
908
948
|
}();
|
|
909
949
|
/** LISTINGS */
|
|
@@ -920,53 +960,53 @@ exports.TransferNFT = /*#__PURE__*/function () {
|
|
|
920
960
|
|
|
921
961
|
|
|
922
962
|
exports.ListingStatus = /*#__PURE__*/function () {
|
|
923
|
-
var
|
|
963
|
+
var _ref30 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(_ref29) {
|
|
924
964
|
var listingId;
|
|
925
|
-
return _regeneratorRuntime.wrap(function
|
|
965
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
926
966
|
while (1) {
|
|
927
|
-
switch (
|
|
967
|
+
switch (_context15.prev = _context15.next) {
|
|
928
968
|
case 0:
|
|
929
|
-
listingId =
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
969
|
+
listingId = _ref29.listingId;
|
|
970
|
+
_context15.prev = 1;
|
|
971
|
+
_context15.t0 = Utils;
|
|
972
|
+
_context15.next = 5;
|
|
933
973
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
934
974
|
path: UrlJoin("as", "mkt", "status", listingId),
|
|
935
975
|
method: "GET"
|
|
936
976
|
});
|
|
937
977
|
|
|
938
978
|
case 5:
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
return
|
|
979
|
+
_context15.t1 = _context15.sent;
|
|
980
|
+
_context15.next = 8;
|
|
981
|
+
return _context15.t0.ResponseToJson.call(_context15.t0, _context15.t1);
|
|
942
982
|
|
|
943
983
|
case 8:
|
|
944
|
-
return
|
|
984
|
+
return _context15.abrupt("return", _context15.sent);
|
|
945
985
|
|
|
946
986
|
case 11:
|
|
947
|
-
|
|
948
|
-
|
|
987
|
+
_context15.prev = 11;
|
|
988
|
+
_context15.t2 = _context15["catch"](1);
|
|
949
989
|
|
|
950
|
-
if (!(
|
|
951
|
-
|
|
990
|
+
if (!(_context15.t2.status === 404)) {
|
|
991
|
+
_context15.next = 15;
|
|
952
992
|
break;
|
|
953
993
|
}
|
|
954
994
|
|
|
955
|
-
return
|
|
995
|
+
return _context15.abrupt("return");
|
|
956
996
|
|
|
957
997
|
case 15:
|
|
958
|
-
throw
|
|
998
|
+
throw _context15.t2;
|
|
959
999
|
|
|
960
1000
|
case 16:
|
|
961
1001
|
case "end":
|
|
962
|
-
return
|
|
1002
|
+
return _context15.stop();
|
|
963
1003
|
}
|
|
964
1004
|
}
|
|
965
|
-
},
|
|
1005
|
+
}, _callee15, this, [[1, 11]]);
|
|
966
1006
|
}));
|
|
967
1007
|
|
|
968
|
-
return function (
|
|
969
|
-
return
|
|
1008
|
+
return function (_x8) {
|
|
1009
|
+
return _ref30.apply(this, arguments);
|
|
970
1010
|
};
|
|
971
1011
|
}();
|
|
972
1012
|
/**
|
|
@@ -983,40 +1023,40 @@ exports.ListingStatus = /*#__PURE__*/function () {
|
|
|
983
1023
|
|
|
984
1024
|
|
|
985
1025
|
exports.Listing = /*#__PURE__*/function () {
|
|
986
|
-
var
|
|
1026
|
+
var _ref32 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(_ref31) {
|
|
987
1027
|
var listingId;
|
|
988
|
-
return _regeneratorRuntime.wrap(function
|
|
1028
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
989
1029
|
while (1) {
|
|
990
|
-
switch (
|
|
1030
|
+
switch (_context16.prev = _context16.next) {
|
|
991
1031
|
case 0:
|
|
992
|
-
listingId =
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
1032
|
+
listingId = _ref31.listingId;
|
|
1033
|
+
_context16.t0 = FormatNFT;
|
|
1034
|
+
_context16.t1 = Utils;
|
|
1035
|
+
_context16.next = 5;
|
|
996
1036
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
997
1037
|
path: UrlJoin("as", "mkt", "l", listingId),
|
|
998
1038
|
method: "GET"
|
|
999
1039
|
});
|
|
1000
1040
|
|
|
1001
1041
|
case 5:
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
return
|
|
1042
|
+
_context16.t2 = _context16.sent;
|
|
1043
|
+
_context16.next = 8;
|
|
1044
|
+
return _context16.t1.ResponseToJson.call(_context16.t1, _context16.t2);
|
|
1005
1045
|
|
|
1006
1046
|
case 8:
|
|
1007
|
-
|
|
1008
|
-
return
|
|
1047
|
+
_context16.t3 = _context16.sent;
|
|
1048
|
+
return _context16.abrupt("return", (0, _context16.t0)(_context16.t3));
|
|
1009
1049
|
|
|
1010
1050
|
case 10:
|
|
1011
1051
|
case "end":
|
|
1012
|
-
return
|
|
1052
|
+
return _context16.stop();
|
|
1013
1053
|
}
|
|
1014
1054
|
}
|
|
1015
|
-
},
|
|
1055
|
+
}, _callee16, this);
|
|
1016
1056
|
}));
|
|
1017
1057
|
|
|
1018
|
-
return function (
|
|
1019
|
-
return
|
|
1058
|
+
return function (_x9) {
|
|
1059
|
+
return _ref32.apply(this, arguments);
|
|
1020
1060
|
};
|
|
1021
1061
|
}();
|
|
1022
1062
|
/**
|
|
@@ -1052,22 +1092,22 @@ exports.Listing = /*#__PURE__*/function () {
|
|
|
1052
1092
|
*/
|
|
1053
1093
|
|
|
1054
1094
|
|
|
1055
|
-
exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1056
|
-
var
|
|
1057
|
-
return _regeneratorRuntime.wrap(function
|
|
1095
|
+
exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17() {
|
|
1096
|
+
var _args17 = arguments;
|
|
1097
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
1058
1098
|
while (1) {
|
|
1059
|
-
switch (
|
|
1099
|
+
switch (_context17.prev = _context17.next) {
|
|
1060
1100
|
case 0:
|
|
1061
|
-
return
|
|
1101
|
+
return _context17.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1062
1102
|
mode: "listings"
|
|
1063
|
-
},
|
|
1103
|
+
}, _args17[0] || {})));
|
|
1064
1104
|
|
|
1065
1105
|
case 1:
|
|
1066
1106
|
case "end":
|
|
1067
|
-
return
|
|
1107
|
+
return _context17.stop();
|
|
1068
1108
|
}
|
|
1069
1109
|
}
|
|
1070
|
-
},
|
|
1110
|
+
}, _callee17, this);
|
|
1071
1111
|
}));
|
|
1072
1112
|
/**
|
|
1073
1113
|
* Retrieve stats for listings matching the specified parameters.
|
|
@@ -1101,22 +1141,22 @@ exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRunt
|
|
|
1101
1141
|
* @returns {Promise<Object>} - Statistics about listings. All prices in USD.
|
|
1102
1142
|
*/
|
|
1103
1143
|
|
|
1104
|
-
exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1105
|
-
var
|
|
1106
|
-
return _regeneratorRuntime.wrap(function
|
|
1144
|
+
exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18() {
|
|
1145
|
+
var _args18 = arguments;
|
|
1146
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
1107
1147
|
while (1) {
|
|
1108
|
-
switch (
|
|
1148
|
+
switch (_context18.prev = _context18.next) {
|
|
1109
1149
|
case 0:
|
|
1110
|
-
return
|
|
1150
|
+
return _context18.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1111
1151
|
mode: "listing-stats"
|
|
1112
|
-
},
|
|
1152
|
+
}, _args18[0] || {})));
|
|
1113
1153
|
|
|
1114
1154
|
case 1:
|
|
1115
1155
|
case "end":
|
|
1116
|
-
return
|
|
1156
|
+
return _context18.stop();
|
|
1117
1157
|
}
|
|
1118
1158
|
}
|
|
1119
|
-
},
|
|
1159
|
+
}, _callee18, this);
|
|
1120
1160
|
}));
|
|
1121
1161
|
/**
|
|
1122
1162
|
* Retrieve sales matching the specified parameters.
|
|
@@ -1150,22 +1190,22 @@ exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
|
|
|
1150
1190
|
* @returns {Promise<Object>} - Results of the query and pagination info
|
|
1151
1191
|
*/
|
|
1152
1192
|
|
|
1153
|
-
exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1154
|
-
var
|
|
1155
|
-
return _regeneratorRuntime.wrap(function
|
|
1193
|
+
exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19() {
|
|
1194
|
+
var _args19 = arguments;
|
|
1195
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
1156
1196
|
while (1) {
|
|
1157
|
-
switch (
|
|
1197
|
+
switch (_context19.prev = _context19.next) {
|
|
1158
1198
|
case 0:
|
|
1159
|
-
return
|
|
1199
|
+
return _context19.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1160
1200
|
mode: "sales"
|
|
1161
|
-
},
|
|
1201
|
+
}, _args19[0] || {})));
|
|
1162
1202
|
|
|
1163
1203
|
case 1:
|
|
1164
1204
|
case "end":
|
|
1165
|
-
return
|
|
1205
|
+
return _context19.stop();
|
|
1166
1206
|
}
|
|
1167
1207
|
}
|
|
1168
|
-
},
|
|
1208
|
+
}, _callee19, this);
|
|
1169
1209
|
}));
|
|
1170
1210
|
/**
|
|
1171
1211
|
* Retrieve sales and transfers matching the specified parameters.
|
|
@@ -1199,22 +1239,22 @@ exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
|
|
1199
1239
|
* @returns {Promise<Object>} - Results of the query and pagination info
|
|
1200
1240
|
*/
|
|
1201
1241
|
|
|
1202
|
-
exports.Transfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1203
|
-
var
|
|
1204
|
-
return _regeneratorRuntime.wrap(function
|
|
1242
|
+
exports.Transfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20() {
|
|
1243
|
+
var _args20 = arguments;
|
|
1244
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
1205
1245
|
while (1) {
|
|
1206
|
-
switch (
|
|
1246
|
+
switch (_context20.prev = _context20.next) {
|
|
1207
1247
|
case 0:
|
|
1208
|
-
return
|
|
1248
|
+
return _context20.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1209
1249
|
mode: "transfers"
|
|
1210
|
-
},
|
|
1250
|
+
}, _args20[0] || {})));
|
|
1211
1251
|
|
|
1212
1252
|
case 1:
|
|
1213
1253
|
case "end":
|
|
1214
|
-
return
|
|
1254
|
+
return _context20.stop();
|
|
1215
1255
|
}
|
|
1216
1256
|
}
|
|
1217
|
-
},
|
|
1257
|
+
}, _callee20, this);
|
|
1218
1258
|
}));
|
|
1219
1259
|
/**
|
|
1220
1260
|
* Retrieve stats for listings matching the specified parameters.
|
|
@@ -1248,22 +1288,22 @@ exports.Transfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
|
|
|
1248
1288
|
* @returns {Promise<Object>} - Statistics about sales. All prices in USD.
|
|
1249
1289
|
*/
|
|
1250
1290
|
|
|
1251
|
-
exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1252
|
-
var
|
|
1253
|
-
return _regeneratorRuntime.wrap(function
|
|
1291
|
+
exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21() {
|
|
1292
|
+
var _args21 = arguments;
|
|
1293
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
1254
1294
|
while (1) {
|
|
1255
|
-
switch (
|
|
1295
|
+
switch (_context21.prev = _context21.next) {
|
|
1256
1296
|
case 0:
|
|
1257
|
-
return
|
|
1297
|
+
return _context21.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1258
1298
|
mode: "sales-stats"
|
|
1259
|
-
},
|
|
1299
|
+
}, _args21[0] || {})));
|
|
1260
1300
|
|
|
1261
1301
|
case 1:
|
|
1262
1302
|
case "end":
|
|
1263
|
-
return
|
|
1303
|
+
return _context21.stop();
|
|
1264
1304
|
}
|
|
1265
1305
|
}
|
|
1266
|
-
},
|
|
1306
|
+
}, _callee21, this);
|
|
1267
1307
|
}));
|
|
1268
1308
|
/**
|
|
1269
1309
|
* <b><i>Requires login</i></b>
|
|
@@ -1281,22 +1321,22 @@ exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRu
|
|
|
1281
1321
|
*/
|
|
1282
1322
|
|
|
1283
1323
|
exports.CreateListing = /*#__PURE__*/function () {
|
|
1284
|
-
var
|
|
1324
|
+
var _ref39 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(_ref38) {
|
|
1285
1325
|
var contractAddress, tokenId, price, listingId;
|
|
1286
|
-
return _regeneratorRuntime.wrap(function
|
|
1326
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
1287
1327
|
while (1) {
|
|
1288
|
-
switch (
|
|
1328
|
+
switch (_context22.prev = _context22.next) {
|
|
1289
1329
|
case 0:
|
|
1290
|
-
contractAddress =
|
|
1330
|
+
contractAddress = _ref38.contractAddress, tokenId = _ref38.tokenId, price = _ref38.price, listingId = _ref38.listingId;
|
|
1291
1331
|
contractAddress = Utils.FormatAddress(contractAddress);
|
|
1292
1332
|
|
|
1293
1333
|
if (!listingId) {
|
|
1294
|
-
|
|
1334
|
+
_context22.next = 12;
|
|
1295
1335
|
break;
|
|
1296
1336
|
}
|
|
1297
1337
|
|
|
1298
|
-
|
|
1299
|
-
|
|
1338
|
+
_context22.t0 = Utils;
|
|
1339
|
+
_context22.next = 6;
|
|
1300
1340
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1301
1341
|
path: UrlJoin("as", "wlt", "mkt"),
|
|
1302
1342
|
method: "PUT",
|
|
@@ -1310,16 +1350,16 @@ exports.CreateListing = /*#__PURE__*/function () {
|
|
|
1310
1350
|
});
|
|
1311
1351
|
|
|
1312
1352
|
case 6:
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
return
|
|
1353
|
+
_context22.t1 = _context22.sent;
|
|
1354
|
+
_context22.next = 9;
|
|
1355
|
+
return _context22.t0.ResponseToFormat.call(_context22.t0, "text", _context22.t1);
|
|
1316
1356
|
|
|
1317
1357
|
case 9:
|
|
1318
|
-
return
|
|
1358
|
+
return _context22.abrupt("return", _context22.sent);
|
|
1319
1359
|
|
|
1320
1360
|
case 12:
|
|
1321
|
-
|
|
1322
|
-
|
|
1361
|
+
_context22.t2 = Utils;
|
|
1362
|
+
_context22.next = 15;
|
|
1323
1363
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1324
1364
|
path: UrlJoin("as", "wlt", "mkt"),
|
|
1325
1365
|
method: "POST",
|
|
@@ -1334,23 +1374,23 @@ exports.CreateListing = /*#__PURE__*/function () {
|
|
|
1334
1374
|
});
|
|
1335
1375
|
|
|
1336
1376
|
case 15:
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
return
|
|
1377
|
+
_context22.t3 = _context22.sent;
|
|
1378
|
+
_context22.next = 18;
|
|
1379
|
+
return _context22.t2.ResponseToJson.call(_context22.t2, _context22.t3);
|
|
1340
1380
|
|
|
1341
1381
|
case 18:
|
|
1342
|
-
return
|
|
1382
|
+
return _context22.abrupt("return", _context22.sent);
|
|
1343
1383
|
|
|
1344
1384
|
case 19:
|
|
1345
1385
|
case "end":
|
|
1346
|
-
return
|
|
1386
|
+
return _context22.stop();
|
|
1347
1387
|
}
|
|
1348
1388
|
}
|
|
1349
|
-
},
|
|
1389
|
+
}, _callee22, this);
|
|
1350
1390
|
}));
|
|
1351
1391
|
|
|
1352
|
-
return function (
|
|
1353
|
-
return
|
|
1392
|
+
return function (_x10) {
|
|
1393
|
+
return _ref39.apply(this, arguments);
|
|
1354
1394
|
};
|
|
1355
1395
|
}();
|
|
1356
1396
|
/**
|
|
@@ -1365,14 +1405,14 @@ exports.CreateListing = /*#__PURE__*/function () {
|
|
|
1365
1405
|
|
|
1366
1406
|
|
|
1367
1407
|
exports.RemoveListing = /*#__PURE__*/function () {
|
|
1368
|
-
var
|
|
1408
|
+
var _ref41 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(_ref40) {
|
|
1369
1409
|
var listingId;
|
|
1370
|
-
return _regeneratorRuntime.wrap(function
|
|
1410
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
1371
1411
|
while (1) {
|
|
1372
|
-
switch (
|
|
1412
|
+
switch (_context23.prev = _context23.next) {
|
|
1373
1413
|
case 0:
|
|
1374
|
-
listingId =
|
|
1375
|
-
|
|
1414
|
+
listingId = _ref40.listingId;
|
|
1415
|
+
_context23.next = 3;
|
|
1376
1416
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1377
1417
|
path: UrlJoin("as", "wlt", "mkt", listingId),
|
|
1378
1418
|
method: "DELETE",
|
|
@@ -1383,14 +1423,14 @@ exports.RemoveListing = /*#__PURE__*/function () {
|
|
|
1383
1423
|
|
|
1384
1424
|
case 3:
|
|
1385
1425
|
case "end":
|
|
1386
|
-
return
|
|
1426
|
+
return _context23.stop();
|
|
1387
1427
|
}
|
|
1388
1428
|
}
|
|
1389
|
-
},
|
|
1429
|
+
}, _callee23, this);
|
|
1390
1430
|
}));
|
|
1391
1431
|
|
|
1392
|
-
return function (
|
|
1393
|
-
return
|
|
1432
|
+
return function (_x11) {
|
|
1433
|
+
return _ref41.apply(this, arguments);
|
|
1394
1434
|
};
|
|
1395
1435
|
}();
|
|
1396
1436
|
/**
|
|
@@ -1407,30 +1447,30 @@ exports.RemoveListing = /*#__PURE__*/function () {
|
|
|
1407
1447
|
|
|
1408
1448
|
|
|
1409
1449
|
exports.ListingNames = /*#__PURE__*/function () {
|
|
1410
|
-
var
|
|
1450
|
+
var _ref43 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(_ref42) {
|
|
1411
1451
|
var marketplaceParams, tenantId;
|
|
1412
|
-
return _regeneratorRuntime.wrap(function
|
|
1452
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
1413
1453
|
while (1) {
|
|
1414
|
-
switch (
|
|
1454
|
+
switch (_context24.prev = _context24.next) {
|
|
1415
1455
|
case 0:
|
|
1416
|
-
marketplaceParams =
|
|
1456
|
+
marketplaceParams = _ref42.marketplaceParams;
|
|
1417
1457
|
|
|
1418
1458
|
if (!marketplaceParams) {
|
|
1419
|
-
|
|
1459
|
+
_context24.next = 5;
|
|
1420
1460
|
break;
|
|
1421
1461
|
}
|
|
1422
1462
|
|
|
1423
|
-
|
|
1463
|
+
_context24.next = 4;
|
|
1424
1464
|
return this.MarketplaceInfo({
|
|
1425
1465
|
marketplaceParams: marketplaceParams
|
|
1426
1466
|
});
|
|
1427
1467
|
|
|
1428
1468
|
case 4:
|
|
1429
|
-
tenantId =
|
|
1469
|
+
tenantId = _context24.sent.tenantId;
|
|
1430
1470
|
|
|
1431
1471
|
case 5:
|
|
1432
|
-
|
|
1433
|
-
|
|
1472
|
+
_context24.t0 = Utils;
|
|
1473
|
+
_context24.next = 8;
|
|
1434
1474
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1435
1475
|
path: UrlJoin("as", "mkt", "names"),
|
|
1436
1476
|
method: "GET",
|
|
@@ -1440,23 +1480,23 @@ exports.ListingNames = /*#__PURE__*/function () {
|
|
|
1440
1480
|
});
|
|
1441
1481
|
|
|
1442
1482
|
case 8:
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
return
|
|
1483
|
+
_context24.t1 = _context24.sent;
|
|
1484
|
+
_context24.next = 11;
|
|
1485
|
+
return _context24.t0.ResponseToJson.call(_context24.t0, _context24.t1);
|
|
1446
1486
|
|
|
1447
1487
|
case 11:
|
|
1448
|
-
return
|
|
1488
|
+
return _context24.abrupt("return", _context24.sent);
|
|
1449
1489
|
|
|
1450
1490
|
case 12:
|
|
1451
1491
|
case "end":
|
|
1452
|
-
return
|
|
1492
|
+
return _context24.stop();
|
|
1453
1493
|
}
|
|
1454
1494
|
}
|
|
1455
|
-
},
|
|
1495
|
+
}, _callee24, this);
|
|
1456
1496
|
}));
|
|
1457
1497
|
|
|
1458
|
-
return function (
|
|
1459
|
-
return
|
|
1498
|
+
return function (_x12) {
|
|
1499
|
+
return _ref43.apply(this, arguments);
|
|
1460
1500
|
};
|
|
1461
1501
|
}();
|
|
1462
1502
|
/**
|
|
@@ -1471,15 +1511,15 @@ exports.ListingNames = /*#__PURE__*/function () {
|
|
|
1471
1511
|
|
|
1472
1512
|
|
|
1473
1513
|
exports.ListingEditionNames = /*#__PURE__*/function () {
|
|
1474
|
-
var
|
|
1514
|
+
var _ref45 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(_ref44) {
|
|
1475
1515
|
var displayName;
|
|
1476
|
-
return _regeneratorRuntime.wrap(function
|
|
1516
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
1477
1517
|
while (1) {
|
|
1478
|
-
switch (
|
|
1518
|
+
switch (_context25.prev = _context25.next) {
|
|
1479
1519
|
case 0:
|
|
1480
|
-
displayName =
|
|
1481
|
-
|
|
1482
|
-
|
|
1520
|
+
displayName = _ref44.displayName;
|
|
1521
|
+
_context25.t0 = Utils;
|
|
1522
|
+
_context25.next = 4;
|
|
1483
1523
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1484
1524
|
path: UrlJoin("as", "mkt", "editions"),
|
|
1485
1525
|
queryParams: {
|
|
@@ -1489,23 +1529,23 @@ exports.ListingEditionNames = /*#__PURE__*/function () {
|
|
|
1489
1529
|
});
|
|
1490
1530
|
|
|
1491
1531
|
case 4:
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
return
|
|
1532
|
+
_context25.t1 = _context25.sent;
|
|
1533
|
+
_context25.next = 7;
|
|
1534
|
+
return _context25.t0.ResponseToJson.call(_context25.t0, _context25.t1);
|
|
1495
1535
|
|
|
1496
1536
|
case 7:
|
|
1497
|
-
return
|
|
1537
|
+
return _context25.abrupt("return", _context25.sent);
|
|
1498
1538
|
|
|
1499
1539
|
case 8:
|
|
1500
1540
|
case "end":
|
|
1501
|
-
return
|
|
1541
|
+
return _context25.stop();
|
|
1502
1542
|
}
|
|
1503
1543
|
}
|
|
1504
|
-
},
|
|
1544
|
+
}, _callee25, this);
|
|
1505
1545
|
}));
|
|
1506
1546
|
|
|
1507
|
-
return function (
|
|
1508
|
-
return
|
|
1547
|
+
return function (_x13) {
|
|
1548
|
+
return _ref45.apply(this, arguments);
|
|
1509
1549
|
};
|
|
1510
1550
|
}();
|
|
1511
1551
|
/**
|
|
@@ -1522,46 +1562,46 @@ exports.ListingEditionNames = /*#__PURE__*/function () {
|
|
|
1522
1562
|
*/
|
|
1523
1563
|
|
|
1524
1564
|
|
|
1525
|
-
exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1526
|
-
var
|
|
1565
|
+
exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26() {
|
|
1566
|
+
var _ref47,
|
|
1527
1567
|
marketplaceParams,
|
|
1528
1568
|
displayName,
|
|
1529
1569
|
filters,
|
|
1530
1570
|
attributes,
|
|
1531
|
-
|
|
1571
|
+
_args26 = arguments;
|
|
1532
1572
|
|
|
1533
|
-
return _regeneratorRuntime.wrap(function
|
|
1573
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
1534
1574
|
while (1) {
|
|
1535
|
-
switch (
|
|
1575
|
+
switch (_context26.prev = _context26.next) {
|
|
1536
1576
|
case 0:
|
|
1537
|
-
|
|
1577
|
+
_ref47 = _args26.length > 0 && _args26[0] !== undefined ? _args26[0] : {}, marketplaceParams = _ref47.marketplaceParams, displayName = _ref47.displayName;
|
|
1538
1578
|
filters = [];
|
|
1539
1579
|
|
|
1540
1580
|
if (!marketplaceParams) {
|
|
1541
|
-
|
|
1581
|
+
_context26.next = 10;
|
|
1542
1582
|
break;
|
|
1543
1583
|
}
|
|
1544
1584
|
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1585
|
+
_context26.t0 = filters;
|
|
1586
|
+
_context26.t1 = "tenant:eq:";
|
|
1587
|
+
_context26.next = 7;
|
|
1548
1588
|
return this.MarketplaceInfo({
|
|
1549
1589
|
marketplaceParams: marketplaceParams
|
|
1550
1590
|
});
|
|
1551
1591
|
|
|
1552
1592
|
case 7:
|
|
1553
|
-
|
|
1554
|
-
|
|
1593
|
+
_context26.t2 = _context26.sent.tenantId;
|
|
1594
|
+
_context26.t3 = _context26.t1.concat.call(_context26.t1, _context26.t2);
|
|
1555
1595
|
|
|
1556
|
-
|
|
1596
|
+
_context26.t0.push.call(_context26.t0, _context26.t3);
|
|
1557
1597
|
|
|
1558
1598
|
case 10:
|
|
1559
1599
|
if (displayName) {
|
|
1560
1600
|
filters.push("nft/display_name:eq:".concat(displayName));
|
|
1561
1601
|
}
|
|
1562
1602
|
|
|
1563
|
-
|
|
1564
|
-
|
|
1603
|
+
_context26.t4 = Utils;
|
|
1604
|
+
_context26.next = 14;
|
|
1565
1605
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1566
1606
|
path: UrlJoin("as", "mkt", "attributes"),
|
|
1567
1607
|
method: "GET",
|
|
@@ -1571,30 +1611,30 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
|
|
|
1571
1611
|
});
|
|
1572
1612
|
|
|
1573
1613
|
case 14:
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
return
|
|
1614
|
+
_context26.t5 = _context26.sent;
|
|
1615
|
+
_context26.next = 17;
|
|
1616
|
+
return _context26.t4.ResponseToJson.call(_context26.t4, _context26.t5);
|
|
1577
1617
|
|
|
1578
1618
|
case 17:
|
|
1579
|
-
attributes =
|
|
1580
|
-
return
|
|
1581
|
-
var trait_type =
|
|
1582
|
-
values =
|
|
1619
|
+
attributes = _context26.sent;
|
|
1620
|
+
return _context26.abrupt("return", attributes.map(function (_ref48) {
|
|
1621
|
+
var trait_type = _ref48.trait_type,
|
|
1622
|
+
values = _ref48.values;
|
|
1583
1623
|
return {
|
|
1584
1624
|
name: trait_type,
|
|
1585
1625
|
values: values
|
|
1586
1626
|
};
|
|
1587
|
-
}).filter(function (
|
|
1588
|
-
var name =
|
|
1627
|
+
}).filter(function (_ref49) {
|
|
1628
|
+
var name = _ref49.name;
|
|
1589
1629
|
return !["Content Fabric Hash", "Total Minted Supply", "Creator"].includes(name);
|
|
1590
1630
|
}));
|
|
1591
1631
|
|
|
1592
1632
|
case 19:
|
|
1593
1633
|
case "end":
|
|
1594
|
-
return
|
|
1634
|
+
return _context26.stop();
|
|
1595
1635
|
}
|
|
1596
1636
|
}
|
|
1597
|
-
},
|
|
1637
|
+
}, _callee26, this);
|
|
1598
1638
|
}));
|
|
1599
1639
|
/* MINTING STATUS */
|
|
1600
1640
|
|
|
@@ -1610,61 +1650,61 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
|
|
|
1610
1650
|
*/
|
|
1611
1651
|
|
|
1612
1652
|
exports.ListingPurchaseStatus = /*#__PURE__*/function () {
|
|
1613
|
-
var
|
|
1653
|
+
var _ref51 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(_ref50) {
|
|
1614
1654
|
var listingId, confirmationId, listingStatus, statuses;
|
|
1615
|
-
return _regeneratorRuntime.wrap(function
|
|
1655
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
1616
1656
|
while (1) {
|
|
1617
|
-
switch (
|
|
1657
|
+
switch (_context27.prev = _context27.next) {
|
|
1618
1658
|
case 0:
|
|
1619
|
-
listingId =
|
|
1620
|
-
|
|
1621
|
-
|
|
1659
|
+
listingId = _ref50.listingId, confirmationId = _ref50.confirmationId;
|
|
1660
|
+
_context27.prev = 1;
|
|
1661
|
+
_context27.next = 4;
|
|
1622
1662
|
return this.ListingStatus({
|
|
1623
1663
|
listingId: listingId
|
|
1624
1664
|
});
|
|
1625
1665
|
|
|
1626
1666
|
case 4:
|
|
1627
|
-
listingStatus =
|
|
1667
|
+
listingStatus = _context27.sent;
|
|
1628
1668
|
|
|
1629
1669
|
if (listingStatus) {
|
|
1630
|
-
|
|
1670
|
+
_context27.next = 7;
|
|
1631
1671
|
break;
|
|
1632
1672
|
}
|
|
1633
1673
|
|
|
1634
1674
|
throw Error("Unable to find info for listing " + listingId);
|
|
1635
1675
|
|
|
1636
1676
|
case 7:
|
|
1637
|
-
|
|
1677
|
+
_context27.next = 9;
|
|
1638
1678
|
return this.MintingStatus({
|
|
1639
1679
|
tenantId: listingStatus.tenant
|
|
1640
1680
|
});
|
|
1641
1681
|
|
|
1642
1682
|
case 9:
|
|
1643
|
-
statuses =
|
|
1644
|
-
return
|
|
1683
|
+
statuses = _context27.sent;
|
|
1684
|
+
return _context27.abrupt("return", statuses.find(function (status) {
|
|
1645
1685
|
return status.op === "nft-transfer" && status.extra && status.extra[0] === confirmationId;
|
|
1646
1686
|
}) || {
|
|
1647
1687
|
status: "none"
|
|
1648
1688
|
});
|
|
1649
1689
|
|
|
1650
1690
|
case 13:
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
this.Log(
|
|
1654
|
-
return
|
|
1691
|
+
_context27.prev = 13;
|
|
1692
|
+
_context27.t0 = _context27["catch"](1);
|
|
1693
|
+
this.Log(_context27.t0, true);
|
|
1694
|
+
return _context27.abrupt("return", {
|
|
1655
1695
|
status: "unknown"
|
|
1656
1696
|
});
|
|
1657
1697
|
|
|
1658
1698
|
case 17:
|
|
1659
1699
|
case "end":
|
|
1660
|
-
return
|
|
1700
|
+
return _context27.stop();
|
|
1661
1701
|
}
|
|
1662
1702
|
}
|
|
1663
|
-
},
|
|
1703
|
+
}, _callee27, this, [[1, 13]]);
|
|
1664
1704
|
}));
|
|
1665
1705
|
|
|
1666
|
-
return function (
|
|
1667
|
-
return
|
|
1706
|
+
return function (_x14) {
|
|
1707
|
+
return _ref51.apply(this, arguments);
|
|
1668
1708
|
};
|
|
1669
1709
|
}();
|
|
1670
1710
|
/**
|
|
@@ -1680,52 +1720,52 @@ exports.ListingPurchaseStatus = /*#__PURE__*/function () {
|
|
|
1680
1720
|
|
|
1681
1721
|
|
|
1682
1722
|
exports.PurchaseStatus = /*#__PURE__*/function () {
|
|
1683
|
-
var
|
|
1723
|
+
var _ref53 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref52) {
|
|
1684
1724
|
var marketplaceParams, confirmationId, marketplaceInfo, statuses;
|
|
1685
|
-
return _regeneratorRuntime.wrap(function
|
|
1725
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
1686
1726
|
while (1) {
|
|
1687
|
-
switch (
|
|
1727
|
+
switch (_context28.prev = _context28.next) {
|
|
1688
1728
|
case 0:
|
|
1689
|
-
marketplaceParams =
|
|
1690
|
-
|
|
1691
|
-
|
|
1729
|
+
marketplaceParams = _ref52.marketplaceParams, confirmationId = _ref52.confirmationId;
|
|
1730
|
+
_context28.prev = 1;
|
|
1731
|
+
_context28.next = 4;
|
|
1692
1732
|
return this.MarketplaceInfo({
|
|
1693
1733
|
marketplaceParams: marketplaceParams
|
|
1694
1734
|
});
|
|
1695
1735
|
|
|
1696
1736
|
case 4:
|
|
1697
|
-
marketplaceInfo =
|
|
1698
|
-
|
|
1737
|
+
marketplaceInfo = _context28.sent;
|
|
1738
|
+
_context28.next = 7;
|
|
1699
1739
|
return this.MintingStatus({
|
|
1700
1740
|
tenantId: marketplaceInfo.tenant_id
|
|
1701
1741
|
});
|
|
1702
1742
|
|
|
1703
1743
|
case 7:
|
|
1704
|
-
statuses =
|
|
1705
|
-
return
|
|
1744
|
+
statuses = _context28.sent;
|
|
1745
|
+
return _context28.abrupt("return", statuses.find(function (status) {
|
|
1706
1746
|
return status.op === "nft-buy" && status.confirmationId === confirmationId;
|
|
1707
1747
|
}) || {
|
|
1708
1748
|
status: "none"
|
|
1709
1749
|
});
|
|
1710
1750
|
|
|
1711
1751
|
case 11:
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
this.Log(
|
|
1715
|
-
return
|
|
1752
|
+
_context28.prev = 11;
|
|
1753
|
+
_context28.t0 = _context28["catch"](1);
|
|
1754
|
+
this.Log(_context28.t0, true);
|
|
1755
|
+
return _context28.abrupt("return", {
|
|
1716
1756
|
status: "unknown"
|
|
1717
1757
|
});
|
|
1718
1758
|
|
|
1719
1759
|
case 15:
|
|
1720
1760
|
case "end":
|
|
1721
|
-
return
|
|
1761
|
+
return _context28.stop();
|
|
1722
1762
|
}
|
|
1723
1763
|
}
|
|
1724
|
-
},
|
|
1764
|
+
}, _callee28, this, [[1, 11]]);
|
|
1725
1765
|
}));
|
|
1726
1766
|
|
|
1727
|
-
return function (
|
|
1728
|
-
return
|
|
1767
|
+
return function (_x15) {
|
|
1768
|
+
return _ref53.apply(this, arguments);
|
|
1729
1769
|
};
|
|
1730
1770
|
}();
|
|
1731
1771
|
/**
|
|
@@ -1741,52 +1781,52 @@ exports.PurchaseStatus = /*#__PURE__*/function () {
|
|
|
1741
1781
|
|
|
1742
1782
|
|
|
1743
1783
|
exports.ClaimStatus = /*#__PURE__*/function () {
|
|
1744
|
-
var
|
|
1784
|
+
var _ref55 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref54) {
|
|
1745
1785
|
var marketplaceParams, sku, marketplaceInfo, statuses;
|
|
1746
|
-
return _regeneratorRuntime.wrap(function
|
|
1786
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
1747
1787
|
while (1) {
|
|
1748
|
-
switch (
|
|
1788
|
+
switch (_context29.prev = _context29.next) {
|
|
1749
1789
|
case 0:
|
|
1750
|
-
marketplaceParams =
|
|
1751
|
-
|
|
1752
|
-
|
|
1790
|
+
marketplaceParams = _ref54.marketplaceParams, sku = _ref54.sku;
|
|
1791
|
+
_context29.prev = 1;
|
|
1792
|
+
_context29.next = 4;
|
|
1753
1793
|
return this.MarketplaceInfo({
|
|
1754
1794
|
marketplaceParams: marketplaceParams
|
|
1755
1795
|
});
|
|
1756
1796
|
|
|
1757
1797
|
case 4:
|
|
1758
|
-
marketplaceInfo =
|
|
1759
|
-
|
|
1798
|
+
marketplaceInfo = _context29.sent;
|
|
1799
|
+
_context29.next = 7;
|
|
1760
1800
|
return this.MintingStatus({
|
|
1761
1801
|
tenantId: marketplaceInfo.tenantId
|
|
1762
1802
|
});
|
|
1763
1803
|
|
|
1764
1804
|
case 7:
|
|
1765
|
-
statuses =
|
|
1766
|
-
return
|
|
1805
|
+
statuses = _context29.sent;
|
|
1806
|
+
return _context29.abrupt("return", statuses.find(function (status) {
|
|
1767
1807
|
return status.op === "nft-claim" && status.marketplaceId === marketplaceInfo.marketplaceId && status.confirmationId === sku;
|
|
1768
1808
|
}) || {
|
|
1769
1809
|
status: "none"
|
|
1770
1810
|
});
|
|
1771
1811
|
|
|
1772
1812
|
case 11:
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
this.Log(
|
|
1776
|
-
return
|
|
1813
|
+
_context29.prev = 11;
|
|
1814
|
+
_context29.t0 = _context29["catch"](1);
|
|
1815
|
+
this.Log(_context29.t0, true);
|
|
1816
|
+
return _context29.abrupt("return", {
|
|
1777
1817
|
status: "unknown"
|
|
1778
1818
|
});
|
|
1779
1819
|
|
|
1780
1820
|
case 15:
|
|
1781
1821
|
case "end":
|
|
1782
|
-
return
|
|
1822
|
+
return _context29.stop();
|
|
1783
1823
|
}
|
|
1784
1824
|
}
|
|
1785
|
-
},
|
|
1825
|
+
}, _callee29, this, [[1, 11]]);
|
|
1786
1826
|
}));
|
|
1787
1827
|
|
|
1788
|
-
return function (
|
|
1789
|
-
return
|
|
1828
|
+
return function (_x16) {
|
|
1829
|
+
return _ref55.apply(this, arguments);
|
|
1790
1830
|
};
|
|
1791
1831
|
}();
|
|
1792
1832
|
/**
|
|
@@ -1802,52 +1842,52 @@ exports.ClaimStatus = /*#__PURE__*/function () {
|
|
|
1802
1842
|
|
|
1803
1843
|
|
|
1804
1844
|
exports.PackOpenStatus = /*#__PURE__*/function () {
|
|
1805
|
-
var
|
|
1845
|
+
var _ref57 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(_ref56) {
|
|
1806
1846
|
var contractAddress, tokenId, tenantConfig, statuses;
|
|
1807
|
-
return _regeneratorRuntime.wrap(function
|
|
1847
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
1808
1848
|
while (1) {
|
|
1809
|
-
switch (
|
|
1849
|
+
switch (_context30.prev = _context30.next) {
|
|
1810
1850
|
case 0:
|
|
1811
|
-
contractAddress =
|
|
1812
|
-
|
|
1813
|
-
|
|
1851
|
+
contractAddress = _ref56.contractAddress, tokenId = _ref56.tokenId;
|
|
1852
|
+
_context30.prev = 1;
|
|
1853
|
+
_context30.next = 4;
|
|
1814
1854
|
return this.TenantConfiguration({
|
|
1815
1855
|
contractAddress: contractAddress
|
|
1816
1856
|
});
|
|
1817
1857
|
|
|
1818
1858
|
case 4:
|
|
1819
|
-
tenantConfig =
|
|
1820
|
-
|
|
1859
|
+
tenantConfig = _context30.sent;
|
|
1860
|
+
_context30.next = 7;
|
|
1821
1861
|
return this.MintingStatus({
|
|
1822
1862
|
tenantId: tenantConfig.tenant
|
|
1823
1863
|
});
|
|
1824
1864
|
|
|
1825
1865
|
case 7:
|
|
1826
|
-
statuses =
|
|
1827
|
-
return
|
|
1866
|
+
statuses = _context30.sent;
|
|
1867
|
+
return _context30.abrupt("return", statuses.find(function (status) {
|
|
1828
1868
|
return status.op === "nft-open" && Utils.EqualAddress(contractAddress, status.address) && status.tokenId === tokenId;
|
|
1829
1869
|
}) || {
|
|
1830
1870
|
status: "none"
|
|
1831
1871
|
});
|
|
1832
1872
|
|
|
1833
1873
|
case 11:
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
this.Log(
|
|
1837
|
-
return
|
|
1874
|
+
_context30.prev = 11;
|
|
1875
|
+
_context30.t0 = _context30["catch"](1);
|
|
1876
|
+
this.Log(_context30.t0, true);
|
|
1877
|
+
return _context30.abrupt("return", {
|
|
1838
1878
|
status: "unknown"
|
|
1839
1879
|
});
|
|
1840
1880
|
|
|
1841
1881
|
case 15:
|
|
1842
1882
|
case "end":
|
|
1843
|
-
return
|
|
1883
|
+
return _context30.stop();
|
|
1844
1884
|
}
|
|
1845
1885
|
}
|
|
1846
|
-
},
|
|
1886
|
+
}, _callee30, this, [[1, 11]]);
|
|
1847
1887
|
}));
|
|
1848
1888
|
|
|
1849
|
-
return function (
|
|
1850
|
-
return
|
|
1889
|
+
return function (_x17) {
|
|
1890
|
+
return _ref57.apply(this, arguments);
|
|
1851
1891
|
};
|
|
1852
1892
|
}();
|
|
1853
1893
|
/**
|
|
@@ -1863,60 +1903,60 @@ exports.PackOpenStatus = /*#__PURE__*/function () {
|
|
|
1863
1903
|
|
|
1864
1904
|
|
|
1865
1905
|
exports.CollectionRedemptionStatus = /*#__PURE__*/function () {
|
|
1866
|
-
var
|
|
1906
|
+
var _ref59 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(_ref58) {
|
|
1867
1907
|
var marketplaceParams, confirmationId, statuses;
|
|
1868
|
-
return _regeneratorRuntime.wrap(function
|
|
1908
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
1869
1909
|
while (1) {
|
|
1870
|
-
switch (
|
|
1910
|
+
switch (_context31.prev = _context31.next) {
|
|
1871
1911
|
case 0:
|
|
1872
|
-
marketplaceParams =
|
|
1873
|
-
|
|
1874
|
-
|
|
1912
|
+
marketplaceParams = _ref58.marketplaceParams, confirmationId = _ref58.confirmationId;
|
|
1913
|
+
_context31.prev = 1;
|
|
1914
|
+
_context31.next = 4;
|
|
1875
1915
|
return this.MintingStatus({
|
|
1876
1916
|
marketplaceParams: marketplaceParams
|
|
1877
1917
|
});
|
|
1878
1918
|
|
|
1879
1919
|
case 4:
|
|
1880
|
-
statuses =
|
|
1881
|
-
return
|
|
1920
|
+
statuses = _context31.sent;
|
|
1921
|
+
return _context31.abrupt("return", statuses.find(function (status) {
|
|
1882
1922
|
return status.op === "nft-redeem" && status.confirmationId === confirmationId;
|
|
1883
1923
|
}) || {
|
|
1884
1924
|
status: "none"
|
|
1885
1925
|
});
|
|
1886
1926
|
|
|
1887
1927
|
case 8:
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
this.Log(
|
|
1891
|
-
return
|
|
1928
|
+
_context31.prev = 8;
|
|
1929
|
+
_context31.t0 = _context31["catch"](1);
|
|
1930
|
+
this.Log(_context31.t0, true);
|
|
1931
|
+
return _context31.abrupt("return", {
|
|
1892
1932
|
status: "unknown"
|
|
1893
1933
|
});
|
|
1894
1934
|
|
|
1895
1935
|
case 12:
|
|
1896
1936
|
case "end":
|
|
1897
|
-
return
|
|
1937
|
+
return _context31.stop();
|
|
1898
1938
|
}
|
|
1899
1939
|
}
|
|
1900
|
-
},
|
|
1940
|
+
}, _callee31, this, [[1, 8]]);
|
|
1901
1941
|
}));
|
|
1902
1942
|
|
|
1903
|
-
return function (
|
|
1904
|
-
return
|
|
1943
|
+
return function (_x18) {
|
|
1944
|
+
return _ref59.apply(this, arguments);
|
|
1905
1945
|
};
|
|
1906
1946
|
}();
|
|
1907
1947
|
/* EVENTS */
|
|
1908
1948
|
|
|
1909
1949
|
|
|
1910
1950
|
exports.LoadDrop = /*#__PURE__*/function () {
|
|
1911
|
-
var
|
|
1951
|
+
var _ref61 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(_ref60) {
|
|
1912
1952
|
var _this2 = this;
|
|
1913
1953
|
|
|
1914
1954
|
var tenantSlug, eventSlug, dropId, mainSiteHash, event, eventId;
|
|
1915
|
-
return _regeneratorRuntime.wrap(function
|
|
1955
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
1916
1956
|
while (1) {
|
|
1917
|
-
switch (
|
|
1957
|
+
switch (_context32.prev = _context32.next) {
|
|
1918
1958
|
case 0:
|
|
1919
|
-
tenantSlug =
|
|
1959
|
+
tenantSlug = _ref60.tenantSlug, eventSlug = _ref60.eventSlug, dropId = _ref60.dropId;
|
|
1920
1960
|
|
|
1921
1961
|
if (!this.drops) {
|
|
1922
1962
|
this.drops = {};
|
|
@@ -1931,18 +1971,18 @@ exports.LoadDrop = /*#__PURE__*/function () {
|
|
|
1931
1971
|
}
|
|
1932
1972
|
|
|
1933
1973
|
if (this.drops[tenantSlug][eventSlug][dropId]) {
|
|
1934
|
-
|
|
1974
|
+
_context32.next = 16;
|
|
1935
1975
|
break;
|
|
1936
1976
|
}
|
|
1937
1977
|
|
|
1938
|
-
|
|
1978
|
+
_context32.next = 7;
|
|
1939
1979
|
return this.client.LatestVersionHash({
|
|
1940
1980
|
objectId: this.mainSiteId
|
|
1941
1981
|
});
|
|
1942
1982
|
|
|
1943
1983
|
case 7:
|
|
1944
|
-
mainSiteHash =
|
|
1945
|
-
|
|
1984
|
+
mainSiteHash = _context32.sent;
|
|
1985
|
+
_context32.next = 10;
|
|
1946
1986
|
return this.client.ContentObjectMetadata({
|
|
1947
1987
|
versionHash: mainSiteHash,
|
|
1948
1988
|
metadataSubtree: UrlJoin("public", "asset_metadata", "tenants", tenantSlug, "sites", eventSlug, "info"),
|
|
@@ -1955,17 +1995,17 @@ exports.LoadDrop = /*#__PURE__*/function () {
|
|
|
1955
1995
|
});
|
|
1956
1996
|
|
|
1957
1997
|
case 10:
|
|
1958
|
-
|
|
1998
|
+
_context32.t0 = _context32.sent;
|
|
1959
1999
|
|
|
1960
|
-
if (
|
|
1961
|
-
|
|
2000
|
+
if (_context32.t0) {
|
|
2001
|
+
_context32.next = 13;
|
|
1962
2002
|
break;
|
|
1963
2003
|
}
|
|
1964
2004
|
|
|
1965
|
-
|
|
2005
|
+
_context32.t0 = [];
|
|
1966
2006
|
|
|
1967
2007
|
case 13:
|
|
1968
|
-
event =
|
|
2008
|
+
event = _context32.t0;
|
|
1969
2009
|
eventId = Utils.DecodeVersionHash(event["."].source).objectId;
|
|
1970
2010
|
event.drops.forEach(function (drop) {
|
|
1971
2011
|
drop = _objectSpread(_objectSpread({}, drop), {}, {
|
|
@@ -1976,37 +2016,37 @@ exports.LoadDrop = /*#__PURE__*/function () {
|
|
|
1976
2016
|
});
|
|
1977
2017
|
|
|
1978
2018
|
case 16:
|
|
1979
|
-
return
|
|
2019
|
+
return _context32.abrupt("return", this.drops[dropId]);
|
|
1980
2020
|
|
|
1981
2021
|
case 17:
|
|
1982
2022
|
case "end":
|
|
1983
|
-
return
|
|
2023
|
+
return _context32.stop();
|
|
1984
2024
|
}
|
|
1985
2025
|
}
|
|
1986
|
-
},
|
|
2026
|
+
}, _callee32, this);
|
|
1987
2027
|
}));
|
|
1988
2028
|
|
|
1989
|
-
return function (
|
|
1990
|
-
return
|
|
2029
|
+
return function (_x19) {
|
|
2030
|
+
return _ref61.apply(this, arguments);
|
|
1991
2031
|
};
|
|
1992
2032
|
}();
|
|
1993
2033
|
|
|
1994
2034
|
exports.SubmitDropVote = /*#__PURE__*/function () {
|
|
1995
|
-
var
|
|
2035
|
+
var _ref63 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(_ref62) {
|
|
1996
2036
|
var marketplaceParams, eventId, dropId, sku, marketplaceInfo;
|
|
1997
|
-
return _regeneratorRuntime.wrap(function
|
|
2037
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
1998
2038
|
while (1) {
|
|
1999
|
-
switch (
|
|
2039
|
+
switch (_context33.prev = _context33.next) {
|
|
2000
2040
|
case 0:
|
|
2001
|
-
marketplaceParams =
|
|
2002
|
-
|
|
2041
|
+
marketplaceParams = _ref62.marketplaceParams, eventId = _ref62.eventId, dropId = _ref62.dropId, sku = _ref62.sku;
|
|
2042
|
+
_context33.next = 3;
|
|
2003
2043
|
return this.MarketplaceInfo({
|
|
2004
2044
|
marketplaceParams: marketplaceParams
|
|
2005
2045
|
});
|
|
2006
2046
|
|
|
2007
2047
|
case 3:
|
|
2008
|
-
marketplaceInfo =
|
|
2009
|
-
|
|
2048
|
+
marketplaceInfo = _context33.sent;
|
|
2049
|
+
_context33.next = 6;
|
|
2010
2050
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
2011
2051
|
path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
|
|
2012
2052
|
method: "POST",
|
|
@@ -2023,27 +2063,27 @@ exports.SubmitDropVote = /*#__PURE__*/function () {
|
|
|
2023
2063
|
|
|
2024
2064
|
case 6:
|
|
2025
2065
|
case "end":
|
|
2026
|
-
return
|
|
2066
|
+
return _context33.stop();
|
|
2027
2067
|
}
|
|
2028
2068
|
}
|
|
2029
|
-
},
|
|
2069
|
+
}, _callee33, this);
|
|
2030
2070
|
}));
|
|
2031
2071
|
|
|
2032
|
-
return function (
|
|
2033
|
-
return
|
|
2072
|
+
return function (_x20) {
|
|
2073
|
+
return _ref63.apply(this, arguments);
|
|
2034
2074
|
};
|
|
2035
2075
|
}();
|
|
2036
2076
|
|
|
2037
2077
|
exports.DropStatus = /*#__PURE__*/function () {
|
|
2038
|
-
var
|
|
2078
|
+
var _ref65 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(_ref64) {
|
|
2039
2079
|
var marketplace, eventId, dropId, response;
|
|
2040
|
-
return _regeneratorRuntime.wrap(function
|
|
2080
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
2041
2081
|
while (1) {
|
|
2042
|
-
switch (
|
|
2082
|
+
switch (_context34.prev = _context34.next) {
|
|
2043
2083
|
case 0:
|
|
2044
|
-
marketplace =
|
|
2045
|
-
|
|
2046
|
-
|
|
2084
|
+
marketplace = _ref64.marketplace, eventId = _ref64.eventId, dropId = _ref64.dropId;
|
|
2085
|
+
_context34.prev = 1;
|
|
2086
|
+
_context34.next = 4;
|
|
2047
2087
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
2048
2088
|
path: UrlJoin("as", "wlt", "act", marketplace.tenant_id, eventId, dropId),
|
|
2049
2089
|
method: "GET",
|
|
@@ -2053,28 +2093,28 @@ exports.DropStatus = /*#__PURE__*/function () {
|
|
|
2053
2093
|
}));
|
|
2054
2094
|
|
|
2055
2095
|
case 4:
|
|
2056
|
-
response =
|
|
2057
|
-
return
|
|
2096
|
+
response = _context34.sent;
|
|
2097
|
+
return _context34.abrupt("return", response.sort(function (a, b) {
|
|
2058
2098
|
return a.ts > b.ts ? 1 : -1;
|
|
2059
2099
|
})[0] || {
|
|
2060
2100
|
status: "none"
|
|
2061
2101
|
});
|
|
2062
2102
|
|
|
2063
2103
|
case 8:
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
this.Log(
|
|
2067
|
-
return
|
|
2104
|
+
_context34.prev = 8;
|
|
2105
|
+
_context34.t0 = _context34["catch"](1);
|
|
2106
|
+
this.Log(_context34.t0, true);
|
|
2107
|
+
return _context34.abrupt("return", "");
|
|
2068
2108
|
|
|
2069
2109
|
case 12:
|
|
2070
2110
|
case "end":
|
|
2071
|
-
return
|
|
2111
|
+
return _context34.stop();
|
|
2072
2112
|
}
|
|
2073
2113
|
}
|
|
2074
|
-
},
|
|
2114
|
+
}, _callee34, this, [[1, 8]]);
|
|
2075
2115
|
}));
|
|
2076
2116
|
|
|
2077
|
-
return function (
|
|
2078
|
-
return
|
|
2117
|
+
return function (_x21) {
|
|
2118
|
+
return _ref65.apply(this, arguments);
|
|
2079
2119
|
};
|
|
2080
2120
|
}();
|