@eluvio/elv-client-js 3.2.2 → 3.2.6

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.
Files changed (35) hide show
  1. package/dist/ElvClient-min.js +15 -11
  2. package/dist/ElvClient-node-min.js +17 -13
  3. package/dist/ElvFrameClient-min.js +12 -8
  4. package/dist/ElvPermissionsClient-min.js +13 -9
  5. package/dist/ElvWalletClient-min.js +58 -0
  6. package/dist/ElvWalletClient-node-min.js +78 -0
  7. package/dist/src/AuthorizationClient.js +2248 -1990
  8. package/dist/src/ContentObjectVerification.js +164 -173
  9. package/dist/src/Crypto.js +376 -324
  10. package/dist/src/ElvClient.js +1182 -1019
  11. package/dist/src/ElvWallet.js +119 -95
  12. package/dist/src/EthClient.js +1040 -896
  13. package/dist/src/FrameClient.js +331 -300
  14. package/dist/src/HttpClient.js +153 -147
  15. package/dist/src/Id.js +1 -3
  16. package/dist/src/PermissionsClient.js +1294 -1168
  17. package/dist/src/RemoteSigner.js +263 -211
  18. package/dist/src/UserProfileClient.js +1164 -1023
  19. package/dist/src/Utils.js +209 -181
  20. package/dist/src/client/ABRPublishing.js +895 -858
  21. package/dist/src/client/AccessGroups.js +1102 -959
  22. package/dist/src/client/ContentAccess.js +3724 -3431
  23. package/dist/src/client/ContentManagement.js +2252 -2068
  24. package/dist/src/client/Contracts.js +647 -563
  25. package/dist/src/client/Files.js +1886 -1757
  26. package/dist/src/client/NFT.js +126 -112
  27. package/dist/src/client/NTP.js +478 -422
  28. package/dist/src/walletClient/ClientMethods.js +1029 -879
  29. package/dist/src/walletClient/Utils.js +84 -70
  30. package/dist/src/walletClient/index.js +1203 -1087
  31. package/package.json +4 -2
  32. package/src/Utils.js +0 -1
  33. package/src/walletClient/ClientMethods.js +34 -2
  34. package/src/walletClient/index.js +3 -3
  35. package/utilities/ProductionMasterCreate.js +2 -2
@@ -2,9 +2,11 @@ var _defineProperty = require("@babel/runtime/helpers/defineProperty");
2
2
 
3
3
  var _regeneratorRuntime = require("@babel/runtime/regenerator");
4
4
 
5
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
5
+ var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
6
6
 
7
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
7
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8
+
9
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
10
 
9
11
  var Utils = require("../Utils");
10
12
 
@@ -80,9 +82,9 @@ exports.UserAddress = function () {
80
82
  */
81
83
 
82
84
 
83
- exports.UserWalletBalance = function _callee() {
85
+ exports.UserWalletBalance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
84
86
  var checkOnboard,
85
- _ref,
87
+ _yield$this$client$ut,
86
88
  balance,
87
89
  usage_hold,
88
90
  payout_hold,
@@ -98,7 +100,7 @@ exports.UserWalletBalance = function _callee() {
98
100
  balances,
99
101
  _args = arguments;
100
102
 
101
- return _regeneratorRuntime.async(function _callee$(_context) {
103
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
102
104
  while (1) {
103
105
  switch (_context.prev = _context.next) {
104
106
  case 0:
@@ -112,46 +114,44 @@ exports.UserWalletBalance = function _callee() {
112
114
  return _context.abrupt("return");
113
115
 
114
116
  case 3:
115
- _context.t0 = _regeneratorRuntime;
116
- _context.t1 = this.client.utils;
117
- _context.next = 7;
118
- return _regeneratorRuntime.awrap(this.client.authClient.MakeAuthServiceRequest({
117
+ _context.t0 = this.client.utils;
118
+ _context.next = 6;
119
+ return this.client.authClient.MakeAuthServiceRequest({
119
120
  path: UrlJoin("as", "wlt", "mkt", "bal"),
120
121
  method: "GET",
121
122
  headers: {
122
123
  Authorization: "Bearer ".concat(this.AuthToken())
123
124
  }
124
- }));
125
+ });
125
126
 
126
- case 7:
127
- _context.t2 = _context.sent;
128
- _context.t3 = _context.t1.ResponseToJson.call(_context.t1, _context.t2);
129
- _context.next = 11;
130
- return _context.t0.awrap.call(_context.t0, _context.t3);
131
-
132
- case 11:
133
- _ref = _context.sent;
134
- balance = _ref.balance;
135
- usage_hold = _ref.usage_hold;
136
- payout_hold = _ref.payout_hold;
137
- stripe_id = _ref.stripe_id;
138
- stripe_payouts_enabled = _ref.stripe_payouts_enabled;
127
+ case 6:
128
+ _context.t1 = _context.sent;
129
+ _context.next = 9;
130
+ return _context.t0.ResponseToJson.call(_context.t0, _context.t1);
131
+
132
+ case 9:
133
+ _yield$this$client$ut = _context.sent;
134
+ balance = _yield$this$client$ut.balance;
135
+ usage_hold = _yield$this$client$ut.usage_hold;
136
+ payout_hold = _yield$this$client$ut.payout_hold;
137
+ stripe_id = _yield$this$client$ut.stripe_id;
138
+ stripe_payouts_enabled = _yield$this$client$ut.stripe_payouts_enabled;
139
139
  userStripeId = stripe_id;
140
140
  userStripeEnabled = stripe_payouts_enabled;
141
141
  totalWalletBalance = parseFloat(balance || 0);
142
- availableWalletBalance = Math.max(0, this.totalWalletBalance - parseFloat(usage_hold || 0));
143
- pendingWalletBalance = Math.max(0, this.totalWalletBalance - this.availableWalletBalance);
144
- withdrawableWalletBalance = Math.max(0, this.totalWalletBalance - parseFloat(payout_hold || 0));
142
+ availableWalletBalance = Math.max(0, totalWalletBalance - parseFloat(usage_hold || 0));
143
+ pendingWalletBalance = Math.max(0, totalWalletBalance - availableWalletBalance);
144
+ withdrawableWalletBalance = Math.max(0, totalWalletBalance - parseFloat(payout_hold || 0));
145
145
 
146
146
  if (!(checkOnboard && stripe_id && !stripe_payouts_enabled)) {
147
- _context.next = 30;
147
+ _context.next = 28;
148
148
  break;
149
149
  }
150
150
 
151
151
  // Refresh stripe enabled flag
152
152
  rootUrl = new URL(UrlJoin(window.location.origin, window.location.pathname)).toString();
153
- _context.next = 27;
154
- return _regeneratorRuntime.awrap(this.client.authClient.MakeAuthServiceRequest({
153
+ _context.next = 25;
154
+ return this.client.authClient.MakeAuthServiceRequest({
155
155
  path: UrlJoin("as", "wlt", "onb", "stripe"),
156
156
  method: "POST",
157
157
  body: {
@@ -163,16 +163,16 @@ exports.UserWalletBalance = function _callee() {
163
163
  headers: {
164
164
  Authorization: "Bearer ".concat(this.AuthToken())
165
165
  }
166
- }));
166
+ });
167
167
 
168
- case 27:
169
- _context.next = 29;
170
- return _regeneratorRuntime.awrap(this.UserWalletBalance(false));
168
+ case 25:
169
+ _context.next = 27;
170
+ return this.UserWalletBalance(false);
171
171
 
172
- case 29:
172
+ case 27:
173
173
  return _context.abrupt("return", _context.sent);
174
174
 
175
- case 30:
175
+ case 28:
176
176
  balances = {
177
177
  totalWalletBalance: totalWalletBalance,
178
178
  availableWalletBalance: availableWalletBalance,
@@ -194,13 +194,13 @@ exports.UserWalletBalance = function _callee() {
194
194
 
195
195
  return _context.abrupt("return", balances);
196
196
 
197
- case 33:
197
+ case 31:
198
198
  case "end":
199
199
  return _context.stop();
200
200
  }
201
201
  }
202
- }, null, this);
203
- };
202
+ }, _callee, this);
203
+ }));
204
204
  /**
205
205
  * <b><i>Requires login</i></b>
206
206
  *
@@ -213,12 +213,11 @@ exports.UserWalletBalance = function _callee() {
213
213
  * @returns {Promise<Object>} - Basic info about all owned items.
214
214
  */
215
215
 
216
-
217
- exports.UserItemInfo = function _callee2() {
216
+ exports.UserItemInfo = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
218
217
  var _this = this;
219
218
 
220
219
  var accountId, nftInfo;
221
- return _regeneratorRuntime.async(function _callee2$(_context2) {
220
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
222
221
  while (1) {
223
222
  switch (_context2.prev = _context2.next) {
224
223
  case 0:
@@ -232,10 +231,10 @@ exports.UserItemInfo = function _callee2() {
232
231
  case 2:
233
232
  accountId = "iusr".concat(Utils.AddressToHash(this.UserAddress()));
234
233
  _context2.next = 5;
235
- return _regeneratorRuntime.awrap(this.client.ethClient.MakeProviderCall({
234
+ return this.client.ethClient.MakeProviderCall({
236
235
  methodName: "send",
237
236
  args: ["elv_getAccountProfile", [this.client.contentSpaceId, accountId]]
238
- }));
237
+ });
239
238
 
240
239
  case 5:
241
240
  this.profileData = _context2.sent;
@@ -265,7 +264,7 @@ exports.UserItemInfo = function _callee2() {
265
264
 
266
265
  var contractAddress = Utils.FormatAddress(details.ContractAddr);
267
266
  var key = "".concat(contractAddress, "-").concat(details.TokenIdStr);
268
- nftInfo[key] = _objectSpread({}, details, {
267
+ nftInfo[key] = _objectSpread(_objectSpread({}, details), {}, {
269
268
  ContractAddr: Utils.FormatAddress(details.ContractAddr),
270
269
  ContractId: "ictr".concat(Utils.AddressToHash(details.ContractAddr)),
271
270
  VersionHash: versionHash
@@ -280,8 +279,8 @@ exports.UserItemInfo = function _callee2() {
280
279
  return _context2.stop();
281
280
  }
282
281
  }
283
- }, null, this);
284
- };
282
+ }, _callee2, this);
283
+ }));
285
284
  /**
286
285
  * <b><i>Requires login</i></b>
287
286
  *
@@ -302,10 +301,9 @@ exports.UserItemInfo = function _callee2() {
302
301
  * @returns {Promise<Object>} - Results of the query and pagination info
303
302
  */
304
303
 
305
-
306
- exports.UserItems = function _callee3() {
304
+ exports.UserItems = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
307
305
  var _args3 = arguments;
308
- return _regeneratorRuntime.async(function _callee3$(_context3) {
306
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
309
307
  while (1) {
310
308
  switch (_context3.prev = _context3.next) {
311
309
  case 0:
@@ -318,8 +316,8 @@ exports.UserItems = function _callee3() {
318
316
  return _context3.stop();
319
317
  }
320
318
  }
321
- }, null, this);
322
- };
319
+ }, _callee3, this);
320
+ }));
323
321
  /**
324
322
  * Return all listings for the current user. Not paginated.
325
323
  *
@@ -334,25 +332,24 @@ exports.UserItems = function _callee3() {
334
332
  * @returns {Promise<Array<Object>>} - List of current user's listings
335
333
  */
336
334
 
337
-
338
- exports.UserListings = function _callee4() {
339
- var _ref2,
340
- _ref2$sortBy,
335
+ exports.UserListings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
336
+ var _ref5,
337
+ _ref5$sortBy,
341
338
  sortBy,
342
- _ref2$sortDesc,
339
+ _ref5$sortDesc,
343
340
  sortDesc,
344
341
  contractAddress,
345
342
  tokenId,
346
343
  marketplaceParams,
347
344
  _args4 = arguments;
348
345
 
349
- return _regeneratorRuntime.async(function _callee4$(_context4) {
346
+ return _regeneratorRuntime.wrap(function _callee4$(_context4) {
350
347
  while (1) {
351
348
  switch (_context4.prev = _context4.next) {
352
349
  case 0:
353
- _ref2 = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {}, _ref2$sortBy = _ref2.sortBy, sortBy = _ref2$sortBy === void 0 ? "created" : _ref2$sortBy, _ref2$sortDesc = _ref2.sortDesc, sortDesc = _ref2$sortDesc === void 0 ? false : _ref2$sortDesc, contractAddress = _ref2.contractAddress, tokenId = _ref2.tokenId, marketplaceParams = _ref2.marketplaceParams;
350
+ _ref5 = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {}, _ref5$sortBy = _ref5.sortBy, sortBy = _ref5$sortBy === void 0 ? "created" : _ref5$sortBy, _ref5$sortDesc = _ref5.sortDesc, sortDesc = _ref5$sortDesc === void 0 ? false : _ref5$sortDesc, contractAddress = _ref5.contractAddress, tokenId = _ref5.tokenId, marketplaceParams = _ref5.marketplaceParams;
354
351
  _context4.next = 3;
355
- return _regeneratorRuntime.awrap(this.FilteredQuery({
352
+ return this.FilteredQuery({
356
353
  mode: "listings",
357
354
  start: 0,
358
355
  limit: 10000,
@@ -362,7 +359,7 @@ exports.UserListings = function _callee4() {
362
359
  marketplaceParams: marketplaceParams,
363
360
  contractAddress: contractAddress,
364
361
  tokenId: tokenId
365
- }));
362
+ });
366
363
 
367
364
  case 3:
368
365
  return _context4.abrupt("return", _context4.sent.results);
@@ -372,8 +369,8 @@ exports.UserListings = function _callee4() {
372
369
  return _context4.stop();
373
370
  }
374
371
  }
375
- }, null, this);
376
- };
372
+ }, _callee4, this);
373
+ }));
377
374
  /**
378
375
  * Return all sales for the current user. Not paginated.
379
376
  *
@@ -389,25 +386,24 @@ exports.UserListings = function _callee4() {
389
386
  * @returns {Promise<Array<Object>>} - List of current user's sales
390
387
  */
391
388
 
392
-
393
- exports.UserSales = function _callee5() {
394
- var _ref3,
395
- _ref3$sortBy,
389
+ exports.UserSales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
390
+ var _ref7,
391
+ _ref7$sortBy,
396
392
  sortBy,
397
- _ref3$sortDesc,
393
+ _ref7$sortDesc,
398
394
  sortDesc,
399
395
  contractAddress,
400
396
  tokenId,
401
397
  marketplaceParams,
402
398
  _args5 = arguments;
403
399
 
404
- return _regeneratorRuntime.async(function _callee5$(_context5) {
400
+ return _regeneratorRuntime.wrap(function _callee5$(_context5) {
405
401
  while (1) {
406
402
  switch (_context5.prev = _context5.next) {
407
403
  case 0:
408
- _ref3 = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {}, _ref3$sortBy = _ref3.sortBy, sortBy = _ref3$sortBy === void 0 ? "created" : _ref3$sortBy, _ref3$sortDesc = _ref3.sortDesc, sortDesc = _ref3$sortDesc === void 0 ? false : _ref3$sortDesc, contractAddress = _ref3.contractAddress, tokenId = _ref3.tokenId, marketplaceParams = _ref3.marketplaceParams;
404
+ _ref7 = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {}, _ref7$sortBy = _ref7.sortBy, sortBy = _ref7$sortBy === void 0 ? "created" : _ref7$sortBy, _ref7$sortDesc = _ref7.sortDesc, sortDesc = _ref7$sortDesc === void 0 ? false : _ref7$sortDesc, contractAddress = _ref7.contractAddress, tokenId = _ref7.tokenId, marketplaceParams = _ref7.marketplaceParams;
409
405
  _context5.next = 3;
410
- return _regeneratorRuntime.awrap(this.FilteredQuery({
406
+ return this.FilteredQuery({
411
407
  mode: "sales",
412
408
  start: 0,
413
409
  limit: 10000,
@@ -417,7 +413,7 @@ exports.UserSales = function _callee5() {
417
413
  marketplaceParams: marketplaceParams,
418
414
  contractAddress: contractAddress,
419
415
  tokenId: tokenId
420
- }));
416
+ });
421
417
 
422
418
  case 3:
423
419
  return _context5.abrupt("return", _context5.sent.results);
@@ -427,8 +423,8 @@ exports.UserSales = function _callee5() {
427
423
  return _context5.stop();
428
424
  }
429
425
  }
430
- }, null, this);
431
- };
426
+ }, _callee5, this);
427
+ }));
432
428
  /* TENANT */
433
429
 
434
430
  /**
@@ -444,38 +440,43 @@ exports.UserSales = function _callee5() {
444
440
  * @returns {Promise<{Object}>} - The tenant configuration
445
441
  */
446
442
 
447
-
448
- exports.TenantConfiguration = function _callee6(_ref4) {
449
- var tenantId, contractAddress;
450
- return _regeneratorRuntime.async(function _callee6$(_context6) {
451
- while (1) {
452
- switch (_context6.prev = _context6.next) {
453
- case 0:
454
- tenantId = _ref4.tenantId, contractAddress = _ref4.contractAddress;
455
- _context6.prev = 1;
456
- _context6.next = 4;
457
- return _regeneratorRuntime.awrap(this.utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
458
- path: contractAddress ? UrlJoin("as", "config", "nft", contractAddress) : UrlJoin("as", "config", "tnt", tenantId),
459
- method: "GET"
460
- })));
461
-
462
- case 4:
463
- return _context6.abrupt("return", _context6.sent);
464
-
465
- case 7:
466
- _context6.prev = 7;
467
- _context6.t0 = _context6["catch"](1);
468
- this.Log("Failed to load tenant configuration", true);
469
- this.Log(_context6.t0, true);
470
- return _context6.abrupt("return", {});
471
-
472
- case 12:
473
- case "end":
474
- return _context6.stop();
443
+ exports.TenantConfiguration = /*#__PURE__*/function () {
444
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(_ref8) {
445
+ var tenantId, contractAddress;
446
+ return _regeneratorRuntime.wrap(function _callee6$(_context6) {
447
+ while (1) {
448
+ switch (_context6.prev = _context6.next) {
449
+ case 0:
450
+ tenantId = _ref8.tenantId, contractAddress = _ref8.contractAddress;
451
+ _context6.prev = 1;
452
+ _context6.next = 4;
453
+ return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
454
+ path: contractAddress ? UrlJoin("as", "config", "nft", contractAddress) : UrlJoin("as", "config", "tnt", tenantId),
455
+ method: "GET"
456
+ }));
457
+
458
+ case 4:
459
+ return _context6.abrupt("return", _context6.sent);
460
+
461
+ case 7:
462
+ _context6.prev = 7;
463
+ _context6.t0 = _context6["catch"](1);
464
+ this.Log("Failed to load tenant configuration", true);
465
+ this.Log(_context6.t0, true);
466
+ return _context6.abrupt("return", {});
467
+
468
+ case 12:
469
+ case "end":
470
+ return _context6.stop();
471
+ }
475
472
  }
476
- }
477
- }, null, this, [[1, 7]]);
478
- };
473
+ }, _callee6, this, [[1, 7]]);
474
+ }));
475
+
476
+ return function (_x) {
477
+ return _ref9.apply(this, arguments);
478
+ };
479
+ }();
479
480
  /* MARKETPLACE */
480
481
 
481
482
  /**
@@ -491,55 +492,61 @@ exports.TenantConfiguration = function _callee6(_ref4) {
491
492
  */
492
493
 
493
494
 
494
- exports.MarketplaceStock = function _callee7(_ref5) {
495
- var marketplaceParams, tenantId, marketplaceInfo;
496
- return _regeneratorRuntime.async(function _callee7$(_context7) {
497
- while (1) {
498
- switch (_context7.prev = _context7.next) {
499
- case 0:
500
- marketplaceParams = _ref5.marketplaceParams, tenantId = _ref5.tenantId;
495
+ exports.MarketplaceStock = /*#__PURE__*/function () {
496
+ var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_ref10) {
497
+ var marketplaceParams, tenantId, marketplaceInfo;
498
+ return _regeneratorRuntime.wrap(function _callee7$(_context7) {
499
+ while (1) {
500
+ switch (_context7.prev = _context7.next) {
501
+ case 0:
502
+ marketplaceParams = _ref10.marketplaceParams, tenantId = _ref10.tenantId;
501
503
 
502
- if (!tenantId) {
503
- marketplaceInfo = this.MarketplaceInfo({
504
- marketplaceParams: marketplaceParams
505
- });
506
- tenantId = marketplaceInfo.tenantId;
507
- }
508
-
509
- if (!this.loggedIn) {
510
- _context7.next = 6;
511
- break;
512
- }
504
+ if (!tenantId) {
505
+ marketplaceInfo = this.MarketplaceInfo({
506
+ marketplaceParams: marketplaceParams
507
+ });
508
+ tenantId = marketplaceInfo.tenantId;
509
+ }
513
510
 
514
- _context7.next = 5;
515
- return _regeneratorRuntime.awrap(Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
516
- path: UrlJoin("as", "wlt", "nft", "info", tenantId),
517
- method: "GET",
518
- headers: {
519
- Authorization: "Bearer ".concat(this.AuthToken())
511
+ if (!this.loggedIn) {
512
+ _context7.next = 6;
513
+ break;
520
514
  }
521
- })));
522
515
 
523
- case 5:
524
- return _context7.abrupt("return", _context7.sent);
516
+ _context7.next = 5;
517
+ return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
518
+ path: UrlJoin("as", "wlt", "nft", "info", tenantId),
519
+ method: "GET",
520
+ headers: {
521
+ Authorization: "Bearer ".concat(this.AuthToken())
522
+ }
523
+ }));
525
524
 
526
- case 6:
527
- _context7.next = 8;
528
- return _regeneratorRuntime.awrap(Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
529
- path: UrlJoin("as", "nft", "stock", tenantId),
530
- method: "GET"
531
- })));
525
+ case 5:
526
+ return _context7.abrupt("return", _context7.sent);
532
527
 
533
- case 8:
534
- return _context7.abrupt("return", _context7.sent);
528
+ case 6:
529
+ _context7.next = 8;
530
+ return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
531
+ path: UrlJoin("as", "nft", "stock", tenantId),
532
+ method: "GET"
533
+ }));
535
534
 
536
- case 9:
537
- case "end":
538
- return _context7.stop();
535
+ case 8:
536
+ return _context7.abrupt("return", _context7.sent);
537
+
538
+ case 9:
539
+ case "end":
540
+ return _context7.stop();
541
+ }
539
542
  }
540
- }
541
- }, null, this);
542
- };
543
+ }, _callee7, this);
544
+ }));
545
+
546
+ return function (_x2) {
547
+ return _ref11.apply(this, arguments);
548
+ };
549
+ }();
543
550
  /**
544
551
  * Retrieve basic information about a specific available marketplace with the specified tenant/marketplace slug, ID, or hash.
545
552
  *
@@ -555,21 +562,22 @@ exports.MarketplaceStock = function _callee7(_ref5) {
555
562
  */
556
563
 
557
564
 
558
- exports.MarketplaceInfo = function (_ref6) {
559
- var marketplaceParams = _ref6.marketplaceParams;
565
+ exports.MarketplaceInfo = function (_ref12) {
566
+ var marketplaceParams = _ref12.marketplaceParams;
560
567
 
561
- var _ref7 = marketplaceParams || {},
562
- tenantSlug = _ref7.tenantSlug,
563
- marketplaceSlug = _ref7.marketplaceSlug,
564
- marketplaceId = _ref7.marketplaceId,
565
- marketplaceHash = _ref7.marketplaceHash;
568
+ var _ref13 = marketplaceParams || {},
569
+ tenantSlug = _ref13.tenantSlug,
570
+ marketplaceSlug = _ref13.marketplaceSlug,
571
+ marketplaceId = _ref13.marketplaceId,
572
+ marketplaceHash = _ref13.marketplaceHash;
566
573
 
567
574
  var marketplaceInfo;
568
575
 
569
576
  if (tenantSlug && marketplaceSlug) {
570
577
  marketplaceInfo = (this.availableMarketplaces[tenantSlug] || {})[marketplaceSlug];
571
578
  } else {
572
- marketplaceInfo = this.availableMarketplacesById[marketplaceId || this.client.utils.DecodeVersionHash(marketplaceHash).objectId];
579
+ marketplaceId = marketplaceHash ? this.client.utils.DecodeVersionHash(marketplaceHash).objectId : marketplaceId;
580
+ marketplaceInfo = this.availableMarketplacesById[marketplaceId];
573
581
  }
574
582
 
575
583
  if (!marketplaceInfo) {
@@ -589,44 +597,50 @@ exports.MarketplaceInfo = function (_ref6) {
589
597
  */
590
598
 
591
599
 
592
- exports.MarketplaceCSS = function _callee8(_ref8) {
593
- var marketplaceParams, marketplaceInfo, marketplaceHash;
594
- return _regeneratorRuntime.async(function _callee8$(_context8) {
595
- while (1) {
596
- switch (_context8.prev = _context8.next) {
597
- case 0:
598
- marketplaceParams = _ref8.marketplaceParams;
599
- marketplaceInfo = this.MarketplaceInfo({
600
- marketplaceParams: marketplaceParams
601
- });
602
- marketplaceHash = marketplaceInfo.marketplaceHash;
600
+ exports.MarketplaceCSS = /*#__PURE__*/function () {
601
+ var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(_ref14) {
602
+ var marketplaceParams, marketplaceInfo, marketplaceHash;
603
+ return _regeneratorRuntime.wrap(function _callee8$(_context8) {
604
+ while (1) {
605
+ switch (_context8.prev = _context8.next) {
606
+ case 0:
607
+ marketplaceParams = _ref14.marketplaceParams;
608
+ marketplaceInfo = this.MarketplaceInfo({
609
+ marketplaceParams: marketplaceParams
610
+ });
611
+ marketplaceHash = marketplaceInfo.marketplaceHash;
603
612
 
604
- if (this.cachedCSS[marketplaceHash]) {
605
- _context8.next = 7;
606
- break;
607
- }
613
+ if (this.cachedCSS[marketplaceHash]) {
614
+ _context8.next = 7;
615
+ break;
616
+ }
608
617
 
609
- _context8.next = 6;
610
- return _regeneratorRuntime.awrap(this.client.ContentObjectMetadata({
611
- versionHash: marketplaceHash,
612
- metadataSubtree: "public/asset_metadata/info/branding/custom_css",
613
- authorizationToken: this.publicStaticToken,
614
- noAuth: true
615
- }));
618
+ _context8.next = 6;
619
+ return this.client.ContentObjectMetadata({
620
+ versionHash: marketplaceHash,
621
+ metadataSubtree: "public/asset_metadata/info/branding/custom_css",
622
+ authorizationToken: this.publicStaticToken,
623
+ noAuth: true
624
+ });
616
625
 
617
- case 6:
618
- this.cachedCSS[marketplaceHash] = _context8.sent;
626
+ case 6:
627
+ this.cachedCSS[marketplaceHash] = _context8.sent;
619
628
 
620
- case 7:
621
- return _context8.abrupt("return", this.cachedCSS[marketplaceHash] || "");
629
+ case 7:
630
+ return _context8.abrupt("return", this.cachedCSS[marketplaceHash] || "");
622
631
 
623
- case 8:
624
- case "end":
625
- return _context8.stop();
632
+ case 8:
633
+ case "end":
634
+ return _context8.stop();
635
+ }
626
636
  }
627
- }
628
- }, null, this);
629
- };
637
+ }, _callee8, this);
638
+ }));
639
+
640
+ return function (_x3) {
641
+ return _ref15.apply(this, arguments);
642
+ };
643
+ }();
630
644
  /**
631
645
  * Retrieve info about all available marketplaces
632
646
  *
@@ -639,18 +653,18 @@ exports.MarketplaceCSS = function _callee8(_ref8) {
639
653
  */
640
654
 
641
655
 
642
- exports.AvailableMarketplaces = function _callee9() {
643
- var _ref9,
656
+ exports.AvailableMarketplaces = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
657
+ var _ref17,
644
658
  organizeById,
645
- _ref9$forceReload,
659
+ _ref17$forceReload,
646
660
  forceReload,
647
661
  _args9 = arguments;
648
662
 
649
- return _regeneratorRuntime.async(function _callee9$(_context9) {
663
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
650
664
  while (1) {
651
665
  switch (_context9.prev = _context9.next) {
652
666
  case 0:
653
- _ref9 = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {}, organizeById = _ref9.organizeById, _ref9$forceReload = _ref9.forceReload, forceReload = _ref9$forceReload === void 0 ? false : _ref9$forceReload;
667
+ _ref17 = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {}, organizeById = _ref17.organizeById, _ref17$forceReload = _ref17.forceReload, forceReload = _ref17$forceReload === void 0 ? false : _ref17$forceReload;
654
668
 
655
669
  if (!forceReload) {
656
670
  _context9.next = 4;
@@ -658,7 +672,7 @@ exports.AvailableMarketplaces = function _callee9() {
658
672
  }
659
673
 
660
674
  _context9.next = 4;
661
- return _regeneratorRuntime.awrap(this.LoadAvailableMarketplaces(true));
675
+ return this.LoadAvailableMarketplaces(true);
662
676
 
663
677
  case 4:
664
678
  return _context9.abrupt("return", _objectSpread({}, organizeById ? this.availableMarketplacesById : this.availableMarketplaces));
@@ -668,8 +682,8 @@ exports.AvailableMarketplaces = function _callee9() {
668
682
  return _context9.stop();
669
683
  }
670
684
  }
671
- }, null, this);
672
- };
685
+ }, _callee9, this);
686
+ }));
673
687
  /**
674
688
  * Retrieve full information about the specified marketplace
675
689
  *
@@ -682,23 +696,28 @@ exports.AvailableMarketplaces = function _callee9() {
682
696
  * @returns {Promise<Object>} - The full information for the marketplace
683
697
  */
684
698
 
685
-
686
- exports.Marketplace = function _callee10(_ref10) {
687
- var marketplaceParams;
688
- return _regeneratorRuntime.async(function _callee10$(_context10) {
689
- while (1) {
690
- switch (_context10.prev = _context10.next) {
691
- case 0:
692
- marketplaceParams = _ref10.marketplaceParams;
693
- return _context10.abrupt("return", this.LoadMarketplace(marketplaceParams));
694
-
695
- case 2:
696
- case "end":
697
- return _context10.stop();
699
+ exports.Marketplace = /*#__PURE__*/function () {
700
+ var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(_ref18) {
701
+ var marketplaceParams;
702
+ return _regeneratorRuntime.wrap(function _callee10$(_context10) {
703
+ while (1) {
704
+ switch (_context10.prev = _context10.next) {
705
+ case 0:
706
+ marketplaceParams = _ref18.marketplaceParams;
707
+ return _context10.abrupt("return", this.LoadMarketplace(marketplaceParams));
708
+
709
+ case 2:
710
+ case "end":
711
+ return _context10.stop();
712
+ }
698
713
  }
699
- }
700
- }, null, this);
701
- };
714
+ }, _callee10, this);
715
+ }));
716
+
717
+ return function (_x4) {
718
+ return _ref19.apply(this, arguments);
719
+ };
720
+ }();
702
721
  /* NFTS */
703
722
 
704
723
  /**
@@ -711,63 +730,129 @@ exports.Marketplace = function _callee10(_ref10) {
711
730
  */
712
731
 
713
732
 
714
- exports.NFT = function _callee11(_ref11) {
715
- var tokenId, contractAddress, nft;
716
- return _regeneratorRuntime.async(function _callee11$(_context11) {
717
- while (1) {
718
- switch (_context11.prev = _context11.next) {
719
- case 0:
720
- tokenId = _ref11.tokenId, contractAddress = _ref11.contractAddress;
721
- _context11.t0 = FormatNFTDetails;
722
- _context11.next = 4;
723
- return _regeneratorRuntime.awrap(Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
724
- path: UrlJoin("as", "nft", "info", contractAddress, tokenId),
725
- method: "GET"
726
- })));
733
+ exports.NFT = /*#__PURE__*/function () {
734
+ var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref20) {
735
+ var tokenId, contractAddress, nft;
736
+ return _regeneratorRuntime.wrap(function _callee11$(_context11) {
737
+ while (1) {
738
+ switch (_context11.prev = _context11.next) {
739
+ case 0:
740
+ tokenId = _ref20.tokenId, contractAddress = _ref20.contractAddress;
741
+ _context11.t0 = FormatNFTDetails;
742
+ _context11.next = 4;
743
+ return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
744
+ path: UrlJoin("as", "nft", "info", contractAddress, tokenId),
745
+ method: "GET"
746
+ }));
747
+
748
+ case 4:
749
+ _context11.t1 = _context11.sent;
750
+ nft = (0, _context11.t0)(_context11.t1);
751
+ _context11.t2 = _objectSpread;
752
+ _context11.t3 = _objectSpread;
753
+ _context11.t4 = {};
754
+ _context11.next = 11;
755
+ return this.client.ContentObjectMetadata({
756
+ versionHash: nft.details.VersionHash,
757
+ metadataSubtree: "public/asset_metadata/nft",
758
+ produceLinkUrls: true
759
+ });
727
760
 
728
- case 4:
729
- _context11.t1 = _context11.sent;
730
- nft = (0, _context11.t0)(_context11.t1);
731
- _context11.t2 = _objectSpread;
732
- _context11.t3 = {};
733
- _context11.next = 10;
734
- return _regeneratorRuntime.awrap(this.client.ContentObjectMetadata({
735
- versionHash: nft.details.VersionHash,
736
- metadataSubtree: "public/asset_metadata/nft",
737
- produceLinkUrls: true
738
- }));
761
+ case 11:
762
+ _context11.t5 = _context11.sent;
739
763
 
740
- case 10:
741
- _context11.t4 = _context11.sent;
764
+ if (_context11.t5) {
765
+ _context11.next = 14;
766
+ break;
767
+ }
742
768
 
743
- if (_context11.t4) {
744
- _context11.next = 13;
745
- break;
746
- }
769
+ _context11.t5 = {};
747
770
 
748
- _context11.t4 = {};
771
+ case 14:
772
+ _context11.t6 = _context11.t5;
773
+ _context11.t7 = (0, _context11.t3)(_context11.t4, _context11.t6);
774
+ _context11.t8 = nft.metadata || {};
775
+ nft.metadata = (0, _context11.t2)(_context11.t7, _context11.t8);
776
+ _context11.next = 20;
777
+ return this.TenantConfiguration({
778
+ contractAddress: contractAddress
779
+ });
749
780
 
750
- case 13:
751
- _context11.t5 = _context11.t4;
752
- _context11.t6 = {};
753
- _context11.t7 = nft.metadata || {};
754
- nft.metadata = (0, _context11.t2)(_context11.t3, _context11.t5, _context11.t6, _context11.t7);
755
- _context11.next = 19;
756
- return _regeneratorRuntime.awrap(this.TenantConfiguration({
757
- contractAddress: contractAddress
758
- }));
781
+ case 20:
782
+ nft.config = _context11.sent;
783
+ return _context11.abrupt("return", FormatNFTMetadata(nft));
759
784
 
760
- case 19:
761
- nft.config = _context11.sent;
762
- return _context11.abrupt("return", FormatNFTMetadata(nft));
785
+ case 22:
786
+ case "end":
787
+ return _context11.stop();
788
+ }
789
+ }
790
+ }, _callee11, this);
791
+ }));
763
792
 
764
- case 21:
765
- case "end":
766
- return _context11.stop();
793
+ return function (_x5) {
794
+ return _ref21.apply(this, arguments);
795
+ };
796
+ }();
797
+ /**
798
+ * <b><i>Requires login</i></b>
799
+ *
800
+ * Transfer the specified NFT owned by the current user to the specified address
801
+ *
802
+ * @methodGroup NFT
803
+ * @namedParams
804
+ * @param {string} contractAddress - The contract address of the NFT
805
+ * @param {string} tokenId - The token ID of the NFT
806
+ * @param {string} targetAddress - The address to which to transfer the NFT
807
+ */
808
+
809
+
810
+ exports.TransferNFT = /*#__PURE__*/function () {
811
+ var _ref23 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(_ref22) {
812
+ var contractAddress, tokenId, targetAddress;
813
+ return _regeneratorRuntime.wrap(function _callee12$(_context12) {
814
+ while (1) {
815
+ switch (_context12.prev = _context12.next) {
816
+ case 0:
817
+ contractAddress = _ref22.contractAddress, tokenId = _ref22.tokenId, targetAddress = _ref22.targetAddress;
818
+
819
+ if (!(!targetAddress || !Utils.ValidAddress(targetAddress))) {
820
+ _context12.next = 3;
821
+ break;
822
+ }
823
+
824
+ throw Error("Eluvio Wallet Client: Invalid or missing target address in UserTransferNFT");
825
+
826
+ case 3:
827
+ _context12.next = 5;
828
+ return this.client.authClient.MakeAuthServiceRequest({
829
+ path: UrlJoin("as", "wlt", "mkt", "xfer"),
830
+ method: "POST",
831
+ body: {
832
+ contract: Utils.FormatAddress(contractAddress),
833
+ token: tokenId,
834
+ to_addr: Utils.FormatAddress(targetAddress)
835
+ },
836
+ headers: {
837
+ Authorization: "Bearer ".concat(this.AuthToken())
838
+ }
839
+ });
840
+
841
+ case 5:
842
+ return _context12.abrupt("return", _context12.sent);
843
+
844
+ case 6:
845
+ case "end":
846
+ return _context12.stop();
847
+ }
767
848
  }
768
- }
769
- }, null, this);
770
- };
849
+ }, _callee12, this);
850
+ }));
851
+
852
+ return function (_x6) {
853
+ return _ref23.apply(this, arguments);
854
+ };
855
+ }();
771
856
  /** LISTINGS */
772
857
 
773
858
  /**
@@ -781,52 +866,56 @@ exports.NFT = function _callee11(_ref11) {
781
866
  */
782
867
 
783
868
 
784
- exports.ListingStatus = function _callee12(_ref12) {
785
- var listingId;
786
- return _regeneratorRuntime.async(function _callee12$(_context12) {
787
- while (1) {
788
- switch (_context12.prev = _context12.next) {
789
- case 0:
790
- listingId = _ref12.listingId;
791
- _context12.prev = 1;
792
- _context12.t0 = _regeneratorRuntime;
793
- _context12.t1 = Utils;
794
- _context12.next = 6;
795
- return _regeneratorRuntime.awrap(this.client.authClient.MakeAuthServiceRequest({
796
- path: UrlJoin("as", "mkt", "status", listingId),
797
- method: "GET"
798
- }));
869
+ exports.ListingStatus = /*#__PURE__*/function () {
870
+ var _ref25 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref24) {
871
+ var listingId;
872
+ return _regeneratorRuntime.wrap(function _callee13$(_context13) {
873
+ while (1) {
874
+ switch (_context13.prev = _context13.next) {
875
+ case 0:
876
+ listingId = _ref24.listingId;
877
+ _context13.prev = 1;
878
+ _context13.t0 = Utils;
879
+ _context13.next = 5;
880
+ return this.client.authClient.MakeAuthServiceRequest({
881
+ path: UrlJoin("as", "mkt", "status", listingId),
882
+ method: "GET"
883
+ });
799
884
 
800
- case 6:
801
- _context12.t2 = _context12.sent;
802
- _context12.t3 = _context12.t1.ResponseToJson.call(_context12.t1, _context12.t2);
803
- _context12.next = 10;
804
- return _context12.t0.awrap.call(_context12.t0, _context12.t3);
885
+ case 5:
886
+ _context13.t1 = _context13.sent;
887
+ _context13.next = 8;
888
+ return _context13.t0.ResponseToJson.call(_context13.t0, _context13.t1);
805
889
 
806
- case 10:
807
- return _context12.abrupt("return", _context12.sent);
890
+ case 8:
891
+ return _context13.abrupt("return", _context13.sent);
808
892
 
809
- case 13:
810
- _context12.prev = 13;
811
- _context12.t4 = _context12["catch"](1);
893
+ case 11:
894
+ _context13.prev = 11;
895
+ _context13.t2 = _context13["catch"](1);
812
896
 
813
- if (!(_context12.t4.status === 404)) {
814
- _context12.next = 17;
815
- break;
816
- }
897
+ if (!(_context13.t2.status === 404)) {
898
+ _context13.next = 15;
899
+ break;
900
+ }
817
901
 
818
- return _context12.abrupt("return");
902
+ return _context13.abrupt("return");
819
903
 
820
- case 17:
821
- throw _context12.t4;
904
+ case 15:
905
+ throw _context13.t2;
822
906
 
823
- case 18:
824
- case "end":
825
- return _context12.stop();
907
+ case 16:
908
+ case "end":
909
+ return _context13.stop();
910
+ }
826
911
  }
827
- }
828
- }, null, this, [[1, 13]]);
829
- };
912
+ }, _callee13, this, [[1, 11]]);
913
+ }));
914
+
915
+ return function (_x7) {
916
+ return _ref25.apply(this, arguments);
917
+ };
918
+ }();
830
919
  /**
831
920
  * Retrieve a specific listing
832
921
  *
@@ -840,39 +929,43 @@ exports.ListingStatus = function _callee12(_ref12) {
840
929
  */
841
930
 
842
931
 
843
- exports.Listing = function _callee13(_ref13) {
844
- var listingId;
845
- return _regeneratorRuntime.async(function _callee13$(_context13) {
846
- while (1) {
847
- switch (_context13.prev = _context13.next) {
848
- case 0:
849
- listingId = _ref13.listingId;
850
- _context13.t0 = FormatNFT;
851
- _context13.t1 = _regeneratorRuntime;
852
- _context13.t2 = Utils;
853
- _context13.next = 6;
854
- return _regeneratorRuntime.awrap(this.client.authClient.MakeAuthServiceRequest({
855
- path: UrlJoin("as", "mkt", "l", listingId),
856
- method: "GET"
857
- }));
932
+ exports.Listing = /*#__PURE__*/function () {
933
+ var _ref27 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref26) {
934
+ var listingId;
935
+ return _regeneratorRuntime.wrap(function _callee14$(_context14) {
936
+ while (1) {
937
+ switch (_context14.prev = _context14.next) {
938
+ case 0:
939
+ listingId = _ref26.listingId;
940
+ _context14.t0 = FormatNFT;
941
+ _context14.t1 = Utils;
942
+ _context14.next = 5;
943
+ return this.client.authClient.MakeAuthServiceRequest({
944
+ path: UrlJoin("as", "mkt", "l", listingId),
945
+ method: "GET"
946
+ });
858
947
 
859
- case 6:
860
- _context13.t3 = _context13.sent;
861
- _context13.t4 = _context13.t2.ResponseToJson.call(_context13.t2, _context13.t3);
862
- _context13.next = 10;
863
- return _context13.t1.awrap.call(_context13.t1, _context13.t4);
948
+ case 5:
949
+ _context14.t2 = _context14.sent;
950
+ _context14.next = 8;
951
+ return _context14.t1.ResponseToJson.call(_context14.t1, _context14.t2);
864
952
 
865
- case 10:
866
- _context13.t5 = _context13.sent;
867
- return _context13.abrupt("return", (0, _context13.t0)(_context13.t5));
953
+ case 8:
954
+ _context14.t3 = _context14.sent;
955
+ return _context14.abrupt("return", (0, _context14.t0)(_context14.t3));
868
956
 
869
- case 12:
870
- case "end":
871
- return _context13.stop();
957
+ case 10:
958
+ case "end":
959
+ return _context14.stop();
960
+ }
872
961
  }
873
- }
874
- }, null, this);
875
- };
962
+ }, _callee14, this);
963
+ }));
964
+
965
+ return function (_x8) {
966
+ return _ref27.apply(this, arguments);
967
+ };
968
+ }();
876
969
  /**
877
970
  * Retrieve listings matching the specified parameters.
878
971
  *
@@ -906,23 +999,23 @@ exports.Listing = function _callee13(_ref13) {
906
999
  */
907
1000
 
908
1001
 
909
- exports.Listings = function _callee14() {
910
- var _args14 = arguments;
911
- return _regeneratorRuntime.async(function _callee14$(_context14) {
1002
+ exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15() {
1003
+ var _args15 = arguments;
1004
+ return _regeneratorRuntime.wrap(function _callee15$(_context15) {
912
1005
  while (1) {
913
- switch (_context14.prev = _context14.next) {
1006
+ switch (_context15.prev = _context15.next) {
914
1007
  case 0:
915
- return _context14.abrupt("return", this.FilteredQuery(_objectSpread({
1008
+ return _context15.abrupt("return", this.FilteredQuery(_objectSpread({
916
1009
  mode: "listings"
917
- }, _args14[0] || {})));
1010
+ }, _args15[0] || {})));
918
1011
 
919
1012
  case 1:
920
1013
  case "end":
921
- return _context14.stop();
1014
+ return _context15.stop();
922
1015
  }
923
1016
  }
924
- }, null, this);
925
- };
1017
+ }, _callee15, this);
1018
+ }));
926
1019
  /**
927
1020
  * Retrieve stats for listings matching the specified parameters.
928
1021
  *
@@ -955,24 +1048,23 @@ exports.Listings = function _callee14() {
955
1048
  * @returns {Promise<Object>} - Statistics about listings. All prices in USD.
956
1049
  */
957
1050
 
958
-
959
- exports.ListingStats = function _callee15() {
960
- var _args15 = arguments;
961
- return _regeneratorRuntime.async(function _callee15$(_context15) {
1051
+ exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16() {
1052
+ var _args16 = arguments;
1053
+ return _regeneratorRuntime.wrap(function _callee16$(_context16) {
962
1054
  while (1) {
963
- switch (_context15.prev = _context15.next) {
1055
+ switch (_context16.prev = _context16.next) {
964
1056
  case 0:
965
- return _context15.abrupt("return", this.FilteredQuery(_objectSpread({
1057
+ return _context16.abrupt("return", this.FilteredQuery(_objectSpread({
966
1058
  mode: "listing-stats"
967
- }, _args15[0] || {})));
1059
+ }, _args16[0] || {})));
968
1060
 
969
1061
  case 1:
970
1062
  case "end":
971
- return _context15.stop();
1063
+ return _context16.stop();
972
1064
  }
973
1065
  }
974
- }, null, this);
975
- };
1066
+ }, _callee16, this);
1067
+ }));
976
1068
  /**
977
1069
  * Retrieve sales matching the specified parameters.
978
1070
  *
@@ -1005,24 +1097,23 @@ exports.ListingStats = function _callee15() {
1005
1097
  * @returns {Promise<Object>} - Results of the query and pagination info
1006
1098
  */
1007
1099
 
1008
-
1009
- exports.Sales = function _callee16() {
1010
- var _args16 = arguments;
1011
- return _regeneratorRuntime.async(function _callee16$(_context16) {
1100
+ exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17() {
1101
+ var _args17 = arguments;
1102
+ return _regeneratorRuntime.wrap(function _callee17$(_context17) {
1012
1103
  while (1) {
1013
- switch (_context16.prev = _context16.next) {
1104
+ switch (_context17.prev = _context17.next) {
1014
1105
  case 0:
1015
- return _context16.abrupt("return", this.FilteredQuery(_objectSpread({
1106
+ return _context17.abrupt("return", this.FilteredQuery(_objectSpread({
1016
1107
  mode: "sales"
1017
- }, _args16[0] || {})));
1108
+ }, _args17[0] || {})));
1018
1109
 
1019
1110
  case 1:
1020
1111
  case "end":
1021
- return _context16.stop();
1112
+ return _context17.stop();
1022
1113
  }
1023
1114
  }
1024
- }, null, this);
1025
- };
1115
+ }, _callee17, this);
1116
+ }));
1026
1117
  /**
1027
1118
  * Retrieve stats for listings matching the specified parameters.
1028
1119
  *
@@ -1055,24 +1146,23 @@ exports.Sales = function _callee16() {
1055
1146
  * @returns {Promise<Object>} - Statistics about sales. All prices in USD.
1056
1147
  */
1057
1148
 
1058
-
1059
- exports.SalesStats = function _callee17() {
1060
- var _args17 = arguments;
1061
- return _regeneratorRuntime.async(function _callee17$(_context17) {
1149
+ exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18() {
1150
+ var _args18 = arguments;
1151
+ return _regeneratorRuntime.wrap(function _callee18$(_context18) {
1062
1152
  while (1) {
1063
- switch (_context17.prev = _context17.next) {
1153
+ switch (_context18.prev = _context18.next) {
1064
1154
  case 0:
1065
- return _context17.abrupt("return", this.FilteredQuery(_objectSpread({
1155
+ return _context18.abrupt("return", this.FilteredQuery(_objectSpread({
1066
1156
  mode: "sales-stats"
1067
- }, _args17[0] || {})));
1157
+ }, _args18[0] || {})));
1068
1158
 
1069
1159
  case 1:
1070
1160
  case "end":
1071
- return _context17.stop();
1161
+ return _context18.stop();
1072
1162
  }
1073
1163
  }
1074
- }, null, this);
1075
- };
1164
+ }, _callee18, this);
1165
+ }));
1076
1166
  /**
1077
1167
  * <b><i>Requires login</i></b>
1078
1168
  *
@@ -1088,78 +1178,79 @@ exports.SalesStats = function _callee17() {
1088
1178
  * @returns {Promise<string>} - The listing ID of the created listing
1089
1179
  */
1090
1180
 
1091
-
1092
- exports.CreateListing = function _callee18(_ref14) {
1093
- var contractAddress, tokenId, price, listingId;
1094
- return _regeneratorRuntime.async(function _callee18$(_context18) {
1095
- while (1) {
1096
- switch (_context18.prev = _context18.next) {
1097
- case 0:
1098
- contractAddress = _ref14.contractAddress, tokenId = _ref14.tokenId, price = _ref14.price, listingId = _ref14.listingId;
1099
- contractAddress = Utils.FormatAddress(contractAddress);
1100
-
1101
- if (!listingId) {
1102
- _context18.next = 14;
1103
- break;
1104
- }
1105
-
1106
- _context18.t0 = _regeneratorRuntime;
1107
- _context18.t1 = Utils;
1108
- _context18.next = 7;
1109
- return _regeneratorRuntime.awrap(this.client.authClient.MakeAuthServiceRequest({
1110
- path: UrlJoin("as", "wlt", "mkt"),
1111
- method: "PUT",
1112
- body: {
1113
- id: listingId,
1114
- price: parseFloat(price)
1115
- },
1116
- headers: {
1117
- Authorization: "Bearer ".concat(this.AuthToken())
1181
+ exports.CreateListing = /*#__PURE__*/function () {
1182
+ var _ref33 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(_ref32) {
1183
+ var contractAddress, tokenId, price, listingId;
1184
+ return _regeneratorRuntime.wrap(function _callee19$(_context19) {
1185
+ while (1) {
1186
+ switch (_context19.prev = _context19.next) {
1187
+ case 0:
1188
+ contractAddress = _ref32.contractAddress, tokenId = _ref32.tokenId, price = _ref32.price, listingId = _ref32.listingId;
1189
+ contractAddress = Utils.FormatAddress(contractAddress);
1190
+
1191
+ if (!listingId) {
1192
+ _context19.next = 12;
1193
+ break;
1118
1194
  }
1119
- }));
1120
-
1121
- case 7:
1122
- _context18.t2 = _context18.sent;
1123
- _context18.t3 = _context18.t1.ResponseToFormat.call(_context18.t1, "text", _context18.t2);
1124
- _context18.next = 11;
1125
- return _context18.t0.awrap.call(_context18.t0, _context18.t3);
1126
1195
 
1127
- case 11:
1128
- return _context18.abrupt("return", _context18.sent);
1196
+ _context19.t0 = Utils;
1197
+ _context19.next = 6;
1198
+ return this.client.authClient.MakeAuthServiceRequest({
1199
+ path: UrlJoin("as", "wlt", "mkt"),
1200
+ method: "PUT",
1201
+ body: {
1202
+ id: listingId,
1203
+ price: parseFloat(price)
1204
+ },
1205
+ headers: {
1206
+ Authorization: "Bearer ".concat(this.AuthToken())
1207
+ }
1208
+ });
1129
1209
 
1130
- case 14:
1131
- _context18.t4 = _regeneratorRuntime;
1132
- _context18.t5 = Utils;
1133
- _context18.next = 18;
1134
- return _regeneratorRuntime.awrap(this.client.authClient.MakeAuthServiceRequest({
1135
- path: UrlJoin("as", "wlt", "mkt"),
1136
- method: "POST",
1137
- body: {
1138
- contract: contractAddress,
1139
- token: tokenId,
1140
- price: parseFloat(price)
1141
- },
1142
- headers: {
1143
- Authorization: "Bearer ".concat(this.AuthToken())
1144
- }
1145
- }));
1210
+ case 6:
1211
+ _context19.t1 = _context19.sent;
1212
+ _context19.next = 9;
1213
+ return _context19.t0.ResponseToFormat.call(_context19.t0, "text", _context19.t1);
1214
+
1215
+ case 9:
1216
+ return _context19.abrupt("return", _context19.sent);
1217
+
1218
+ case 12:
1219
+ _context19.t2 = Utils;
1220
+ _context19.next = 15;
1221
+ return this.client.authClient.MakeAuthServiceRequest({
1222
+ path: UrlJoin("as", "wlt", "mkt"),
1223
+ method: "POST",
1224
+ body: {
1225
+ contract: contractAddress,
1226
+ token: tokenId,
1227
+ price: parseFloat(price)
1228
+ },
1229
+ headers: {
1230
+ Authorization: "Bearer ".concat(this.AuthToken())
1231
+ }
1232
+ });
1146
1233
 
1147
- case 18:
1148
- _context18.t6 = _context18.sent;
1149
- _context18.t7 = _context18.t5.ResponseToJson.call(_context18.t5, _context18.t6);
1150
- _context18.next = 22;
1151
- return _context18.t4.awrap.call(_context18.t4, _context18.t7);
1234
+ case 15:
1235
+ _context19.t3 = _context19.sent;
1236
+ _context19.next = 18;
1237
+ return _context19.t2.ResponseToJson.call(_context19.t2, _context19.t3);
1152
1238
 
1153
- case 22:
1154
- return _context18.abrupt("return", _context18.sent);
1239
+ case 18:
1240
+ return _context19.abrupt("return", _context19.sent);
1155
1241
 
1156
- case 23:
1157
- case "end":
1158
- return _context18.stop();
1242
+ case 19:
1243
+ case "end":
1244
+ return _context19.stop();
1245
+ }
1159
1246
  }
1160
- }
1161
- }, null, this);
1162
- };
1247
+ }, _callee19, this);
1248
+ }));
1249
+
1250
+ return function (_x9) {
1251
+ return _ref33.apply(this, arguments);
1252
+ };
1253
+ }();
1163
1254
  /**
1164
1255
  * <b><i>Requires login</i></b>
1165
1256
  *
@@ -1171,29 +1262,35 @@ exports.CreateListing = function _callee18(_ref14) {
1171
1262
  */
1172
1263
 
1173
1264
 
1174
- exports.RemoveListing = function _callee19(_ref15) {
1175
- var listingId;
1176
- return _regeneratorRuntime.async(function _callee19$(_context19) {
1177
- while (1) {
1178
- switch (_context19.prev = _context19.next) {
1179
- case 0:
1180
- listingId = _ref15.listingId;
1181
- _context19.next = 3;
1182
- return _regeneratorRuntime.awrap(this.client.authClient.MakeAuthServiceRequest({
1183
- path: UrlJoin("as", "wlt", "mkt", listingId),
1184
- method: "DELETE",
1185
- headers: {
1186
- Authorization: "Bearer ".concat(this.AuthToken())
1187
- }
1188
- }));
1265
+ exports.RemoveListing = /*#__PURE__*/function () {
1266
+ var _ref35 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(_ref34) {
1267
+ var listingId;
1268
+ return _regeneratorRuntime.wrap(function _callee20$(_context20) {
1269
+ while (1) {
1270
+ switch (_context20.prev = _context20.next) {
1271
+ case 0:
1272
+ listingId = _ref34.listingId;
1273
+ _context20.next = 3;
1274
+ return this.client.authClient.MakeAuthServiceRequest({
1275
+ path: UrlJoin("as", "wlt", "mkt", listingId),
1276
+ method: "DELETE",
1277
+ headers: {
1278
+ Authorization: "Bearer ".concat(this.AuthToken())
1279
+ }
1280
+ });
1189
1281
 
1190
- case 3:
1191
- case "end":
1192
- return _context19.stop();
1282
+ case 3:
1283
+ case "end":
1284
+ return _context20.stop();
1285
+ }
1193
1286
  }
1194
- }
1195
- }, null, this);
1196
- };
1287
+ }, _callee20, this);
1288
+ }));
1289
+
1290
+ return function (_x10) {
1291
+ return _ref35.apply(this, arguments);
1292
+ };
1293
+ }();
1197
1294
  /**
1198
1295
  * Retrieve all valid names for filtering listings. Full item names are required for filtering listing results by name.
1199
1296
  *
@@ -1207,55 +1304,59 @@ exports.RemoveListing = function _callee19(_ref15) {
1207
1304
  */
1208
1305
 
1209
1306
 
1210
- exports.ListingNames = function _callee20(_ref16) {
1211
- var marketplaceParams, tenantId;
1212
- return _regeneratorRuntime.async(function _callee20$(_context20) {
1213
- while (1) {
1214
- switch (_context20.prev = _context20.next) {
1215
- case 0:
1216
- marketplaceParams = _ref16.marketplaceParams;
1217
-
1218
- if (!marketplaceParams) {
1219
- _context20.next = 5;
1220
- break;
1221
- }
1307
+ exports.ListingNames = /*#__PURE__*/function () {
1308
+ var _ref37 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(_ref36) {
1309
+ var marketplaceParams, tenantId;
1310
+ return _regeneratorRuntime.wrap(function _callee21$(_context21) {
1311
+ while (1) {
1312
+ switch (_context21.prev = _context21.next) {
1313
+ case 0:
1314
+ marketplaceParams = _ref36.marketplaceParams;
1222
1315
 
1223
- _context20.next = 4;
1224
- return _regeneratorRuntime.awrap(this.MarketplaceInfo({
1225
- marketplaceParams: marketplaceParams
1226
- }));
1316
+ if (!marketplaceParams) {
1317
+ _context21.next = 5;
1318
+ break;
1319
+ }
1227
1320
 
1228
- case 4:
1229
- tenantId = _context20.sent.tenantId;
1321
+ _context21.next = 4;
1322
+ return this.MarketplaceInfo({
1323
+ marketplaceParams: marketplaceParams
1324
+ });
1230
1325
 
1231
- case 5:
1232
- _context20.t0 = _regeneratorRuntime;
1233
- _context20.t1 = Utils;
1234
- _context20.next = 9;
1235
- return _regeneratorRuntime.awrap(this.client.authClient.MakeAuthServiceRequest({
1236
- path: UrlJoin("as", "mkt", "names"),
1237
- method: "GET",
1238
- queryParams: tenantId ? {
1239
- filter: "tenant:eq:".concat(tenantId)
1240
- } : {}
1241
- }));
1326
+ case 4:
1327
+ tenantId = _context21.sent.tenantId;
1328
+
1329
+ case 5:
1330
+ _context21.t0 = Utils;
1331
+ _context21.next = 8;
1332
+ return this.client.authClient.MakeAuthServiceRequest({
1333
+ path: UrlJoin("as", "mkt", "names"),
1334
+ method: "GET",
1335
+ queryParams: tenantId ? {
1336
+ filter: "tenant:eq:".concat(tenantId)
1337
+ } : {}
1338
+ });
1242
1339
 
1243
- case 9:
1244
- _context20.t2 = _context20.sent;
1245
- _context20.t3 = _context20.t1.ResponseToJson.call(_context20.t1, _context20.t2);
1246
- _context20.next = 13;
1247
- return _context20.t0.awrap.call(_context20.t0, _context20.t3);
1340
+ case 8:
1341
+ _context21.t1 = _context21.sent;
1342
+ _context21.next = 11;
1343
+ return _context21.t0.ResponseToJson.call(_context21.t0, _context21.t1);
1248
1344
 
1249
- case 13:
1250
- return _context20.abrupt("return", _context20.sent);
1345
+ case 11:
1346
+ return _context21.abrupt("return", _context21.sent);
1251
1347
 
1252
- case 14:
1253
- case "end":
1254
- return _context20.stop();
1348
+ case 12:
1349
+ case "end":
1350
+ return _context21.stop();
1351
+ }
1255
1352
  }
1256
- }
1257
- }, null, this);
1258
- };
1353
+ }, _callee21, this);
1354
+ }));
1355
+
1356
+ return function (_x11) {
1357
+ return _ref37.apply(this, arguments);
1358
+ };
1359
+ }();
1259
1360
  /**
1260
1361
  * Retrieve all valid edition names of the specified item. Full item edition names are required for filtering listing results by edition.
1261
1362
  *
@@ -1267,40 +1368,44 @@ exports.ListingNames = function _callee20(_ref16) {
1267
1368
  */
1268
1369
 
1269
1370
 
1270
- exports.ListingEditionNames = function _callee21(_ref17) {
1271
- var displayName;
1272
- return _regeneratorRuntime.async(function _callee21$(_context21) {
1273
- while (1) {
1274
- switch (_context21.prev = _context21.next) {
1275
- case 0:
1276
- displayName = _ref17.displayName;
1277
- _context21.t0 = _regeneratorRuntime;
1278
- _context21.t1 = Utils;
1279
- _context21.next = 5;
1280
- return _regeneratorRuntime.awrap(this.client.authClient.MakeAuthServiceRequest({
1281
- path: UrlJoin("as", "mkt", "editions"),
1282
- queryParams: {
1283
- filter: "nft/display_name:eq:".concat(displayName)
1284
- },
1285
- method: "GET"
1286
- }));
1371
+ exports.ListingEditionNames = /*#__PURE__*/function () {
1372
+ var _ref39 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(_ref38) {
1373
+ var displayName;
1374
+ return _regeneratorRuntime.wrap(function _callee22$(_context22) {
1375
+ while (1) {
1376
+ switch (_context22.prev = _context22.next) {
1377
+ case 0:
1378
+ displayName = _ref38.displayName;
1379
+ _context22.t0 = Utils;
1380
+ _context22.next = 4;
1381
+ return this.client.authClient.MakeAuthServiceRequest({
1382
+ path: UrlJoin("as", "mkt", "editions"),
1383
+ queryParams: {
1384
+ filter: "nft/display_name:eq:".concat(displayName)
1385
+ },
1386
+ method: "GET"
1387
+ });
1287
1388
 
1288
- case 5:
1289
- _context21.t2 = _context21.sent;
1290
- _context21.t3 = _context21.t1.ResponseToJson.call(_context21.t1, _context21.t2);
1291
- _context21.next = 9;
1292
- return _context21.t0.awrap.call(_context21.t0, _context21.t3);
1389
+ case 4:
1390
+ _context22.t1 = _context22.sent;
1391
+ _context22.next = 7;
1392
+ return _context22.t0.ResponseToJson.call(_context22.t0, _context22.t1);
1293
1393
 
1294
- case 9:
1295
- return _context21.abrupt("return", _context21.sent);
1394
+ case 7:
1395
+ return _context22.abrupt("return", _context22.sent);
1296
1396
 
1297
- case 10:
1298
- case "end":
1299
- return _context21.stop();
1397
+ case 8:
1398
+ case "end":
1399
+ return _context22.stop();
1400
+ }
1300
1401
  }
1301
- }
1302
- }, null, this);
1303
- };
1402
+ }, _callee22, this);
1403
+ }));
1404
+
1405
+ return function (_x12) {
1406
+ return _ref39.apply(this, arguments);
1407
+ };
1408
+ }();
1304
1409
  /**
1305
1410
  * Retrieve names of all valid attributes for listed tiems. Full attribute names and values are required for filtering listing results by attributes.
1306
1411
  *
@@ -1315,82 +1420,80 @@ exports.ListingEditionNames = function _callee21(_ref17) {
1315
1420
  */
1316
1421
 
1317
1422
 
1318
- exports.ListingAttributes = function _callee22() {
1319
- var _ref18,
1423
+ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23() {
1424
+ var _ref41,
1320
1425
  marketplaceParams,
1321
1426
  displayName,
1322
1427
  filters,
1323
1428
  attributes,
1324
- _args22 = arguments;
1429
+ _args23 = arguments;
1325
1430
 
1326
- return _regeneratorRuntime.async(function _callee22$(_context22) {
1431
+ return _regeneratorRuntime.wrap(function _callee23$(_context23) {
1327
1432
  while (1) {
1328
- switch (_context22.prev = _context22.next) {
1433
+ switch (_context23.prev = _context23.next) {
1329
1434
  case 0:
1330
- _ref18 = _args22.length > 0 && _args22[0] !== undefined ? _args22[0] : {}, marketplaceParams = _ref18.marketplaceParams, displayName = _ref18.displayName;
1435
+ _ref41 = _args23.length > 0 && _args23[0] !== undefined ? _args23[0] : {}, marketplaceParams = _ref41.marketplaceParams, displayName = _ref41.displayName;
1331
1436
  filters = [];
1332
1437
 
1333
1438
  if (!marketplaceParams) {
1334
- _context22.next = 10;
1439
+ _context23.next = 10;
1335
1440
  break;
1336
1441
  }
1337
1442
 
1338
- _context22.t0 = filters;
1339
- _context22.t1 = "tenant:eq:";
1340
- _context22.next = 7;
1341
- return _regeneratorRuntime.awrap(this.MarketplaceInfo({
1443
+ _context23.t0 = filters;
1444
+ _context23.t1 = "tenant:eq:";
1445
+ _context23.next = 7;
1446
+ return this.MarketplaceInfo({
1342
1447
  marketplaceParams: marketplaceParams
1343
- }));
1448
+ });
1344
1449
 
1345
1450
  case 7:
1346
- _context22.t2 = _context22.sent.tenantId;
1347
- _context22.t3 = _context22.t1.concat.call(_context22.t1, _context22.t2);
1451
+ _context23.t2 = _context23.sent.tenantId;
1452
+ _context23.t3 = _context23.t1.concat.call(_context23.t1, _context23.t2);
1348
1453
 
1349
- _context22.t0.push.call(_context22.t0, _context22.t3);
1454
+ _context23.t0.push.call(_context23.t0, _context23.t3);
1350
1455
 
1351
1456
  case 10:
1352
1457
  if (displayName) {
1353
1458
  filters.push("nft/display_name:eq:".concat(displayName));
1354
1459
  }
1355
1460
 
1356
- _context22.t4 = _regeneratorRuntime;
1357
- _context22.t5 = Utils;
1358
- _context22.next = 15;
1359
- return _regeneratorRuntime.awrap(this.client.authClient.MakeAuthServiceRequest({
1461
+ _context23.t4 = Utils;
1462
+ _context23.next = 14;
1463
+ return this.client.authClient.MakeAuthServiceRequest({
1360
1464
  path: UrlJoin("as", "mkt", "attributes"),
1361
1465
  method: "GET",
1362
1466
  queryParams: {
1363
1467
  filter: filters
1364
1468
  }
1365
- }));
1469
+ });
1366
1470
 
1367
- case 15:
1368
- _context22.t6 = _context22.sent;
1369
- _context22.t7 = _context22.t5.ResponseToJson.call(_context22.t5, _context22.t6);
1370
- _context22.next = 19;
1371
- return _context22.t4.awrap.call(_context22.t4, _context22.t7);
1471
+ case 14:
1472
+ _context23.t5 = _context23.sent;
1473
+ _context23.next = 17;
1474
+ return _context23.t4.ResponseToJson.call(_context23.t4, _context23.t5);
1372
1475
 
1373
- case 19:
1374
- attributes = _context22.sent;
1375
- return _context22.abrupt("return", attributes.map(function (_ref19) {
1376
- var trait_type = _ref19.trait_type,
1377
- values = _ref19.values;
1476
+ case 17:
1477
+ attributes = _context23.sent;
1478
+ return _context23.abrupt("return", attributes.map(function (_ref42) {
1479
+ var trait_type = _ref42.trait_type,
1480
+ values = _ref42.values;
1378
1481
  return {
1379
1482
  name: trait_type,
1380
1483
  values: values
1381
1484
  };
1382
- }).filter(function (_ref20) {
1383
- var name = _ref20.name;
1485
+ }).filter(function (_ref43) {
1486
+ var name = _ref43.name;
1384
1487
  return !["Content Fabric Hash", "Total Minted Supply", "Creator"].includes(name);
1385
1488
  }));
1386
1489
 
1387
- case 21:
1490
+ case 19:
1388
1491
  case "end":
1389
- return _context22.stop();
1492
+ return _context23.stop();
1390
1493
  }
1391
1494
  }
1392
- }, null, this);
1393
- };
1495
+ }, _callee23, this);
1496
+ }));
1394
1497
  /* MINTING STATUS */
1395
1498
 
1396
1499
  /**
@@ -1404,59 +1507,64 @@ exports.ListingAttributes = function _callee22() {
1404
1507
  * @returns {Promise<Object>} - The status of the purchase
1405
1508
  */
1406
1509
 
1510
+ exports.ListingPurchaseStatus = /*#__PURE__*/function () {
1511
+ var _ref45 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(_ref44) {
1512
+ var listingId, confirmationId, listingStatus, statuses;
1513
+ return _regeneratorRuntime.wrap(function _callee24$(_context24) {
1514
+ while (1) {
1515
+ switch (_context24.prev = _context24.next) {
1516
+ case 0:
1517
+ listingId = _ref44.listingId, confirmationId = _ref44.confirmationId;
1518
+ _context24.prev = 1;
1519
+ _context24.next = 4;
1520
+ return this.ListingStatus({
1521
+ listingId: listingId
1522
+ });
1407
1523
 
1408
- exports.ListingPurchaseStatus = function _callee23(_ref21) {
1409
- var listingId, confirmationId, listingStatus, statuses;
1410
- return _regeneratorRuntime.async(function _callee23$(_context23) {
1411
- while (1) {
1412
- switch (_context23.prev = _context23.next) {
1413
- case 0:
1414
- listingId = _ref21.listingId, confirmationId = _ref21.confirmationId;
1415
- _context23.prev = 1;
1416
- _context23.next = 4;
1417
- return _regeneratorRuntime.awrap(this.ListingStatus({
1418
- listingId: listingId
1419
- }));
1420
-
1421
- case 4:
1422
- listingStatus = _context23.sent;
1524
+ case 4:
1525
+ listingStatus = _context24.sent;
1423
1526
 
1424
- if (listingStatus) {
1425
- _context23.next = 7;
1426
- break;
1427
- }
1527
+ if (listingStatus) {
1528
+ _context24.next = 7;
1529
+ break;
1530
+ }
1428
1531
 
1429
- throw Error("Unable to find info for listing " + listingId);
1532
+ throw Error("Unable to find info for listing " + listingId);
1430
1533
 
1431
- case 7:
1432
- _context23.next = 9;
1433
- return _regeneratorRuntime.awrap(this.MintingStatus({
1434
- tenantId: listingStatus.tenant
1435
- }));
1534
+ case 7:
1535
+ _context24.next = 9;
1536
+ return this.MintingStatus({
1537
+ tenantId: listingStatus.tenant
1538
+ });
1436
1539
 
1437
- case 9:
1438
- statuses = _context23.sent;
1439
- return _context23.abrupt("return", statuses.find(function (status) {
1440
- return status.op === "nft-transfer" && status.extra && status.extra[0] === confirmationId;
1441
- }) || {
1442
- status: "none"
1443
- });
1540
+ case 9:
1541
+ statuses = _context24.sent;
1542
+ return _context24.abrupt("return", statuses.find(function (status) {
1543
+ return status.op === "nft-transfer" && status.extra && status.extra[0] === confirmationId;
1544
+ }) || {
1545
+ status: "none"
1546
+ });
1444
1547
 
1445
- case 13:
1446
- _context23.prev = 13;
1447
- _context23.t0 = _context23["catch"](1);
1448
- this.Log(_context23.t0, true);
1449
- return _context23.abrupt("return", {
1450
- status: "unknown"
1451
- });
1548
+ case 13:
1549
+ _context24.prev = 13;
1550
+ _context24.t0 = _context24["catch"](1);
1551
+ this.Log(_context24.t0, true);
1552
+ return _context24.abrupt("return", {
1553
+ status: "unknown"
1554
+ });
1452
1555
 
1453
- case 17:
1454
- case "end":
1455
- return _context23.stop();
1556
+ case 17:
1557
+ case "end":
1558
+ return _context24.stop();
1559
+ }
1456
1560
  }
1457
- }
1458
- }, null, this, [[1, 13]]);
1459
- };
1561
+ }, _callee24, this, [[1, 13]]);
1562
+ }));
1563
+
1564
+ return function (_x13) {
1565
+ return _ref45.apply(this, arguments);
1566
+ };
1567
+ }();
1460
1568
  /**
1461
1569
  * Return status of the specified marketplace purchase
1462
1570
  *
@@ -1469,49 +1577,55 @@ exports.ListingPurchaseStatus = function _callee23(_ref21) {
1469
1577
  */
1470
1578
 
1471
1579
 
1472
- exports.PurchaseStatus = function _callee24(_ref22) {
1473
- var marketplaceParams, confirmationId, marketplaceInfo, statuses;
1474
- return _regeneratorRuntime.async(function _callee24$(_context24) {
1475
- while (1) {
1476
- switch (_context24.prev = _context24.next) {
1477
- case 0:
1478
- marketplaceParams = _ref22.marketplaceParams, confirmationId = _ref22.confirmationId;
1479
- _context24.prev = 1;
1480
- _context24.next = 4;
1481
- return _regeneratorRuntime.awrap(this.MarketplaceInfo({
1482
- marketplaceParams: marketplaceParams
1483
- }));
1580
+ exports.PurchaseStatus = /*#__PURE__*/function () {
1581
+ var _ref47 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(_ref46) {
1582
+ var marketplaceParams, confirmationId, marketplaceInfo, statuses;
1583
+ return _regeneratorRuntime.wrap(function _callee25$(_context25) {
1584
+ while (1) {
1585
+ switch (_context25.prev = _context25.next) {
1586
+ case 0:
1587
+ marketplaceParams = _ref46.marketplaceParams, confirmationId = _ref46.confirmationId;
1588
+ _context25.prev = 1;
1589
+ _context25.next = 4;
1590
+ return this.MarketplaceInfo({
1591
+ marketplaceParams: marketplaceParams
1592
+ });
1484
1593
 
1485
- case 4:
1486
- marketplaceInfo = _context24.sent;
1487
- _context24.next = 7;
1488
- return _regeneratorRuntime.awrap(this.MintingStatus({
1489
- tenantId: marketplaceInfo.tenant_id
1490
- }));
1594
+ case 4:
1595
+ marketplaceInfo = _context25.sent;
1596
+ _context25.next = 7;
1597
+ return this.MintingStatus({
1598
+ tenantId: marketplaceInfo.tenant_id
1599
+ });
1491
1600
 
1492
- case 7:
1493
- statuses = _context24.sent;
1494
- return _context24.abrupt("return", statuses.find(function (status) {
1495
- return status.op === "nft-buy" && status.confirmationId === confirmationId;
1496
- }) || {
1497
- status: "none"
1498
- });
1601
+ case 7:
1602
+ statuses = _context25.sent;
1603
+ return _context25.abrupt("return", statuses.find(function (status) {
1604
+ return status.op === "nft-buy" && status.confirmationId === confirmationId;
1605
+ }) || {
1606
+ status: "none"
1607
+ });
1499
1608
 
1500
- case 11:
1501
- _context24.prev = 11;
1502
- _context24.t0 = _context24["catch"](1);
1503
- this.Log(_context24.t0, true);
1504
- return _context24.abrupt("return", {
1505
- status: "unknown"
1506
- });
1609
+ case 11:
1610
+ _context25.prev = 11;
1611
+ _context25.t0 = _context25["catch"](1);
1612
+ this.Log(_context25.t0, true);
1613
+ return _context25.abrupt("return", {
1614
+ status: "unknown"
1615
+ });
1507
1616
 
1508
- case 15:
1509
- case "end":
1510
- return _context24.stop();
1617
+ case 15:
1618
+ case "end":
1619
+ return _context25.stop();
1620
+ }
1511
1621
  }
1512
- }
1513
- }, null, this, [[1, 11]]);
1514
- };
1622
+ }, _callee25, this, [[1, 11]]);
1623
+ }));
1624
+
1625
+ return function (_x14) {
1626
+ return _ref47.apply(this, arguments);
1627
+ };
1628
+ }();
1515
1629
  /**
1516
1630
  * Return status of the specified item claim
1517
1631
  *
@@ -1524,49 +1638,55 @@ exports.PurchaseStatus = function _callee24(_ref22) {
1524
1638
  */
1525
1639
 
1526
1640
 
1527
- exports.ClaimStatus = function _callee25(_ref23) {
1528
- var marketplaceParams, sku, marketplaceInfo, statuses;
1529
- return _regeneratorRuntime.async(function _callee25$(_context25) {
1530
- while (1) {
1531
- switch (_context25.prev = _context25.next) {
1532
- case 0:
1533
- marketplaceParams = _ref23.marketplaceParams, sku = _ref23.sku;
1534
- _context25.prev = 1;
1535
- _context25.next = 4;
1536
- return _regeneratorRuntime.awrap(this.MarketplaceInfo({
1537
- marketplaceParams: marketplaceParams
1538
- }));
1641
+ exports.ClaimStatus = /*#__PURE__*/function () {
1642
+ var _ref49 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(_ref48) {
1643
+ var marketplaceParams, sku, marketplaceInfo, statuses;
1644
+ return _regeneratorRuntime.wrap(function _callee26$(_context26) {
1645
+ while (1) {
1646
+ switch (_context26.prev = _context26.next) {
1647
+ case 0:
1648
+ marketplaceParams = _ref48.marketplaceParams, sku = _ref48.sku;
1649
+ _context26.prev = 1;
1650
+ _context26.next = 4;
1651
+ return this.MarketplaceInfo({
1652
+ marketplaceParams: marketplaceParams
1653
+ });
1539
1654
 
1540
- case 4:
1541
- marketplaceInfo = _context25.sent;
1542
- _context25.next = 7;
1543
- return _regeneratorRuntime.awrap(this.MintingStatus({
1544
- tenantId: marketplaceInfo.tenantId
1545
- }));
1655
+ case 4:
1656
+ marketplaceInfo = _context26.sent;
1657
+ _context26.next = 7;
1658
+ return this.MintingStatus({
1659
+ tenantId: marketplaceInfo.tenantId
1660
+ });
1546
1661
 
1547
- case 7:
1548
- statuses = _context25.sent;
1549
- return _context25.abrupt("return", statuses.find(function (status) {
1550
- return status.op === "nft-claim" && status.marketplaceId === marketplaceInfo.marketplaceId && status.confirmationId === sku;
1551
- }) || {
1552
- status: "none"
1553
- });
1662
+ case 7:
1663
+ statuses = _context26.sent;
1664
+ return _context26.abrupt("return", statuses.find(function (status) {
1665
+ return status.op === "nft-claim" && status.marketplaceId === marketplaceInfo.marketplaceId && status.confirmationId === sku;
1666
+ }) || {
1667
+ status: "none"
1668
+ });
1554
1669
 
1555
- case 11:
1556
- _context25.prev = 11;
1557
- _context25.t0 = _context25["catch"](1);
1558
- this.Log(_context25.t0, true);
1559
- return _context25.abrupt("return", {
1560
- status: "unknown"
1561
- });
1670
+ case 11:
1671
+ _context26.prev = 11;
1672
+ _context26.t0 = _context26["catch"](1);
1673
+ this.Log(_context26.t0, true);
1674
+ return _context26.abrupt("return", {
1675
+ status: "unknown"
1676
+ });
1562
1677
 
1563
- case 15:
1564
- case "end":
1565
- return _context25.stop();
1678
+ case 15:
1679
+ case "end":
1680
+ return _context26.stop();
1681
+ }
1566
1682
  }
1567
- }
1568
- }, null, this, [[1, 11]]);
1569
- };
1683
+ }, _callee26, this, [[1, 11]]);
1684
+ }));
1685
+
1686
+ return function (_x15) {
1687
+ return _ref49.apply(this, arguments);
1688
+ };
1689
+ }();
1570
1690
  /**
1571
1691
  * Return status of the specified pack opening
1572
1692
  *
@@ -1579,49 +1699,55 @@ exports.ClaimStatus = function _callee25(_ref23) {
1579
1699
  */
1580
1700
 
1581
1701
 
1582
- exports.PackOpenStatus = function _callee26(_ref24) {
1583
- var contractAddress, tokenId, tenantConfig, statuses;
1584
- return _regeneratorRuntime.async(function _callee26$(_context26) {
1585
- while (1) {
1586
- switch (_context26.prev = _context26.next) {
1587
- case 0:
1588
- contractAddress = _ref24.contractAddress, tokenId = _ref24.tokenId;
1589
- _context26.prev = 1;
1590
- _context26.next = 4;
1591
- return _regeneratorRuntime.awrap(this.TenantConfiguration({
1592
- contractAddress: contractAddress
1593
- }));
1702
+ exports.PackOpenStatus = /*#__PURE__*/function () {
1703
+ var _ref51 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(_ref50) {
1704
+ var contractAddress, tokenId, tenantConfig, statuses;
1705
+ return _regeneratorRuntime.wrap(function _callee27$(_context27) {
1706
+ while (1) {
1707
+ switch (_context27.prev = _context27.next) {
1708
+ case 0:
1709
+ contractAddress = _ref50.contractAddress, tokenId = _ref50.tokenId;
1710
+ _context27.prev = 1;
1711
+ _context27.next = 4;
1712
+ return this.TenantConfiguration({
1713
+ contractAddress: contractAddress
1714
+ });
1594
1715
 
1595
- case 4:
1596
- tenantConfig = _context26.sent;
1597
- _context26.next = 7;
1598
- return _regeneratorRuntime.awrap(this.MintingStatus({
1599
- tenantId: tenantConfig.tenant
1600
- }));
1716
+ case 4:
1717
+ tenantConfig = _context27.sent;
1718
+ _context27.next = 7;
1719
+ return this.MintingStatus({
1720
+ tenantId: tenantConfig.tenant
1721
+ });
1601
1722
 
1602
- case 7:
1603
- statuses = _context26.sent;
1604
- return _context26.abrupt("return", statuses.find(function (status) {
1605
- return status.op === "nft-open" && Utils.EqualAddress(contractAddress, status.address) && status.tokenId === tokenId;
1606
- }) || {
1607
- status: "none"
1608
- });
1723
+ case 7:
1724
+ statuses = _context27.sent;
1725
+ return _context27.abrupt("return", statuses.find(function (status) {
1726
+ return status.op === "nft-open" && Utils.EqualAddress(contractAddress, status.address) && status.tokenId === tokenId;
1727
+ }) || {
1728
+ status: "none"
1729
+ });
1609
1730
 
1610
- case 11:
1611
- _context26.prev = 11;
1612
- _context26.t0 = _context26["catch"](1);
1613
- this.Log(_context26.t0, true);
1614
- return _context26.abrupt("return", {
1615
- status: "unknown"
1616
- });
1731
+ case 11:
1732
+ _context27.prev = 11;
1733
+ _context27.t0 = _context27["catch"](1);
1734
+ this.Log(_context27.t0, true);
1735
+ return _context27.abrupt("return", {
1736
+ status: "unknown"
1737
+ });
1617
1738
 
1618
- case 15:
1619
- case "end":
1620
- return _context26.stop();
1739
+ case 15:
1740
+ case "end":
1741
+ return _context27.stop();
1742
+ }
1621
1743
  }
1622
- }
1623
- }, null, this, [[1, 11]]);
1624
- };
1744
+ }, _callee27, this, [[1, 11]]);
1745
+ }));
1746
+
1747
+ return function (_x16) {
1748
+ return _ref51.apply(this, arguments);
1749
+ };
1750
+ }();
1625
1751
  /**
1626
1752
  * Return status of the specified collection redemption
1627
1753
  *
@@ -1634,195 +1760,219 @@ exports.PackOpenStatus = function _callee26(_ref24) {
1634
1760
  */
1635
1761
 
1636
1762
 
1637
- exports.CollectionRedemptionStatus = function _callee27(_ref25) {
1638
- var marketplaceParams, confirmationId, statuses;
1639
- return _regeneratorRuntime.async(function _callee27$(_context27) {
1640
- while (1) {
1641
- switch (_context27.prev = _context27.next) {
1642
- case 0:
1643
- marketplaceParams = _ref25.marketplaceParams, confirmationId = _ref25.confirmationId;
1644
- _context27.prev = 1;
1645
- _context27.next = 4;
1646
- return _regeneratorRuntime.awrap(this.MintingStatus({
1647
- marketplaceParams: marketplaceParams
1648
- }));
1763
+ exports.CollectionRedemptionStatus = /*#__PURE__*/function () {
1764
+ var _ref53 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref52) {
1765
+ var marketplaceParams, confirmationId, statuses;
1766
+ return _regeneratorRuntime.wrap(function _callee28$(_context28) {
1767
+ while (1) {
1768
+ switch (_context28.prev = _context28.next) {
1769
+ case 0:
1770
+ marketplaceParams = _ref52.marketplaceParams, confirmationId = _ref52.confirmationId;
1771
+ _context28.prev = 1;
1772
+ _context28.next = 4;
1773
+ return this.MintingStatus({
1774
+ marketplaceParams: marketplaceParams
1775
+ });
1649
1776
 
1650
- case 4:
1651
- statuses = _context27.sent;
1652
- return _context27.abrupt("return", statuses.find(function (status) {
1653
- return status.op === "nft-redeem" && status.confirmationId === confirmationId;
1654
- }) || {
1655
- status: "none"
1656
- });
1777
+ case 4:
1778
+ statuses = _context28.sent;
1779
+ return _context28.abrupt("return", statuses.find(function (status) {
1780
+ return status.op === "nft-redeem" && status.confirmationId === confirmationId;
1781
+ }) || {
1782
+ status: "none"
1783
+ });
1657
1784
 
1658
- case 8:
1659
- _context27.prev = 8;
1660
- _context27.t0 = _context27["catch"](1);
1661
- this.Log(_context27.t0, true);
1662
- return _context27.abrupt("return", {
1663
- status: "unknown"
1664
- });
1785
+ case 8:
1786
+ _context28.prev = 8;
1787
+ _context28.t0 = _context28["catch"](1);
1788
+ this.Log(_context28.t0, true);
1789
+ return _context28.abrupt("return", {
1790
+ status: "unknown"
1791
+ });
1665
1792
 
1666
- case 12:
1667
- case "end":
1668
- return _context27.stop();
1793
+ case 12:
1794
+ case "end":
1795
+ return _context28.stop();
1796
+ }
1669
1797
  }
1670
- }
1671
- }, null, this, [[1, 8]]);
1672
- };
1798
+ }, _callee28, this, [[1, 8]]);
1799
+ }));
1800
+
1801
+ return function (_x17) {
1802
+ return _ref53.apply(this, arguments);
1803
+ };
1804
+ }();
1673
1805
  /* EVENTS */
1674
1806
 
1675
1807
 
1676
- exports.LoadDrop = function _callee28(_ref26) {
1677
- var _this2 = this;
1808
+ exports.LoadDrop = /*#__PURE__*/function () {
1809
+ var _ref55 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref54) {
1810
+ var _this2 = this;
1678
1811
 
1679
- var tenantSlug, eventSlug, dropId, mainSiteHash, event, eventId;
1680
- return _regeneratorRuntime.async(function _callee28$(_context28) {
1681
- while (1) {
1682
- switch (_context28.prev = _context28.next) {
1683
- case 0:
1684
- tenantSlug = _ref26.tenantSlug, eventSlug = _ref26.eventSlug, dropId = _ref26.dropId;
1812
+ var tenantSlug, eventSlug, dropId, mainSiteHash, event, eventId;
1813
+ return _regeneratorRuntime.wrap(function _callee29$(_context29) {
1814
+ while (1) {
1815
+ switch (_context29.prev = _context29.next) {
1816
+ case 0:
1817
+ tenantSlug = _ref54.tenantSlug, eventSlug = _ref54.eventSlug, dropId = _ref54.dropId;
1685
1818
 
1686
- if (!this.drops) {
1687
- this.drops = {};
1688
- }
1819
+ if (!this.drops) {
1820
+ this.drops = {};
1821
+ }
1689
1822
 
1690
- if (!this.drops[tenantSlug]) {
1691
- this.drops[tenantSlug] = {};
1692
- }
1823
+ if (!this.drops[tenantSlug]) {
1824
+ this.drops[tenantSlug] = {};
1825
+ }
1693
1826
 
1694
- if (!this.drops[tenantSlug][eventSlug]) {
1695
- this.drops[tenantSlug][eventSlug] = {};
1696
- }
1827
+ if (!this.drops[tenantSlug][eventSlug]) {
1828
+ this.drops[tenantSlug][eventSlug] = {};
1829
+ }
1697
1830
 
1698
- if (this.drops[tenantSlug][eventSlug][dropId]) {
1699
- _context28.next = 16;
1700
- break;
1701
- }
1831
+ if (this.drops[tenantSlug][eventSlug][dropId]) {
1832
+ _context29.next = 16;
1833
+ break;
1834
+ }
1702
1835
 
1703
- _context28.next = 7;
1704
- return _regeneratorRuntime.awrap(this.client.LatestVersionHash({
1705
- objectId: this.mainSiteId
1706
- }));
1836
+ _context29.next = 7;
1837
+ return this.client.LatestVersionHash({
1838
+ objectId: this.mainSiteId
1839
+ });
1707
1840
 
1708
- case 7:
1709
- mainSiteHash = _context28.sent;
1710
- _context28.next = 10;
1711
- return _regeneratorRuntime.awrap(this.client.ContentObjectMetadata({
1712
- versionHash: mainSiteHash,
1713
- metadataSubtree: UrlJoin("public", "asset_metadata", "tenants", tenantSlug, "sites", eventSlug, "info"),
1714
- resolveLinks: true,
1715
- linkDepthLimit: 2,
1716
- resolveIncludeSource: true,
1717
- produceLinkUrls: true,
1718
- select: [".", "drops"],
1719
- noAuth: true
1720
- }));
1841
+ case 7:
1842
+ mainSiteHash = _context29.sent;
1843
+ _context29.next = 10;
1844
+ return this.client.ContentObjectMetadata({
1845
+ versionHash: mainSiteHash,
1846
+ metadataSubtree: UrlJoin("public", "asset_metadata", "tenants", tenantSlug, "sites", eventSlug, "info"),
1847
+ resolveLinks: true,
1848
+ linkDepthLimit: 2,
1849
+ resolveIncludeSource: true,
1850
+ produceLinkUrls: true,
1851
+ select: [".", "drops"],
1852
+ noAuth: true
1853
+ });
1721
1854
 
1722
- case 10:
1723
- _context28.t0 = _context28.sent;
1855
+ case 10:
1856
+ _context29.t0 = _context29.sent;
1724
1857
 
1725
- if (_context28.t0) {
1726
- _context28.next = 13;
1727
- break;
1728
- }
1858
+ if (_context29.t0) {
1859
+ _context29.next = 13;
1860
+ break;
1861
+ }
1729
1862
 
1730
- _context28.t0 = [];
1863
+ _context29.t0 = [];
1731
1864
 
1732
- case 13:
1733
- event = _context28.t0;
1734
- eventId = Utils.DecodeVersionHash(event["."].source).objectId;
1735
- event.drops.forEach(function (drop) {
1736
- drop = _objectSpread({}, drop, {
1737
- eventId: eventId
1865
+ case 13:
1866
+ event = _context29.t0;
1867
+ eventId = Utils.DecodeVersionHash(event["."].source).objectId;
1868
+ event.drops.forEach(function (drop) {
1869
+ drop = _objectSpread(_objectSpread({}, drop), {}, {
1870
+ eventId: eventId
1871
+ });
1872
+ _this2.drops[tenantSlug][eventSlug][drop.uuid] = drop;
1873
+ _this2.drops[drop.uuid] = drop;
1738
1874
  });
1739
- _this2.drops[tenantSlug][eventSlug][drop.uuid] = drop;
1740
- _this2.drops[drop.uuid] = drop;
1741
- });
1742
1875
 
1743
- case 16:
1744
- return _context28.abrupt("return", this.drops[dropId]);
1876
+ case 16:
1877
+ return _context29.abrupt("return", this.drops[dropId]);
1745
1878
 
1746
- case 17:
1747
- case "end":
1748
- return _context28.stop();
1879
+ case 17:
1880
+ case "end":
1881
+ return _context29.stop();
1882
+ }
1749
1883
  }
1750
- }
1751
- }, null, this);
1752
- };
1884
+ }, _callee29, this);
1885
+ }));
1753
1886
 
1754
- exports.SubmitDropVote = function _callee29(_ref27) {
1755
- var marketplaceParams, eventId, dropId, sku, marketplaceInfo;
1756
- return _regeneratorRuntime.async(function _callee29$(_context29) {
1757
- while (1) {
1758
- switch (_context29.prev = _context29.next) {
1759
- case 0:
1760
- marketplaceParams = _ref27.marketplaceParams, eventId = _ref27.eventId, dropId = _ref27.dropId, sku = _ref27.sku;
1761
- _context29.next = 3;
1762
- return _regeneratorRuntime.awrap(this.MarketplaceInfo({
1763
- marketplaceParams: marketplaceParams
1764
- }));
1887
+ return function (_x18) {
1888
+ return _ref55.apply(this, arguments);
1889
+ };
1890
+ }();
1891
+
1892
+ exports.SubmitDropVote = /*#__PURE__*/function () {
1893
+ var _ref57 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(_ref56) {
1894
+ var marketplaceParams, eventId, dropId, sku, marketplaceInfo;
1895
+ return _regeneratorRuntime.wrap(function _callee30$(_context30) {
1896
+ while (1) {
1897
+ switch (_context30.prev = _context30.next) {
1898
+ case 0:
1899
+ marketplaceParams = _ref56.marketplaceParams, eventId = _ref56.eventId, dropId = _ref56.dropId, sku = _ref56.sku;
1900
+ _context30.next = 3;
1901
+ return this.MarketplaceInfo({
1902
+ marketplaceParams: marketplaceParams
1903
+ });
1765
1904
 
1766
- case 3:
1767
- marketplaceInfo = _context29.sent;
1768
- _context29.next = 6;
1769
- return _regeneratorRuntime.awrap(this.client.authClient.MakeAuthServiceRequest({
1770
- path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
1771
- method: "POST",
1772
- body: {
1773
- op: "vote-drop",
1774
- evt: eventId,
1775
- id: dropId,
1776
- itm: sku
1777
- },
1778
- headers: {
1779
- Authorization: "Bearer ".concat(this.AuthToken())
1780
- }
1781
- }));
1905
+ case 3:
1906
+ marketplaceInfo = _context30.sent;
1907
+ _context30.next = 6;
1908
+ return this.client.authClient.MakeAuthServiceRequest({
1909
+ path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
1910
+ method: "POST",
1911
+ body: {
1912
+ op: "vote-drop",
1913
+ evt: eventId,
1914
+ id: dropId,
1915
+ itm: sku
1916
+ },
1917
+ headers: {
1918
+ Authorization: "Bearer ".concat(this.AuthToken())
1919
+ }
1920
+ });
1782
1921
 
1783
- case 6:
1784
- case "end":
1785
- return _context29.stop();
1922
+ case 6:
1923
+ case "end":
1924
+ return _context30.stop();
1925
+ }
1786
1926
  }
1787
- }
1788
- }, null, this);
1789
- };
1790
-
1791
- exports.DropStatus = function _callee30(_ref28) {
1792
- var marketplace, eventId, dropId, response;
1793
- return _regeneratorRuntime.async(function _callee30$(_context30) {
1794
- while (1) {
1795
- switch (_context30.prev = _context30.next) {
1796
- case 0:
1797
- marketplace = _ref28.marketplace, eventId = _ref28.eventId, dropId = _ref28.dropId;
1798
- _context30.prev = 1;
1799
- _context30.next = 4;
1800
- return _regeneratorRuntime.awrap(Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
1801
- path: UrlJoin("as", "wlt", "act", marketplace.tenant_id, eventId, dropId),
1802
- method: "GET",
1803
- headers: {
1804
- Authorization: "Bearer ".concat(this.AuthToken())
1805
- }
1806
- })));
1927
+ }, _callee30, this);
1928
+ }));
1807
1929
 
1808
- case 4:
1809
- response = _context30.sent;
1810
- return _context30.abrupt("return", response.sort(function (a, b) {
1811
- return a.ts > b.ts ? 1 : -1;
1812
- })[0] || {
1813
- status: "none"
1814
- });
1930
+ return function (_x19) {
1931
+ return _ref57.apply(this, arguments);
1932
+ };
1933
+ }();
1934
+
1935
+ exports.DropStatus = /*#__PURE__*/function () {
1936
+ var _ref59 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(_ref58) {
1937
+ var marketplace, eventId, dropId, response;
1938
+ return _regeneratorRuntime.wrap(function _callee31$(_context31) {
1939
+ while (1) {
1940
+ switch (_context31.prev = _context31.next) {
1941
+ case 0:
1942
+ marketplace = _ref58.marketplace, eventId = _ref58.eventId, dropId = _ref58.dropId;
1943
+ _context31.prev = 1;
1944
+ _context31.next = 4;
1945
+ return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
1946
+ path: UrlJoin("as", "wlt", "act", marketplace.tenant_id, eventId, dropId),
1947
+ method: "GET",
1948
+ headers: {
1949
+ Authorization: "Bearer ".concat(this.AuthToken())
1950
+ }
1951
+ }));
1952
+
1953
+ case 4:
1954
+ response = _context31.sent;
1955
+ return _context31.abrupt("return", response.sort(function (a, b) {
1956
+ return a.ts > b.ts ? 1 : -1;
1957
+ })[0] || {
1958
+ status: "none"
1959
+ });
1815
1960
 
1816
- case 8:
1817
- _context30.prev = 8;
1818
- _context30.t0 = _context30["catch"](1);
1819
- this.Log(_context30.t0, true);
1820
- return _context30.abrupt("return", "");
1961
+ case 8:
1962
+ _context31.prev = 8;
1963
+ _context31.t0 = _context31["catch"](1);
1964
+ this.Log(_context31.t0, true);
1965
+ return _context31.abrupt("return", "");
1821
1966
 
1822
- case 12:
1823
- case "end":
1824
- return _context30.stop();
1967
+ case 12:
1968
+ case "end":
1969
+ return _context31.stop();
1970
+ }
1825
1971
  }
1826
- }
1827
- }, null, this, [[1, 8]]);
1828
- };
1972
+ }, _callee31, this, [[1, 8]]);
1973
+ }));
1974
+
1975
+ return function (_x20) {
1976
+ return _ref59.apply(this, arguments);
1977
+ };
1978
+ }();