@eluvio/elv-client-js 4.2.9 → 4.2.11

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