@eluvio/elv-client-js 4.0.147 → 4.2.0

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 (47) hide show
  1. package/dist/ElvClient-min.js +2 -67
  2. package/dist/ElvClient-min.js.LICENSE.txt +72 -0
  3. package/dist/ElvClient-node-min.js +2 -66
  4. package/dist/ElvClient-node-min.js.LICENSE.txt +72 -0
  5. package/dist/ElvFrameClient-min.js +2 -60
  6. package/dist/ElvFrameClient-min.js.LICENSE.txt +72 -0
  7. package/dist/ElvPermissionsClient-min.js +2 -60
  8. package/dist/ElvPermissionsClient-min.js.LICENSE.txt +72 -0
  9. package/dist/ElvWalletClient-min.js +2 -67
  10. package/dist/ElvWalletClient-min.js.LICENSE.txt +72 -0
  11. package/dist/ElvWalletClient-node-min.js +2 -66
  12. package/dist/ElvWalletClient-node-min.js.LICENSE.txt +72 -0
  13. package/dist/src/AuthorizationClient.js +713 -715
  14. package/dist/src/ContentObjectAudit.js +59 -59
  15. package/dist/src/Crypto.js +85 -86
  16. package/dist/src/ElvClient.js +532 -501
  17. package/dist/src/ElvWallet.js +30 -28
  18. package/dist/src/EthClient.js +316 -316
  19. package/dist/src/FrameClient.js +70 -71
  20. package/dist/src/HttpClient.js +60 -60
  21. package/dist/src/Id.js +1 -2
  22. package/dist/src/PermissionsClient.js +501 -489
  23. package/dist/src/RemoteSigner.js +83 -84
  24. package/dist/src/UserProfileClient.js +392 -374
  25. package/dist/src/Utils.js +67 -67
  26. package/dist/src/Validation.js +20 -12
  27. package/dist/src/client/ABRPublishing.js +412 -356
  28. package/dist/src/client/AccessGroups.js +479 -476
  29. package/dist/src/client/ContentAccess.js +1750 -1804
  30. package/dist/src/client/ContentManagement.js +874 -874
  31. package/dist/src/client/Contracts.js +586 -590
  32. package/dist/src/client/Files.js +702 -686
  33. package/dist/src/client/LiveConf.js +3 -5
  34. package/dist/src/client/LiveStream.js +659 -652
  35. package/dist/src/client/NFT.js +16 -16
  36. package/dist/src/client/NTP.js +84 -84
  37. package/dist/src/client/Shares.js +51 -51
  38. package/dist/src/walletClient/ClientMethods.js +979 -953
  39. package/dist/src/walletClient/Notifications.js +14 -14
  40. package/dist/src/walletClient/Profile.js +68 -68
  41. package/dist/src/walletClient/Utils.js +17 -17
  42. package/dist/src/walletClient/index.js +574 -564
  43. package/package.json +17 -16
  44. package/src/client/AccessGroups.js +1 -1
  45. package/testScripts/Test.js +5 -1
  46. package/webpack.config.js +10 -13
  47. package/dist/src/ContentObjectVerification.js +0 -281
@@ -1,8 +1,8 @@
1
1
  var _defineProperty = require("@babel/runtime/helpers/defineProperty");
2
2
  var _regeneratorRuntime = require("@babel/runtime/regenerator");
3
3
  var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
4
- 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; }
5
- 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; }
4
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
6
  var Utils = require("../Utils");
7
7
  var UrlJoin = require("url-join");
8
8
  var _require = require("./Utils"),
@@ -72,7 +72,7 @@ exports.UserAddress = function () {
72
72
  * <li>- usedBalance - <i>(Only included if user has set up Solana link with the Phantom wallet)</i> Available USDC balance of the user's Solana wallet</li>
73
73
  * </ul>
74
74
  */
75
- exports.UserWalletBalance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
75
+ exports.UserWalletBalance = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
76
76
  var checkOnboard,
77
77
  _yield$this$client$ut,
78
78
  balance,
@@ -90,19 +90,21 @@ exports.UserWalletBalance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
90
90
  withdrawableWalletBalance,
91
91
  rootUrl,
92
92
  balances,
93
- _args = arguments;
94
- return _regeneratorRuntime.wrap(function _callee$(_context) {
93
+ _args = arguments,
94
+ _t,
95
+ _t2;
96
+ return _regeneratorRuntime.wrap(function (_context) {
95
97
  while (1) switch (_context.prev = _context.next) {
96
98
  case 0:
97
99
  checkOnboard = _args.length > 0 && _args[0] !== undefined ? _args[0] : false;
98
100
  if (this.loggedIn) {
99
- _context.next = 3;
101
+ _context.next = 1;
100
102
  break;
101
103
  }
102
104
  return _context.abrupt("return");
103
- case 3:
104
- _context.t0 = this.client.utils;
105
- _context.next = 6;
105
+ case 1:
106
+ _t = this.client.utils;
107
+ _context.next = 2;
106
108
  return this.client.authClient.MakeAuthServiceRequest({
107
109
  path: UrlJoin("as", "wlt", "mkt", "bal"),
108
110
  method: "GET",
@@ -110,11 +112,11 @@ exports.UserWalletBalance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
110
112
  Authorization: "Bearer ".concat(this.AuthToken())
111
113
  }
112
114
  });
113
- case 6:
114
- _context.t1 = _context.sent;
115
- _context.next = 9;
116
- return _context.t0.ResponseToJson.call(_context.t0, _context.t1);
117
- case 9:
115
+ case 2:
116
+ _t2 = _context.sent;
117
+ _context.next = 3;
118
+ return _t.ResponseToJson.call(_t, _t2);
119
+ case 3:
118
120
  _yield$this$client$ut = _context.sent;
119
121
  balance = _yield$this$client$ut.balance;
120
122
  usage_hold = _yield$this$client$ut.usage_hold;
@@ -130,12 +132,12 @@ exports.UserWalletBalance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
130
132
  pendingWalletBalance = Math.max(0, totalWalletBalance - availableWalletBalance);
131
133
  withdrawableWalletBalance = Math.max(0, totalWalletBalance - parseFloat(Math.max(payout_hold, lockedWalletBalance) || 0));
132
134
  if (!(checkOnboard && stripe_id && !stripe_payouts_enabled)) {
133
- _context.next = 30;
135
+ _context.next = 6;
134
136
  break;
135
137
  }
136
138
  // Refresh stripe enabled flag
137
139
  rootUrl = new URL(UrlJoin(window.location.origin, window.location.pathname)).toString();
138
- _context.next = 27;
140
+ _context.next = 4;
139
141
  return this.client.authClient.MakeAuthServiceRequest({
140
142
  path: UrlJoin("as", "wlt", "onb", "stripe"),
141
143
  method: "POST",
@@ -149,12 +151,12 @@ exports.UserWalletBalance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
149
151
  Authorization: "Bearer ".concat(this.AuthToken())
150
152
  }
151
153
  });
152
- case 27:
153
- _context.next = 29;
154
+ case 4:
155
+ _context.next = 5;
154
156
  return this.UserWalletBalance(false);
155
- case 29:
157
+ case 5:
156
158
  return _context.abrupt("return", _context.sent);
157
- case 30:
159
+ case 6:
158
160
  balances = {
159
161
  totalWalletBalance: totalWalletBalance,
160
162
  availableWalletBalance: availableWalletBalance,
@@ -174,7 +176,7 @@ exports.UserWalletBalance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
174
176
  }
175
177
  */
176
178
  return _context.abrupt("return", balances);
177
- case 33:
179
+ case 7:
178
180
  case "end":
179
181
  return _context.stop();
180
182
  }
@@ -193,37 +195,43 @@ exports.UserWalletBalance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
193
195
  *
194
196
  * @returns {Promise<Array<String>>} - A list of item names
195
197
  */
196
- exports.UserItemNames = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
198
+ exports.UserItemNames = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
197
199
  var _ref3,
198
200
  marketplaceParams,
199
201
  userAddress,
200
202
  filters,
201
- _args2 = arguments;
202
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
203
+ _args2 = arguments,
204
+ _t3,
205
+ _t4,
206
+ _t5,
207
+ _t6,
208
+ _t7,
209
+ _t8;
210
+ return _regeneratorRuntime.wrap(function (_context2) {
203
211
  while (1) switch (_context2.prev = _context2.next) {
204
212
  case 0:
205
213
  _ref3 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, marketplaceParams = _ref3.marketplaceParams, userAddress = _ref3.userAddress;
206
214
  filters = [];
207
215
  if (!marketplaceParams) {
208
- _context2.next = 10;
216
+ _context2.next = 2;
209
217
  break;
210
218
  }
211
- _context2.t0 = filters;
212
- _context2.t1 = "tenant:eq:";
213
- _context2.next = 7;
219
+ _t3 = filters;
220
+ _t4 = "tenant:eq:";
221
+ _context2.next = 1;
214
222
  return this.MarketplaceInfo({
215
223
  marketplaceParams: marketplaceParams
216
224
  });
217
- case 7:
218
- _context2.t2 = _context2.sent.tenantId;
219
- _context2.t3 = _context2.t1.concat.call(_context2.t1, _context2.t2);
220
- _context2.t0.push.call(_context2.t0, _context2.t3);
221
- case 10:
225
+ case 1:
226
+ _t5 = _context2.sent.tenantId;
227
+ _t6 = _t4.concat.call(_t4, _t5);
228
+ _t3.push.call(_t3, _t6);
229
+ case 2:
222
230
  if (userAddress) {
223
231
  filters.push("wlt:eq:".concat(Utils.FormatAddress(userAddress)));
224
232
  }
225
- _context2.t4 = Utils;
226
- _context2.next = 14;
233
+ _t7 = Utils;
234
+ _context2.next = 3;
227
235
  return this.client.authClient.MakeAuthServiceRequest({
228
236
  path: UrlJoin("as", "wlt", "names"),
229
237
  method: "GET",
@@ -231,13 +239,13 @@ exports.UserItemNames = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerato
231
239
  filter: filters
232
240
  }
233
241
  });
234
- case 14:
235
- _context2.t5 = _context2.sent;
236
- _context2.next = 17;
237
- return _context2.t4.ResponseToJson.call(_context2.t4, _context2.t5);
238
- case 17:
242
+ case 3:
243
+ _t8 = _context2.sent;
244
+ _context2.next = 4;
245
+ return _t7.ResponseToJson.call(_t7, _t8);
246
+ case 4:
239
247
  return _context2.abrupt("return", _context2.sent);
240
- case 18:
248
+ case 5:
241
249
  case "end":
242
250
  return _context2.stop();
243
251
  }
@@ -256,14 +264,14 @@ exports.UserItemNames = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerato
256
264
  * @returns {Promise<Array<String>>} - A list of item editions
257
265
  */
258
266
  exports.UserItemEditionNames = /*#__PURE__*/function () {
259
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref4) {
260
- var displayName;
261
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
267
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref4) {
268
+ var displayName, _t9, _t0;
269
+ return _regeneratorRuntime.wrap(function (_context3) {
262
270
  while (1) switch (_context3.prev = _context3.next) {
263
271
  case 0:
264
272
  displayName = _ref4.displayName;
265
- _context3.t0 = Utils;
266
- _context3.next = 4;
273
+ _t9 = Utils;
274
+ _context3.next = 1;
267
275
  return this.client.authClient.MakeAuthServiceRequest({
268
276
  path: UrlJoin("as", "wlt", "editions"),
269
277
  method: "GET",
@@ -271,13 +279,13 @@ exports.UserItemEditionNames = /*#__PURE__*/function () {
271
279
  filter: "meta/display_name:eq:".concat(displayName)
272
280
  }
273
281
  });
274
- case 4:
275
- _context3.t1 = _context3.sent;
276
- _context3.next = 7;
277
- return _context3.t0.ResponseToJson.call(_context3.t0, _context3.t1);
278
- case 7:
282
+ case 1:
283
+ _t0 = _context3.sent;
284
+ _context3.next = 2;
285
+ return _t9.ResponseToJson.call(_t9, _t0);
286
+ case 2:
279
287
  return _context3.abrupt("return", _context3.sent);
280
- case 8:
288
+ case 3:
281
289
  case "end":
282
290
  return _context3.stop();
283
291
  }
@@ -301,42 +309,48 @@ exports.UserItemEditionNames = /*#__PURE__*/function () {
301
309
  *
302
310
  * @returns {Promise<Array<String>>} - A list of item names
303
311
  */
304
- exports.UserItemAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
312
+ exports.UserItemAttributes = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
305
313
  var _ref7,
306
314
  marketplaceParams,
307
315
  displayName,
308
316
  userAddress,
309
317
  filters,
310
318
  attributes,
311
- _args4 = arguments;
312
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
319
+ _args4 = arguments,
320
+ _t1,
321
+ _t10,
322
+ _t11,
323
+ _t12,
324
+ _t13,
325
+ _t14;
326
+ return _regeneratorRuntime.wrap(function (_context4) {
313
327
  while (1) switch (_context4.prev = _context4.next) {
314
328
  case 0:
315
329
  _ref7 = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {}, marketplaceParams = _ref7.marketplaceParams, displayName = _ref7.displayName, userAddress = _ref7.userAddress;
316
330
  filters = [];
317
331
  if (!marketplaceParams) {
318
- _context4.next = 10;
332
+ _context4.next = 2;
319
333
  break;
320
334
  }
321
- _context4.t0 = filters;
322
- _context4.t1 = "tenant:eq:";
323
- _context4.next = 7;
335
+ _t1 = filters;
336
+ _t10 = "tenant:eq:";
337
+ _context4.next = 1;
324
338
  return this.MarketplaceInfo({
325
339
  marketplaceParams: marketplaceParams
326
340
  });
327
- case 7:
328
- _context4.t2 = _context4.sent.tenantId;
329
- _context4.t3 = _context4.t1.concat.call(_context4.t1, _context4.t2);
330
- _context4.t0.push.call(_context4.t0, _context4.t3);
331
- case 10:
341
+ case 1:
342
+ _t11 = _context4.sent.tenantId;
343
+ _t12 = _t10.concat.call(_t10, _t11);
344
+ _t1.push.call(_t1, _t12);
345
+ case 2:
332
346
  if (userAddress) {
333
347
  filters.push("wlt:eq:".concat(Utils.FormatAddress(userAddress)));
334
348
  }
335
349
  if (displayName) {
336
350
  filters.push("meta/display_name:eq:".concat(displayName));
337
351
  }
338
- _context4.t4 = Utils;
339
- _context4.next = 15;
352
+ _t13 = Utils;
353
+ _context4.next = 3;
340
354
  return this.client.authClient.MakeAuthServiceRequest({
341
355
  path: UrlJoin("as", "wlt", "attributes"),
342
356
  method: "GET",
@@ -344,11 +358,11 @@ exports.UserItemAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regen
344
358
  filter: filters
345
359
  }
346
360
  });
347
- case 15:
348
- _context4.t5 = _context4.sent;
349
- _context4.next = 18;
350
- return _context4.t4.ResponseToJson.call(_context4.t4, _context4.t5);
351
- case 18:
361
+ case 3:
362
+ _t14 = _context4.sent;
363
+ _context4.next = 4;
364
+ return _t13.ResponseToJson.call(_t13, _t14);
365
+ case 4:
352
366
  attributes = _context4.sent;
353
367
  return _context4.abrupt("return", attributes.map(function (_ref8) {
354
368
  var trait_type = _ref8.trait_type,
@@ -361,7 +375,7 @@ exports.UserItemAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regen
361
375
  var name = _ref9.name;
362
376
  return !["Content Fabric Hash", "Total Minted Supply", "Creator"].includes(name);
363
377
  }));
364
- case 20:
378
+ case 5:
365
379
  case "end":
366
380
  return _context4.stop();
367
381
  }
@@ -389,31 +403,31 @@ exports.UserItemAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regen
389
403
  *
390
404
  * @returns {Promise<Object>} - Results of the query and pagination info
391
405
  */
392
- exports.UserItems = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
393
- var _ref11,
394
- _ref11$sortBy,
406
+ exports.UserItems = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
407
+ var _ref1,
408
+ _ref1$sortBy,
395
409
  sortBy,
396
- _ref11$includeFullMet,
410
+ _ref1$includeFullMeta,
397
411
  includeFullMetadata,
398
412
  _args5 = arguments;
399
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
413
+ return _regeneratorRuntime.wrap(function (_context5) {
400
414
  while (1) switch (_context5.prev = _context5.next) {
401
415
  case 0:
402
- _ref11 = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {}, _ref11$sortBy = _ref11.sortBy, sortBy = _ref11$sortBy === void 0 ? "default" : _ref11$sortBy, _ref11$includeFullMet = _ref11.includeFullMetadata, includeFullMetadata = _ref11$includeFullMet === void 0 ? false : _ref11$includeFullMet;
416
+ _ref1 = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {}, _ref1$sortBy = _ref1.sortBy, sortBy = _ref1$sortBy === void 0 ? "default" : _ref1$sortBy, _ref1$includeFullMeta = _ref1.includeFullMetadata, includeFullMetadata = _ref1$includeFullMeta === void 0 ? false : _ref1$includeFullMeta;
403
417
  if (!(includeFullMetadata && this.loggedIn)) {
404
- _context5.next = 5;
418
+ _context5.next = 1;
405
419
  break;
406
420
  }
407
421
  return _context5.abrupt("return", this.FilteredQuery(_objectSpread({
408
422
  mode: "owned-full-meta",
409
423
  sortBy: sortBy
410
424
  }, _args5[0] || {})));
411
- case 5:
425
+ case 1:
412
426
  return _context5.abrupt("return", this.FilteredQuery(_objectSpread({
413
427
  mode: "owned",
414
428
  sortBy: sortBy
415
429
  }, _args5[0] || {})));
416
- case 6:
430
+ case 2:
417
431
  case "end":
418
432
  return _context5.stop();
419
433
  }
@@ -434,22 +448,22 @@ exports.UserItems = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
434
448
  *
435
449
  * @returns {Promise<Array<Object>>} - List of current user's listings
436
450
  */
437
- exports.UserListings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
438
- var _ref13,
451
+ exports.UserListings = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
452
+ var _ref11,
439
453
  userAddress,
440
- _ref13$sortBy,
454
+ _ref11$sortBy,
441
455
  sortBy,
442
- _ref13$sortDesc,
456
+ _ref11$sortDesc,
443
457
  sortDesc,
444
458
  contractAddress,
445
459
  tokenId,
446
460
  marketplaceParams,
447
461
  _args6 = arguments;
448
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
462
+ return _regeneratorRuntime.wrap(function (_context6) {
449
463
  while (1) switch (_context6.prev = _context6.next) {
450
464
  case 0:
451
- _ref13 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, userAddress = _ref13.userAddress, _ref13$sortBy = _ref13.sortBy, sortBy = _ref13$sortBy === void 0 ? "created" : _ref13$sortBy, _ref13$sortDesc = _ref13.sortDesc, sortDesc = _ref13$sortDesc === void 0 ? false : _ref13$sortDesc, contractAddress = _ref13.contractAddress, tokenId = _ref13.tokenId, marketplaceParams = _ref13.marketplaceParams;
452
- _context6.next = 3;
465
+ _ref11 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, userAddress = _ref11.userAddress, _ref11$sortBy = _ref11.sortBy, sortBy = _ref11$sortBy === void 0 ? "created" : _ref11$sortBy, _ref11$sortDesc = _ref11.sortDesc, sortDesc = _ref11$sortDesc === void 0 ? false : _ref11$sortDesc, contractAddress = _ref11.contractAddress, tokenId = _ref11.tokenId, marketplaceParams = _ref11.marketplaceParams;
466
+ _context6.next = 1;
453
467
  return this.FilteredQuery({
454
468
  mode: "listings",
455
469
  start: 0,
@@ -462,9 +476,9 @@ exports.UserListings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
462
476
  tokenId: tokenId,
463
477
  includeCheckoutLocked: true
464
478
  });
465
- case 3:
479
+ case 1:
466
480
  return _context6.abrupt("return", _context6.sent.results);
467
- case 4:
481
+ case 2:
468
482
  case "end":
469
483
  return _context6.stop();
470
484
  }
@@ -488,12 +502,12 @@ exports.UserListings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
488
502
  *
489
503
  * @returns {Promise<Array<Object>>} - List of current user's sales
490
504
  */
491
- exports.UserSales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
492
- var _ref15,
505
+ exports.UserSales = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
506
+ var _ref13,
493
507
  userAddress,
494
- _ref15$sortBy,
508
+ _ref13$sortBy,
495
509
  sortBy,
496
- _ref15$sortDesc,
510
+ _ref13$sortDesc,
497
511
  sortDesc,
498
512
  contractAddress,
499
513
  tokenId,
@@ -502,11 +516,11 @@ exports.UserSales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
502
516
  lastNDays,
503
517
  marketplaceParams,
504
518
  _args7 = arguments;
505
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
519
+ return _regeneratorRuntime.wrap(function (_context7) {
506
520
  while (1) switch (_context7.prev = _context7.next) {
507
521
  case 0:
508
- _ref15 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, userAddress = _ref15.userAddress, _ref15$sortBy = _ref15.sortBy, sortBy = _ref15$sortBy === void 0 ? "created" : _ref15$sortBy, _ref15$sortDesc = _ref15.sortDesc, sortDesc = _ref15$sortDesc === void 0 ? false : _ref15$sortDesc, contractAddress = _ref15.contractAddress, tokenId = _ref15.tokenId, startTime = _ref15.startTime, endTime = _ref15.endTime, lastNDays = _ref15.lastNDays, marketplaceParams = _ref15.marketplaceParams;
509
- _context7.next = 3;
522
+ _ref13 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, userAddress = _ref13.userAddress, _ref13$sortBy = _ref13.sortBy, sortBy = _ref13$sortBy === void 0 ? "created" : _ref13$sortBy, _ref13$sortDesc = _ref13.sortDesc, sortDesc = _ref13$sortDesc === void 0 ? false : _ref13$sortDesc, contractAddress = _ref13.contractAddress, tokenId = _ref13.tokenId, startTime = _ref13.startTime, endTime = _ref13.endTime, lastNDays = _ref13.lastNDays, marketplaceParams = _ref13.marketplaceParams;
523
+ _context7.next = 1;
510
524
  return this.FilteredQuery({
511
525
  mode: "sales",
512
526
  start: 0,
@@ -521,9 +535,9 @@ exports.UserSales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
521
535
  contractAddress: contractAddress,
522
536
  tokenId: tokenId
523
537
  });
524
- case 3:
538
+ case 1:
525
539
  return _context7.abrupt("return", _context7.sent.results);
526
- case 4:
540
+ case 2:
527
541
  case "end":
528
542
  return _context7.stop();
529
543
  }
@@ -547,12 +561,12 @@ exports.UserSales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
547
561
  *
548
562
  * @returns {Promise<Array<Object>>} - List of current user's sales
549
563
  */
550
- exports.UserTransfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
551
- var _ref17,
564
+ exports.UserTransfers = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
565
+ var _ref15,
552
566
  userAddress,
553
- _ref17$sortBy,
567
+ _ref15$sortBy,
554
568
  sortBy,
555
- _ref17$sortDesc,
569
+ _ref15$sortDesc,
556
570
  sortDesc,
557
571
  contractAddress,
558
572
  tokenId,
@@ -561,11 +575,11 @@ exports.UserTransfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerato
561
575
  lastNDays,
562
576
  marketplaceParams,
563
577
  _args8 = arguments;
564
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
578
+ return _regeneratorRuntime.wrap(function (_context8) {
565
579
  while (1) switch (_context8.prev = _context8.next) {
566
580
  case 0:
567
- _ref17 = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {}, userAddress = _ref17.userAddress, _ref17$sortBy = _ref17.sortBy, sortBy = _ref17$sortBy === void 0 ? "created" : _ref17$sortBy, _ref17$sortDesc = _ref17.sortDesc, sortDesc = _ref17$sortDesc === void 0 ? false : _ref17$sortDesc, contractAddress = _ref17.contractAddress, tokenId = _ref17.tokenId, startTime = _ref17.startTime, endTime = _ref17.endTime, lastNDays = _ref17.lastNDays, marketplaceParams = _ref17.marketplaceParams;
568
- _context8.next = 3;
581
+ _ref15 = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {}, userAddress = _ref15.userAddress, _ref15$sortBy = _ref15.sortBy, sortBy = _ref15$sortBy === void 0 ? "created" : _ref15$sortBy, _ref15$sortDesc = _ref15.sortDesc, sortDesc = _ref15$sortDesc === void 0 ? false : _ref15$sortDesc, contractAddress = _ref15.contractAddress, tokenId = _ref15.tokenId, startTime = _ref15.startTime, endTime = _ref15.endTime, lastNDays = _ref15.lastNDays, marketplaceParams = _ref15.marketplaceParams;
582
+ _context8.next = 1;
569
583
  return this.FilteredQuery({
570
584
  mode: "transfers",
571
585
  start: 0,
@@ -580,9 +594,9 @@ exports.UserTransfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerato
580
594
  endTime: endTime,
581
595
  lastNDays: lastNDays
582
596
  });
583
- case 3:
597
+ case 1:
584
598
  return _context8.abrupt("return", _context8.sent.results);
585
- case 4:
599
+ case 2:
586
600
  case "end":
587
601
  return _context8.stop();
588
602
  }
@@ -604,40 +618,40 @@ exports.UserTransfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerato
604
618
  * @returns {Promise<Object>} - The tenant configuration
605
619
  */
606
620
  exports.TenantConfiguration = /*#__PURE__*/function () {
607
- var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(_ref18) {
608
- var tenantId, contractAddress;
609
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
621
+ var _ref17 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(_ref16) {
622
+ var tenantId, contractAddress, _t15;
623
+ return _regeneratorRuntime.wrap(function (_context9) {
610
624
  while (1) switch (_context9.prev = _context9.next) {
611
625
  case 0:
612
- tenantId = _ref18.tenantId, contractAddress = _ref18.contractAddress;
626
+ tenantId = _ref16.tenantId, contractAddress = _ref16.contractAddress;
613
627
  _context9.prev = 1;
614
628
  contractAddress = contractAddress ? Utils.FormatAddress(contractAddress) : undefined;
615
629
  if (this.tenantConfigs[contractAddress || tenantId]) {
616
- _context9.next = 7;
630
+ _context9.next = 3;
617
631
  break;
618
632
  }
619
- _context9.next = 6;
633
+ _context9.next = 2;
620
634
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
621
635
  path: contractAddress ? UrlJoin("as", "config", "nft", contractAddress) : UrlJoin("as", "config", "tnt", tenantId),
622
636
  method: "GET"
623
637
  }));
624
- case 6:
638
+ case 2:
625
639
  this.tenantConfigs[contractAddress || tenantId] = _context9.sent;
626
- case 7:
640
+ case 3:
627
641
  return _context9.abrupt("return", this.tenantConfigs[contractAddress || tenantId]);
628
- case 10:
629
- _context9.prev = 10;
630
- _context9.t0 = _context9["catch"](1);
631
- this.Log("Failed to load tenant configuration", true, _context9.t0);
642
+ case 4:
643
+ _context9.prev = 4;
644
+ _t15 = _context9["catch"](1);
645
+ this.Log("Failed to load tenant configuration", true, _t15);
632
646
  return _context9.abrupt("return", {});
633
- case 14:
647
+ case 5:
634
648
  case "end":
635
649
  return _context9.stop();
636
650
  }
637
- }, _callee9, this, [[1, 10]]);
651
+ }, _callee9, this, [[1, 4]]);
638
652
  }));
639
653
  return function (_x2) {
640
- return _ref19.apply(this, arguments);
654
+ return _ref17.apply(this, arguments);
641
655
  };
642
656
  }();
643
657
 
@@ -649,33 +663,33 @@ exports.TenantConfiguration = /*#__PURE__*/function () {
649
663
  * @param {string} currency - The currency for which to retrieve the USD exchange rate
650
664
  */
651
665
  exports.ExchangeRate = /*#__PURE__*/function () {
652
- var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(_ref20) {
666
+ var _ref19 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee0(_ref18) {
653
667
  var currency;
654
- return _regeneratorRuntime.wrap(function _callee10$(_context10) {
655
- while (1) switch (_context10.prev = _context10.next) {
668
+ return _regeneratorRuntime.wrap(function (_context0) {
669
+ while (1) switch (_context0.prev = _context0.next) {
656
670
  case 0:
657
- currency = _ref20.currency;
671
+ currency = _ref18.currency;
658
672
  if (currency) {
659
- _context10.next = 3;
673
+ _context0.next = 1;
660
674
  break;
661
675
  }
662
676
  throw Error("Eluvio Wallet Client: Invalid or missing currency in ExchangeRate");
663
- case 3:
664
- _context10.next = 5;
677
+ case 1:
678
+ _context0.next = 2;
665
679
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
666
680
  path: UrlJoin("as", "xr", "ebanx", currency),
667
681
  method: "GET"
668
682
  }));
669
- case 5:
670
- return _context10.abrupt("return", _context10.sent);
671
- case 6:
683
+ case 2:
684
+ return _context0.abrupt("return", _context0.sent);
685
+ case 3:
672
686
  case "end":
673
- return _context10.stop();
687
+ return _context0.stop();
674
688
  }
675
- }, _callee10, this);
689
+ }, _callee0, this);
676
690
  }));
677
691
  return function (_x3) {
678
- return _ref21.apply(this, arguments);
692
+ return _ref19.apply(this, arguments);
679
693
  };
680
694
  }();
681
695
 
@@ -689,35 +703,35 @@ exports.ExchangeRate = /*#__PURE__*/function () {
689
703
  * @returns {Promise<string>} - The CSS of the tenant
690
704
  */
691
705
  exports.TenantCSS = /*#__PURE__*/function () {
692
- var _ref23 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref22) {
706
+ var _ref21 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee1(_ref20) {
693
707
  var tenantSlug;
694
- return _regeneratorRuntime.wrap(function _callee11$(_context11) {
695
- while (1) switch (_context11.prev = _context11.next) {
708
+ return _regeneratorRuntime.wrap(function (_context1) {
709
+ while (1) switch (_context1.prev = _context1.next) {
696
710
  case 0:
697
- tenantSlug = _ref22.tenantSlug;
711
+ tenantSlug = _ref20.tenantSlug;
698
712
  if (this.cachedCSS[tenantSlug]) {
699
- _context11.next = 5;
713
+ _context1.next = 2;
700
714
  break;
701
715
  }
702
- _context11.next = 4;
716
+ _context1.next = 1;
703
717
  return this.client.ContentObjectMetadata({
704
718
  libraryId: this.mainSiteLibraryId,
705
719
  objectId: this.mainSiteId,
706
720
  metadataSubtree: UrlJoin("/public", "asset_metadata", "tenants", tenantSlug, "info", "branding", "wallet_css"),
707
721
  authorizationToken: this.publicStaticToken
708
722
  });
709
- case 4:
710
- this.cachedCSS[tenantSlug] = _context11.sent;
711
- case 5:
712
- return _context11.abrupt("return", this.cachedCSS[tenantSlug] || "");
713
- case 6:
723
+ case 1:
724
+ this.cachedCSS[tenantSlug] = _context1.sent;
725
+ case 2:
726
+ return _context1.abrupt("return", this.cachedCSS[tenantSlug] || "");
727
+ case 3:
714
728
  case "end":
715
- return _context11.stop();
729
+ return _context1.stop();
716
730
  }
717
- }, _callee11, this);
731
+ }, _callee1, this);
718
732
  }));
719
733
  return function (_x4) {
720
- return _ref23.apply(this, arguments);
734
+ return _ref21.apply(this, arguments);
721
735
  };
722
736
  }();
723
737
 
@@ -735,12 +749,12 @@ exports.TenantCSS = /*#__PURE__*/function () {
735
749
  * @returns {Promise<Object>} - Stock info for items in the marketplace
736
750
  */
737
751
  exports.MarketplaceStock = /*#__PURE__*/function () {
738
- var _ref25 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(_ref24) {
752
+ var _ref23 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(_ref22) {
739
753
  var marketplaceParams, tenantId, marketplaceInfo;
740
- return _regeneratorRuntime.wrap(function _callee12$(_context12) {
741
- while (1) switch (_context12.prev = _context12.next) {
754
+ return _regeneratorRuntime.wrap(function (_context10) {
755
+ while (1) switch (_context10.prev = _context10.next) {
742
756
  case 0:
743
- marketplaceParams = _ref24.marketplaceParams, tenantId = _ref24.tenantId;
757
+ marketplaceParams = _ref22.marketplaceParams, tenantId = _ref22.tenantId;
744
758
  if (!tenantId) {
745
759
  marketplaceInfo = this.MarketplaceInfo({
746
760
  marketplaceParams: marketplaceParams
@@ -748,10 +762,10 @@ exports.MarketplaceStock = /*#__PURE__*/function () {
748
762
  tenantId = marketplaceInfo.tenantId;
749
763
  }
750
764
  if (!this.loggedIn) {
751
- _context12.next = 6;
765
+ _context10.next = 2;
752
766
  break;
753
767
  }
754
- _context12.next = 5;
768
+ _context10.next = 1;
755
769
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
756
770
  path: UrlJoin("as", "wlt", "nft", "info", tenantId),
757
771
  method: "GET",
@@ -759,24 +773,24 @@ exports.MarketplaceStock = /*#__PURE__*/function () {
759
773
  Authorization: "Bearer ".concat(this.AuthToken())
760
774
  }
761
775
  }));
762
- case 5:
763
- return _context12.abrupt("return", _context12.sent);
764
- case 6:
765
- _context12.next = 8;
776
+ case 1:
777
+ return _context10.abrupt("return", _context10.sent);
778
+ case 2:
779
+ _context10.next = 3;
766
780
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
767
781
  path: UrlJoin("as", "nft", "stock", tenantId),
768
782
  method: "GET"
769
783
  }));
770
- case 8:
771
- return _context12.abrupt("return", _context12.sent);
772
- case 9:
784
+ case 3:
785
+ return _context10.abrupt("return", _context10.sent);
786
+ case 4:
773
787
  case "end":
774
- return _context12.stop();
788
+ return _context10.stop();
775
789
  }
776
- }, _callee12, this);
790
+ }, _callee10, this);
777
791
  }));
778
792
  return function (_x5) {
779
- return _ref25.apply(this, arguments);
793
+ return _ref23.apply(this, arguments);
780
794
  };
781
795
  }();
782
796
 
@@ -793,13 +807,13 @@ exports.MarketplaceStock = /*#__PURE__*/function () {
793
807
  *
794
808
  * @returns {Promise<Object>} - Info about the marketplace
795
809
  */
796
- exports.MarketplaceInfo = function (_ref26) {
797
- var marketplaceParams = _ref26.marketplaceParams;
798
- var _ref27 = marketplaceParams || {},
799
- tenantSlug = _ref27.tenantSlug,
800
- marketplaceSlug = _ref27.marketplaceSlug,
801
- marketplaceId = _ref27.marketplaceId,
802
- marketplaceHash = _ref27.marketplaceHash;
810
+ exports.MarketplaceInfo = function (_ref24) {
811
+ var marketplaceParams = _ref24.marketplaceParams;
812
+ var _ref25 = marketplaceParams || {},
813
+ tenantSlug = _ref25.tenantSlug,
814
+ marketplaceSlug = _ref25.marketplaceSlug,
815
+ marketplaceId = _ref25.marketplaceId,
816
+ marketplaceHash = _ref25.marketplaceHash;
803
817
  var marketplaceInfo;
804
818
  if (tenantSlug && marketplaceSlug) {
805
819
  marketplaceInfo = (this.availableMarketplaces[tenantSlug] || {})[marketplaceSlug];
@@ -823,39 +837,39 @@ exports.MarketplaceInfo = function (_ref26) {
823
837
  * @returns {Promise<string>} - The CSS of the marketplace
824
838
  */
825
839
  exports.MarketplaceCSS = /*#__PURE__*/function () {
826
- var _ref29 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref28) {
840
+ var _ref27 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref26) {
827
841
  var marketplaceParams, marketplaceInfo, marketplaceHash;
828
- return _regeneratorRuntime.wrap(function _callee13$(_context13) {
829
- while (1) switch (_context13.prev = _context13.next) {
842
+ return _regeneratorRuntime.wrap(function (_context11) {
843
+ while (1) switch (_context11.prev = _context11.next) {
830
844
  case 0:
831
- marketplaceParams = _ref28.marketplaceParams;
845
+ marketplaceParams = _ref26.marketplaceParams;
832
846
  marketplaceInfo = this.MarketplaceInfo({
833
847
  marketplaceParams: marketplaceParams
834
848
  });
835
849
  marketplaceHash = marketplaceInfo.marketplaceHash;
836
850
  if (this.cachedCSS[marketplaceHash]) {
837
- _context13.next = 7;
851
+ _context11.next = 2;
838
852
  break;
839
853
  }
840
- _context13.next = 6;
854
+ _context11.next = 1;
841
855
  return this.client.ContentObjectMetadata({
842
856
  versionHash: marketplaceHash,
843
857
  metadataSubtree: "public/asset_metadata/info/branding/custom_css",
844
858
  authorizationToken: this.publicStaticToken,
845
859
  noAuth: true
846
860
  });
847
- case 6:
848
- this.cachedCSS[marketplaceHash] = _context13.sent;
849
- case 7:
850
- return _context13.abrupt("return", this.cachedCSS[marketplaceHash] || "");
851
- case 8:
861
+ case 1:
862
+ this.cachedCSS[marketplaceHash] = _context11.sent;
863
+ case 2:
864
+ return _context11.abrupt("return", this.cachedCSS[marketplaceHash] || "");
865
+ case 3:
852
866
  case "end":
853
- return _context13.stop();
867
+ return _context11.stop();
854
868
  }
855
- }, _callee13, this);
869
+ }, _callee11, this);
856
870
  }));
857
871
  return function (_x6) {
858
- return _ref29.apply(this, arguments);
872
+ return _ref27.apply(this, arguments);
859
873
  };
860
874
  }();
861
875
 
@@ -869,29 +883,29 @@ exports.MarketplaceCSS = /*#__PURE__*/function () {
869
883
  *
870
884
  * @returns {Promise<Object>} - Info about available marketplaces
871
885
  */
872
- exports.AvailableMarketplaces = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
873
- var _ref31,
886
+ exports.AvailableMarketplaces = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12() {
887
+ var _ref29,
874
888
  organizeById,
875
- _ref31$forceReload,
889
+ _ref29$forceReload,
876
890
  forceReload,
877
- _args14 = arguments;
878
- return _regeneratorRuntime.wrap(function _callee14$(_context14) {
879
- while (1) switch (_context14.prev = _context14.next) {
891
+ _args12 = arguments;
892
+ return _regeneratorRuntime.wrap(function (_context12) {
893
+ while (1) switch (_context12.prev = _context12.next) {
880
894
  case 0:
881
- _ref31 = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {}, organizeById = _ref31.organizeById, _ref31$forceReload = _ref31.forceReload, forceReload = _ref31$forceReload === void 0 ? false : _ref31$forceReload;
895
+ _ref29 = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {}, organizeById = _ref29.organizeById, _ref29$forceReload = _ref29.forceReload, forceReload = _ref29$forceReload === void 0 ? false : _ref29$forceReload;
882
896
  if (!forceReload) {
883
- _context14.next = 4;
897
+ _context12.next = 1;
884
898
  break;
885
899
  }
886
- _context14.next = 4;
900
+ _context12.next = 1;
887
901
  return this.LoadAvailableMarketplaces(true);
888
- case 4:
889
- return _context14.abrupt("return", _objectSpread({}, organizeById ? this.availableMarketplacesById : this.availableMarketplaces));
890
- case 5:
902
+ case 1:
903
+ return _context12.abrupt("return", _objectSpread({}, organizeById ? this.availableMarketplacesById : this.availableMarketplaces));
904
+ case 2:
891
905
  case "end":
892
- return _context14.stop();
906
+ return _context12.stop();
893
907
  }
894
- }, _callee14, this);
908
+ }, _callee12, this);
895
909
  }));
896
910
 
897
911
  /**
@@ -906,21 +920,21 @@ exports.AvailableMarketplaces = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_re
906
920
  * @returns {Promise<Object>} - The full information for the marketplace
907
921
  */
908
922
  exports.Marketplace = /*#__PURE__*/function () {
909
- var _ref33 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(_ref32) {
923
+ var _ref31 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref30) {
910
924
  var marketplaceParams;
911
- return _regeneratorRuntime.wrap(function _callee15$(_context15) {
912
- while (1) switch (_context15.prev = _context15.next) {
925
+ return _regeneratorRuntime.wrap(function (_context13) {
926
+ while (1) switch (_context13.prev = _context13.next) {
913
927
  case 0:
914
- marketplaceParams = _ref32.marketplaceParams;
915
- return _context15.abrupt("return", this.LoadMarketplace(marketplaceParams));
916
- case 2:
928
+ marketplaceParams = _ref30.marketplaceParams;
929
+ return _context13.abrupt("return", this.LoadMarketplace(marketplaceParams));
930
+ case 1:
917
931
  case "end":
918
- return _context15.stop();
932
+ return _context13.stop();
919
933
  }
920
- }, _callee15, this);
934
+ }, _callee13, this);
921
935
  }));
922
936
  return function (_x7) {
923
- return _ref33.apply(this, arguments);
937
+ return _ref31.apply(this, arguments);
924
938
  };
925
939
  }();
926
940
 
@@ -936,27 +950,27 @@ exports.Marketplace = /*#__PURE__*/function () {
936
950
  * @returns {Promise<Object>} - Information about the specified contract
937
951
  */
938
952
  exports.NFTContractStats = /*#__PURE__*/function () {
939
- var _ref35 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(_ref34) {
953
+ var _ref33 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref32) {
940
954
  var contractAddress;
941
- return _regeneratorRuntime.wrap(function _callee16$(_context16) {
942
- while (1) switch (_context16.prev = _context16.next) {
955
+ return _regeneratorRuntime.wrap(function (_context14) {
956
+ while (1) switch (_context14.prev = _context14.next) {
943
957
  case 0:
944
- contractAddress = _ref34.contractAddress;
945
- _context16.next = 3;
958
+ contractAddress = _ref32.contractAddress;
959
+ _context14.next = 1;
946
960
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
947
961
  path: UrlJoin("as", "nft", "info", contractAddress),
948
962
  method: "GET"
949
963
  }));
950
- case 3:
951
- return _context16.abrupt("return", _context16.sent);
952
- case 4:
964
+ case 1:
965
+ return _context14.abrupt("return", _context14.sent);
966
+ case 2:
953
967
  case "end":
954
- return _context16.stop();
968
+ return _context14.stop();
955
969
  }
956
- }, _callee16, this);
970
+ }, _callee14, this);
957
971
  }));
958
972
  return function (_x8) {
959
- return _ref35.apply(this, arguments);
973
+ return _ref33.apply(this, arguments);
960
974
  };
961
975
  }();
962
976
 
@@ -969,77 +983,77 @@ exports.NFTContractStats = /*#__PURE__*/function () {
969
983
  * @param {string} tokenId - The token ID of the NFT
970
984
  */
971
985
  exports.NFT = /*#__PURE__*/function () {
972
- var _ref37 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(_ref36) {
973
- var tokenId, contractAddress, nft, assetMetadata, localizedMetadata;
974
- return _regeneratorRuntime.wrap(function _callee17$(_context17) {
975
- while (1) switch (_context17.prev = _context17.next) {
986
+ var _ref35 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(_ref34) {
987
+ var tokenId, contractAddress, nft, assetMetadata, localizedMetadata, _t16, _t17, _t18, _t19;
988
+ return _regeneratorRuntime.wrap(function (_context15) {
989
+ while (1) switch (_context15.prev = _context15.next) {
976
990
  case 0:
977
- tokenId = _ref36.tokenId, contractAddress = _ref36.contractAddress;
978
- _context17.t0 = FormatNFTDetails;
979
- _context17.next = 4;
991
+ tokenId = _ref34.tokenId, contractAddress = _ref34.contractAddress;
992
+ _t16 = FormatNFTDetails;
993
+ _context15.next = 1;
980
994
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
981
995
  path: UrlJoin("as", "nft", "info", contractAddress, tokenId),
982
996
  method: "GET"
983
997
  }));
984
- case 4:
985
- _context17.t1 = _context17.sent;
986
- nft = (0, _context17.t0)(_context17.t1);
987
- _context17.next = 8;
998
+ case 1:
999
+ _t17 = _context15.sent;
1000
+ nft = _t16(_t17);
1001
+ _context15.next = 2;
988
1002
  return this.client.ContentObjectMetadata({
989
1003
  versionHash: nft.details.VersionHash,
990
1004
  metadataSubtree: "public/asset_metadata/nft",
991
1005
  produceLinkUrls: true
992
1006
  });
993
- case 8:
994
- _context17.t2 = _context17.sent;
995
- if (_context17.t2) {
996
- _context17.next = 11;
1007
+ case 2:
1008
+ _t18 = _context15.sent;
1009
+ if (_t18) {
1010
+ _context15.next = 3;
997
1011
  break;
998
1012
  }
999
- _context17.t2 = {};
1000
- case 11:
1001
- assetMetadata = _context17.t2;
1013
+ _t18 = {};
1014
+ case 3:
1015
+ assetMetadata = _t18;
1002
1016
  nft.metadata = MergeWith({}, assetMetadata, nft.metadata, function (a, b) {
1003
1017
  return b === null || b === "" ? a : undefined;
1004
1018
  });
1005
1019
  if (!this.localization) {
1006
- _context17.next = 21;
1020
+ _context15.next = 6;
1007
1021
  break;
1008
1022
  }
1009
- _context17.next = 16;
1023
+ _context15.next = 4;
1010
1024
  return this.client.ContentObjectMetadata({
1011
1025
  versionHash: nft.details.VersionHash,
1012
1026
  metadataSubtree: UrlJoin("public", "asset_metadata", "localizations", this.localization, "nft"),
1013
1027
  produceLinkUrls: true
1014
1028
  });
1015
- case 16:
1016
- _context17.t3 = _context17.sent;
1017
- if (_context17.t3) {
1018
- _context17.next = 19;
1029
+ case 4:
1030
+ _t19 = _context15.sent;
1031
+ if (_t19) {
1032
+ _context15.next = 5;
1019
1033
  break;
1020
1034
  }
1021
- _context17.t3 = {};
1022
- case 19:
1023
- localizedMetadata = _context17.t3;
1035
+ _t19 = {};
1036
+ case 5:
1037
+ localizedMetadata = _t19;
1024
1038
  nft.metadata = MergeWith({}, nft.metadata, localizedMetadata, function (a, b) {
1025
1039
  return b === null || b === "" ? a : undefined;
1026
1040
  });
1027
- case 21:
1028
- _context17.next = 23;
1041
+ case 6:
1042
+ _context15.next = 7;
1029
1043
  return this.TenantConfiguration({
1030
1044
  contractAddress: contractAddress
1031
1045
  });
1032
- case 23:
1033
- nft.config = _context17.sent;
1034
- return _context17.abrupt("return", FormatNFTMetadata(this, nft));
1035
- case 25:
1046
+ case 7:
1047
+ nft.config = _context15.sent;
1048
+ return _context15.abrupt("return", FormatNFTMetadata(this, nft));
1049
+ case 8:
1036
1050
  case "end":
1037
- return _context17.stop();
1051
+ return _context15.stop();
1038
1052
  }
1039
- }, _callee17, this);
1053
+ }, _callee15, this);
1040
1054
  }));
1041
1055
  return function (_x9) {
1042
- return _ref37.apply(this, arguments);
1056
+ return _ref35.apply(this, arguments);
1043
1057
  };
1044
1058
  }();
1045
1059
 
@@ -1055,19 +1069,19 @@ exports.NFT = /*#__PURE__*/function () {
1055
1069
  * @param {string} targetAddress - The address to which to transfer the NFT
1056
1070
  */
1057
1071
  exports.TransferNFT = /*#__PURE__*/function () {
1058
- var _ref39 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(_ref38) {
1072
+ var _ref37 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(_ref36) {
1059
1073
  var contractAddress, tokenId, targetAddress;
1060
- return _regeneratorRuntime.wrap(function _callee18$(_context18) {
1061
- while (1) switch (_context18.prev = _context18.next) {
1074
+ return _regeneratorRuntime.wrap(function (_context16) {
1075
+ while (1) switch (_context16.prev = _context16.next) {
1062
1076
  case 0:
1063
- contractAddress = _ref38.contractAddress, tokenId = _ref38.tokenId, targetAddress = _ref38.targetAddress;
1077
+ contractAddress = _ref36.contractAddress, tokenId = _ref36.tokenId, targetAddress = _ref36.targetAddress;
1064
1078
  if (!(!targetAddress || !Utils.ValidAddress(targetAddress))) {
1065
- _context18.next = 3;
1079
+ _context16.next = 1;
1066
1080
  break;
1067
1081
  }
1068
1082
  throw Error("Eluvio Wallet Client: Invalid or missing target address in UserTransferNFT");
1069
- case 3:
1070
- _context18.next = 5;
1083
+ case 1:
1084
+ _context16.next = 2;
1071
1085
  return this.client.authClient.MakeAuthServiceRequest({
1072
1086
  path: UrlJoin("as", "wlt", "mkt", "xfer"),
1073
1087
  method: "POST",
@@ -1080,16 +1094,16 @@ exports.TransferNFT = /*#__PURE__*/function () {
1080
1094
  Authorization: "Bearer ".concat(this.AuthToken())
1081
1095
  }
1082
1096
  });
1083
- case 5:
1084
- return _context18.abrupt("return", _context18.sent);
1085
- case 6:
1097
+ case 2:
1098
+ return _context16.abrupt("return", _context16.sent);
1099
+ case 3:
1086
1100
  case "end":
1087
- return _context18.stop();
1101
+ return _context16.stop();
1088
1102
  }
1089
- }, _callee18, this);
1103
+ }, _callee16, this);
1090
1104
  }));
1091
- return function (_x10) {
1092
- return _ref39.apply(this, arguments);
1105
+ return function (_x0) {
1106
+ return _ref37.apply(this, arguments);
1093
1107
  };
1094
1108
  }();
1095
1109
 
@@ -1105,43 +1119,43 @@ exports.TransferNFT = /*#__PURE__*/function () {
1105
1119
  * @returns {Promise<Object>} - The status of the listing
1106
1120
  */
1107
1121
  exports.ListingStatus = /*#__PURE__*/function () {
1108
- var _ref41 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(_ref40) {
1109
- var listingId;
1110
- return _regeneratorRuntime.wrap(function _callee19$(_context19) {
1111
- while (1) switch (_context19.prev = _context19.next) {
1122
+ var _ref39 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(_ref38) {
1123
+ var listingId, _t20, _t21, _t22;
1124
+ return _regeneratorRuntime.wrap(function (_context17) {
1125
+ while (1) switch (_context17.prev = _context17.next) {
1112
1126
  case 0:
1113
- listingId = _ref40.listingId;
1114
- _context19.prev = 1;
1115
- _context19.t0 = Utils;
1116
- _context19.next = 5;
1127
+ listingId = _ref38.listingId;
1128
+ _context17.prev = 1;
1129
+ _t20 = Utils;
1130
+ _context17.next = 2;
1117
1131
  return this.client.authClient.MakeAuthServiceRequest({
1118
1132
  path: UrlJoin("as", "mkt", "status", listingId),
1119
1133
  method: "GET"
1120
1134
  });
1121
- case 5:
1122
- _context19.t1 = _context19.sent;
1123
- _context19.next = 8;
1124
- return _context19.t0.ResponseToJson.call(_context19.t0, _context19.t1);
1125
- case 8:
1126
- return _context19.abrupt("return", _context19.sent);
1127
- case 11:
1128
- _context19.prev = 11;
1129
- _context19.t2 = _context19["catch"](1);
1130
- if (!(_context19.t2.status === 404)) {
1131
- _context19.next = 15;
1135
+ case 2:
1136
+ _t21 = _context17.sent;
1137
+ _context17.next = 3;
1138
+ return _t20.ResponseToJson.call(_t20, _t21);
1139
+ case 3:
1140
+ return _context17.abrupt("return", _context17.sent);
1141
+ case 4:
1142
+ _context17.prev = 4;
1143
+ _t22 = _context17["catch"](1);
1144
+ if (!(_t22.status === 404)) {
1145
+ _context17.next = 5;
1132
1146
  break;
1133
1147
  }
1134
- return _context19.abrupt("return");
1135
- case 15:
1136
- throw _context19.t2;
1137
- case 16:
1148
+ return _context17.abrupt("return");
1149
+ case 5:
1150
+ throw _t22;
1151
+ case 6:
1138
1152
  case "end":
1139
- return _context19.stop();
1153
+ return _context17.stop();
1140
1154
  }
1141
- }, _callee19, this, [[1, 11]]);
1155
+ }, _callee17, this, [[1, 4]]);
1142
1156
  }));
1143
- return function (_x11) {
1144
- return _ref41.apply(this, arguments);
1157
+ return function (_x1) {
1158
+ return _ref39.apply(this, arguments);
1145
1159
  };
1146
1160
  }();
1147
1161
 
@@ -1157,35 +1171,35 @@ exports.ListingStatus = /*#__PURE__*/function () {
1157
1171
  * @returns {Promise<Object>} - The listing
1158
1172
  */
1159
1173
  exports.Listing = /*#__PURE__*/function () {
1160
- var _ref43 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(_ref42) {
1161
- var listingId;
1162
- return _regeneratorRuntime.wrap(function _callee20$(_context20) {
1163
- while (1) switch (_context20.prev = _context20.next) {
1174
+ var _ref41 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(_ref40) {
1175
+ var listingId, _t23, _t24, _t25, _t26, _t27;
1176
+ return _regeneratorRuntime.wrap(function (_context18) {
1177
+ while (1) switch (_context18.prev = _context18.next) {
1164
1178
  case 0:
1165
- listingId = _ref42.listingId;
1166
- _context20.t0 = FormatNFT;
1167
- _context20.t1 = this;
1168
- _context20.t2 = Utils;
1169
- _context20.next = 6;
1179
+ listingId = _ref40.listingId;
1180
+ _t23 = FormatNFT;
1181
+ _t24 = this;
1182
+ _t25 = Utils;
1183
+ _context18.next = 1;
1170
1184
  return this.client.authClient.MakeAuthServiceRequest({
1171
1185
  path: UrlJoin("as", "mkt", "l", listingId),
1172
1186
  method: "GET"
1173
1187
  });
1174
- case 6:
1175
- _context20.t3 = _context20.sent;
1176
- _context20.next = 9;
1177
- return _context20.t2.ResponseToJson.call(_context20.t2, _context20.t3);
1178
- case 9:
1179
- _context20.t4 = _context20.sent;
1180
- return _context20.abrupt("return", (0, _context20.t0)(_context20.t1, _context20.t4));
1181
- case 11:
1188
+ case 1:
1189
+ _t26 = _context18.sent;
1190
+ _context18.next = 2;
1191
+ return _t25.ResponseToJson.call(_t25, _t26);
1192
+ case 2:
1193
+ _t27 = _context18.sent;
1194
+ return _context18.abrupt("return", _t23(_t24, _t27));
1195
+ case 3:
1182
1196
  case "end":
1183
- return _context20.stop();
1197
+ return _context18.stop();
1184
1198
  }
1185
- }, _callee20, this);
1199
+ }, _callee18, this);
1186
1200
  }));
1187
- return function (_x12) {
1188
- return _ref43.apply(this, arguments);
1201
+ return function (_x10) {
1202
+ return _ref41.apply(this, arguments);
1189
1203
  };
1190
1204
  }();
1191
1205
 
@@ -1224,19 +1238,19 @@ exports.Listing = /*#__PURE__*/function () {
1224
1238
  *
1225
1239
  * @returns {Promise<Object>} - Results of the query and pagination info
1226
1240
  */
1227
- exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21() {
1228
- var _args21 = arguments;
1229
- return _regeneratorRuntime.wrap(function _callee21$(_context21) {
1230
- while (1) switch (_context21.prev = _context21.next) {
1241
+ exports.Listings = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19() {
1242
+ var _args19 = arguments;
1243
+ return _regeneratorRuntime.wrap(function (_context19) {
1244
+ while (1) switch (_context19.prev = _context19.next) {
1231
1245
  case 0:
1232
- return _context21.abrupt("return", this.FilteredQuery(_objectSpread({
1246
+ return _context19.abrupt("return", this.FilteredQuery(_objectSpread({
1233
1247
  mode: "listings"
1234
- }, _args21[0] || {})));
1248
+ }, _args19[0] || {})));
1235
1249
  case 1:
1236
1250
  case "end":
1237
- return _context21.stop();
1251
+ return _context19.stop();
1238
1252
  }
1239
- }, _callee21, this);
1253
+ }, _callee19, this);
1240
1254
  }));
1241
1255
 
1242
1256
  /**
@@ -1273,19 +1287,19 @@ exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRunt
1273
1287
  *
1274
1288
  * @returns {Promise<Object>} - Statistics about listings. All prices in USD.
1275
1289
  */
1276
- exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22() {
1277
- var _args22 = arguments;
1278
- return _regeneratorRuntime.wrap(function _callee22$(_context22) {
1279
- while (1) switch (_context22.prev = _context22.next) {
1290
+ exports.ListingStats = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20() {
1291
+ var _args20 = arguments;
1292
+ return _regeneratorRuntime.wrap(function (_context20) {
1293
+ while (1) switch (_context20.prev = _context20.next) {
1280
1294
  case 0:
1281
- return _context22.abrupt("return", this.FilteredQuery(_objectSpread({
1295
+ return _context20.abrupt("return", this.FilteredQuery(_objectSpread({
1282
1296
  mode: "listing-stats"
1283
- }, _args22[0] || {})));
1297
+ }, _args20[0] || {})));
1284
1298
  case 1:
1285
1299
  case "end":
1286
- return _context22.stop();
1300
+ return _context20.stop();
1287
1301
  }
1288
- }, _callee22, this);
1302
+ }, _callee20, this);
1289
1303
  }));
1290
1304
 
1291
1305
  /**
@@ -1321,19 +1335,19 @@ exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
1321
1335
  *
1322
1336
  * @returns {Promise<Object>} - Results of the query and pagination info
1323
1337
  */
1324
- exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23() {
1325
- var _args23 = arguments;
1326
- return _regeneratorRuntime.wrap(function _callee23$(_context23) {
1327
- while (1) switch (_context23.prev = _context23.next) {
1338
+ exports.Sales = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21() {
1339
+ var _args21 = arguments;
1340
+ return _regeneratorRuntime.wrap(function (_context21) {
1341
+ while (1) switch (_context21.prev = _context21.next) {
1328
1342
  case 0:
1329
- return _context23.abrupt("return", this.FilteredQuery(_objectSpread({
1343
+ return _context21.abrupt("return", this.FilteredQuery(_objectSpread({
1330
1344
  mode: "sales"
1331
- }, _args23[0] || {})));
1345
+ }, _args21[0] || {})));
1332
1346
  case 1:
1333
1347
  case "end":
1334
- return _context23.stop();
1348
+ return _context21.stop();
1335
1349
  }
1336
- }, _callee23, this);
1350
+ }, _callee21, this);
1337
1351
  }));
1338
1352
 
1339
1353
  /**
@@ -1369,19 +1383,19 @@ exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
1369
1383
  *
1370
1384
  * @returns {Promise<Object>} - Results of the query and pagination info
1371
1385
  */
1372
- exports.Transfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24() {
1373
- var _args24 = arguments;
1374
- return _regeneratorRuntime.wrap(function _callee24$(_context24) {
1375
- while (1) switch (_context24.prev = _context24.next) {
1386
+ exports.Transfers = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22() {
1387
+ var _args22 = arguments;
1388
+ return _regeneratorRuntime.wrap(function (_context22) {
1389
+ while (1) switch (_context22.prev = _context22.next) {
1376
1390
  case 0:
1377
- return _context24.abrupt("return", this.FilteredQuery(_objectSpread({
1391
+ return _context22.abrupt("return", this.FilteredQuery(_objectSpread({
1378
1392
  mode: "transfers"
1379
- }, _args24[0] || {})));
1393
+ }, _args22[0] || {})));
1380
1394
  case 1:
1381
1395
  case "end":
1382
- return _context24.stop();
1396
+ return _context22.stop();
1383
1397
  }
1384
- }, _callee24, this);
1398
+ }, _callee22, this);
1385
1399
  }));
1386
1400
 
1387
1401
  /**
@@ -1417,19 +1431,19 @@ exports.Transfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
1417
1431
  *
1418
1432
  * @returns {Promise<Object>} - Statistics about sales. All prices in USD.
1419
1433
  */
1420
- exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25() {
1421
- var _args25 = arguments;
1422
- return _regeneratorRuntime.wrap(function _callee25$(_context25) {
1423
- while (1) switch (_context25.prev = _context25.next) {
1434
+ exports.SalesStats = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23() {
1435
+ var _args23 = arguments;
1436
+ return _regeneratorRuntime.wrap(function (_context23) {
1437
+ while (1) switch (_context23.prev = _context23.next) {
1424
1438
  case 0:
1425
- return _context25.abrupt("return", this.FilteredQuery(_objectSpread({
1439
+ return _context23.abrupt("return", this.FilteredQuery(_objectSpread({
1426
1440
  mode: "sales-stats"
1427
- }, _args25[0] || {})));
1441
+ }, _args23[0] || {})));
1428
1442
  case 1:
1429
1443
  case "end":
1430
- return _context25.stop();
1444
+ return _context23.stop();
1431
1445
  }
1432
- }, _callee25, this);
1446
+ }, _callee23, this);
1433
1447
  }));
1434
1448
 
1435
1449
  /**
@@ -1445,68 +1459,74 @@ exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRu
1445
1459
  * @returns {Promise<Array|Object>} - Returns a list of leaderboard rankings or, if userAddress is specified, ranking for that user.
1446
1460
  */
1447
1461
  exports.Leaderboard = /*#__PURE__*/function () {
1448
- var _ref50 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(_ref49) {
1462
+ var _ref48 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(_ref47) {
1449
1463
  var userAddress,
1450
1464
  marketplaceParams,
1451
1465
  params,
1452
- _args26 = arguments;
1453
- return _regeneratorRuntime.wrap(function _callee26$(_context26) {
1454
- while (1) switch (_context26.prev = _context26.next) {
1466
+ _args24 = arguments,
1467
+ _t28,
1468
+ _t29,
1469
+ _t30,
1470
+ _t31,
1471
+ _t32,
1472
+ _t33;
1473
+ return _regeneratorRuntime.wrap(function (_context24) {
1474
+ while (1) switch (_context24.prev = _context24.next) {
1455
1475
  case 0:
1456
- userAddress = _ref49.userAddress, marketplaceParams = _ref49.marketplaceParams;
1476
+ userAddress = _ref47.userAddress, marketplaceParams = _ref47.marketplaceParams;
1457
1477
  if (!userAddress) {
1458
- _context26.next = 20;
1478
+ _context24.next = 6;
1459
1479
  break;
1460
1480
  }
1461
1481
  params = {
1462
1482
  addr: Utils.FormatAddress(userAddress)
1463
1483
  };
1464
1484
  if (!marketplaceParams) {
1465
- _context26.next = 10;
1485
+ _context24.next = 2;
1466
1486
  break;
1467
1487
  }
1468
- _context26.t0 = "tenant:eq:";
1469
- _context26.next = 7;
1488
+ _t28 = "tenant:eq:";
1489
+ _context24.next = 1;
1470
1490
  return this.MarketplaceInfo({
1471
1491
  marketplaceParams: marketplaceParams
1472
1492
  });
1473
- case 7:
1474
- _context26.t1 = _context26.sent.tenantId;
1475
- _context26.t2 = _context26.t0.concat.call(_context26.t0, _context26.t1);
1476
- params.filter = [_context26.t2];
1477
- case 10:
1478
- _context26.t4 = Utils;
1479
- _context26.next = 13;
1493
+ case 1:
1494
+ _t29 = _context24.sent.tenantId;
1495
+ _t30 = _t28.concat.call(_t28, _t29);
1496
+ params.filter = [_t30];
1497
+ case 2:
1498
+ _t32 = Utils;
1499
+ _context24.next = 3;
1480
1500
  return this.client.authClient.MakeAuthServiceRequest({
1481
1501
  path: UrlJoin("as", "wlt", "ranks"),
1482
1502
  method: "GET",
1483
1503
  queryParams: params
1484
1504
  });
1485
- case 13:
1486
- _context26.t5 = _context26.sent;
1487
- _context26.next = 16;
1488
- return _context26.t4.ResponseToJson.call(_context26.t4, _context26.t5);
1489
- case 16:
1490
- _context26.t3 = _context26.sent;
1491
- if (_context26.t3) {
1492
- _context26.next = 19;
1505
+ case 3:
1506
+ _t33 = _context24.sent;
1507
+ _context24.next = 4;
1508
+ return _t32.ResponseToJson.call(_t32, _t33);
1509
+ case 4:
1510
+ _t31 = _context24.sent;
1511
+ if (_t31) {
1512
+ _context24.next = 5;
1493
1513
  break;
1494
1514
  }
1495
- _context26.t3 = [];
1496
- case 19:
1497
- return _context26.abrupt("return", _context26.t3[0]);
1498
- case 20:
1499
- return _context26.abrupt("return", this.FilteredQuery(_objectSpread({
1515
+ _t31 = [];
1516
+ case 5:
1517
+ return _context24.abrupt("return", _t31[0]);
1518
+ case 6:
1519
+ return _context24.abrupt("return", this.FilteredQuery(_objectSpread({
1500
1520
  mode: "leaderboard"
1501
- }, _args26[0] || {})));
1502
- case 21:
1521
+ }, _args24[0] || {})));
1522
+ case 7:
1503
1523
  case "end":
1504
- return _context26.stop();
1524
+ return _context24.stop();
1505
1525
  }
1506
- }, _callee26, this);
1526
+ }, _callee24, this);
1507
1527
  }));
1508
- return function (_x13) {
1509
- return _ref50.apply(this, arguments);
1528
+ return function (_x11) {
1529
+ return _ref48.apply(this, arguments);
1510
1530
  };
1511
1531
  }();
1512
1532
 
@@ -1525,19 +1545,19 @@ exports.Leaderboard = /*#__PURE__*/function () {
1525
1545
  * @returns {Promise<string>} - The listing ID of the created listing
1526
1546
  */
1527
1547
  exports.CreateListing = /*#__PURE__*/function () {
1528
- var _ref52 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(_ref51) {
1529
- var contractAddress, tokenId, price, listingId;
1530
- return _regeneratorRuntime.wrap(function _callee27$(_context27) {
1531
- while (1) switch (_context27.prev = _context27.next) {
1548
+ var _ref50 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(_ref49) {
1549
+ var contractAddress, tokenId, price, listingId, _t34, _t35, _t36, _t37;
1550
+ return _regeneratorRuntime.wrap(function (_context25) {
1551
+ while (1) switch (_context25.prev = _context25.next) {
1532
1552
  case 0:
1533
- contractAddress = _ref51.contractAddress, tokenId = _ref51.tokenId, price = _ref51.price, listingId = _ref51.listingId;
1553
+ contractAddress = _ref49.contractAddress, tokenId = _ref49.tokenId, price = _ref49.price, listingId = _ref49.listingId;
1534
1554
  contractAddress = Utils.FormatAddress(contractAddress);
1535
1555
  if (!listingId) {
1536
- _context27.next = 12;
1556
+ _context25.next = 3;
1537
1557
  break;
1538
1558
  }
1539
- _context27.t0 = Utils;
1540
- _context27.next = 6;
1559
+ _t34 = Utils;
1560
+ _context25.next = 1;
1541
1561
  return this.client.authClient.MakeAuthServiceRequest({
1542
1562
  path: UrlJoin("as", "wlt", "mkt"),
1543
1563
  method: "PUT",
@@ -1549,15 +1569,15 @@ exports.CreateListing = /*#__PURE__*/function () {
1549
1569
  Authorization: "Bearer ".concat(this.AuthToken())
1550
1570
  }
1551
1571
  });
1552
- case 6:
1553
- _context27.t1 = _context27.sent;
1554
- _context27.next = 9;
1555
- return _context27.t0.ResponseToFormat.call(_context27.t0, "text", _context27.t1);
1556
- case 9:
1557
- return _context27.abrupt("return", _context27.sent);
1558
- case 12:
1559
- _context27.t2 = Utils;
1560
- _context27.next = 15;
1572
+ case 1:
1573
+ _t35 = _context25.sent;
1574
+ _context25.next = 2;
1575
+ return _t34.ResponseToFormat.call(_t34, "text", _t35);
1576
+ case 2:
1577
+ return _context25.abrupt("return", _context25.sent);
1578
+ case 3:
1579
+ _t36 = Utils;
1580
+ _context25.next = 4;
1561
1581
  return this.client.authClient.MakeAuthServiceRequest({
1562
1582
  path: UrlJoin("as", "wlt", "mkt"),
1563
1583
  method: "POST",
@@ -1570,20 +1590,20 @@ exports.CreateListing = /*#__PURE__*/function () {
1570
1590
  Authorization: "Bearer ".concat(this.AuthToken())
1571
1591
  }
1572
1592
  });
1573
- case 15:
1574
- _context27.t3 = _context27.sent;
1575
- _context27.next = 18;
1576
- return _context27.t2.ResponseToJson.call(_context27.t2, _context27.t3);
1577
- case 18:
1578
- return _context27.abrupt("return", _context27.sent);
1579
- case 19:
1593
+ case 4:
1594
+ _t37 = _context25.sent;
1595
+ _context25.next = 5;
1596
+ return _t36.ResponseToJson.call(_t36, _t37);
1597
+ case 5:
1598
+ return _context25.abrupt("return", _context25.sent);
1599
+ case 6:
1580
1600
  case "end":
1581
- return _context27.stop();
1601
+ return _context25.stop();
1582
1602
  }
1583
- }, _callee27, this);
1603
+ }, _callee25, this);
1584
1604
  }));
1585
- return function (_x14) {
1586
- return _ref52.apply(this, arguments);
1605
+ return function (_x12) {
1606
+ return _ref50.apply(this, arguments);
1587
1607
  };
1588
1608
  }();
1589
1609
 
@@ -1597,13 +1617,13 @@ exports.CreateListing = /*#__PURE__*/function () {
1597
1617
  * @param {string} listingId - The ID of the listing to remove
1598
1618
  */
1599
1619
  exports.RemoveListing = /*#__PURE__*/function () {
1600
- var _ref54 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref53) {
1620
+ var _ref52 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(_ref51) {
1601
1621
  var listingId;
1602
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
1603
- while (1) switch (_context28.prev = _context28.next) {
1622
+ return _regeneratorRuntime.wrap(function (_context26) {
1623
+ while (1) switch (_context26.prev = _context26.next) {
1604
1624
  case 0:
1605
- listingId = _ref53.listingId;
1606
- _context28.next = 3;
1625
+ listingId = _ref51.listingId;
1626
+ _context26.next = 1;
1607
1627
  return this.client.authClient.MakeAuthServiceRequest({
1608
1628
  path: UrlJoin("as", "wlt", "mkt", listingId),
1609
1629
  method: "DELETE",
@@ -1611,15 +1631,15 @@ exports.RemoveListing = /*#__PURE__*/function () {
1611
1631
  Authorization: "Bearer ".concat(this.AuthToken())
1612
1632
  }
1613
1633
  });
1614
- case 3:
1634
+ case 1:
1615
1635
  case "end":
1616
- return _context28.stop();
1636
+ return _context26.stop();
1617
1637
  }
1618
- }, _callee28, this);
1638
+ }, _callee26, this);
1619
1639
  }));
1620
- return function (_x15) {
1621
- return _ref54.apply(this, arguments);
1622
- };
1640
+ return function (_x13) {
1641
+ return _ref52.apply(this, arguments);
1642
+ };
1623
1643
  }();
1624
1644
 
1625
1645
  /**
@@ -1634,25 +1654,25 @@ exports.RemoveListing = /*#__PURE__*/function () {
1634
1654
  * @returns {Promise<Array<String>>} - A list of item names
1635
1655
  */
1636
1656
  exports.SalesNames = /*#__PURE__*/function () {
1637
- var _ref56 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref55) {
1638
- var marketplaceParams, tenantId;
1639
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
1640
- while (1) switch (_context29.prev = _context29.next) {
1657
+ var _ref54 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(_ref53) {
1658
+ var marketplaceParams, tenantId, _t38, _t39;
1659
+ return _regeneratorRuntime.wrap(function (_context27) {
1660
+ while (1) switch (_context27.prev = _context27.next) {
1641
1661
  case 0:
1642
- marketplaceParams = _ref55.marketplaceParams;
1662
+ marketplaceParams = _ref53.marketplaceParams;
1643
1663
  if (!marketplaceParams) {
1644
- _context29.next = 5;
1664
+ _context27.next = 2;
1645
1665
  break;
1646
1666
  }
1647
- _context29.next = 4;
1667
+ _context27.next = 1;
1648
1668
  return this.MarketplaceInfo({
1649
1669
  marketplaceParams: marketplaceParams
1650
1670
  });
1651
- case 4:
1652
- tenantId = _context29.sent.tenantId;
1653
- case 5:
1654
- _context29.t0 = Utils;
1655
- _context29.next = 8;
1671
+ case 1:
1672
+ tenantId = _context27.sent.tenantId;
1673
+ case 2:
1674
+ _t38 = Utils;
1675
+ _context27.next = 3;
1656
1676
  return this.client.authClient.MakeAuthServiceRequest({
1657
1677
  path: UrlJoin("as", "mkt", "names", "hst"),
1658
1678
  method: "GET",
@@ -1660,20 +1680,20 @@ exports.SalesNames = /*#__PURE__*/function () {
1660
1680
  filter: "tenant:eq:".concat(tenantId)
1661
1681
  } : {}
1662
1682
  });
1663
- case 8:
1664
- _context29.t1 = _context29.sent;
1665
- _context29.next = 11;
1666
- return _context29.t0.ResponseToJson.call(_context29.t0, _context29.t1);
1667
- case 11:
1668
- return _context29.abrupt("return", _context29.sent);
1669
- case 12:
1683
+ case 3:
1684
+ _t39 = _context27.sent;
1685
+ _context27.next = 4;
1686
+ return _t38.ResponseToJson.call(_t38, _t39);
1687
+ case 4:
1688
+ return _context27.abrupt("return", _context27.sent);
1689
+ case 5:
1670
1690
  case "end":
1671
- return _context29.stop();
1691
+ return _context27.stop();
1672
1692
  }
1673
- }, _callee29, this);
1693
+ }, _callee27, this);
1674
1694
  }));
1675
- return function (_x16) {
1676
- return _ref56.apply(this, arguments);
1695
+ return function (_x14) {
1696
+ return _ref54.apply(this, arguments);
1677
1697
  };
1678
1698
  }();
1679
1699
 
@@ -1689,25 +1709,25 @@ exports.SalesNames = /*#__PURE__*/function () {
1689
1709
  * @returns {Promise<Array<String>>} - A list of item names
1690
1710
  */
1691
1711
  exports.ListingNames = /*#__PURE__*/function () {
1692
- var _ref58 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(_ref57) {
1693
- var marketplaceParams, tenantId;
1694
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
1695
- while (1) switch (_context30.prev = _context30.next) {
1712
+ var _ref56 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref55) {
1713
+ var marketplaceParams, tenantId, _t40, _t41;
1714
+ return _regeneratorRuntime.wrap(function (_context28) {
1715
+ while (1) switch (_context28.prev = _context28.next) {
1696
1716
  case 0:
1697
- marketplaceParams = _ref57.marketplaceParams;
1717
+ marketplaceParams = _ref55.marketplaceParams;
1698
1718
  if (!marketplaceParams) {
1699
- _context30.next = 5;
1719
+ _context28.next = 2;
1700
1720
  break;
1701
1721
  }
1702
- _context30.next = 4;
1722
+ _context28.next = 1;
1703
1723
  return this.MarketplaceInfo({
1704
1724
  marketplaceParams: marketplaceParams
1705
1725
  });
1706
- case 4:
1707
- tenantId = _context30.sent.tenantId;
1708
- case 5:
1709
- _context30.t0 = Utils;
1710
- _context30.next = 8;
1726
+ case 1:
1727
+ tenantId = _context28.sent.tenantId;
1728
+ case 2:
1729
+ _t40 = Utils;
1730
+ _context28.next = 3;
1711
1731
  return this.client.authClient.MakeAuthServiceRequest({
1712
1732
  path: UrlJoin("as", "mkt", "names"),
1713
1733
  method: "GET",
@@ -1715,20 +1735,20 @@ exports.ListingNames = /*#__PURE__*/function () {
1715
1735
  filter: "tenant:eq:".concat(tenantId)
1716
1736
  } : {}
1717
1737
  });
1718
- case 8:
1719
- _context30.t1 = _context30.sent;
1720
- _context30.next = 11;
1721
- return _context30.t0.ResponseToJson.call(_context30.t0, _context30.t1);
1722
- case 11:
1723
- return _context30.abrupt("return", _context30.sent);
1724
- case 12:
1738
+ case 3:
1739
+ _t41 = _context28.sent;
1740
+ _context28.next = 4;
1741
+ return _t40.ResponseToJson.call(_t40, _t41);
1742
+ case 4:
1743
+ return _context28.abrupt("return", _context28.sent);
1744
+ case 5:
1725
1745
  case "end":
1726
- return _context30.stop();
1746
+ return _context28.stop();
1727
1747
  }
1728
- }, _callee30, this);
1748
+ }, _callee28, this);
1729
1749
  }));
1730
- return function (_x17) {
1731
- return _ref58.apply(this, arguments);
1750
+ return function (_x15) {
1751
+ return _ref56.apply(this, arguments);
1732
1752
  };
1733
1753
  }();
1734
1754
 
@@ -1742,14 +1762,14 @@ exports.ListingNames = /*#__PURE__*/function () {
1742
1762
  * @returns {Promise<Array<String>>} - A list of item editions
1743
1763
  */
1744
1764
  exports.ListingEditionNames = /*#__PURE__*/function () {
1745
- var _ref60 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(_ref59) {
1746
- var displayName;
1747
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
1748
- while (1) switch (_context31.prev = _context31.next) {
1765
+ var _ref58 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref57) {
1766
+ var displayName, _t42, _t43;
1767
+ return _regeneratorRuntime.wrap(function (_context29) {
1768
+ while (1) switch (_context29.prev = _context29.next) {
1749
1769
  case 0:
1750
- displayName = _ref59.displayName;
1751
- _context31.t0 = Utils;
1752
- _context31.next = 4;
1770
+ displayName = _ref57.displayName;
1771
+ _t42 = Utils;
1772
+ _context29.next = 1;
1753
1773
  return this.client.authClient.MakeAuthServiceRequest({
1754
1774
  path: UrlJoin("as", "mkt", "editions"),
1755
1775
  queryParams: {
@@ -1757,20 +1777,20 @@ exports.ListingEditionNames = /*#__PURE__*/function () {
1757
1777
  },
1758
1778
  method: "GET"
1759
1779
  });
1760
- case 4:
1761
- _context31.t1 = _context31.sent;
1762
- _context31.next = 7;
1763
- return _context31.t0.ResponseToJson.call(_context31.t0, _context31.t1);
1764
- case 7:
1765
- return _context31.abrupt("return", _context31.sent);
1766
- case 8:
1780
+ case 1:
1781
+ _t43 = _context29.sent;
1782
+ _context29.next = 2;
1783
+ return _t42.ResponseToJson.call(_t42, _t43);
1784
+ case 2:
1785
+ return _context29.abrupt("return", _context29.sent);
1786
+ case 3:
1767
1787
  case "end":
1768
- return _context31.stop();
1788
+ return _context29.stop();
1769
1789
  }
1770
- }, _callee31, this);
1790
+ }, _callee29, this);
1771
1791
  }));
1772
- return function (_x18) {
1773
- return _ref60.apply(this, arguments);
1792
+ return function (_x16) {
1793
+ return _ref58.apply(this, arguments);
1774
1794
  };
1775
1795
  }();
1776
1796
 
@@ -1786,38 +1806,44 @@ exports.ListingEditionNames = /*#__PURE__*/function () {
1786
1806
  *
1787
1807
  * @returns {Promise<Array<String>>} - A list of valid attributes
1788
1808
  */
1789
- exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32() {
1790
- var _ref62,
1809
+ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30() {
1810
+ var _ref60,
1791
1811
  marketplaceParams,
1792
1812
  displayName,
1793
1813
  filters,
1794
1814
  attributes,
1795
- _args32 = arguments;
1796
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
1797
- while (1) switch (_context32.prev = _context32.next) {
1815
+ _args30 = arguments,
1816
+ _t44,
1817
+ _t45,
1818
+ _t46,
1819
+ _t47,
1820
+ _t48,
1821
+ _t49;
1822
+ return _regeneratorRuntime.wrap(function (_context30) {
1823
+ while (1) switch (_context30.prev = _context30.next) {
1798
1824
  case 0:
1799
- _ref62 = _args32.length > 0 && _args32[0] !== undefined ? _args32[0] : {}, marketplaceParams = _ref62.marketplaceParams, displayName = _ref62.displayName;
1825
+ _ref60 = _args30.length > 0 && _args30[0] !== undefined ? _args30[0] : {}, marketplaceParams = _ref60.marketplaceParams, displayName = _ref60.displayName;
1800
1826
  filters = [];
1801
1827
  if (!marketplaceParams) {
1802
- _context32.next = 10;
1828
+ _context30.next = 2;
1803
1829
  break;
1804
1830
  }
1805
- _context32.t0 = filters;
1806
- _context32.t1 = "tenant:eq:";
1807
- _context32.next = 7;
1831
+ _t44 = filters;
1832
+ _t45 = "tenant:eq:";
1833
+ _context30.next = 1;
1808
1834
  return this.MarketplaceInfo({
1809
1835
  marketplaceParams: marketplaceParams
1810
1836
  });
1811
- case 7:
1812
- _context32.t2 = _context32.sent.tenantId;
1813
- _context32.t3 = _context32.t1.concat.call(_context32.t1, _context32.t2);
1814
- _context32.t0.push.call(_context32.t0, _context32.t3);
1815
- case 10:
1837
+ case 1:
1838
+ _t46 = _context30.sent.tenantId;
1839
+ _t47 = _t45.concat.call(_t45, _t46);
1840
+ _t44.push.call(_t44, _t47);
1841
+ case 2:
1816
1842
  if (displayName) {
1817
1843
  filters.push("nft/display_name:eq:".concat(displayName));
1818
1844
  }
1819
- _context32.t4 = Utils;
1820
- _context32.next = 14;
1845
+ _t48 = Utils;
1846
+ _context30.next = 3;
1821
1847
  return this.client.authClient.MakeAuthServiceRequest({
1822
1848
  path: UrlJoin("as", "mkt", "attributes"),
1823
1849
  method: "GET",
@@ -1825,28 +1851,28 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
1825
1851
  filter: filters
1826
1852
  }
1827
1853
  });
1828
- case 14:
1829
- _context32.t5 = _context32.sent;
1830
- _context32.next = 17;
1831
- return _context32.t4.ResponseToJson.call(_context32.t4, _context32.t5);
1832
- case 17:
1833
- attributes = _context32.sent;
1834
- return _context32.abrupt("return", attributes.map(function (_ref63) {
1835
- var trait_type = _ref63.trait_type,
1836
- values = _ref63.values;
1854
+ case 3:
1855
+ _t49 = _context30.sent;
1856
+ _context30.next = 4;
1857
+ return _t48.ResponseToJson.call(_t48, _t49);
1858
+ case 4:
1859
+ attributes = _context30.sent;
1860
+ return _context30.abrupt("return", attributes.map(function (_ref61) {
1861
+ var trait_type = _ref61.trait_type,
1862
+ values = _ref61.values;
1837
1863
  return {
1838
1864
  name: trait_type,
1839
1865
  values: values
1840
1866
  };
1841
- }).filter(function (_ref64) {
1842
- var name = _ref64.name;
1867
+ }).filter(function (_ref62) {
1868
+ var name = _ref62.name;
1843
1869
  return !["Content Fabric Hash", "Total Minted Supply", "Creator"].includes(name);
1844
1870
  }));
1845
- case 19:
1871
+ case 5:
1846
1872
  case "end":
1847
- return _context32.stop();
1873
+ return _context30.stop();
1848
1874
  }
1849
- }, _callee32, this);
1875
+ }, _callee30, this);
1850
1876
  }));
1851
1877
 
1852
1878
  /* PURCHASE / CLAIM */
@@ -1863,13 +1889,13 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
1863
1889
  * @returns {Promise<Object>} - Information about the claim, including the tenant associated with the item, the gift ID and the status op key
1864
1890
  */
1865
1891
  exports.ClaimGift = /*#__PURE__*/function () {
1866
- var _ref66 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(_ref65) {
1892
+ var _ref64 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(_ref63) {
1867
1893
  var code;
1868
- return _regeneratorRuntime.wrap(function _callee33$(_context33) {
1869
- while (1) switch (_context33.prev = _context33.next) {
1894
+ return _regeneratorRuntime.wrap(function (_context31) {
1895
+ while (1) switch (_context31.prev = _context31.next) {
1870
1896
  case 0:
1871
- code = _ref65.code;
1872
- _context33.next = 3;
1897
+ code = _ref63.code;
1898
+ _context31.next = 1;
1873
1899
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
1874
1900
  method: "POST",
1875
1901
  path: UrlJoin("as", "wlt", "gifts", "claim"),
@@ -1880,16 +1906,16 @@ exports.ClaimGift = /*#__PURE__*/function () {
1880
1906
  Authorization: "Bearer ".concat(this.AuthToken())
1881
1907
  }
1882
1908
  }));
1883
- case 3:
1884
- return _context33.abrupt("return", _context33.sent);
1885
- case 4:
1909
+ case 1:
1910
+ return _context31.abrupt("return", _context31.sent);
1911
+ case 2:
1886
1912
  case "end":
1887
- return _context33.stop();
1913
+ return _context31.stop();
1888
1914
  }
1889
- }, _callee33, this);
1915
+ }, _callee31, this);
1890
1916
  }));
1891
- return function (_x19) {
1892
- return _ref66.apply(this, arguments);
1917
+ return function (_x17) {
1918
+ return _ref64.apply(this, arguments);
1893
1919
  };
1894
1920
  }();
1895
1921
 
@@ -1905,19 +1931,19 @@ exports.ClaimGift = /*#__PURE__*/function () {
1905
1931
  * @param {string=} email - Email address of the user. If specified, this will bind the user to the tenant of the specified marketplace
1906
1932
  */
1907
1933
  exports.ClaimItem = /*#__PURE__*/function () {
1908
- var _ref68 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(_ref67) {
1934
+ var _ref66 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(_ref65) {
1909
1935
  var marketplaceParams, sku, email, marketplaceInfo;
1910
- return _regeneratorRuntime.wrap(function _callee34$(_context34) {
1911
- while (1) switch (_context34.prev = _context34.next) {
1936
+ return _regeneratorRuntime.wrap(function (_context32) {
1937
+ while (1) switch (_context32.prev = _context32.next) {
1912
1938
  case 0:
1913
- marketplaceParams = _ref67.marketplaceParams, sku = _ref67.sku, email = _ref67.email;
1914
- _context34.next = 3;
1939
+ marketplaceParams = _ref65.marketplaceParams, sku = _ref65.sku, email = _ref65.email;
1940
+ _context32.next = 1;
1915
1941
  return this.MarketplaceInfo({
1916
1942
  marketplaceParams: marketplaceParams
1917
1943
  });
1918
- case 3:
1919
- marketplaceInfo = _context34.sent;
1920
- _context34.next = 6;
1944
+ case 1:
1945
+ marketplaceInfo = _context32.sent;
1946
+ _context32.next = 2;
1921
1947
  return this.client.authClient.MakeAuthServiceRequest({
1922
1948
  method: "POST",
1923
1949
  path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
@@ -1931,14 +1957,14 @@ exports.ClaimItem = /*#__PURE__*/function () {
1931
1957
  Authorization: "Bearer ".concat(this.AuthToken())
1932
1958
  }
1933
1959
  });
1934
- case 6:
1960
+ case 2:
1935
1961
  case "end":
1936
- return _context34.stop();
1962
+ return _context32.stop();
1937
1963
  }
1938
- }, _callee34, this);
1964
+ }, _callee32, this);
1939
1965
  }));
1940
- return function (_x20) {
1941
- return _ref68.apply(this, arguments);
1966
+ return function (_x18) {
1967
+ return _ref66.apply(this, arguments);
1942
1968
  };
1943
1969
  }();
1944
1970
 
@@ -1956,18 +1982,18 @@ exports.ClaimItem = /*#__PURE__*/function () {
1956
1982
  * @param {string} cancelUrl - The URL to redirect back to upon cancellation of purchase
1957
1983
  */
1958
1984
  exports.PurchaseItem = /*#__PURE__*/function () {
1959
- var _ref70 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(_ref69) {
1985
+ var _ref68 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(_ref67) {
1960
1986
  var marketplaceParams, sku, confirmationId, successUrl, cancelUrl, marketplaceInfo;
1961
- return _regeneratorRuntime.wrap(function _callee35$(_context35) {
1962
- while (1) switch (_context35.prev = _context35.next) {
1987
+ return _regeneratorRuntime.wrap(function (_context33) {
1988
+ while (1) switch (_context33.prev = _context33.next) {
1963
1989
  case 0:
1964
- marketplaceParams = _ref69.marketplaceParams, sku = _ref69.sku, confirmationId = _ref69.confirmationId, successUrl = _ref69.successUrl, cancelUrl = _ref69.cancelUrl;
1965
- _context35.next = 3;
1990
+ marketplaceParams = _ref67.marketplaceParams, sku = _ref67.sku, confirmationId = _ref67.confirmationId, successUrl = _ref67.successUrl, cancelUrl = _ref67.cancelUrl;
1991
+ _context33.next = 1;
1966
1992
  return this.MarketplaceInfo({
1967
1993
  marketplaceParams: marketplaceParams
1968
1994
  });
1969
- case 3:
1970
- marketplaceInfo = _context35.sent;
1995
+ case 1:
1996
+ marketplaceInfo = _context33.sent;
1971
1997
  window.location.href = this.FlowURL({
1972
1998
  type: "action",
1973
1999
  flow: "purchase",
@@ -1981,14 +2007,14 @@ exports.PurchaseItem = /*#__PURE__*/function () {
1981
2007
  auth: this.ClientAuthToken()
1982
2008
  }
1983
2009
  });
1984
- case 5:
2010
+ case 2:
1985
2011
  case "end":
1986
- return _context35.stop();
2012
+ return _context33.stop();
1987
2013
  }
1988
- }, _callee35, this);
2014
+ }, _callee33, this);
1989
2015
  }));
1990
- return function (_x21) {
1991
- return _ref70.apply(this, arguments);
2016
+ return function (_x19) {
2017
+ return _ref68.apply(this, arguments);
1992
2018
  };
1993
2019
  }();
1994
2020
 
@@ -2006,23 +2032,23 @@ exports.PurchaseItem = /*#__PURE__*/function () {
2006
2032
  * @param {string} cancelUrl - The URL to redirect back to upon cancellation of purchase
2007
2033
  */
2008
2034
  exports.PurchaseListing = /*#__PURE__*/function () {
2009
- var _ref72 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(_ref71) {
2035
+ var _ref70 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(_ref69) {
2010
2036
  var marketplaceParams, listingId, confirmationId, successUrl, cancelUrl, marketplaceInfo;
2011
- return _regeneratorRuntime.wrap(function _callee36$(_context36) {
2012
- while (1) switch (_context36.prev = _context36.next) {
2037
+ return _regeneratorRuntime.wrap(function (_context34) {
2038
+ while (1) switch (_context34.prev = _context34.next) {
2013
2039
  case 0:
2014
- marketplaceParams = _ref71.marketplaceParams, listingId = _ref71.listingId, confirmationId = _ref71.confirmationId, successUrl = _ref71.successUrl, cancelUrl = _ref71.cancelUrl;
2040
+ marketplaceParams = _ref69.marketplaceParams, listingId = _ref69.listingId, confirmationId = _ref69.confirmationId, successUrl = _ref69.successUrl, cancelUrl = _ref69.cancelUrl;
2015
2041
  if (!marketplaceParams) {
2016
- _context36.next = 5;
2042
+ _context34.next = 2;
2017
2043
  break;
2018
2044
  }
2019
- _context36.next = 4;
2045
+ _context34.next = 1;
2020
2046
  return this.MarketplaceInfo({
2021
2047
  marketplaceParams: marketplaceParams
2022
2048
  });
2023
- case 4:
2024
- marketplaceInfo = _context36.sent;
2025
- case 5:
2049
+ case 1:
2050
+ marketplaceInfo = _context34.sent;
2051
+ case 2:
2026
2052
  window.location.href = this.FlowURL({
2027
2053
  type: "action",
2028
2054
  flow: "purchase",
@@ -2036,14 +2062,14 @@ exports.PurchaseListing = /*#__PURE__*/function () {
2036
2062
  auth: this.ClientAuthToken()
2037
2063
  }
2038
2064
  });
2039
- case 6:
2065
+ case 3:
2040
2066
  case "end":
2041
- return _context36.stop();
2067
+ return _context34.stop();
2042
2068
  }
2043
- }, _callee36, this);
2069
+ }, _callee34, this);
2044
2070
  }));
2045
- return function (_x22) {
2046
- return _ref72.apply(this, arguments);
2071
+ return function (_x20) {
2072
+ return _ref70.apply(this, arguments);
2047
2073
  };
2048
2074
  }();
2049
2075
 
@@ -2060,51 +2086,51 @@ exports.PurchaseListing = /*#__PURE__*/function () {
2060
2086
  * @returns {Promise<Object>} - The status of the purchase
2061
2087
  */
2062
2088
  exports.ListingPurchaseStatus = /*#__PURE__*/function () {
2063
- var _ref74 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(_ref73) {
2064
- var listingId, confirmationId, listingStatus, statuses;
2065
- return _regeneratorRuntime.wrap(function _callee37$(_context37) {
2066
- while (1) switch (_context37.prev = _context37.next) {
2089
+ var _ref72 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(_ref71) {
2090
+ var listingId, confirmationId, listingStatus, statuses, _t50;
2091
+ return _regeneratorRuntime.wrap(function (_context35) {
2092
+ while (1) switch (_context35.prev = _context35.next) {
2067
2093
  case 0:
2068
- listingId = _ref73.listingId, confirmationId = _ref73.confirmationId;
2069
- _context37.prev = 1;
2070
- _context37.next = 4;
2094
+ listingId = _ref71.listingId, confirmationId = _ref71.confirmationId;
2095
+ _context35.prev = 1;
2096
+ _context35.next = 2;
2071
2097
  return this.ListingStatus({
2072
2098
  listingId: listingId
2073
2099
  });
2074
- case 4:
2075
- listingStatus = _context37.sent;
2100
+ case 2:
2101
+ listingStatus = _context35.sent;
2076
2102
  if (listingStatus) {
2077
- _context37.next = 7;
2103
+ _context35.next = 3;
2078
2104
  break;
2079
2105
  }
2080
2106
  throw Error("Unable to find info for listing " + listingId);
2081
- case 7:
2082
- _context37.next = 9;
2107
+ case 3:
2108
+ _context35.next = 4;
2083
2109
  return this.MintingStatus({
2084
2110
  tenantId: listingStatus.tenant
2085
2111
  });
2086
- case 9:
2087
- statuses = _context37.sent;
2088
- return _context37.abrupt("return", statuses.find(function (status) {
2112
+ case 4:
2113
+ statuses = _context35.sent;
2114
+ return _context35.abrupt("return", statuses.find(function (status) {
2089
2115
  return status.op === "nft-transfer" && status.extra && status.extra[0] === confirmationId;
2090
2116
  }) || {
2091
2117
  status: "none"
2092
2118
  });
2093
- case 13:
2094
- _context37.prev = 13;
2095
- _context37.t0 = _context37["catch"](1);
2096
- this.Log(_context37.t0, true);
2097
- return _context37.abrupt("return", {
2119
+ case 5:
2120
+ _context35.prev = 5;
2121
+ _t50 = _context35["catch"](1);
2122
+ this.Log(_t50, true);
2123
+ return _context35.abrupt("return", {
2098
2124
  status: "unknown"
2099
2125
  });
2100
- case 17:
2126
+ case 6:
2101
2127
  case "end":
2102
- return _context37.stop();
2128
+ return _context35.stop();
2103
2129
  }
2104
- }, _callee37, this, [[1, 13]]);
2130
+ }, _callee35, this, [[1, 5]]);
2105
2131
  }));
2106
- return function (_x23) {
2107
- return _ref74.apply(this, arguments);
2132
+ return function (_x21) {
2133
+ return _ref72.apply(this, arguments);
2108
2134
  };
2109
2135
  }();
2110
2136
 
@@ -2119,45 +2145,45 @@ exports.ListingPurchaseStatus = /*#__PURE__*/function () {
2119
2145
  * @returns {Promise<Object>} - The minting status of the purchaseed item(s)
2120
2146
  */
2121
2147
  exports.PurchaseStatus = /*#__PURE__*/function () {
2122
- var _ref76 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(_ref75) {
2123
- var marketplaceParams, confirmationId, marketplaceInfo, statuses;
2124
- return _regeneratorRuntime.wrap(function _callee38$(_context38) {
2125
- while (1) switch (_context38.prev = _context38.next) {
2148
+ var _ref74 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee36(_ref73) {
2149
+ var marketplaceParams, confirmationId, marketplaceInfo, statuses, _t51;
2150
+ return _regeneratorRuntime.wrap(function (_context36) {
2151
+ while (1) switch (_context36.prev = _context36.next) {
2126
2152
  case 0:
2127
- marketplaceParams = _ref75.marketplaceParams, confirmationId = _ref75.confirmationId;
2128
- _context38.prev = 1;
2129
- _context38.next = 4;
2153
+ marketplaceParams = _ref73.marketplaceParams, confirmationId = _ref73.confirmationId;
2154
+ _context36.prev = 1;
2155
+ _context36.next = 2;
2130
2156
  return this.MarketplaceInfo({
2131
2157
  marketplaceParams: marketplaceParams
2132
2158
  });
2133
- case 4:
2134
- marketplaceInfo = _context38.sent;
2135
- _context38.next = 7;
2159
+ case 2:
2160
+ marketplaceInfo = _context36.sent;
2161
+ _context36.next = 3;
2136
2162
  return this.MintingStatus({
2137
2163
  tenantId: marketplaceInfo.tenantId
2138
2164
  });
2139
- case 7:
2140
- statuses = _context38.sent;
2141
- return _context38.abrupt("return", statuses.find(function (status) {
2165
+ case 3:
2166
+ statuses = _context36.sent;
2167
+ return _context36.abrupt("return", statuses.find(function (status) {
2142
2168
  return status.op === "nft-buy" && status.confirmationId === confirmationId;
2143
2169
  }) || {
2144
2170
  status: "none"
2145
2171
  });
2146
- case 11:
2147
- _context38.prev = 11;
2148
- _context38.t0 = _context38["catch"](1);
2149
- this.Log(_context38.t0, true);
2150
- return _context38.abrupt("return", {
2172
+ case 4:
2173
+ _context36.prev = 4;
2174
+ _t51 = _context36["catch"](1);
2175
+ this.Log(_t51, true);
2176
+ return _context36.abrupt("return", {
2151
2177
  status: "unknown"
2152
2178
  });
2153
- case 15:
2179
+ case 5:
2154
2180
  case "end":
2155
- return _context38.stop();
2181
+ return _context36.stop();
2156
2182
  }
2157
- }, _callee38, this, [[1, 11]]);
2183
+ }, _callee36, this, [[1, 4]]);
2158
2184
  }));
2159
- return function (_x24) {
2160
- return _ref76.apply(this, arguments);
2185
+ return function (_x22) {
2186
+ return _ref74.apply(this, arguments);
2161
2187
  };
2162
2188
  }();
2163
2189
 
@@ -2172,45 +2198,45 @@ exports.PurchaseStatus = /*#__PURE__*/function () {
2172
2198
  * @returns {Promise<Object>} - The minting status of the claim
2173
2199
  */
2174
2200
  exports.ClaimStatus = /*#__PURE__*/function () {
2175
- var _ref78 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(_ref77) {
2176
- var marketplaceParams, sku, marketplaceInfo, statuses;
2177
- return _regeneratorRuntime.wrap(function _callee39$(_context39) {
2178
- while (1) switch (_context39.prev = _context39.next) {
2201
+ var _ref76 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee37(_ref75) {
2202
+ var marketplaceParams, sku, marketplaceInfo, statuses, _t52;
2203
+ return _regeneratorRuntime.wrap(function (_context37) {
2204
+ while (1) switch (_context37.prev = _context37.next) {
2179
2205
  case 0:
2180
- marketplaceParams = _ref77.marketplaceParams, sku = _ref77.sku;
2181
- _context39.prev = 1;
2182
- _context39.next = 4;
2206
+ marketplaceParams = _ref75.marketplaceParams, sku = _ref75.sku;
2207
+ _context37.prev = 1;
2208
+ _context37.next = 2;
2183
2209
  return this.MarketplaceInfo({
2184
2210
  marketplaceParams: marketplaceParams
2185
2211
  });
2186
- case 4:
2187
- marketplaceInfo = _context39.sent;
2188
- _context39.next = 7;
2212
+ case 2:
2213
+ marketplaceInfo = _context37.sent;
2214
+ _context37.next = 3;
2189
2215
  return this.MintingStatus({
2190
2216
  tenantId: marketplaceInfo.tenantId
2191
2217
  });
2192
- case 7:
2193
- statuses = _context39.sent;
2194
- return _context39.abrupt("return", statuses.find(function (status) {
2218
+ case 3:
2219
+ statuses = _context37.sent;
2220
+ return _context37.abrupt("return", statuses.find(function (status) {
2195
2221
  return status.op === "nft-claim" && status.marketplaceId === marketplaceInfo.marketplaceId && status.confirmationId === sku;
2196
2222
  }) || {
2197
2223
  status: "none"
2198
2224
  });
2199
- case 11:
2200
- _context39.prev = 11;
2201
- _context39.t0 = _context39["catch"](1);
2202
- this.Log(_context39.t0, true);
2203
- return _context39.abrupt("return", {
2225
+ case 4:
2226
+ _context37.prev = 4;
2227
+ _t52 = _context37["catch"](1);
2228
+ this.Log(_t52, true);
2229
+ return _context37.abrupt("return", {
2204
2230
  status: "unknown"
2205
2231
  });
2206
- case 15:
2232
+ case 5:
2207
2233
  case "end":
2208
- return _context39.stop();
2234
+ return _context37.stop();
2209
2235
  }
2210
- }, _callee39, this, [[1, 11]]);
2236
+ }, _callee37, this, [[1, 4]]);
2211
2237
  }));
2212
- return function (_x25) {
2213
- return _ref78.apply(this, arguments);
2238
+ return function (_x23) {
2239
+ return _ref76.apply(this, arguments);
2214
2240
  };
2215
2241
  }();
2216
2242
 
@@ -2226,25 +2252,25 @@ exports.ClaimStatus = /*#__PURE__*/function () {
2226
2252
  * @returns {Promise<Object>} - The transfer status of the gift claim
2227
2253
  */
2228
2254
  exports.GiftClaimStatus = /*#__PURE__*/function () {
2229
- var _ref80 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(_ref79) {
2230
- var marketplaceParams, confirmationId, giftId, marketplaceInfo, statuses, responses;
2231
- return _regeneratorRuntime.wrap(function _callee40$(_context40) {
2232
- while (1) switch (_context40.prev = _context40.next) {
2255
+ var _ref78 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee38(_ref77) {
2256
+ var marketplaceParams, confirmationId, giftId, marketplaceInfo, statuses, responses, _t53;
2257
+ return _regeneratorRuntime.wrap(function (_context38) {
2258
+ while (1) switch (_context38.prev = _context38.next) {
2233
2259
  case 0:
2234
- marketplaceParams = _ref79.marketplaceParams, confirmationId = _ref79.confirmationId, giftId = _ref79.giftId;
2235
- _context40.prev = 1;
2236
- _context40.next = 4;
2260
+ marketplaceParams = _ref77.marketplaceParams, confirmationId = _ref77.confirmationId, giftId = _ref77.giftId;
2261
+ _context38.prev = 1;
2262
+ _context38.next = 2;
2237
2263
  return this.MarketplaceInfo({
2238
2264
  marketplaceParams: marketplaceParams
2239
2265
  });
2240
- case 4:
2241
- marketplaceInfo = _context40.sent;
2242
- _context40.next = 7;
2266
+ case 2:
2267
+ marketplaceInfo = _context38.sent;
2268
+ _context38.next = 3;
2243
2269
  return this.MintingStatus({
2244
2270
  tenantId: marketplaceInfo.tenantId
2245
2271
  });
2246
- case 7:
2247
- statuses = _context40.sent;
2272
+ case 3:
2273
+ statuses = _context38.sent;
2248
2274
  // Status is a list of transfer statuses, may be multiple if quantity > 1
2249
2275
  responses = statuses.filter(function (status) {
2250
2276
  return status.op === "nft-transfer" && (confirmationId && status.confirmationId === confirmationId || giftId && status.giftId === giftId);
@@ -2252,38 +2278,38 @@ exports.GiftClaimStatus = /*#__PURE__*/function () {
2252
2278
  status: "none"
2253
2279
  };
2254
2280
  if (!(responses.length === 0)) {
2255
- _context40.next = 13;
2281
+ _context38.next = 4;
2256
2282
  break;
2257
2283
  }
2258
- return _context40.abrupt("return", {
2284
+ return _context38.abrupt("return", {
2259
2285
  status: "none"
2260
2286
  });
2261
- case 13:
2287
+ case 4:
2262
2288
  if (!responses.find(function (response) {
2263
2289
  return response.status === "failed";
2264
2290
  })) {
2265
- _context40.next = 17;
2291
+ _context38.next = 5;
2266
2292
  break;
2267
2293
  }
2268
- return _context40.abrupt("return", {
2294
+ return _context38.abrupt("return", {
2269
2295
  status: "failed",
2270
2296
  op: "nft-transfer",
2271
2297
  transfer_statuses: responses
2272
2298
  });
2273
- case 17:
2299
+ case 5:
2274
2300
  if (!responses.find(function (response) {
2275
2301
  return response.status !== "complete";
2276
2302
  })) {
2277
- _context40.next = 21;
2303
+ _context38.next = 6;
2278
2304
  break;
2279
2305
  }
2280
- return _context40.abrupt("return", {
2306
+ return _context38.abrupt("return", {
2281
2307
  status: "pending",
2282
2308
  op: "nft-transfer",
2283
2309
  transfer_statuses: responses
2284
2310
  });
2285
- case 21:
2286
- return _context40.abrupt("return", {
2311
+ case 6:
2312
+ return _context38.abrupt("return", {
2287
2313
  status: "complete",
2288
2314
  op: "nft-transfer",
2289
2315
  transfer_statuses: responses,
@@ -2294,24 +2320,24 @@ exports.GiftClaimStatus = /*#__PURE__*/function () {
2294
2320
  };
2295
2321
  })
2296
2322
  });
2297
- case 22:
2298
- _context40.next = 28;
2323
+ case 7:
2324
+ _context38.next = 9;
2299
2325
  break;
2300
- case 24:
2301
- _context40.prev = 24;
2302
- _context40.t0 = _context40["catch"](1);
2303
- this.Log(_context40.t0, true);
2304
- return _context40.abrupt("return", {
2326
+ case 8:
2327
+ _context38.prev = 8;
2328
+ _t53 = _context38["catch"](1);
2329
+ this.Log(_t53, true);
2330
+ return _context38.abrupt("return", {
2305
2331
  status: "unknown"
2306
2332
  });
2307
- case 28:
2333
+ case 9:
2308
2334
  case "end":
2309
- return _context40.stop();
2335
+ return _context38.stop();
2310
2336
  }
2311
- }, _callee40, this, [[1, 24]]);
2337
+ }, _callee38, this, [[1, 8]]);
2312
2338
  }));
2313
- return function (_x26) {
2314
- return _ref80.apply(this, arguments);
2339
+ return function (_x24) {
2340
+ return _ref78.apply(this, arguments);
2315
2341
  };
2316
2342
  }();
2317
2343
 
@@ -2326,45 +2352,45 @@ exports.GiftClaimStatus = /*#__PURE__*/function () {
2326
2352
  * @returns {Promise<Object>} - The mint status of the entitlement claim
2327
2353
  */
2328
2354
  exports.EntitlementClaimStatus = /*#__PURE__*/function () {
2329
- var _ref82 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(_ref81) {
2330
- var marketplaceParams, purchaseId, marketplaceInfo, statuses, responses;
2331
- return _regeneratorRuntime.wrap(function _callee41$(_context41) {
2332
- while (1) switch (_context41.prev = _context41.next) {
2355
+ var _ref80 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee39(_ref79) {
2356
+ var marketplaceParams, purchaseId, marketplaceInfo, statuses, responses, _t54;
2357
+ return _regeneratorRuntime.wrap(function (_context39) {
2358
+ while (1) switch (_context39.prev = _context39.next) {
2333
2359
  case 0:
2334
- marketplaceParams = _ref81.marketplaceParams, purchaseId = _ref81.purchaseId;
2335
- _context41.prev = 1;
2336
- _context41.next = 4;
2360
+ marketplaceParams = _ref79.marketplaceParams, purchaseId = _ref79.purchaseId;
2361
+ _context39.prev = 1;
2362
+ _context39.next = 2;
2337
2363
  return this.MarketplaceInfo({
2338
2364
  marketplaceParams: marketplaceParams
2339
2365
  });
2340
- case 4:
2341
- marketplaceInfo = _context41.sent;
2342
- _context41.next = 7;
2366
+ case 2:
2367
+ marketplaceInfo = _context39.sent;
2368
+ _context39.next = 3;
2343
2369
  return this.MintingStatus({
2344
2370
  tenantId: marketplaceInfo.tenantId
2345
2371
  });
2346
- case 7:
2347
- statuses = _context41.sent;
2372
+ case 3:
2373
+ statuses = _context39.sent;
2348
2374
  responses = statuses.filter(function (status) {
2349
2375
  return status.op === "nft-claim-entitlement" && purchaseId && purchaseId == status.confirmationId;
2350
2376
  }) || {
2351
2377
  status: "none"
2352
2378
  };
2353
2379
  if (!(responses.length === 0)) {
2354
- _context41.next = 13;
2380
+ _context39.next = 4;
2355
2381
  break;
2356
2382
  }
2357
- return _context41.abrupt("return", {
2383
+ return _context39.abrupt("return", {
2358
2384
  status: "none"
2359
2385
  });
2360
- case 13:
2386
+ case 4:
2361
2387
  if (!responses.find(function (response) {
2362
2388
  return response.status === "complete";
2363
2389
  })) {
2364
- _context41.next = 17;
2390
+ _context39.next = 5;
2365
2391
  break;
2366
2392
  }
2367
- return _context41.abrupt("return", {
2393
+ return _context39.abrupt("return", {
2368
2394
  status: "complete",
2369
2395
  op: "nft-claim-entitlement",
2370
2396
  items: [{
@@ -2372,40 +2398,40 @@ exports.EntitlementClaimStatus = /*#__PURE__*/function () {
2372
2398
  token_id: responses[0].tokenId
2373
2399
  }]
2374
2400
  });
2375
- case 17:
2401
+ case 5:
2376
2402
  if (!responses.find(function (response) {
2377
2403
  return response.status === "error";
2378
2404
  })) {
2379
- _context41.next = 21;
2405
+ _context39.next = 6;
2380
2406
  break;
2381
2407
  }
2382
- return _context41.abrupt("return", {
2408
+ return _context39.abrupt("return", {
2383
2409
  status: "error",
2384
2410
  op: "nft-claim-entitlement"
2385
2411
  });
2386
- case 21:
2387
- return _context41.abrupt("return", {
2412
+ case 6:
2413
+ return _context39.abrupt("return", {
2388
2414
  status: "pending",
2389
2415
  op: "nft-claim-entitlement"
2390
2416
  });
2391
- case 22:
2392
- _context41.next = 28;
2417
+ case 7:
2418
+ _context39.next = 9;
2393
2419
  break;
2394
- case 24:
2395
- _context41.prev = 24;
2396
- _context41.t0 = _context41["catch"](1);
2397
- this.Log(_context41.t0, true);
2398
- return _context41.abrupt("return", {
2420
+ case 8:
2421
+ _context39.prev = 8;
2422
+ _t54 = _context39["catch"](1);
2423
+ this.Log(_t54, true);
2424
+ return _context39.abrupt("return", {
2399
2425
  status: "unknown"
2400
2426
  });
2401
- case 28:
2427
+ case 9:
2402
2428
  case "end":
2403
- return _context41.stop();
2429
+ return _context39.stop();
2404
2430
  }
2405
- }, _callee41, this, [[1, 24]]);
2431
+ }, _callee39, this, [[1, 8]]);
2406
2432
  }));
2407
- return function (_x27) {
2408
- return _ref82.apply(this, arguments);
2433
+ return function (_x25) {
2434
+ return _ref80.apply(this, arguments);
2409
2435
  };
2410
2436
  }();
2411
2437
 
@@ -2420,45 +2446,45 @@ exports.EntitlementClaimStatus = /*#__PURE__*/function () {
2420
2446
  * @returns {Promise<Object>} - The status of the pack opening
2421
2447
  */
2422
2448
  exports.PackOpenStatus = /*#__PURE__*/function () {
2423
- var _ref84 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(_ref83) {
2424
- var contractAddress, tokenId, tenantConfig, statuses;
2425
- return _regeneratorRuntime.wrap(function _callee42$(_context42) {
2426
- while (1) switch (_context42.prev = _context42.next) {
2449
+ var _ref82 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee40(_ref81) {
2450
+ var contractAddress, tokenId, tenantConfig, statuses, _t55;
2451
+ return _regeneratorRuntime.wrap(function (_context40) {
2452
+ while (1) switch (_context40.prev = _context40.next) {
2427
2453
  case 0:
2428
- contractAddress = _ref83.contractAddress, tokenId = _ref83.tokenId;
2429
- _context42.prev = 1;
2430
- _context42.next = 4;
2454
+ contractAddress = _ref81.contractAddress, tokenId = _ref81.tokenId;
2455
+ _context40.prev = 1;
2456
+ _context40.next = 2;
2431
2457
  return this.TenantConfiguration({
2432
2458
  contractAddress: contractAddress
2433
2459
  });
2434
- case 4:
2435
- tenantConfig = _context42.sent;
2436
- _context42.next = 7;
2460
+ case 2:
2461
+ tenantConfig = _context40.sent;
2462
+ _context40.next = 3;
2437
2463
  return this.MintingStatus({
2438
2464
  tenantId: tenantConfig.tenant
2439
2465
  });
2440
- case 7:
2441
- statuses = _context42.sent;
2442
- return _context42.abrupt("return", statuses.find(function (status) {
2466
+ case 3:
2467
+ statuses = _context40.sent;
2468
+ return _context40.abrupt("return", statuses.find(function (status) {
2443
2469
  return status.op === "nft-open" && Utils.EqualAddress(contractAddress, status.address) && status.tokenId === tokenId;
2444
2470
  }) || {
2445
2471
  status: "none"
2446
2472
  });
2447
- case 11:
2448
- _context42.prev = 11;
2449
- _context42.t0 = _context42["catch"](1);
2450
- this.Log(_context42.t0, true);
2451
- return _context42.abrupt("return", {
2473
+ case 4:
2474
+ _context40.prev = 4;
2475
+ _t55 = _context40["catch"](1);
2476
+ this.Log(_t55, true);
2477
+ return _context40.abrupt("return", {
2452
2478
  status: "unknown"
2453
2479
  });
2454
- case 15:
2480
+ case 5:
2455
2481
  case "end":
2456
- return _context42.stop();
2482
+ return _context40.stop();
2457
2483
  }
2458
- }, _callee42, this, [[1, 11]]);
2484
+ }, _callee40, this, [[1, 4]]);
2459
2485
  }));
2460
- return function (_x28) {
2461
- return _ref84.apply(this, arguments);
2486
+ return function (_x26) {
2487
+ return _ref82.apply(this, arguments);
2462
2488
  };
2463
2489
  }();
2464
2490
 
@@ -2473,39 +2499,39 @@ exports.PackOpenStatus = /*#__PURE__*/function () {
2473
2499
  * @returns {Promise<Object>} - The status of the collection redemption
2474
2500
  */
2475
2501
  exports.CollectionRedemptionStatus = /*#__PURE__*/function () {
2476
- var _ref86 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(_ref85) {
2477
- var marketplaceParams, confirmationId, statuses;
2478
- return _regeneratorRuntime.wrap(function _callee43$(_context43) {
2479
- while (1) switch (_context43.prev = _context43.next) {
2502
+ var _ref84 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee41(_ref83) {
2503
+ var marketplaceParams, confirmationId, statuses, _t56;
2504
+ return _regeneratorRuntime.wrap(function (_context41) {
2505
+ while (1) switch (_context41.prev = _context41.next) {
2480
2506
  case 0:
2481
- marketplaceParams = _ref85.marketplaceParams, confirmationId = _ref85.confirmationId;
2482
- _context43.prev = 1;
2483
- _context43.next = 4;
2507
+ marketplaceParams = _ref83.marketplaceParams, confirmationId = _ref83.confirmationId;
2508
+ _context41.prev = 1;
2509
+ _context41.next = 2;
2484
2510
  return this.MintingStatus({
2485
2511
  marketplaceParams: marketplaceParams
2486
2512
  });
2487
- case 4:
2488
- statuses = _context43.sent;
2489
- return _context43.abrupt("return", statuses.find(function (status) {
2513
+ case 2:
2514
+ statuses = _context41.sent;
2515
+ return _context41.abrupt("return", statuses.find(function (status) {
2490
2516
  return status.op === "nft-redeem" && status.confirmationId === confirmationId;
2491
2517
  }) || {
2492
2518
  status: "none"
2493
2519
  });
2494
- case 8:
2495
- _context43.prev = 8;
2496
- _context43.t0 = _context43["catch"](1);
2497
- this.Log(_context43.t0, true);
2498
- return _context43.abrupt("return", {
2520
+ case 3:
2521
+ _context41.prev = 3;
2522
+ _t56 = _context41["catch"](1);
2523
+ this.Log(_t56, true);
2524
+ return _context41.abrupt("return", {
2499
2525
  status: "unknown"
2500
2526
  });
2501
- case 12:
2527
+ case 4:
2502
2528
  case "end":
2503
- return _context43.stop();
2529
+ return _context41.stop();
2504
2530
  }
2505
- }, _callee43, this, [[1, 8]]);
2531
+ }, _callee41, this, [[1, 3]]);
2506
2532
  }));
2507
- return function (_x29) {
2508
- return _ref86.apply(this, arguments);
2533
+ return function (_x27) {
2534
+ return _ref84.apply(this, arguments);
2509
2535
  };
2510
2536
  }();
2511
2537
 
@@ -2523,51 +2549,51 @@ exports.CollectionRedemptionStatus = /*#__PURE__*/function () {
2523
2549
  * @returns {Promise<Object>} - The status of the offer redemption
2524
2550
  */
2525
2551
  exports.RedeemableOfferStatus = /*#__PURE__*/function () {
2526
- var _ref88 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(_ref87) {
2527
- var tenantId, marketplaceParams, contractAddress, tokenId, offerId, statuses;
2528
- return _regeneratorRuntime.wrap(function _callee44$(_context44) {
2529
- while (1) switch (_context44.prev = _context44.next) {
2552
+ var _ref86 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee42(_ref85) {
2553
+ var tenantId, marketplaceParams, contractAddress, tokenId, offerId, statuses, _t57;
2554
+ return _regeneratorRuntime.wrap(function (_context42) {
2555
+ while (1) switch (_context42.prev = _context42.next) {
2530
2556
  case 0:
2531
- tenantId = _ref87.tenantId, marketplaceParams = _ref87.marketplaceParams, contractAddress = _ref87.contractAddress, tokenId = _ref87.tokenId, offerId = _ref87.offerId;
2532
- _context44.prev = 1;
2533
- _context44.next = 4;
2557
+ tenantId = _ref85.tenantId, marketplaceParams = _ref85.marketplaceParams, contractAddress = _ref85.contractAddress, tokenId = _ref85.tokenId, offerId = _ref85.offerId;
2558
+ _context42.prev = 1;
2559
+ _context42.next = 2;
2534
2560
  return this.MintingStatus({
2535
2561
  marketplaceParams: marketplaceParams,
2536
2562
  tenantId: tenantId
2537
2563
  });
2538
- case 4:
2539
- statuses = _context44.sent;
2564
+ case 2:
2565
+ statuses = _context42.sent;
2540
2566
  contractAddress = Utils.FormatAddress(contractAddress);
2541
- return _context44.abrupt("return", statuses.find(function (status) {
2567
+ return _context42.abrupt("return", statuses.find(function (status) {
2542
2568
  return status.op === "nft-offer-redeem" && Utils.EqualAddress(status.address, contractAddress) && status.tokenId === (tokenId || "").toString() && status.offerId === (offerId || "").toString();
2543
2569
  }) || {
2544
2570
  status: "none"
2545
2571
  });
2546
- case 9:
2547
- _context44.prev = 9;
2548
- _context44.t0 = _context44["catch"](1);
2549
- this.Log(_context44.t0, true);
2550
- return _context44.abrupt("return", {
2572
+ case 3:
2573
+ _context42.prev = 3;
2574
+ _t57 = _context42["catch"](1);
2575
+ this.Log(_t57, true);
2576
+ return _context42.abrupt("return", {
2551
2577
  status: "unknown"
2552
2578
  });
2553
- case 13:
2579
+ case 4:
2554
2580
  case "end":
2555
- return _context44.stop();
2581
+ return _context42.stop();
2556
2582
  }
2557
- }, _callee44, this, [[1, 9]]);
2583
+ }, _callee42, this, [[1, 3]]);
2558
2584
  }));
2559
- return function (_x30) {
2560
- return _ref88.apply(this, arguments);
2585
+ return function (_x28) {
2586
+ return _ref86.apply(this, arguments);
2561
2587
  };
2562
2588
  }();
2563
2589
  exports.RedeemableCustomFulfillmentInfo = /*#__PURE__*/function () {
2564
- var _ref90 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(_ref89) {
2590
+ var _ref88 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee43(_ref87) {
2565
2591
  var redeemableTransactionId;
2566
- return _regeneratorRuntime.wrap(function _callee45$(_context45) {
2567
- while (1) switch (_context45.prev = _context45.next) {
2592
+ return _regeneratorRuntime.wrap(function (_context43) {
2593
+ while (1) switch (_context43.prev = _context43.next) {
2568
2594
  case 0:
2569
- redeemableTransactionId = _ref89.redeemableTransactionId;
2570
- _context45.next = 3;
2595
+ redeemableTransactionId = _ref87.redeemableTransactionId;
2596
+ _context43.next = 1;
2571
2597
  return Utils.ResponseToJson(this.stateStoreClient.Request({
2572
2598
  method: "GET",
2573
2599
  path: UrlJoin("code-fulfillment", this.network === "main" ? "main" : "demov3", "fulfill", redeemableTransactionId),
@@ -2575,29 +2601,29 @@ exports.RedeemableCustomFulfillmentInfo = /*#__PURE__*/function () {
2575
2601
  Authorization: "Bearer ".concat(this.AuthToken())
2576
2602
  }
2577
2603
  }));
2578
- case 3:
2579
- return _context45.abrupt("return", _context45.sent);
2580
- case 4:
2604
+ case 1:
2605
+ return _context43.abrupt("return", _context43.sent);
2606
+ case 2:
2581
2607
  case "end":
2582
- return _context45.stop();
2608
+ return _context43.stop();
2583
2609
  }
2584
- }, _callee45, this);
2610
+ }, _callee43, this);
2585
2611
  }));
2586
- return function (_x31) {
2587
- return _ref90.apply(this, arguments);
2612
+ return function (_x29) {
2613
+ return _ref88.apply(this, arguments);
2588
2614
  };
2589
2615
  }();
2590
2616
 
2591
2617
  /* EVENTS */
2592
2618
 
2593
2619
  exports.LoadDrop = /*#__PURE__*/function () {
2594
- var _ref92 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(_ref91) {
2620
+ var _ref90 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee44(_ref89) {
2595
2621
  var _this = this;
2596
- var tenantSlug, eventSlug, dropId, event, eventId;
2597
- return _regeneratorRuntime.wrap(function _callee46$(_context46) {
2598
- while (1) switch (_context46.prev = _context46.next) {
2622
+ var tenantSlug, eventSlug, dropId, event, eventId, _t58;
2623
+ return _regeneratorRuntime.wrap(function (_context44) {
2624
+ while (1) switch (_context44.prev = _context44.next) {
2599
2625
  case 0:
2600
- tenantSlug = _ref91.tenantSlug, eventSlug = _ref91.eventSlug, dropId = _ref91.dropId;
2626
+ tenantSlug = _ref89.tenantSlug, eventSlug = _ref89.eventSlug, dropId = _ref89.dropId;
2601
2627
  if (!this.drops) {
2602
2628
  this.drops = {};
2603
2629
  }
@@ -2608,10 +2634,10 @@ exports.LoadDrop = /*#__PURE__*/function () {
2608
2634
  this.drops[tenantSlug][eventSlug] = {};
2609
2635
  }
2610
2636
  if (this.drops[tenantSlug][eventSlug][dropId]) {
2611
- _context46.next = 13;
2637
+ _context44.next = 3;
2612
2638
  break;
2613
2639
  }
2614
- _context46.next = 7;
2640
+ _context44.next = 1;
2615
2641
  return this.client.ContentObjectMetadata({
2616
2642
  libraryId: this.mainSiteLibraryId,
2617
2643
  objectId: this.mainSiteId,
@@ -2623,15 +2649,15 @@ exports.LoadDrop = /*#__PURE__*/function () {
2623
2649
  select: [".", "drops"],
2624
2650
  noAuth: true
2625
2651
  });
2626
- case 7:
2627
- _context46.t0 = _context46.sent;
2628
- if (_context46.t0) {
2629
- _context46.next = 10;
2652
+ case 1:
2653
+ _t58 = _context44.sent;
2654
+ if (_t58) {
2655
+ _context44.next = 2;
2630
2656
  break;
2631
2657
  }
2632
- _context46.t0 = [];
2633
- case 10:
2634
- event = _context46.t0;
2658
+ _t58 = [];
2659
+ case 2:
2660
+ event = _t58;
2635
2661
  eventId = Utils.DecodeVersionHash(event["."].source).objectId;
2636
2662
  event.drops.forEach(function (drop) {
2637
2663
  drop = _objectSpread(_objectSpread({}, drop), {}, {
@@ -2640,32 +2666,32 @@ exports.LoadDrop = /*#__PURE__*/function () {
2640
2666
  _this.drops[tenantSlug][eventSlug][drop.uuid] = drop;
2641
2667
  _this.drops[drop.uuid] = drop;
2642
2668
  });
2643
- case 13:
2644
- return _context46.abrupt("return", this.drops[dropId]);
2645
- case 14:
2669
+ case 3:
2670
+ return _context44.abrupt("return", this.drops[dropId]);
2671
+ case 4:
2646
2672
  case "end":
2647
- return _context46.stop();
2673
+ return _context44.stop();
2648
2674
  }
2649
- }, _callee46, this);
2675
+ }, _callee44, this);
2650
2676
  }));
2651
- return function (_x32) {
2652
- return _ref92.apply(this, arguments);
2677
+ return function (_x30) {
2678
+ return _ref90.apply(this, arguments);
2653
2679
  };
2654
2680
  }();
2655
2681
  exports.SubmitDropVote = /*#__PURE__*/function () {
2656
- var _ref94 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(_ref93) {
2682
+ var _ref92 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee45(_ref91) {
2657
2683
  var marketplaceParams, eventId, dropId, sku, marketplaceInfo;
2658
- return _regeneratorRuntime.wrap(function _callee47$(_context47) {
2659
- while (1) switch (_context47.prev = _context47.next) {
2684
+ return _regeneratorRuntime.wrap(function (_context45) {
2685
+ while (1) switch (_context45.prev = _context45.next) {
2660
2686
  case 0:
2661
- marketplaceParams = _ref93.marketplaceParams, eventId = _ref93.eventId, dropId = _ref93.dropId, sku = _ref93.sku;
2662
- _context47.next = 3;
2687
+ marketplaceParams = _ref91.marketplaceParams, eventId = _ref91.eventId, dropId = _ref91.dropId, sku = _ref91.sku;
2688
+ _context45.next = 1;
2663
2689
  return this.MarketplaceInfo({
2664
2690
  marketplaceParams: marketplaceParams
2665
2691
  });
2666
- case 3:
2667
- marketplaceInfo = _context47.sent;
2668
- _context47.next = 6;
2692
+ case 1:
2693
+ marketplaceInfo = _context45.sent;
2694
+ _context45.next = 2;
2669
2695
  return this.client.authClient.MakeAuthServiceRequest({
2670
2696
  path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
2671
2697
  method: "POST",
@@ -2679,25 +2705,25 @@ exports.SubmitDropVote = /*#__PURE__*/function () {
2679
2705
  Authorization: "Bearer ".concat(this.AuthToken())
2680
2706
  }
2681
2707
  });
2682
- case 6:
2708
+ case 2:
2683
2709
  case "end":
2684
- return _context47.stop();
2710
+ return _context45.stop();
2685
2711
  }
2686
- }, _callee47, this);
2712
+ }, _callee45, this);
2687
2713
  }));
2688
- return function (_x33) {
2689
- return _ref94.apply(this, arguments);
2714
+ return function (_x31) {
2715
+ return _ref92.apply(this, arguments);
2690
2716
  };
2691
2717
  }();
2692
2718
  exports.DropStatus = /*#__PURE__*/function () {
2693
- var _ref96 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(_ref95) {
2694
- var marketplace, eventId, dropId, response;
2695
- return _regeneratorRuntime.wrap(function _callee48$(_context48) {
2696
- while (1) switch (_context48.prev = _context48.next) {
2719
+ var _ref94 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee46(_ref93) {
2720
+ var marketplace, eventId, dropId, response, _t59;
2721
+ return _regeneratorRuntime.wrap(function (_context46) {
2722
+ while (1) switch (_context46.prev = _context46.next) {
2697
2723
  case 0:
2698
- marketplace = _ref95.marketplace, eventId = _ref95.eventId, dropId = _ref95.dropId;
2699
- _context48.prev = 1;
2700
- _context48.next = 4;
2724
+ marketplace = _ref93.marketplace, eventId = _ref93.eventId, dropId = _ref93.dropId;
2725
+ _context46.prev = 1;
2726
+ _context46.next = 2;
2701
2727
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2702
2728
  path: UrlJoin("as", "wlt", "act", marketplace.tenant_id, eventId, dropId),
2703
2729
  method: "GET",
@@ -2705,26 +2731,26 @@ exports.DropStatus = /*#__PURE__*/function () {
2705
2731
  Authorization: "Bearer ".concat(this.AuthToken())
2706
2732
  }
2707
2733
  }));
2708
- case 4:
2709
- response = _context48.sent;
2710
- return _context48.abrupt("return", response.sort(function (a, b) {
2734
+ case 2:
2735
+ response = _context46.sent;
2736
+ return _context46.abrupt("return", response.sort(function (a, b) {
2711
2737
  return a.ts > b.ts ? 1 : -1;
2712
2738
  })[0] || {
2713
2739
  status: "none"
2714
2740
  });
2715
- case 8:
2716
- _context48.prev = 8;
2717
- _context48.t0 = _context48["catch"](1);
2718
- this.Log(_context48.t0, true);
2719
- return _context48.abrupt("return", "");
2720
- case 12:
2741
+ case 3:
2742
+ _context46.prev = 3;
2743
+ _t59 = _context46["catch"](1);
2744
+ this.Log(_t59, true);
2745
+ return _context46.abrupt("return", "");
2746
+ case 4:
2721
2747
  case "end":
2722
- return _context48.stop();
2748
+ return _context46.stop();
2723
2749
  }
2724
- }, _callee48, this, [[1, 8]]);
2750
+ }, _callee46, this, [[1, 3]]);
2725
2751
  }));
2726
- return function (_x34) {
2727
- return _ref96.apply(this, arguments);
2752
+ return function (_x32) {
2753
+ return _ref94.apply(this, arguments);
2728
2754
  };
2729
2755
  }();
2730
2756
 
@@ -2746,12 +2772,12 @@ exports.DropStatus = /*#__PURE__*/function () {
2746
2772
  * @returns {Promise<Array<Object>>} - Offers matching the specified filters
2747
2773
  */
2748
2774
  exports.MarketplaceOffers = /*#__PURE__*/function () {
2749
- var _ref98 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(_ref97) {
2750
- var contractAddress, tokenId, buyerAddress, sellerAddress, statuses, _ref97$start, start, _ref97$limit, limit, path, queryParams, offers;
2751
- return _regeneratorRuntime.wrap(function _callee49$(_context49) {
2752
- while (1) switch (_context49.prev = _context49.next) {
2775
+ var _ref96 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee47(_ref95) {
2776
+ var contractAddress, tokenId, buyerAddress, sellerAddress, statuses, _ref95$start, start, _ref95$limit, limit, path, queryParams, offers;
2777
+ return _regeneratorRuntime.wrap(function (_context47) {
2778
+ while (1) switch (_context47.prev = _context47.next) {
2753
2779
  case 0:
2754
- contractAddress = _ref97.contractAddress, tokenId = _ref97.tokenId, buyerAddress = _ref97.buyerAddress, sellerAddress = _ref97.sellerAddress, statuses = _ref97.statuses, _ref97$start = _ref97.start, start = _ref97$start === void 0 ? 0 : _ref97$start, _ref97$limit = _ref97.limit, limit = _ref97$limit === void 0 ? 10 : _ref97$limit;
2780
+ contractAddress = _ref95.contractAddress, tokenId = _ref95.tokenId, buyerAddress = _ref95.buyerAddress, sellerAddress = _ref95.sellerAddress, statuses = _ref95.statuses, _ref95$start = _ref95.start, start = _ref95$start === void 0 ? 0 : _ref95$start, _ref95$limit = _ref95.limit, limit = _ref95$limit === void 0 ? 10 : _ref95$limit;
2755
2781
  path = UrlJoin("as", "mkt", "offers", "ls");
2756
2782
  if (buyerAddress) {
2757
2783
  path = UrlJoin(path, "b", Utils.FormatAddress(buyerAddress));
@@ -2771,29 +2797,29 @@ exports.MarketplaceOffers = /*#__PURE__*/function () {
2771
2797
  if (statuses && statuses.length > 0) {
2772
2798
  queryParams.include = statuses.join(",");
2773
2799
  }
2774
- _context49.next = 8;
2800
+ _context47.next = 1;
2775
2801
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2776
2802
  path: path,
2777
2803
  method: "GET",
2778
2804
  queryParams: queryParams
2779
2805
  }));
2780
- case 8:
2781
- offers = _context49.sent;
2782
- return _context49.abrupt("return", offers.map(function (offer) {
2806
+ case 1:
2807
+ offers = _context47.sent;
2808
+ return _context47.abrupt("return", offers.map(function (offer) {
2783
2809
  return _objectSpread(_objectSpread({}, offer), {}, {
2784
2810
  created: offer.created * 1000,
2785
2811
  updated: offer.updated * 1000,
2786
2812
  expiration: offer.expiration * 1000
2787
2813
  });
2788
2814
  }));
2789
- case 10:
2815
+ case 2:
2790
2816
  case "end":
2791
- return _context49.stop();
2817
+ return _context47.stop();
2792
2818
  }
2793
- }, _callee49, this);
2819
+ }, _callee47, this);
2794
2820
  }));
2795
- return function (_x35) {
2796
- return _ref98.apply(this, arguments);
2821
+ return function (_x33) {
2822
+ return _ref96.apply(this, arguments);
2797
2823
  };
2798
2824
  }();
2799
2825
 
@@ -2813,17 +2839,17 @@ exports.MarketplaceOffers = /*#__PURE__*/function () {
2813
2839
  * @returns {Promise<Object>} - Info about the created/updated offer
2814
2840
  */
2815
2841
  exports.CreateMarketplaceOffer = /*#__PURE__*/function () {
2816
- var _ref100 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(_ref99) {
2842
+ var _ref98 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee48(_ref97) {
2817
2843
  var contractAddress, tokenId, offerId, price, expiresAt, response;
2818
- return _regeneratorRuntime.wrap(function _callee50$(_context50) {
2819
- while (1) switch (_context50.prev = _context50.next) {
2844
+ return _regeneratorRuntime.wrap(function (_context48) {
2845
+ while (1) switch (_context48.prev = _context48.next) {
2820
2846
  case 0:
2821
- contractAddress = _ref99.contractAddress, tokenId = _ref99.tokenId, offerId = _ref99.offerId, price = _ref99.price, expiresAt = _ref99.expiresAt;
2847
+ contractAddress = _ref97.contractAddress, tokenId = _ref97.tokenId, offerId = _ref97.offerId, price = _ref97.price, expiresAt = _ref97.expiresAt;
2822
2848
  if (!offerId) {
2823
- _context50.next = 7;
2849
+ _context48.next = 2;
2824
2850
  break;
2825
2851
  }
2826
- _context50.next = 4;
2852
+ _context48.next = 1;
2827
2853
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2828
2854
  path: UrlJoin("as", "wlt", "mkt", "offers", offerId),
2829
2855
  method: "PUT",
@@ -2835,12 +2861,12 @@ exports.CreateMarketplaceOffer = /*#__PURE__*/function () {
2835
2861
  Authorization: "Bearer ".concat(this.AuthToken())
2836
2862
  }
2837
2863
  }));
2838
- case 4:
2839
- response = _context50.sent;
2840
- _context50.next = 10;
2864
+ case 1:
2865
+ response = _context48.sent;
2866
+ _context48.next = 4;
2841
2867
  break;
2842
- case 7:
2843
- _context50.next = 9;
2868
+ case 2:
2869
+ _context48.next = 3;
2844
2870
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2845
2871
  path: UrlJoin("as", "wlt", "mkt", "offers", contractAddress, tokenId),
2846
2872
  method: "POST",
@@ -2854,18 +2880,18 @@ exports.CreateMarketplaceOffer = /*#__PURE__*/function () {
2854
2880
  Authorization: "Bearer ".concat(this.AuthToken())
2855
2881
  }
2856
2882
  }));
2857
- case 9:
2858
- response = _context50.sent;
2859
- case 10:
2860
- return _context50.abrupt("return", response.offer_id);
2861
- case 11:
2883
+ case 3:
2884
+ response = _context48.sent;
2885
+ case 4:
2886
+ return _context48.abrupt("return", response.offer_id);
2887
+ case 5:
2862
2888
  case "end":
2863
- return _context50.stop();
2889
+ return _context48.stop();
2864
2890
  }
2865
- }, _callee50, this);
2891
+ }, _callee48, this);
2866
2892
  }));
2867
- return function (_x36) {
2868
- return _ref100.apply(this, arguments);
2893
+ return function (_x34) {
2894
+ return _ref98.apply(this, arguments);
2869
2895
  };
2870
2896
  }();
2871
2897
 
@@ -2879,13 +2905,13 @@ exports.CreateMarketplaceOffer = /*#__PURE__*/function () {
2879
2905
  * @param {string} offerId - The ID of the offer
2880
2906
  */
2881
2907
  exports.RemoveMarketplaceOffer = /*#__PURE__*/function () {
2882
- var _ref102 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(_ref101) {
2908
+ var _ref100 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee49(_ref99) {
2883
2909
  var offerId;
2884
- return _regeneratorRuntime.wrap(function _callee51$(_context51) {
2885
- while (1) switch (_context51.prev = _context51.next) {
2910
+ return _regeneratorRuntime.wrap(function (_context49) {
2911
+ while (1) switch (_context49.prev = _context49.next) {
2886
2912
  case 0:
2887
- offerId = _ref101.offerId;
2888
- _context51.next = 3;
2913
+ offerId = _ref99.offerId;
2914
+ _context49.next = 1;
2889
2915
  return this.client.authClient.MakeAuthServiceRequest({
2890
2916
  path: UrlJoin("as", "wlt", "mkt", "offers", offerId),
2891
2917
  method: "DELETE",
@@ -2893,16 +2919,16 @@ exports.RemoveMarketplaceOffer = /*#__PURE__*/function () {
2893
2919
  Authorization: "Bearer ".concat(this.AuthToken())
2894
2920
  }
2895
2921
  });
2896
- case 3:
2897
- return _context51.abrupt("return", _context51.sent);
2898
- case 4:
2922
+ case 1:
2923
+ return _context49.abrupt("return", _context49.sent);
2924
+ case 2:
2899
2925
  case "end":
2900
- return _context51.stop();
2926
+ return _context49.stop();
2901
2927
  }
2902
- }, _callee51, this);
2928
+ }, _callee49, this);
2903
2929
  }));
2904
- return function (_x37) {
2905
- return _ref102.apply(this, arguments);
2930
+ return function (_x35) {
2931
+ return _ref100.apply(this, arguments);
2906
2932
  };
2907
2933
  }();
2908
2934
 
@@ -2916,13 +2942,13 @@ exports.RemoveMarketplaceOffer = /*#__PURE__*/function () {
2916
2942
  * @param {string} offerId - The ID of the offer
2917
2943
  */
2918
2944
  exports.AcceptMarketplaceOffer = /*#__PURE__*/function () {
2919
- var _ref104 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(_ref103) {
2945
+ var _ref102 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee50(_ref101) {
2920
2946
  var offerId;
2921
- return _regeneratorRuntime.wrap(function _callee52$(_context52) {
2922
- while (1) switch (_context52.prev = _context52.next) {
2947
+ return _regeneratorRuntime.wrap(function (_context50) {
2948
+ while (1) switch (_context50.prev = _context50.next) {
2923
2949
  case 0:
2924
- offerId = _ref103.offerId;
2925
- _context52.next = 3;
2950
+ offerId = _ref101.offerId;
2951
+ _context50.next = 1;
2926
2952
  return this.client.authClient.MakeAuthServiceRequest({
2927
2953
  path: UrlJoin("as", "wlt", "mkt", "offers", "accept", offerId),
2928
2954
  method: "PUT",
@@ -2930,16 +2956,16 @@ exports.AcceptMarketplaceOffer = /*#__PURE__*/function () {
2930
2956
  Authorization: "Bearer ".concat(this.AuthToken())
2931
2957
  }
2932
2958
  });
2933
- case 3:
2934
- return _context52.abrupt("return", _context52.sent);
2935
- case 4:
2959
+ case 1:
2960
+ return _context50.abrupt("return", _context50.sent);
2961
+ case 2:
2936
2962
  case "end":
2937
- return _context52.stop();
2963
+ return _context50.stop();
2938
2964
  }
2939
- }, _callee52, this);
2965
+ }, _callee50, this);
2940
2966
  }));
2941
- return function (_x38) {
2942
- return _ref104.apply(this, arguments);
2967
+ return function (_x36) {
2968
+ return _ref102.apply(this, arguments);
2943
2969
  };
2944
2970
  }();
2945
2971
 
@@ -2953,13 +2979,13 @@ exports.AcceptMarketplaceOffer = /*#__PURE__*/function () {
2953
2979
  * @param {string} offerId - The ID of the offer
2954
2980
  */
2955
2981
  exports.RejectMarketplaceOffer = /*#__PURE__*/function () {
2956
- var _ref106 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(_ref105) {
2982
+ var _ref104 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee51(_ref103) {
2957
2983
  var offerId;
2958
- return _regeneratorRuntime.wrap(function _callee53$(_context53) {
2959
- while (1) switch (_context53.prev = _context53.next) {
2984
+ return _regeneratorRuntime.wrap(function (_context51) {
2985
+ while (1) switch (_context51.prev = _context51.next) {
2960
2986
  case 0:
2961
- offerId = _ref105.offerId;
2962
- _context53.next = 3;
2987
+ offerId = _ref103.offerId;
2988
+ _context51.next = 1;
2963
2989
  return this.client.authClient.MakeAuthServiceRequest({
2964
2990
  path: UrlJoin("as", "wlt", "mkt", "offers", "decline", offerId),
2965
2991
  method: "PUT",
@@ -2967,16 +2993,16 @@ exports.RejectMarketplaceOffer = /*#__PURE__*/function () {
2967
2993
  Authorization: "Bearer ".concat(this.AuthToken())
2968
2994
  }
2969
2995
  });
2970
- case 3:
2971
- return _context53.abrupt("return", _context53.sent);
2972
- case 4:
2996
+ case 1:
2997
+ return _context51.abrupt("return", _context51.sent);
2998
+ case 2:
2973
2999
  case "end":
2974
- return _context53.stop();
3000
+ return _context51.stop();
2975
3001
  }
2976
- }, _callee53, this);
3002
+ }, _callee51, this);
2977
3003
  }));
2978
- return function (_x39) {
2979
- return _ref106.apply(this, arguments);
3004
+ return function (_x37) {
3005
+ return _ref104.apply(this, arguments);
2980
3006
  };
2981
3007
  }();
2982
3008
 
@@ -2993,29 +3019,29 @@ exports.RejectMarketplaceOffer = /*#__PURE__*/function () {
2993
3019
  * @returns {Promise<Object>} - Info about the voting event, including the current user's votes and the current total voting tally
2994
3020
  */
2995
3021
  exports.VoteStatus = /*#__PURE__*/function () {
2996
- var _ref108 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(_ref107) {
3022
+ var _ref106 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee52(_ref105) {
2997
3023
  var tenantId, votingEventId;
2998
- return _regeneratorRuntime.wrap(function _callee54$(_context54) {
2999
- while (1) switch (_context54.prev = _context54.next) {
3024
+ return _regeneratorRuntime.wrap(function (_context52) {
3025
+ while (1) switch (_context52.prev = _context52.next) {
3000
3026
  case 0:
3001
- tenantId = _ref107.tenantId, votingEventId = _ref107.votingEventId;
3002
- _context54.next = 3;
3027
+ tenantId = _ref105.tenantId, votingEventId = _ref105.votingEventId;
3028
+ _context52.next = 1;
3003
3029
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
3004
3030
  path: UrlJoin("as", "votes", tenantId, votingEventId),
3005
3031
  headers: {
3006
3032
  Authorization: "Bearer ".concat(this.AuthToken())
3007
3033
  }
3008
3034
  }));
3009
- case 3:
3010
- return _context54.abrupt("return", _context54.sent);
3011
- case 4:
3035
+ case 1:
3036
+ return _context52.abrupt("return", _context52.sent);
3037
+ case 2:
3012
3038
  case "end":
3013
- return _context54.stop();
3039
+ return _context52.stop();
3014
3040
  }
3015
- }, _callee54, this);
3041
+ }, _callee52, this);
3016
3042
  }));
3017
- return function (_x40) {
3018
- return _ref108.apply(this, arguments);
3043
+ return function (_x38) {
3044
+ return _ref106.apply(this, arguments);
3019
3045
  };
3020
3046
  }();
3021
3047
 
@@ -3033,13 +3059,13 @@ exports.VoteStatus = /*#__PURE__*/function () {
3033
3059
  * @returns {Promise<Object>} - Info about the voting event, including the current user's votes and the current total voting tally
3034
3060
  */
3035
3061
  exports.CastVote = /*#__PURE__*/function () {
3036
- var _ref110 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(_ref109) {
3062
+ var _ref108 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee53(_ref107) {
3037
3063
  var tenantId, votingEventId, sku;
3038
- return _regeneratorRuntime.wrap(function _callee55$(_context55) {
3039
- while (1) switch (_context55.prev = _context55.next) {
3064
+ return _regeneratorRuntime.wrap(function (_context53) {
3065
+ while (1) switch (_context53.prev = _context53.next) {
3040
3066
  case 0:
3041
- tenantId = _ref109.tenantId, votingEventId = _ref109.votingEventId, sku = _ref109.sku;
3042
- _context55.next = 3;
3067
+ tenantId = _ref107.tenantId, votingEventId = _ref107.votingEventId, sku = _ref107.sku;
3068
+ _context53.next = 1;
3043
3069
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
3044
3070
  path: UrlJoin("as", "votes", tenantId, votingEventId, sku),
3045
3071
  method: "POST",
@@ -3047,16 +3073,16 @@ exports.CastVote = /*#__PURE__*/function () {
3047
3073
  Authorization: "Bearer ".concat(this.AuthToken())
3048
3074
  }
3049
3075
  }));
3050
- case 3:
3051
- return _context55.abrupt("return", _context55.sent);
3052
- case 4:
3076
+ case 1:
3077
+ return _context53.abrupt("return", _context53.sent);
3078
+ case 2:
3053
3079
  case "end":
3054
- return _context55.stop();
3080
+ return _context53.stop();
3055
3081
  }
3056
- }, _callee55, this);
3082
+ }, _callee53, this);
3057
3083
  }));
3058
- return function (_x41) {
3059
- return _ref110.apply(this, arguments);
3084
+ return function (_x39) {
3085
+ return _ref108.apply(this, arguments);
3060
3086
  };
3061
3087
  }();
3062
3088
 
@@ -3074,13 +3100,13 @@ exports.CastVote = /*#__PURE__*/function () {
3074
3100
  * @returns {Promise<Object>} - Info about the voting event, including the current user's votes and the current total voting tally
3075
3101
  */
3076
3102
  exports.RevokeVote = /*#__PURE__*/function () {
3077
- var _ref112 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(_ref111) {
3103
+ var _ref110 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee54(_ref109) {
3078
3104
  var tenantId, votingEventId, sku;
3079
- return _regeneratorRuntime.wrap(function _callee56$(_context56) {
3080
- while (1) switch (_context56.prev = _context56.next) {
3105
+ return _regeneratorRuntime.wrap(function (_context54) {
3106
+ while (1) switch (_context54.prev = _context54.next) {
3081
3107
  case 0:
3082
- tenantId = _ref111.tenantId, votingEventId = _ref111.votingEventId, sku = _ref111.sku;
3083
- _context56.next = 3;
3108
+ tenantId = _ref109.tenantId, votingEventId = _ref109.votingEventId, sku = _ref109.sku;
3109
+ _context54.next = 1;
3084
3110
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
3085
3111
  path: UrlJoin("as", "votes", tenantId, votingEventId, sku),
3086
3112
  method: "DELETE",
@@ -3088,15 +3114,15 @@ exports.RevokeVote = /*#__PURE__*/function () {
3088
3114
  Authorization: "Bearer ".concat(this.AuthToken())
3089
3115
  }
3090
3116
  }));
3091
- case 3:
3092
- return _context56.abrupt("return", _context56.sent);
3093
- case 4:
3117
+ case 1:
3118
+ return _context54.abrupt("return", _context54.sent);
3119
+ case 2:
3094
3120
  case "end":
3095
- return _context56.stop();
3121
+ return _context54.stop();
3096
3122
  }
3097
- }, _callee56, this);
3123
+ }, _callee54, this);
3098
3124
  }));
3099
- return function (_x42) {
3100
- return _ref112.apply(this, arguments);
3125
+ return function (_x40) {
3126
+ return _ref110.apply(this, arguments);
3101
3127
  };
3102
3128
  }();