@eluvio/elv-client-js 4.0.78 → 4.0.80

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 +13 -14
  2. package/dist/ElvClient-node-min.js +13 -14
  3. package/dist/ElvFrameClient-min.js +9 -9
  4. package/dist/ElvPermissionsClient-min.js +10 -10
  5. package/dist/ElvWalletClient-min.js +13 -14
  6. package/dist/ElvWalletClient-node-min.js +13 -14
  7. package/dist/src/AuthorizationClient.js +5 -4
  8. package/dist/src/Crypto.js +2 -2
  9. package/dist/src/ElvClient.js +254 -162
  10. package/dist/src/EthClient.js +2 -2
  11. package/dist/src/FrameClient.js +3 -3
  12. package/dist/src/HttpClient.js +15 -7
  13. package/dist/src/PermissionsClient.js +2 -2
  14. package/dist/src/UserProfileClient.js +36 -71
  15. package/dist/src/Utils.js +2 -2
  16. package/dist/src/client/ABRPublishing.js +2 -2
  17. package/dist/src/client/AccessGroups.js +41 -37
  18. package/dist/src/client/ContentAccess.js +3 -3
  19. package/dist/src/client/ContentManagement.js +103 -43
  20. package/dist/src/client/Contracts.js +270 -6
  21. package/dist/src/client/Files.js +2 -2
  22. package/dist/src/client/LiveStream.js +239 -210
  23. package/dist/src/client/NFT.js +2 -2
  24. package/dist/src/walletClient/ClientMethods.js +283 -189
  25. package/dist/src/walletClient/Profile.js +2 -2
  26. package/dist/src/walletClient/Utils.js +2 -2
  27. package/dist/src/walletClient/index.js +17 -2
  28. package/package.json +1 -1
  29. package/src/ElvClient.js +65 -0
  30. package/src/FrameClient.js +2 -1
  31. package/src/HttpClient.js +6 -0
  32. package/src/UserProfileClient.js +9 -38
  33. package/src/client/AccessGroups.js +19 -24
  34. package/src/client/ContentAccess.js +1 -1
  35. package/src/client/ContentManagement.js +44 -22
  36. package/src/client/Contracts.js +157 -2
  37. package/src/client/LiveStream.js +146 -128
  38. package/src/walletClient/ClientMethods.js +48 -0
  39. package/src/walletClient/index.js +12 -0
  40. package/testScripts/CreateAndDecodeSignedMessage.js +51 -0
  41. package/testScripts/TestAddTenantContractId.js +87 -0
  42. package/utilities/GenerateFabricToken.js +4 -1
@@ -1,8 +1,8 @@
1
1
  var _defineProperty = require("@babel/runtime/helpers/defineProperty");
2
2
  var _regeneratorRuntime = require("@babel/runtime/regenerator");
3
3
  var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
4
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
  var Utils = require("../Utils");
7
7
  var UrlJoin = require("url-join");
8
8
  var _require = require("./Utils"),
@@ -2316,52 +2316,93 @@ exports.GiftClaimStatus = /*#__PURE__*/function () {
2316
2316
  }();
2317
2317
 
2318
2318
  /**
2319
- * Return status of the specified pack opening
2319
+ * Return status of the specified entitlement claim
2320
2320
  *
2321
2321
  * @methodGroup Status
2322
2322
  * @namedParams
2323
- * @param {string} contractAddress - The NFT contract address of the opened pack
2324
- * @param {string} tokenId - The token ID of the opened pack
2323
+ * @param {Object} marketplaceParams - Parameters of the marketplace
2324
+ * @param {string} purchaseId - The purchase ID of the entitlement, for confirmation of status
2325
2325
  *
2326
- * @returns {Promise<Object>} - The status of the pack opening
2326
+ * @returns {Promise<Object>} - The mint status of the entitlement claim
2327
2327
  */
2328
- exports.PackOpenStatus = /*#__PURE__*/function () {
2328
+ exports.EntitlementClaimStatus = /*#__PURE__*/function () {
2329
2329
  var _ref82 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(_ref81) {
2330
- var contractAddress, tokenId, tenantConfig, statuses;
2330
+ var marketplaceParams, purchaseId, marketplaceInfo, statuses, responses;
2331
2331
  return _regeneratorRuntime.wrap(function _callee41$(_context41) {
2332
2332
  while (1) switch (_context41.prev = _context41.next) {
2333
2333
  case 0:
2334
- contractAddress = _ref81.contractAddress, tokenId = _ref81.tokenId;
2334
+ marketplaceParams = _ref81.marketplaceParams, purchaseId = _ref81.purchaseId;
2335
2335
  _context41.prev = 1;
2336
2336
  _context41.next = 4;
2337
- return this.TenantConfiguration({
2338
- contractAddress: contractAddress
2337
+ return this.MarketplaceInfo({
2338
+ marketplaceParams: marketplaceParams
2339
2339
  });
2340
2340
  case 4:
2341
- tenantConfig = _context41.sent;
2341
+ marketplaceInfo = _context41.sent;
2342
2342
  _context41.next = 7;
2343
2343
  return this.MintingStatus({
2344
- tenantId: tenantConfig.tenant
2344
+ tenantId: marketplaceInfo.tenantId
2345
2345
  });
2346
2346
  case 7:
2347
2347
  statuses = _context41.sent;
2348
- return _context41.abrupt("return", statuses.find(function (status) {
2349
- return status.op === "nft-open" && Utils.EqualAddress(contractAddress, status.address) && status.tokenId === tokenId;
2348
+ responses = statuses.filter(function (status) {
2349
+ return status.op === "nft-claim-entitlement" && purchaseId && purchaseId == status.confirmationId;
2350
2350
  }) || {
2351
2351
  status: "none"
2352
+ };
2353
+ if (!(responses.length === 0)) {
2354
+ _context41.next = 13;
2355
+ break;
2356
+ }
2357
+ return _context41.abrupt("return", {
2358
+ status: "none"
2352
2359
  });
2353
- case 11:
2354
- _context41.prev = 11;
2360
+ case 13:
2361
+ if (!responses.find(function (response) {
2362
+ return response.status === "complete";
2363
+ })) {
2364
+ _context41.next = 17;
2365
+ break;
2366
+ }
2367
+ return _context41.abrupt("return", {
2368
+ status: "complete",
2369
+ op: "nft-claim-entitlement",
2370
+ items: [{
2371
+ token_addr: responses[0].address,
2372
+ token_id: responses[0].tokenId
2373
+ }]
2374
+ });
2375
+ case 17:
2376
+ if (!responses.find(function (response) {
2377
+ return response.status === "error";
2378
+ })) {
2379
+ _context41.next = 21;
2380
+ break;
2381
+ }
2382
+ return _context41.abrupt("return", {
2383
+ status: "error",
2384
+ op: "nft-claim-entitlement"
2385
+ });
2386
+ case 21:
2387
+ return _context41.abrupt("return", {
2388
+ status: "pending",
2389
+ op: "nft-claim-entitlement"
2390
+ });
2391
+ case 22:
2392
+ _context41.next = 28;
2393
+ break;
2394
+ case 24:
2395
+ _context41.prev = 24;
2355
2396
  _context41.t0 = _context41["catch"](1);
2356
2397
  this.Log(_context41.t0, true);
2357
2398
  return _context41.abrupt("return", {
2358
2399
  status: "unknown"
2359
2400
  });
2360
- case 15:
2401
+ case 28:
2361
2402
  case "end":
2362
2403
  return _context41.stop();
2363
2404
  }
2364
- }, _callee41, this, [[1, 11]]);
2405
+ }, _callee41, this, [[1, 24]]);
2365
2406
  }));
2366
2407
  return function (_x27) {
2367
2408
  return _ref82.apply(this, arguments);
@@ -2369,52 +2410,105 @@ exports.PackOpenStatus = /*#__PURE__*/function () {
2369
2410
  }();
2370
2411
 
2371
2412
  /**
2372
- * Return status of the specified collection redemption
2413
+ * Return status of the specified pack opening
2373
2414
  *
2374
2415
  * @methodGroup Status
2375
2416
  * @namedParams
2376
- * @param {Object} marketplaceParams - Parameters of the marketplace
2377
- * @param {string} confirmationId - The confirmation ID of the redemption
2417
+ * @param {string} contractAddress - The NFT contract address of the opened pack
2418
+ * @param {string} tokenId - The token ID of the opened pack
2378
2419
  *
2379
- * @returns {Promise<Object>} - The status of the collection redemption
2420
+ * @returns {Promise<Object>} - The status of the pack opening
2380
2421
  */
2381
- exports.CollectionRedemptionStatus = /*#__PURE__*/function () {
2422
+ exports.PackOpenStatus = /*#__PURE__*/function () {
2382
2423
  var _ref84 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(_ref83) {
2383
- var marketplaceParams, confirmationId, statuses;
2424
+ var contractAddress, tokenId, tenantConfig, statuses;
2384
2425
  return _regeneratorRuntime.wrap(function _callee42$(_context42) {
2385
2426
  while (1) switch (_context42.prev = _context42.next) {
2386
2427
  case 0:
2387
- marketplaceParams = _ref83.marketplaceParams, confirmationId = _ref83.confirmationId;
2428
+ contractAddress = _ref83.contractAddress, tokenId = _ref83.tokenId;
2388
2429
  _context42.prev = 1;
2389
2430
  _context42.next = 4;
2390
- return this.MintingStatus({
2391
- marketplaceParams: marketplaceParams
2431
+ return this.TenantConfiguration({
2432
+ contractAddress: contractAddress
2392
2433
  });
2393
2434
  case 4:
2435
+ tenantConfig = _context42.sent;
2436
+ _context42.next = 7;
2437
+ return this.MintingStatus({
2438
+ tenantId: tenantConfig.tenant
2439
+ });
2440
+ case 7:
2394
2441
  statuses = _context42.sent;
2395
2442
  return _context42.abrupt("return", statuses.find(function (status) {
2396
- return status.op === "nft-redeem" && status.confirmationId === confirmationId;
2443
+ return status.op === "nft-open" && Utils.EqualAddress(contractAddress, status.address) && status.tokenId === tokenId;
2397
2444
  }) || {
2398
2445
  status: "none"
2399
2446
  });
2400
- case 8:
2401
- _context42.prev = 8;
2447
+ case 11:
2448
+ _context42.prev = 11;
2402
2449
  _context42.t0 = _context42["catch"](1);
2403
2450
  this.Log(_context42.t0, true);
2404
2451
  return _context42.abrupt("return", {
2405
2452
  status: "unknown"
2406
2453
  });
2407
- case 12:
2454
+ case 15:
2408
2455
  case "end":
2409
2456
  return _context42.stop();
2410
2457
  }
2411
- }, _callee42, this, [[1, 8]]);
2458
+ }, _callee42, this, [[1, 11]]);
2412
2459
  }));
2413
2460
  return function (_x28) {
2414
2461
  return _ref84.apply(this, arguments);
2415
2462
  };
2416
2463
  }();
2417
2464
 
2465
+ /**
2466
+ * Return status of the specified collection redemption
2467
+ *
2468
+ * @methodGroup Status
2469
+ * @namedParams
2470
+ * @param {Object} marketplaceParams - Parameters of the marketplace
2471
+ * @param {string} confirmationId - The confirmation ID of the redemption
2472
+ *
2473
+ * @returns {Promise<Object>} - The status of the collection redemption
2474
+ */
2475
+ exports.CollectionRedemptionStatus = /*#__PURE__*/function () {
2476
+ var _ref86 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(_ref85) {
2477
+ var marketplaceParams, confirmationId, statuses;
2478
+ return _regeneratorRuntime.wrap(function _callee43$(_context43) {
2479
+ while (1) switch (_context43.prev = _context43.next) {
2480
+ case 0:
2481
+ marketplaceParams = _ref85.marketplaceParams, confirmationId = _ref85.confirmationId;
2482
+ _context43.prev = 1;
2483
+ _context43.next = 4;
2484
+ return this.MintingStatus({
2485
+ marketplaceParams: marketplaceParams
2486
+ });
2487
+ case 4:
2488
+ statuses = _context43.sent;
2489
+ return _context43.abrupt("return", statuses.find(function (status) {
2490
+ return status.op === "nft-redeem" && status.confirmationId === confirmationId;
2491
+ }) || {
2492
+ status: "none"
2493
+ });
2494
+ case 8:
2495
+ _context43.prev = 8;
2496
+ _context43.t0 = _context43["catch"](1);
2497
+ this.Log(_context43.t0, true);
2498
+ return _context43.abrupt("return", {
2499
+ status: "unknown"
2500
+ });
2501
+ case 12:
2502
+ case "end":
2503
+ return _context43.stop();
2504
+ }
2505
+ }, _callee43, this, [[1, 8]]);
2506
+ }));
2507
+ return function (_x29) {
2508
+ return _ref86.apply(this, arguments);
2509
+ };
2510
+ }();
2511
+
2418
2512
  /**
2419
2513
  * Return status of the specified redeemable offer
2420
2514
  *
@@ -2429,51 +2523,51 @@ exports.CollectionRedemptionStatus = /*#__PURE__*/function () {
2429
2523
  * @returns {Promise<Object>} - The status of the offer redemption
2430
2524
  */
2431
2525
  exports.RedeemableOfferStatus = /*#__PURE__*/function () {
2432
- var _ref86 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(_ref85) {
2526
+ var _ref88 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(_ref87) {
2433
2527
  var tenantId, marketplaceParams, contractAddress, tokenId, offerId, statuses;
2434
- return _regeneratorRuntime.wrap(function _callee43$(_context43) {
2435
- while (1) switch (_context43.prev = _context43.next) {
2528
+ return _regeneratorRuntime.wrap(function _callee44$(_context44) {
2529
+ while (1) switch (_context44.prev = _context44.next) {
2436
2530
  case 0:
2437
- tenantId = _ref85.tenantId, marketplaceParams = _ref85.marketplaceParams, contractAddress = _ref85.contractAddress, tokenId = _ref85.tokenId, offerId = _ref85.offerId;
2438
- _context43.prev = 1;
2439
- _context43.next = 4;
2531
+ tenantId = _ref87.tenantId, marketplaceParams = _ref87.marketplaceParams, contractAddress = _ref87.contractAddress, tokenId = _ref87.tokenId, offerId = _ref87.offerId;
2532
+ _context44.prev = 1;
2533
+ _context44.next = 4;
2440
2534
  return this.MintingStatus({
2441
2535
  marketplaceParams: marketplaceParams,
2442
2536
  tenantId: tenantId
2443
2537
  });
2444
2538
  case 4:
2445
- statuses = _context43.sent;
2539
+ statuses = _context44.sent;
2446
2540
  contractAddress = Utils.FormatAddress(contractAddress);
2447
- return _context43.abrupt("return", statuses.find(function (status) {
2541
+ return _context44.abrupt("return", statuses.find(function (status) {
2448
2542
  return status.op === "nft-offer-redeem" && Utils.EqualAddress(status.address, contractAddress) && status.tokenId === (tokenId || "").toString() && status.offerId === (offerId || "").toString();
2449
2543
  }) || {
2450
2544
  status: "none"
2451
2545
  });
2452
2546
  case 9:
2453
- _context43.prev = 9;
2454
- _context43.t0 = _context43["catch"](1);
2455
- this.Log(_context43.t0, true);
2456
- return _context43.abrupt("return", {
2547
+ _context44.prev = 9;
2548
+ _context44.t0 = _context44["catch"](1);
2549
+ this.Log(_context44.t0, true);
2550
+ return _context44.abrupt("return", {
2457
2551
  status: "unknown"
2458
2552
  });
2459
2553
  case 13:
2460
2554
  case "end":
2461
- return _context43.stop();
2555
+ return _context44.stop();
2462
2556
  }
2463
- }, _callee43, this, [[1, 9]]);
2557
+ }, _callee44, this, [[1, 9]]);
2464
2558
  }));
2465
- return function (_x29) {
2466
- return _ref86.apply(this, arguments);
2559
+ return function (_x30) {
2560
+ return _ref88.apply(this, arguments);
2467
2561
  };
2468
2562
  }();
2469
2563
  exports.RedeemableCustomFulfillmentInfo = /*#__PURE__*/function () {
2470
- var _ref88 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(_ref87) {
2564
+ var _ref90 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(_ref89) {
2471
2565
  var redeemableTransactionId;
2472
- return _regeneratorRuntime.wrap(function _callee44$(_context44) {
2473
- while (1) switch (_context44.prev = _context44.next) {
2566
+ return _regeneratorRuntime.wrap(function _callee45$(_context45) {
2567
+ while (1) switch (_context45.prev = _context45.next) {
2474
2568
  case 0:
2475
- redeemableTransactionId = _ref87.redeemableTransactionId;
2476
- _context44.next = 3;
2569
+ redeemableTransactionId = _ref89.redeemableTransactionId;
2570
+ _context45.next = 3;
2477
2571
  return Utils.ResponseToJson(this.stateStoreClient.Request({
2478
2572
  method: "GET",
2479
2573
  path: UrlJoin("code-fulfillment", this.network === "main" ? "main" : "demov3", "fulfill", redeemableTransactionId),
@@ -2482,28 +2576,28 @@ exports.RedeemableCustomFulfillmentInfo = /*#__PURE__*/function () {
2482
2576
  }
2483
2577
  }));
2484
2578
  case 3:
2485
- return _context44.abrupt("return", _context44.sent);
2579
+ return _context45.abrupt("return", _context45.sent);
2486
2580
  case 4:
2487
2581
  case "end":
2488
- return _context44.stop();
2582
+ return _context45.stop();
2489
2583
  }
2490
- }, _callee44, this);
2584
+ }, _callee45, this);
2491
2585
  }));
2492
- return function (_x30) {
2493
- return _ref88.apply(this, arguments);
2586
+ return function (_x31) {
2587
+ return _ref90.apply(this, arguments);
2494
2588
  };
2495
2589
  }();
2496
2590
 
2497
2591
  /* EVENTS */
2498
2592
 
2499
2593
  exports.LoadDrop = /*#__PURE__*/function () {
2500
- var _ref90 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(_ref89) {
2594
+ var _ref92 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(_ref91) {
2501
2595
  var _this = this;
2502
2596
  var tenantSlug, eventSlug, dropId, event, eventId;
2503
- return _regeneratorRuntime.wrap(function _callee45$(_context45) {
2504
- while (1) switch (_context45.prev = _context45.next) {
2597
+ return _regeneratorRuntime.wrap(function _callee46$(_context46) {
2598
+ while (1) switch (_context46.prev = _context46.next) {
2505
2599
  case 0:
2506
- tenantSlug = _ref89.tenantSlug, eventSlug = _ref89.eventSlug, dropId = _ref89.dropId;
2600
+ tenantSlug = _ref91.tenantSlug, eventSlug = _ref91.eventSlug, dropId = _ref91.dropId;
2507
2601
  if (!this.drops) {
2508
2602
  this.drops = {};
2509
2603
  }
@@ -2514,10 +2608,10 @@ exports.LoadDrop = /*#__PURE__*/function () {
2514
2608
  this.drops[tenantSlug][eventSlug] = {};
2515
2609
  }
2516
2610
  if (this.drops[tenantSlug][eventSlug][dropId]) {
2517
- _context45.next = 13;
2611
+ _context46.next = 13;
2518
2612
  break;
2519
2613
  }
2520
- _context45.next = 7;
2614
+ _context46.next = 7;
2521
2615
  return this.client.ContentObjectMetadata({
2522
2616
  libraryId: this.mainSiteLibraryId,
2523
2617
  objectId: this.mainSiteId,
@@ -2530,14 +2624,14 @@ exports.LoadDrop = /*#__PURE__*/function () {
2530
2624
  noAuth: true
2531
2625
  });
2532
2626
  case 7:
2533
- _context45.t0 = _context45.sent;
2534
- if (_context45.t0) {
2535
- _context45.next = 10;
2627
+ _context46.t0 = _context46.sent;
2628
+ if (_context46.t0) {
2629
+ _context46.next = 10;
2536
2630
  break;
2537
2631
  }
2538
- _context45.t0 = [];
2632
+ _context46.t0 = [];
2539
2633
  case 10:
2540
- event = _context45.t0;
2634
+ event = _context46.t0;
2541
2635
  eventId = Utils.DecodeVersionHash(event["."].source).objectId;
2542
2636
  event.drops.forEach(function (drop) {
2543
2637
  drop = _objectSpread(_objectSpread({}, drop), {}, {
@@ -2547,31 +2641,31 @@ exports.LoadDrop = /*#__PURE__*/function () {
2547
2641
  _this.drops[drop.uuid] = drop;
2548
2642
  });
2549
2643
  case 13:
2550
- return _context45.abrupt("return", this.drops[dropId]);
2644
+ return _context46.abrupt("return", this.drops[dropId]);
2551
2645
  case 14:
2552
2646
  case "end":
2553
- return _context45.stop();
2647
+ return _context46.stop();
2554
2648
  }
2555
- }, _callee45, this);
2649
+ }, _callee46, this);
2556
2650
  }));
2557
- return function (_x31) {
2558
- return _ref90.apply(this, arguments);
2651
+ return function (_x32) {
2652
+ return _ref92.apply(this, arguments);
2559
2653
  };
2560
2654
  }();
2561
2655
  exports.SubmitDropVote = /*#__PURE__*/function () {
2562
- var _ref92 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(_ref91) {
2656
+ var _ref94 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(_ref93) {
2563
2657
  var marketplaceParams, eventId, dropId, sku, marketplaceInfo;
2564
- return _regeneratorRuntime.wrap(function _callee46$(_context46) {
2565
- while (1) switch (_context46.prev = _context46.next) {
2658
+ return _regeneratorRuntime.wrap(function _callee47$(_context47) {
2659
+ while (1) switch (_context47.prev = _context47.next) {
2566
2660
  case 0:
2567
- marketplaceParams = _ref91.marketplaceParams, eventId = _ref91.eventId, dropId = _ref91.dropId, sku = _ref91.sku;
2568
- _context46.next = 3;
2661
+ marketplaceParams = _ref93.marketplaceParams, eventId = _ref93.eventId, dropId = _ref93.dropId, sku = _ref93.sku;
2662
+ _context47.next = 3;
2569
2663
  return this.MarketplaceInfo({
2570
2664
  marketplaceParams: marketplaceParams
2571
2665
  });
2572
2666
  case 3:
2573
- marketplaceInfo = _context46.sent;
2574
- _context46.next = 6;
2667
+ marketplaceInfo = _context47.sent;
2668
+ _context47.next = 6;
2575
2669
  return this.client.authClient.MakeAuthServiceRequest({
2576
2670
  path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
2577
2671
  method: "POST",
@@ -2587,23 +2681,23 @@ exports.SubmitDropVote = /*#__PURE__*/function () {
2587
2681
  });
2588
2682
  case 6:
2589
2683
  case "end":
2590
- return _context46.stop();
2684
+ return _context47.stop();
2591
2685
  }
2592
- }, _callee46, this);
2686
+ }, _callee47, this);
2593
2687
  }));
2594
- return function (_x32) {
2595
- return _ref92.apply(this, arguments);
2688
+ return function (_x33) {
2689
+ return _ref94.apply(this, arguments);
2596
2690
  };
2597
2691
  }();
2598
2692
  exports.DropStatus = /*#__PURE__*/function () {
2599
- var _ref94 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(_ref93) {
2693
+ var _ref96 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(_ref95) {
2600
2694
  var marketplace, eventId, dropId, response;
2601
- return _regeneratorRuntime.wrap(function _callee47$(_context47) {
2602
- while (1) switch (_context47.prev = _context47.next) {
2695
+ return _regeneratorRuntime.wrap(function _callee48$(_context48) {
2696
+ while (1) switch (_context48.prev = _context48.next) {
2603
2697
  case 0:
2604
- marketplace = _ref93.marketplace, eventId = _ref93.eventId, dropId = _ref93.dropId;
2605
- _context47.prev = 1;
2606
- _context47.next = 4;
2698
+ marketplace = _ref95.marketplace, eventId = _ref95.eventId, dropId = _ref95.dropId;
2699
+ _context48.prev = 1;
2700
+ _context48.next = 4;
2607
2701
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2608
2702
  path: UrlJoin("as", "wlt", "act", marketplace.tenant_id, eventId, dropId),
2609
2703
  method: "GET",
@@ -2612,25 +2706,25 @@ exports.DropStatus = /*#__PURE__*/function () {
2612
2706
  }
2613
2707
  }));
2614
2708
  case 4:
2615
- response = _context47.sent;
2616
- return _context47.abrupt("return", response.sort(function (a, b) {
2709
+ response = _context48.sent;
2710
+ return _context48.abrupt("return", response.sort(function (a, b) {
2617
2711
  return a.ts > b.ts ? 1 : -1;
2618
2712
  })[0] || {
2619
2713
  status: "none"
2620
2714
  });
2621
2715
  case 8:
2622
- _context47.prev = 8;
2623
- _context47.t0 = _context47["catch"](1);
2624
- this.Log(_context47.t0, true);
2625
- return _context47.abrupt("return", "");
2716
+ _context48.prev = 8;
2717
+ _context48.t0 = _context48["catch"](1);
2718
+ this.Log(_context48.t0, true);
2719
+ return _context48.abrupt("return", "");
2626
2720
  case 12:
2627
2721
  case "end":
2628
- return _context47.stop();
2722
+ return _context48.stop();
2629
2723
  }
2630
- }, _callee47, this, [[1, 8]]);
2724
+ }, _callee48, this, [[1, 8]]);
2631
2725
  }));
2632
- return function (_x33) {
2633
- return _ref94.apply(this, arguments);
2726
+ return function (_x34) {
2727
+ return _ref96.apply(this, arguments);
2634
2728
  };
2635
2729
  }();
2636
2730
 
@@ -2652,12 +2746,12 @@ exports.DropStatus = /*#__PURE__*/function () {
2652
2746
  * @returns {Promise<Array<Object>>} - Offers matching the specified filters
2653
2747
  */
2654
2748
  exports.MarketplaceOffers = /*#__PURE__*/function () {
2655
- var _ref96 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(_ref95) {
2656
- var contractAddress, tokenId, buyerAddress, sellerAddress, statuses, _ref95$start, start, _ref95$limit, limit, path, queryParams, offers;
2657
- return _regeneratorRuntime.wrap(function _callee48$(_context48) {
2658
- while (1) switch (_context48.prev = _context48.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) {
2659
2753
  case 0:
2660
- 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;
2661
2755
  path = UrlJoin("as", "mkt", "offers", "ls");
2662
2756
  if (buyerAddress) {
2663
2757
  path = UrlJoin(path, "b", Utils.FormatAddress(buyerAddress));
@@ -2677,15 +2771,15 @@ exports.MarketplaceOffers = /*#__PURE__*/function () {
2677
2771
  if (statuses && statuses.length > 0) {
2678
2772
  queryParams.include = statuses.join(",");
2679
2773
  }
2680
- _context48.next = 8;
2774
+ _context49.next = 8;
2681
2775
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2682
2776
  path: path,
2683
2777
  method: "GET",
2684
2778
  queryParams: queryParams
2685
2779
  }));
2686
2780
  case 8:
2687
- offers = _context48.sent;
2688
- return _context48.abrupt("return", offers.map(function (offer) {
2781
+ offers = _context49.sent;
2782
+ return _context49.abrupt("return", offers.map(function (offer) {
2689
2783
  return _objectSpread(_objectSpread({}, offer), {}, {
2690
2784
  created: offer.created * 1000,
2691
2785
  updated: offer.updated * 1000,
@@ -2694,12 +2788,12 @@ exports.MarketplaceOffers = /*#__PURE__*/function () {
2694
2788
  }));
2695
2789
  case 10:
2696
2790
  case "end":
2697
- return _context48.stop();
2791
+ return _context49.stop();
2698
2792
  }
2699
- }, _callee48, this);
2793
+ }, _callee49, this);
2700
2794
  }));
2701
- return function (_x34) {
2702
- return _ref96.apply(this, arguments);
2795
+ return function (_x35) {
2796
+ return _ref98.apply(this, arguments);
2703
2797
  };
2704
2798
  }();
2705
2799
 
@@ -2719,17 +2813,17 @@ exports.MarketplaceOffers = /*#__PURE__*/function () {
2719
2813
  * @returns {Promise<Object>} - Info about the created/updated offer
2720
2814
  */
2721
2815
  exports.CreateMarketplaceOffer = /*#__PURE__*/function () {
2722
- var _ref98 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(_ref97) {
2816
+ var _ref100 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(_ref99) {
2723
2817
  var contractAddress, tokenId, offerId, price, expiresAt, response;
2724
- return _regeneratorRuntime.wrap(function _callee49$(_context49) {
2725
- while (1) switch (_context49.prev = _context49.next) {
2818
+ return _regeneratorRuntime.wrap(function _callee50$(_context50) {
2819
+ while (1) switch (_context50.prev = _context50.next) {
2726
2820
  case 0:
2727
- 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;
2728
2822
  if (!offerId) {
2729
- _context49.next = 7;
2823
+ _context50.next = 7;
2730
2824
  break;
2731
2825
  }
2732
- _context49.next = 4;
2826
+ _context50.next = 4;
2733
2827
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2734
2828
  path: UrlJoin("as", "wlt", "mkt", "offers", offerId),
2735
2829
  method: "PUT",
@@ -2742,11 +2836,11 @@ exports.CreateMarketplaceOffer = /*#__PURE__*/function () {
2742
2836
  }
2743
2837
  }));
2744
2838
  case 4:
2745
- response = _context49.sent;
2746
- _context49.next = 10;
2839
+ response = _context50.sent;
2840
+ _context50.next = 10;
2747
2841
  break;
2748
2842
  case 7:
2749
- _context49.next = 9;
2843
+ _context50.next = 9;
2750
2844
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2751
2845
  path: UrlJoin("as", "wlt", "mkt", "offers", contractAddress, tokenId),
2752
2846
  method: "POST",
@@ -2761,17 +2855,17 @@ exports.CreateMarketplaceOffer = /*#__PURE__*/function () {
2761
2855
  }
2762
2856
  }));
2763
2857
  case 9:
2764
- response = _context49.sent;
2858
+ response = _context50.sent;
2765
2859
  case 10:
2766
- return _context49.abrupt("return", response.offer_id);
2860
+ return _context50.abrupt("return", response.offer_id);
2767
2861
  case 11:
2768
2862
  case "end":
2769
- return _context49.stop();
2863
+ return _context50.stop();
2770
2864
  }
2771
- }, _callee49, this);
2865
+ }, _callee50, this);
2772
2866
  }));
2773
- return function (_x35) {
2774
- return _ref98.apply(this, arguments);
2867
+ return function (_x36) {
2868
+ return _ref100.apply(this, arguments);
2775
2869
  };
2776
2870
  }();
2777
2871
 
@@ -2785,13 +2879,13 @@ exports.CreateMarketplaceOffer = /*#__PURE__*/function () {
2785
2879
  * @param {string} offerId - The ID of the offer
2786
2880
  */
2787
2881
  exports.RemoveMarketplaceOffer = /*#__PURE__*/function () {
2788
- var _ref100 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(_ref99) {
2882
+ var _ref102 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(_ref101) {
2789
2883
  var offerId;
2790
- return _regeneratorRuntime.wrap(function _callee50$(_context50) {
2791
- while (1) switch (_context50.prev = _context50.next) {
2884
+ return _regeneratorRuntime.wrap(function _callee51$(_context51) {
2885
+ while (1) switch (_context51.prev = _context51.next) {
2792
2886
  case 0:
2793
- offerId = _ref99.offerId;
2794
- _context50.next = 3;
2887
+ offerId = _ref101.offerId;
2888
+ _context51.next = 3;
2795
2889
  return this.client.authClient.MakeAuthServiceRequest({
2796
2890
  path: UrlJoin("as", "wlt", "mkt", "offers", offerId),
2797
2891
  method: "DELETE",
@@ -2800,15 +2894,15 @@ exports.RemoveMarketplaceOffer = /*#__PURE__*/function () {
2800
2894
  }
2801
2895
  });
2802
2896
  case 3:
2803
- return _context50.abrupt("return", _context50.sent);
2897
+ return _context51.abrupt("return", _context51.sent);
2804
2898
  case 4:
2805
2899
  case "end":
2806
- return _context50.stop();
2900
+ return _context51.stop();
2807
2901
  }
2808
- }, _callee50, this);
2902
+ }, _callee51, this);
2809
2903
  }));
2810
- return function (_x36) {
2811
- return _ref100.apply(this, arguments);
2904
+ return function (_x37) {
2905
+ return _ref102.apply(this, arguments);
2812
2906
  };
2813
2907
  }();
2814
2908
 
@@ -2822,13 +2916,13 @@ exports.RemoveMarketplaceOffer = /*#__PURE__*/function () {
2822
2916
  * @param {string} offerId - The ID of the offer
2823
2917
  */
2824
2918
  exports.AcceptMarketplaceOffer = /*#__PURE__*/function () {
2825
- var _ref102 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(_ref101) {
2919
+ var _ref104 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(_ref103) {
2826
2920
  var offerId;
2827
- return _regeneratorRuntime.wrap(function _callee51$(_context51) {
2828
- while (1) switch (_context51.prev = _context51.next) {
2921
+ return _regeneratorRuntime.wrap(function _callee52$(_context52) {
2922
+ while (1) switch (_context52.prev = _context52.next) {
2829
2923
  case 0:
2830
- offerId = _ref101.offerId;
2831
- _context51.next = 3;
2924
+ offerId = _ref103.offerId;
2925
+ _context52.next = 3;
2832
2926
  return this.client.authClient.MakeAuthServiceRequest({
2833
2927
  path: UrlJoin("as", "wlt", "mkt", "offers", "accept", offerId),
2834
2928
  method: "PUT",
@@ -2837,15 +2931,15 @@ exports.AcceptMarketplaceOffer = /*#__PURE__*/function () {
2837
2931
  }
2838
2932
  });
2839
2933
  case 3:
2840
- return _context51.abrupt("return", _context51.sent);
2934
+ return _context52.abrupt("return", _context52.sent);
2841
2935
  case 4:
2842
2936
  case "end":
2843
- return _context51.stop();
2937
+ return _context52.stop();
2844
2938
  }
2845
- }, _callee51, this);
2939
+ }, _callee52, this);
2846
2940
  }));
2847
- return function (_x37) {
2848
- return _ref102.apply(this, arguments);
2941
+ return function (_x38) {
2942
+ return _ref104.apply(this, arguments);
2849
2943
  };
2850
2944
  }();
2851
2945
 
@@ -2859,13 +2953,13 @@ exports.AcceptMarketplaceOffer = /*#__PURE__*/function () {
2859
2953
  * @param {string} offerId - The ID of the offer
2860
2954
  */
2861
2955
  exports.RejectMarketplaceOffer = /*#__PURE__*/function () {
2862
- var _ref104 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(_ref103) {
2956
+ var _ref106 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(_ref105) {
2863
2957
  var offerId;
2864
- return _regeneratorRuntime.wrap(function _callee52$(_context52) {
2865
- while (1) switch (_context52.prev = _context52.next) {
2958
+ return _regeneratorRuntime.wrap(function _callee53$(_context53) {
2959
+ while (1) switch (_context53.prev = _context53.next) {
2866
2960
  case 0:
2867
- offerId = _ref103.offerId;
2868
- _context52.next = 3;
2961
+ offerId = _ref105.offerId;
2962
+ _context53.next = 3;
2869
2963
  return this.client.authClient.MakeAuthServiceRequest({
2870
2964
  path: UrlJoin("as", "wlt", "mkt", "offers", "decline", offerId),
2871
2965
  method: "PUT",
@@ -2874,15 +2968,15 @@ exports.RejectMarketplaceOffer = /*#__PURE__*/function () {
2874
2968
  }
2875
2969
  });
2876
2970
  case 3:
2877
- return _context52.abrupt("return", _context52.sent);
2971
+ return _context53.abrupt("return", _context53.sent);
2878
2972
  case 4:
2879
2973
  case "end":
2880
- return _context52.stop();
2974
+ return _context53.stop();
2881
2975
  }
2882
- }, _callee52, this);
2976
+ }, _callee53, this);
2883
2977
  }));
2884
- return function (_x38) {
2885
- return _ref104.apply(this, arguments);
2978
+ return function (_x39) {
2979
+ return _ref106.apply(this, arguments);
2886
2980
  };
2887
2981
  }();
2888
2982
 
@@ -2899,13 +2993,13 @@ exports.RejectMarketplaceOffer = /*#__PURE__*/function () {
2899
2993
  * @returns {Promise<Object>} - Info about the voting event, including the current user's votes and the current total voting tally
2900
2994
  */
2901
2995
  exports.VoteStatus = /*#__PURE__*/function () {
2902
- var _ref106 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(_ref105) {
2996
+ var _ref108 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(_ref107) {
2903
2997
  var tenantId, votingEventId;
2904
- return _regeneratorRuntime.wrap(function _callee53$(_context53) {
2905
- while (1) switch (_context53.prev = _context53.next) {
2998
+ return _regeneratorRuntime.wrap(function _callee54$(_context54) {
2999
+ while (1) switch (_context54.prev = _context54.next) {
2906
3000
  case 0:
2907
- tenantId = _ref105.tenantId, votingEventId = _ref105.votingEventId;
2908
- _context53.next = 3;
3001
+ tenantId = _ref107.tenantId, votingEventId = _ref107.votingEventId;
3002
+ _context54.next = 3;
2909
3003
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2910
3004
  path: UrlJoin("as", "votes", tenantId, votingEventId),
2911
3005
  headers: {
@@ -2913,15 +3007,15 @@ exports.VoteStatus = /*#__PURE__*/function () {
2913
3007
  }
2914
3008
  }));
2915
3009
  case 3:
2916
- return _context53.abrupt("return", _context53.sent);
3010
+ return _context54.abrupt("return", _context54.sent);
2917
3011
  case 4:
2918
3012
  case "end":
2919
- return _context53.stop();
3013
+ return _context54.stop();
2920
3014
  }
2921
- }, _callee53, this);
3015
+ }, _callee54, this);
2922
3016
  }));
2923
- return function (_x39) {
2924
- return _ref106.apply(this, arguments);
3017
+ return function (_x40) {
3018
+ return _ref108.apply(this, arguments);
2925
3019
  };
2926
3020
  }();
2927
3021
 
@@ -2939,13 +3033,13 @@ exports.VoteStatus = /*#__PURE__*/function () {
2939
3033
  * @returns {Promise<Object>} - Info about the voting event, including the current user's votes and the current total voting tally
2940
3034
  */
2941
3035
  exports.CastVote = /*#__PURE__*/function () {
2942
- var _ref108 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(_ref107) {
3036
+ var _ref110 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(_ref109) {
2943
3037
  var tenantId, votingEventId, sku;
2944
- return _regeneratorRuntime.wrap(function _callee54$(_context54) {
2945
- while (1) switch (_context54.prev = _context54.next) {
3038
+ return _regeneratorRuntime.wrap(function _callee55$(_context55) {
3039
+ while (1) switch (_context55.prev = _context55.next) {
2946
3040
  case 0:
2947
- tenantId = _ref107.tenantId, votingEventId = _ref107.votingEventId, sku = _ref107.sku;
2948
- _context54.next = 3;
3041
+ tenantId = _ref109.tenantId, votingEventId = _ref109.votingEventId, sku = _ref109.sku;
3042
+ _context55.next = 3;
2949
3043
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2950
3044
  path: UrlJoin("as", "votes", tenantId, votingEventId, sku),
2951
3045
  method: "POST",
@@ -2954,15 +3048,15 @@ exports.CastVote = /*#__PURE__*/function () {
2954
3048
  }
2955
3049
  }));
2956
3050
  case 3:
2957
- return _context54.abrupt("return", _context54.sent);
3051
+ return _context55.abrupt("return", _context55.sent);
2958
3052
  case 4:
2959
3053
  case "end":
2960
- return _context54.stop();
3054
+ return _context55.stop();
2961
3055
  }
2962
- }, _callee54, this);
3056
+ }, _callee55, this);
2963
3057
  }));
2964
- return function (_x40) {
2965
- return _ref108.apply(this, arguments);
3058
+ return function (_x41) {
3059
+ return _ref110.apply(this, arguments);
2966
3060
  };
2967
3061
  }();
2968
3062
 
@@ -2980,13 +3074,13 @@ exports.CastVote = /*#__PURE__*/function () {
2980
3074
  * @returns {Promise<Object>} - Info about the voting event, including the current user's votes and the current total voting tally
2981
3075
  */
2982
3076
  exports.RevokeVote = /*#__PURE__*/function () {
2983
- var _ref110 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(_ref109) {
3077
+ var _ref112 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(_ref111) {
2984
3078
  var tenantId, votingEventId, sku;
2985
- return _regeneratorRuntime.wrap(function _callee55$(_context55) {
2986
- while (1) switch (_context55.prev = _context55.next) {
3079
+ return _regeneratorRuntime.wrap(function _callee56$(_context56) {
3080
+ while (1) switch (_context56.prev = _context56.next) {
2987
3081
  case 0:
2988
- tenantId = _ref109.tenantId, votingEventId = _ref109.votingEventId, sku = _ref109.sku;
2989
- _context55.next = 3;
3082
+ tenantId = _ref111.tenantId, votingEventId = _ref111.votingEventId, sku = _ref111.sku;
3083
+ _context56.next = 3;
2990
3084
  return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
2991
3085
  path: UrlJoin("as", "votes", tenantId, votingEventId, sku),
2992
3086
  method: "DELETE",
@@ -2995,14 +3089,14 @@ exports.RevokeVote = /*#__PURE__*/function () {
2995
3089
  }
2996
3090
  }));
2997
3091
  case 3:
2998
- return _context55.abrupt("return", _context55.sent);
3092
+ return _context56.abrupt("return", _context56.sent);
2999
3093
  case 4:
3000
3094
  case "end":
3001
- return _context55.stop();
3095
+ return _context56.stop();
3002
3096
  }
3003
- }, _callee55, this);
3097
+ }, _callee56, this);
3004
3098
  }));
3005
- return function (_x41) {
3006
- return _ref110.apply(this, arguments);
3099
+ return function (_x42) {
3100
+ return _ref112.apply(this, arguments);
3007
3101
  };
3008
3102
  }();