@eluvio/elv-client-js 3.2.44 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ElvClient-min.js +17 -9
- package/dist/ElvClient-node-min.js +12 -25
- package/dist/ElvFrameClient-min.js +17 -9
- package/dist/ElvPermissionsClient-min.js +16 -8
- package/dist/ElvWalletClient-min.js +17 -9
- package/dist/ElvWalletClient-node-min.js +12 -25
- package/dist/src/AuthorizationClient.js +6 -6
- package/dist/src/ElvClient.js +3 -3
- package/dist/src/ElvWallet.js +1 -3
- package/dist/src/EthClient.js +21 -12
- package/dist/src/FrameClient.js +10 -7
- package/dist/src/HttpClient.js +3 -3
- package/dist/src/client/ABRPublishing.js +150 -103
- package/dist/src/client/ContentAccess.js +32 -15
- package/dist/src/client/ContentManagement.js +33 -24
- package/dist/src/client/Contracts.js +1 -1
- package/dist/src/walletClient/ClientMethods.js +573 -645
- package/dist/src/walletClient/index.js +47 -43
- package/package.json +2 -2
- package/src/AuthorizationClient.js +6 -6
- package/src/ElvClient.js +3 -2
- package/src/ElvWallet.js +1 -3
- package/src/EthClient.js +19 -10
- package/src/FrameClient.js +10 -2
- package/src/HttpClient.js +3 -3
- package/src/client/ABRPublishing.js +71 -32
- package/src/client/ContentAccess.js +19 -8
- package/src/client/ContentManagement.js +21 -14
- package/src/client/Contracts.js +1 -1
- package/testScripts/Test.js +7 -36
|
@@ -202,84 +202,6 @@ exports.UserWalletBalance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
|
|
|
202
202
|
}
|
|
203
203
|
}, _callee, this);
|
|
204
204
|
}));
|
|
205
|
-
/**
|
|
206
|
-
* Returns basic contract info about the items the specified/current user owns, organized by contract address + token ID
|
|
207
|
-
*
|
|
208
|
-
* This method is significantly faster than <a href="#.UserItems">UserItems</a>, but does not include any NFT metadata.
|
|
209
|
-
*
|
|
210
|
-
* @methodGroup User
|
|
211
|
-
* @namedParams
|
|
212
|
-
* @param {string=} userAddress - Address of the user to query for. If unspecified, will use the currently logged in user.
|
|
213
|
-
*
|
|
214
|
-
* @returns {Promise<Object>} - Basic info about all owned items.
|
|
215
|
-
*/
|
|
216
|
-
|
|
217
|
-
exports.UserItemInfo = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
218
|
-
var _this = this;
|
|
219
|
-
|
|
220
|
-
var _ref3,
|
|
221
|
-
userAddress,
|
|
222
|
-
accountId,
|
|
223
|
-
nftInfo,
|
|
224
|
-
_args2 = arguments;
|
|
225
|
-
|
|
226
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
227
|
-
while (1) {
|
|
228
|
-
switch (_context2.prev = _context2.next) {
|
|
229
|
-
case 0:
|
|
230
|
-
_ref3 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, userAddress = _ref3.userAddress;
|
|
231
|
-
accountId = "iusr".concat(Utils.AddressToHash(userAddress || this.UserAddress()));
|
|
232
|
-
_context2.next = 4;
|
|
233
|
-
return this.client.ethClient.MakeProviderCall({
|
|
234
|
-
methodName: "send",
|
|
235
|
-
args: ["elv_getAccountProfile", [this.client.contentSpaceId, accountId]]
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
case 4:
|
|
239
|
-
this.profileData = _context2.sent;
|
|
240
|
-
|
|
241
|
-
if (!(!this.profileData || !this.profileData.NFTs)) {
|
|
242
|
-
_context2.next = 7;
|
|
243
|
-
break;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
return _context2.abrupt("return", {});
|
|
247
|
-
|
|
248
|
-
case 7:
|
|
249
|
-
nftInfo = {};
|
|
250
|
-
Object.keys(this.profileData.NFTs).map(function (tenantId) {
|
|
251
|
-
return _this.profileData.NFTs[tenantId].forEach(function (details) {
|
|
252
|
-
var versionHash = (details.TokenUri || "").split("/").find(function (s) {
|
|
253
|
-
return (s || "").startsWith("hq__");
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
if (!versionHash) {
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
if (details.TokenHold) {
|
|
261
|
-
details.TokenHoldDate = new Date(parseInt(details.TokenHold) * 1000);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
var contractAddress = Utils.FormatAddress(details.ContractAddr);
|
|
265
|
-
var key = "".concat(contractAddress, "-").concat(details.TokenIdStr);
|
|
266
|
-
nftInfo[key] = _objectSpread(_objectSpread({}, details), {}, {
|
|
267
|
-
ContractAddr: Utils.FormatAddress(details.ContractAddr),
|
|
268
|
-
ContractId: "ictr".concat(Utils.AddressToHash(details.ContractAddr)),
|
|
269
|
-
VersionHash: versionHash
|
|
270
|
-
});
|
|
271
|
-
});
|
|
272
|
-
});
|
|
273
|
-
this.nftInfo = nftInfo;
|
|
274
|
-
return _context2.abrupt("return", this.nftInfo);
|
|
275
|
-
|
|
276
|
-
case 11:
|
|
277
|
-
case "end":
|
|
278
|
-
return _context2.stop();
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
}, _callee2, this);
|
|
282
|
-
}));
|
|
283
205
|
/**
|
|
284
206
|
* Retrieve all valid names for filtering user items. Full item names are required for filtering results by name.
|
|
285
207
|
*
|
|
@@ -293,45 +215,45 @@ exports.UserItemInfo = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
|
|
|
293
215
|
* @returns {Promise<Array<String>>} - A list of item names
|
|
294
216
|
*/
|
|
295
217
|
|
|
296
|
-
exports.UserItemNames = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
297
|
-
var
|
|
218
|
+
exports.UserItemNames = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
219
|
+
var _ref3,
|
|
298
220
|
marketplaceParams,
|
|
299
221
|
userAddress,
|
|
300
222
|
filters,
|
|
301
|
-
|
|
223
|
+
_args2 = arguments;
|
|
302
224
|
|
|
303
|
-
return _regeneratorRuntime.wrap(function
|
|
225
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
304
226
|
while (1) {
|
|
305
|
-
switch (
|
|
227
|
+
switch (_context2.prev = _context2.next) {
|
|
306
228
|
case 0:
|
|
307
|
-
|
|
229
|
+
_ref3 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, marketplaceParams = _ref3.marketplaceParams, userAddress = _ref3.userAddress;
|
|
308
230
|
filters = [];
|
|
309
231
|
|
|
310
232
|
if (!marketplaceParams) {
|
|
311
|
-
|
|
233
|
+
_context2.next = 10;
|
|
312
234
|
break;
|
|
313
235
|
}
|
|
314
236
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
237
|
+
_context2.t0 = filters;
|
|
238
|
+
_context2.t1 = "tenant:eq:";
|
|
239
|
+
_context2.next = 7;
|
|
318
240
|
return this.MarketplaceInfo({
|
|
319
241
|
marketplaceParams: marketplaceParams
|
|
320
242
|
});
|
|
321
243
|
|
|
322
244
|
case 7:
|
|
323
|
-
|
|
324
|
-
|
|
245
|
+
_context2.t2 = _context2.sent.tenantId;
|
|
246
|
+
_context2.t3 = _context2.t1.concat.call(_context2.t1, _context2.t2);
|
|
325
247
|
|
|
326
|
-
|
|
248
|
+
_context2.t0.push.call(_context2.t0, _context2.t3);
|
|
327
249
|
|
|
328
250
|
case 10:
|
|
329
251
|
if (userAddress) {
|
|
330
252
|
filters.push("wlt:eq:".concat(Utils.FormatAddress(userAddress)));
|
|
331
253
|
}
|
|
332
254
|
|
|
333
|
-
|
|
334
|
-
|
|
255
|
+
_context2.t4 = Utils;
|
|
256
|
+
_context2.next = 14;
|
|
335
257
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
336
258
|
path: UrlJoin("as", "wlt", "names"),
|
|
337
259
|
method: "GET",
|
|
@@ -341,19 +263,19 @@ exports.UserItemNames = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerato
|
|
|
341
263
|
});
|
|
342
264
|
|
|
343
265
|
case 14:
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
return
|
|
266
|
+
_context2.t5 = _context2.sent;
|
|
267
|
+
_context2.next = 17;
|
|
268
|
+
return _context2.t4.ResponseToJson.call(_context2.t4, _context2.t5);
|
|
347
269
|
|
|
348
270
|
case 17:
|
|
349
|
-
return
|
|
271
|
+
return _context2.abrupt("return", _context2.sent);
|
|
350
272
|
|
|
351
273
|
case 18:
|
|
352
274
|
case "end":
|
|
353
|
-
return
|
|
275
|
+
return _context2.stop();
|
|
354
276
|
}
|
|
355
277
|
}
|
|
356
|
-
},
|
|
278
|
+
}, _callee2, this);
|
|
357
279
|
}));
|
|
358
280
|
/**
|
|
359
281
|
* Retrieve all valid edition names for filtering the specified item. Full edition names are required for filtering results by edition.
|
|
@@ -368,15 +290,15 @@ exports.UserItemNames = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerato
|
|
|
368
290
|
*/
|
|
369
291
|
|
|
370
292
|
exports.UserItemEditionNames = /*#__PURE__*/function () {
|
|
371
|
-
var
|
|
293
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref4) {
|
|
372
294
|
var displayName;
|
|
373
|
-
return _regeneratorRuntime.wrap(function
|
|
295
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
374
296
|
while (1) {
|
|
375
|
-
switch (
|
|
297
|
+
switch (_context3.prev = _context3.next) {
|
|
376
298
|
case 0:
|
|
377
|
-
displayName =
|
|
378
|
-
|
|
379
|
-
|
|
299
|
+
displayName = _ref4.displayName;
|
|
300
|
+
_context3.t0 = Utils;
|
|
301
|
+
_context3.next = 4;
|
|
380
302
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
381
303
|
path: UrlJoin("as", "wlt", "editions"),
|
|
382
304
|
method: "GET",
|
|
@@ -386,23 +308,23 @@ exports.UserItemEditionNames = /*#__PURE__*/function () {
|
|
|
386
308
|
});
|
|
387
309
|
|
|
388
310
|
case 4:
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
return
|
|
311
|
+
_context3.t1 = _context3.sent;
|
|
312
|
+
_context3.next = 7;
|
|
313
|
+
return _context3.t0.ResponseToJson.call(_context3.t0, _context3.t1);
|
|
392
314
|
|
|
393
315
|
case 7:
|
|
394
|
-
return
|
|
316
|
+
return _context3.abrupt("return", _context3.sent);
|
|
395
317
|
|
|
396
318
|
case 8:
|
|
397
319
|
case "end":
|
|
398
|
-
return
|
|
320
|
+
return _context3.stop();
|
|
399
321
|
}
|
|
400
322
|
}
|
|
401
|
-
},
|
|
323
|
+
}, _callee3, this);
|
|
402
324
|
}));
|
|
403
325
|
|
|
404
326
|
return function (_x) {
|
|
405
|
-
return
|
|
327
|
+
return _ref5.apply(this, arguments);
|
|
406
328
|
};
|
|
407
329
|
}();
|
|
408
330
|
/**
|
|
@@ -420,39 +342,39 @@ exports.UserItemEditionNames = /*#__PURE__*/function () {
|
|
|
420
342
|
*/
|
|
421
343
|
|
|
422
344
|
|
|
423
|
-
exports.UserItemAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
424
|
-
var
|
|
345
|
+
exports.UserItemAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
346
|
+
var _ref7,
|
|
425
347
|
marketplaceParams,
|
|
426
348
|
displayName,
|
|
427
349
|
userAddress,
|
|
428
350
|
filters,
|
|
429
351
|
attributes,
|
|
430
|
-
|
|
352
|
+
_args4 = arguments;
|
|
431
353
|
|
|
432
|
-
return _regeneratorRuntime.wrap(function
|
|
354
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
433
355
|
while (1) {
|
|
434
|
-
switch (
|
|
356
|
+
switch (_context4.prev = _context4.next) {
|
|
435
357
|
case 0:
|
|
436
|
-
|
|
358
|
+
_ref7 = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {}, marketplaceParams = _ref7.marketplaceParams, displayName = _ref7.displayName, userAddress = _ref7.userAddress;
|
|
437
359
|
filters = [];
|
|
438
360
|
|
|
439
361
|
if (!marketplaceParams) {
|
|
440
|
-
|
|
362
|
+
_context4.next = 10;
|
|
441
363
|
break;
|
|
442
364
|
}
|
|
443
365
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
366
|
+
_context4.t0 = filters;
|
|
367
|
+
_context4.t1 = "tenant:eq:";
|
|
368
|
+
_context4.next = 7;
|
|
447
369
|
return this.MarketplaceInfo({
|
|
448
370
|
marketplaceParams: marketplaceParams
|
|
449
371
|
});
|
|
450
372
|
|
|
451
373
|
case 7:
|
|
452
|
-
|
|
453
|
-
|
|
374
|
+
_context4.t2 = _context4.sent.tenantId;
|
|
375
|
+
_context4.t3 = _context4.t1.concat.call(_context4.t1, _context4.t2);
|
|
454
376
|
|
|
455
|
-
|
|
377
|
+
_context4.t0.push.call(_context4.t0, _context4.t3);
|
|
456
378
|
|
|
457
379
|
case 10:
|
|
458
380
|
if (userAddress) {
|
|
@@ -463,8 +385,8 @@ exports.UserItemAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regen
|
|
|
463
385
|
filters.push("meta/display_name:eq:".concat(displayName));
|
|
464
386
|
}
|
|
465
387
|
|
|
466
|
-
|
|
467
|
-
|
|
388
|
+
_context4.t4 = Utils;
|
|
389
|
+
_context4.next = 15;
|
|
468
390
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
469
391
|
path: UrlJoin("as", "wlt", "attributes"),
|
|
470
392
|
method: "GET",
|
|
@@ -474,30 +396,30 @@ exports.UserItemAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regen
|
|
|
474
396
|
});
|
|
475
397
|
|
|
476
398
|
case 15:
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
return
|
|
399
|
+
_context4.t5 = _context4.sent;
|
|
400
|
+
_context4.next = 18;
|
|
401
|
+
return _context4.t4.ResponseToJson.call(_context4.t4, _context4.t5);
|
|
480
402
|
|
|
481
403
|
case 18:
|
|
482
|
-
attributes =
|
|
483
|
-
return
|
|
484
|
-
var trait_type =
|
|
485
|
-
values =
|
|
404
|
+
attributes = _context4.sent;
|
|
405
|
+
return _context4.abrupt("return", attributes.map(function (_ref8) {
|
|
406
|
+
var trait_type = _ref8.trait_type,
|
|
407
|
+
values = _ref8.values;
|
|
486
408
|
return {
|
|
487
409
|
name: trait_type,
|
|
488
410
|
values: values
|
|
489
411
|
};
|
|
490
|
-
}).filter(function (
|
|
491
|
-
var name =
|
|
412
|
+
}).filter(function (_ref9) {
|
|
413
|
+
var name = _ref9.name;
|
|
492
414
|
return !["Content Fabric Hash", "Total Minted Supply", "Creator"].includes(name);
|
|
493
415
|
}));
|
|
494
416
|
|
|
495
417
|
case 20:
|
|
496
418
|
case "end":
|
|
497
|
-
return
|
|
419
|
+
return _context4.stop();
|
|
498
420
|
}
|
|
499
421
|
}
|
|
500
|
-
},
|
|
422
|
+
}, _callee4, this);
|
|
501
423
|
}));
|
|
502
424
|
/**
|
|
503
425
|
* <b><i>Requires login</i></b>
|
|
@@ -509,7 +431,7 @@ exports.UserItemAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regen
|
|
|
509
431
|
* @param {string=} userAddress - Address of a user. If not specified, will return results for current user
|
|
510
432
|
* @param {integer=} start=0 - PAGINATION: Index from which the results should start
|
|
511
433
|
* @param {integer=} limit=50 - PAGINATION: Maximum number of results to return
|
|
512
|
-
* @param {string=} sortBy="
|
|
434
|
+
* @param {string=} sortBy="default" - Sort order. Options: `default`, `meta/display_name`
|
|
513
435
|
* @param {boolean=} sortDesc=false - Sort results descending instead of ascending
|
|
514
436
|
* @param {string=} filter - Filter results by item name.
|
|
515
437
|
* @param {string=} contractAddress - Filter results by the address of the NFT contract
|
|
@@ -520,22 +442,28 @@ exports.UserItemAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regen
|
|
|
520
442
|
* @returns {Promise<Object>} - Results of the query and pagination info
|
|
521
443
|
*/
|
|
522
444
|
|
|
523
|
-
exports.UserItems = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
524
|
-
var
|
|
525
|
-
|
|
445
|
+
exports.UserItems = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
|
|
446
|
+
var _ref11,
|
|
447
|
+
_ref11$sortBy,
|
|
448
|
+
sortBy,
|
|
449
|
+
_args5 = arguments;
|
|
450
|
+
|
|
451
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
526
452
|
while (1) {
|
|
527
|
-
switch (
|
|
453
|
+
switch (_context5.prev = _context5.next) {
|
|
528
454
|
case 0:
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
455
|
+
_ref11 = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {}, _ref11$sortBy = _ref11.sortBy, sortBy = _ref11$sortBy === void 0 ? "default" : _ref11$sortBy;
|
|
456
|
+
return _context5.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
457
|
+
mode: "owned",
|
|
458
|
+
sortBy: sortBy
|
|
459
|
+
}, _args5[0] || {})));
|
|
532
460
|
|
|
533
|
-
case
|
|
461
|
+
case 2:
|
|
534
462
|
case "end":
|
|
535
|
-
return
|
|
463
|
+
return _context5.stop();
|
|
536
464
|
}
|
|
537
465
|
}
|
|
538
|
-
},
|
|
466
|
+
}, _callee5, this);
|
|
539
467
|
}));
|
|
540
468
|
/**
|
|
541
469
|
* Return all listings for the current user. Not paginated.
|
|
@@ -552,24 +480,24 @@ exports.UserItems = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
|
|
|
552
480
|
* @returns {Promise<Array<Object>>} - List of current user's listings
|
|
553
481
|
*/
|
|
554
482
|
|
|
555
|
-
exports.UserListings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
556
|
-
var
|
|
483
|
+
exports.UserListings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
|
484
|
+
var _ref13,
|
|
557
485
|
userAddress,
|
|
558
|
-
|
|
486
|
+
_ref13$sortBy,
|
|
559
487
|
sortBy,
|
|
560
|
-
|
|
488
|
+
_ref13$sortDesc,
|
|
561
489
|
sortDesc,
|
|
562
490
|
contractAddress,
|
|
563
491
|
tokenId,
|
|
564
492
|
marketplaceParams,
|
|
565
|
-
|
|
493
|
+
_args6 = arguments;
|
|
566
494
|
|
|
567
|
-
return _regeneratorRuntime.wrap(function
|
|
495
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
568
496
|
while (1) {
|
|
569
|
-
switch (
|
|
497
|
+
switch (_context6.prev = _context6.next) {
|
|
570
498
|
case 0:
|
|
571
|
-
|
|
572
|
-
|
|
499
|
+
_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;
|
|
500
|
+
_context6.next = 3;
|
|
573
501
|
return this.FilteredQuery({
|
|
574
502
|
mode: "listings",
|
|
575
503
|
start: 0,
|
|
@@ -584,14 +512,14 @@ exports.UserListings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
|
|
|
584
512
|
});
|
|
585
513
|
|
|
586
514
|
case 3:
|
|
587
|
-
return
|
|
515
|
+
return _context6.abrupt("return", _context6.sent.results);
|
|
588
516
|
|
|
589
517
|
case 4:
|
|
590
518
|
case "end":
|
|
591
|
-
return
|
|
519
|
+
return _context6.stop();
|
|
592
520
|
}
|
|
593
521
|
}
|
|
594
|
-
},
|
|
522
|
+
}, _callee6, this);
|
|
595
523
|
}));
|
|
596
524
|
/**
|
|
597
525
|
* Return all sales for the current user. Not paginated.
|
|
@@ -609,24 +537,24 @@ exports.UserListings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
|
|
|
609
537
|
* @returns {Promise<Array<Object>>} - List of current user's sales
|
|
610
538
|
*/
|
|
611
539
|
|
|
612
|
-
exports.UserSales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
613
|
-
var
|
|
540
|
+
exports.UserSales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
|
|
541
|
+
var _ref15,
|
|
614
542
|
userAddress,
|
|
615
|
-
|
|
543
|
+
_ref15$sortBy,
|
|
616
544
|
sortBy,
|
|
617
|
-
|
|
545
|
+
_ref15$sortDesc,
|
|
618
546
|
sortDesc,
|
|
619
547
|
contractAddress,
|
|
620
548
|
tokenId,
|
|
621
549
|
marketplaceParams,
|
|
622
|
-
|
|
550
|
+
_args7 = arguments;
|
|
623
551
|
|
|
624
|
-
return _regeneratorRuntime.wrap(function
|
|
552
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
625
553
|
while (1) {
|
|
626
|
-
switch (
|
|
554
|
+
switch (_context7.prev = _context7.next) {
|
|
627
555
|
case 0:
|
|
628
|
-
|
|
629
|
-
|
|
556
|
+
_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, marketplaceParams = _ref15.marketplaceParams;
|
|
557
|
+
_context7.next = 3;
|
|
630
558
|
return this.FilteredQuery({
|
|
631
559
|
mode: "sales",
|
|
632
560
|
start: 0,
|
|
@@ -640,14 +568,14 @@ exports.UserSales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
|
|
|
640
568
|
});
|
|
641
569
|
|
|
642
570
|
case 3:
|
|
643
|
-
return
|
|
571
|
+
return _context7.abrupt("return", _context7.sent.results);
|
|
644
572
|
|
|
645
573
|
case 4:
|
|
646
574
|
case "end":
|
|
647
|
-
return
|
|
575
|
+
return _context7.stop();
|
|
648
576
|
}
|
|
649
577
|
}
|
|
650
|
-
},
|
|
578
|
+
}, _callee7, this);
|
|
651
579
|
}));
|
|
652
580
|
/**
|
|
653
581
|
* Return all transfers and sales for the current user. Not paginated.
|
|
@@ -665,24 +593,24 @@ exports.UserSales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
|
|
|
665
593
|
* @returns {Promise<Array<Object>>} - List of current user's sales
|
|
666
594
|
*/
|
|
667
595
|
|
|
668
|
-
exports.UserTransfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
669
|
-
var
|
|
596
|
+
exports.UserTransfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
|
|
597
|
+
var _ref17,
|
|
670
598
|
userAddress,
|
|
671
|
-
|
|
599
|
+
_ref17$sortBy,
|
|
672
600
|
sortBy,
|
|
673
|
-
|
|
601
|
+
_ref17$sortDesc,
|
|
674
602
|
sortDesc,
|
|
675
603
|
contractAddress,
|
|
676
604
|
tokenId,
|
|
677
605
|
marketplaceParams,
|
|
678
|
-
|
|
606
|
+
_args8 = arguments;
|
|
679
607
|
|
|
680
|
-
return _regeneratorRuntime.wrap(function
|
|
608
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
681
609
|
while (1) {
|
|
682
|
-
switch (
|
|
610
|
+
switch (_context8.prev = _context8.next) {
|
|
683
611
|
case 0:
|
|
684
|
-
|
|
685
|
-
|
|
612
|
+
_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, marketplaceParams = _ref17.marketplaceParams;
|
|
613
|
+
_context8.next = 3;
|
|
686
614
|
return this.FilteredQuery({
|
|
687
615
|
mode: "transfers",
|
|
688
616
|
start: 0,
|
|
@@ -696,14 +624,14 @@ exports.UserTransfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerato
|
|
|
696
624
|
});
|
|
697
625
|
|
|
698
626
|
case 3:
|
|
699
|
-
return
|
|
627
|
+
return _context8.abrupt("return", _context8.sent.results);
|
|
700
628
|
|
|
701
629
|
case 4:
|
|
702
630
|
case "end":
|
|
703
|
-
return
|
|
631
|
+
return _context8.stop();
|
|
704
632
|
}
|
|
705
633
|
}
|
|
706
|
-
},
|
|
634
|
+
}, _callee8, this);
|
|
707
635
|
}));
|
|
708
636
|
/* TENANT */
|
|
709
637
|
|
|
@@ -721,39 +649,39 @@ exports.UserTransfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerato
|
|
|
721
649
|
*/
|
|
722
650
|
|
|
723
651
|
exports.TenantConfiguration = /*#__PURE__*/function () {
|
|
724
|
-
var
|
|
652
|
+
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(_ref18) {
|
|
725
653
|
var tenantId, contractAddress;
|
|
726
|
-
return _regeneratorRuntime.wrap(function
|
|
654
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
727
655
|
while (1) {
|
|
728
|
-
switch (
|
|
656
|
+
switch (_context9.prev = _context9.next) {
|
|
729
657
|
case 0:
|
|
730
|
-
tenantId =
|
|
731
|
-
|
|
732
|
-
|
|
658
|
+
tenantId = _ref18.tenantId, contractAddress = _ref18.contractAddress;
|
|
659
|
+
_context9.prev = 1;
|
|
660
|
+
_context9.next = 4;
|
|
733
661
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
734
662
|
path: contractAddress ? UrlJoin("as", "config", "nft", contractAddress) : UrlJoin("as", "config", "tnt", tenantId),
|
|
735
663
|
method: "GET"
|
|
736
664
|
}));
|
|
737
665
|
|
|
738
666
|
case 4:
|
|
739
|
-
return
|
|
667
|
+
return _context9.abrupt("return", _context9.sent);
|
|
740
668
|
|
|
741
669
|
case 7:
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
this.Log("Failed to load tenant configuration", true,
|
|
745
|
-
return
|
|
670
|
+
_context9.prev = 7;
|
|
671
|
+
_context9.t0 = _context9["catch"](1);
|
|
672
|
+
this.Log("Failed to load tenant configuration", true, _context9.t0);
|
|
673
|
+
return _context9.abrupt("return", {});
|
|
746
674
|
|
|
747
675
|
case 11:
|
|
748
676
|
case "end":
|
|
749
|
-
return
|
|
677
|
+
return _context9.stop();
|
|
750
678
|
}
|
|
751
679
|
}
|
|
752
|
-
},
|
|
680
|
+
}, _callee9, this, [[1, 7]]);
|
|
753
681
|
}));
|
|
754
682
|
|
|
755
683
|
return function (_x2) {
|
|
756
|
-
return
|
|
684
|
+
return _ref19.apply(this, arguments);
|
|
757
685
|
};
|
|
758
686
|
}();
|
|
759
687
|
/**
|
|
@@ -766,41 +694,41 @@ exports.TenantConfiguration = /*#__PURE__*/function () {
|
|
|
766
694
|
|
|
767
695
|
|
|
768
696
|
exports.ExchangeRate = /*#__PURE__*/function () {
|
|
769
|
-
var
|
|
697
|
+
var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(_ref20) {
|
|
770
698
|
var currency;
|
|
771
|
-
return _regeneratorRuntime.wrap(function
|
|
699
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
772
700
|
while (1) {
|
|
773
|
-
switch (
|
|
701
|
+
switch (_context10.prev = _context10.next) {
|
|
774
702
|
case 0:
|
|
775
|
-
currency =
|
|
703
|
+
currency = _ref20.currency;
|
|
776
704
|
|
|
777
705
|
if (currency) {
|
|
778
|
-
|
|
706
|
+
_context10.next = 3;
|
|
779
707
|
break;
|
|
780
708
|
}
|
|
781
709
|
|
|
782
710
|
throw Error("Eluvio Wallet Client: Invalid or missing currency in ExchangeRate");
|
|
783
711
|
|
|
784
712
|
case 3:
|
|
785
|
-
|
|
713
|
+
_context10.next = 5;
|
|
786
714
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
787
715
|
path: UrlJoin("as", "xr", "ebanx", currency),
|
|
788
716
|
method: "GET"
|
|
789
717
|
}));
|
|
790
718
|
|
|
791
719
|
case 5:
|
|
792
|
-
return
|
|
720
|
+
return _context10.abrupt("return", _context10.sent);
|
|
793
721
|
|
|
794
722
|
case 6:
|
|
795
723
|
case "end":
|
|
796
|
-
return
|
|
724
|
+
return _context10.stop();
|
|
797
725
|
}
|
|
798
726
|
}
|
|
799
|
-
},
|
|
727
|
+
}, _callee10, this);
|
|
800
728
|
}));
|
|
801
729
|
|
|
802
730
|
return function (_x3) {
|
|
803
|
-
return
|
|
731
|
+
return _ref21.apply(this, arguments);
|
|
804
732
|
};
|
|
805
733
|
}();
|
|
806
734
|
/* MARKETPLACE */
|
|
@@ -819,13 +747,13 @@ exports.ExchangeRate = /*#__PURE__*/function () {
|
|
|
819
747
|
|
|
820
748
|
|
|
821
749
|
exports.MarketplaceStock = /*#__PURE__*/function () {
|
|
822
|
-
var
|
|
750
|
+
var _ref23 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref22) {
|
|
823
751
|
var marketplaceParams, tenantId, marketplaceInfo;
|
|
824
|
-
return _regeneratorRuntime.wrap(function
|
|
752
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
825
753
|
while (1) {
|
|
826
|
-
switch (
|
|
754
|
+
switch (_context11.prev = _context11.next) {
|
|
827
755
|
case 0:
|
|
828
|
-
marketplaceParams =
|
|
756
|
+
marketplaceParams = _ref22.marketplaceParams, tenantId = _ref22.tenantId;
|
|
829
757
|
|
|
830
758
|
if (!tenantId) {
|
|
831
759
|
marketplaceInfo = this.MarketplaceInfo({
|
|
@@ -835,11 +763,11 @@ exports.MarketplaceStock = /*#__PURE__*/function () {
|
|
|
835
763
|
}
|
|
836
764
|
|
|
837
765
|
if (!this.loggedIn) {
|
|
838
|
-
|
|
766
|
+
_context11.next = 6;
|
|
839
767
|
break;
|
|
840
768
|
}
|
|
841
769
|
|
|
842
|
-
|
|
770
|
+
_context11.next = 5;
|
|
843
771
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
844
772
|
path: UrlJoin("as", "wlt", "nft", "info", tenantId),
|
|
845
773
|
method: "GET",
|
|
@@ -849,28 +777,28 @@ exports.MarketplaceStock = /*#__PURE__*/function () {
|
|
|
849
777
|
}));
|
|
850
778
|
|
|
851
779
|
case 5:
|
|
852
|
-
return
|
|
780
|
+
return _context11.abrupt("return", _context11.sent);
|
|
853
781
|
|
|
854
782
|
case 6:
|
|
855
|
-
|
|
783
|
+
_context11.next = 8;
|
|
856
784
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
857
785
|
path: UrlJoin("as", "nft", "stock", tenantId),
|
|
858
786
|
method: "GET"
|
|
859
787
|
}));
|
|
860
788
|
|
|
861
789
|
case 8:
|
|
862
|
-
return
|
|
790
|
+
return _context11.abrupt("return", _context11.sent);
|
|
863
791
|
|
|
864
792
|
case 9:
|
|
865
793
|
case "end":
|
|
866
|
-
return
|
|
794
|
+
return _context11.stop();
|
|
867
795
|
}
|
|
868
796
|
}
|
|
869
|
-
},
|
|
797
|
+
}, _callee11, this);
|
|
870
798
|
}));
|
|
871
799
|
|
|
872
800
|
return function (_x4) {
|
|
873
|
-
return
|
|
801
|
+
return _ref23.apply(this, arguments);
|
|
874
802
|
};
|
|
875
803
|
}();
|
|
876
804
|
/**
|
|
@@ -888,14 +816,14 @@ exports.MarketplaceStock = /*#__PURE__*/function () {
|
|
|
888
816
|
*/
|
|
889
817
|
|
|
890
818
|
|
|
891
|
-
exports.MarketplaceInfo = function (
|
|
892
|
-
var marketplaceParams =
|
|
819
|
+
exports.MarketplaceInfo = function (_ref24) {
|
|
820
|
+
var marketplaceParams = _ref24.marketplaceParams;
|
|
893
821
|
|
|
894
|
-
var
|
|
895
|
-
tenantSlug =
|
|
896
|
-
marketplaceSlug =
|
|
897
|
-
marketplaceId =
|
|
898
|
-
marketplaceHash =
|
|
822
|
+
var _ref25 = marketplaceParams || {},
|
|
823
|
+
tenantSlug = _ref25.tenantSlug,
|
|
824
|
+
marketplaceSlug = _ref25.marketplaceSlug,
|
|
825
|
+
marketplaceId = _ref25.marketplaceId,
|
|
826
|
+
marketplaceHash = _ref25.marketplaceHash;
|
|
899
827
|
|
|
900
828
|
var marketplaceInfo;
|
|
901
829
|
|
|
@@ -924,24 +852,24 @@ exports.MarketplaceInfo = function (_ref25) {
|
|
|
924
852
|
|
|
925
853
|
|
|
926
854
|
exports.MarketplaceCSS = /*#__PURE__*/function () {
|
|
927
|
-
var
|
|
855
|
+
var _ref27 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(_ref26) {
|
|
928
856
|
var marketplaceParams, marketplaceInfo, marketplaceHash;
|
|
929
|
-
return _regeneratorRuntime.wrap(function
|
|
857
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
930
858
|
while (1) {
|
|
931
|
-
switch (
|
|
859
|
+
switch (_context12.prev = _context12.next) {
|
|
932
860
|
case 0:
|
|
933
|
-
marketplaceParams =
|
|
861
|
+
marketplaceParams = _ref26.marketplaceParams;
|
|
934
862
|
marketplaceInfo = this.MarketplaceInfo({
|
|
935
863
|
marketplaceParams: marketplaceParams
|
|
936
864
|
});
|
|
937
865
|
marketplaceHash = marketplaceInfo.marketplaceHash;
|
|
938
866
|
|
|
939
867
|
if (this.cachedCSS[marketplaceHash]) {
|
|
940
|
-
|
|
868
|
+
_context12.next = 7;
|
|
941
869
|
break;
|
|
942
870
|
}
|
|
943
871
|
|
|
944
|
-
|
|
872
|
+
_context12.next = 6;
|
|
945
873
|
return this.client.ContentObjectMetadata({
|
|
946
874
|
versionHash: marketplaceHash,
|
|
947
875
|
metadataSubtree: "public/asset_metadata/info/branding/custom_css",
|
|
@@ -950,21 +878,21 @@ exports.MarketplaceCSS = /*#__PURE__*/function () {
|
|
|
950
878
|
});
|
|
951
879
|
|
|
952
880
|
case 6:
|
|
953
|
-
this.cachedCSS[marketplaceHash] =
|
|
881
|
+
this.cachedCSS[marketplaceHash] = _context12.sent;
|
|
954
882
|
|
|
955
883
|
case 7:
|
|
956
|
-
return
|
|
884
|
+
return _context12.abrupt("return", this.cachedCSS[marketplaceHash] || "");
|
|
957
885
|
|
|
958
886
|
case 8:
|
|
959
887
|
case "end":
|
|
960
|
-
return
|
|
888
|
+
return _context12.stop();
|
|
961
889
|
}
|
|
962
890
|
}
|
|
963
|
-
},
|
|
891
|
+
}, _callee12, this);
|
|
964
892
|
}));
|
|
965
893
|
|
|
966
894
|
return function (_x5) {
|
|
967
|
-
return
|
|
895
|
+
return _ref27.apply(this, arguments);
|
|
968
896
|
};
|
|
969
897
|
}();
|
|
970
898
|
/**
|
|
@@ -979,36 +907,36 @@ exports.MarketplaceCSS = /*#__PURE__*/function () {
|
|
|
979
907
|
*/
|
|
980
908
|
|
|
981
909
|
|
|
982
|
-
exports.AvailableMarketplaces = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
983
|
-
var
|
|
910
|
+
exports.AvailableMarketplaces = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
|
|
911
|
+
var _ref29,
|
|
984
912
|
organizeById,
|
|
985
|
-
|
|
913
|
+
_ref29$forceReload,
|
|
986
914
|
forceReload,
|
|
987
|
-
|
|
915
|
+
_args13 = arguments;
|
|
988
916
|
|
|
989
|
-
return _regeneratorRuntime.wrap(function
|
|
917
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
990
918
|
while (1) {
|
|
991
|
-
switch (
|
|
919
|
+
switch (_context13.prev = _context13.next) {
|
|
992
920
|
case 0:
|
|
993
|
-
|
|
921
|
+
_ref29 = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {}, organizeById = _ref29.organizeById, _ref29$forceReload = _ref29.forceReload, forceReload = _ref29$forceReload === void 0 ? false : _ref29$forceReload;
|
|
994
922
|
|
|
995
923
|
if (!forceReload) {
|
|
996
|
-
|
|
924
|
+
_context13.next = 4;
|
|
997
925
|
break;
|
|
998
926
|
}
|
|
999
927
|
|
|
1000
|
-
|
|
928
|
+
_context13.next = 4;
|
|
1001
929
|
return this.LoadAvailableMarketplaces(true);
|
|
1002
930
|
|
|
1003
931
|
case 4:
|
|
1004
|
-
return
|
|
932
|
+
return _context13.abrupt("return", _objectSpread({}, organizeById ? this.availableMarketplacesById : this.availableMarketplaces));
|
|
1005
933
|
|
|
1006
934
|
case 5:
|
|
1007
935
|
case "end":
|
|
1008
|
-
return
|
|
936
|
+
return _context13.stop();
|
|
1009
937
|
}
|
|
1010
938
|
}
|
|
1011
|
-
},
|
|
939
|
+
}, _callee13, this);
|
|
1012
940
|
}));
|
|
1013
941
|
/**
|
|
1014
942
|
* Retrieve full information about the specified marketplace
|
|
@@ -1023,25 +951,25 @@ exports.AvailableMarketplaces = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_re
|
|
|
1023
951
|
*/
|
|
1024
952
|
|
|
1025
953
|
exports.Marketplace = /*#__PURE__*/function () {
|
|
1026
|
-
var
|
|
954
|
+
var _ref31 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref30) {
|
|
1027
955
|
var marketplaceParams;
|
|
1028
|
-
return _regeneratorRuntime.wrap(function
|
|
956
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
1029
957
|
while (1) {
|
|
1030
|
-
switch (
|
|
958
|
+
switch (_context14.prev = _context14.next) {
|
|
1031
959
|
case 0:
|
|
1032
|
-
marketplaceParams =
|
|
1033
|
-
return
|
|
960
|
+
marketplaceParams = _ref30.marketplaceParams;
|
|
961
|
+
return _context14.abrupt("return", this.LoadMarketplace(marketplaceParams));
|
|
1034
962
|
|
|
1035
963
|
case 2:
|
|
1036
964
|
case "end":
|
|
1037
|
-
return
|
|
965
|
+
return _context14.stop();
|
|
1038
966
|
}
|
|
1039
967
|
}
|
|
1040
|
-
},
|
|
968
|
+
}, _callee14, this);
|
|
1041
969
|
}));
|
|
1042
970
|
|
|
1043
971
|
return function (_x6) {
|
|
1044
|
-
return
|
|
972
|
+
return _ref31.apply(this, arguments);
|
|
1045
973
|
};
|
|
1046
974
|
}();
|
|
1047
975
|
/* NFTS */
|
|
@@ -1058,32 +986,32 @@ exports.Marketplace = /*#__PURE__*/function () {
|
|
|
1058
986
|
|
|
1059
987
|
|
|
1060
988
|
exports.NFTContractStats = /*#__PURE__*/function () {
|
|
1061
|
-
var
|
|
989
|
+
var _ref33 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(_ref32) {
|
|
1062
990
|
var contractAddress;
|
|
1063
|
-
return _regeneratorRuntime.wrap(function
|
|
991
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
1064
992
|
while (1) {
|
|
1065
|
-
switch (
|
|
993
|
+
switch (_context15.prev = _context15.next) {
|
|
1066
994
|
case 0:
|
|
1067
|
-
contractAddress =
|
|
1068
|
-
|
|
995
|
+
contractAddress = _ref32.contractAddress;
|
|
996
|
+
_context15.next = 3;
|
|
1069
997
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
1070
998
|
path: UrlJoin("as", "nft", "info", contractAddress),
|
|
1071
999
|
method: "GET"
|
|
1072
1000
|
}));
|
|
1073
1001
|
|
|
1074
1002
|
case 3:
|
|
1075
|
-
return
|
|
1003
|
+
return _context15.abrupt("return", _context15.sent);
|
|
1076
1004
|
|
|
1077
1005
|
case 4:
|
|
1078
1006
|
case "end":
|
|
1079
|
-
return
|
|
1007
|
+
return _context15.stop();
|
|
1080
1008
|
}
|
|
1081
1009
|
}
|
|
1082
|
-
},
|
|
1010
|
+
}, _callee15, this);
|
|
1083
1011
|
}));
|
|
1084
1012
|
|
|
1085
1013
|
return function (_x7) {
|
|
1086
|
-
return
|
|
1014
|
+
return _ref33.apply(this, arguments);
|
|
1087
1015
|
};
|
|
1088
1016
|
}();
|
|
1089
1017
|
/**
|
|
@@ -1097,27 +1025,27 @@ exports.NFTContractStats = /*#__PURE__*/function () {
|
|
|
1097
1025
|
|
|
1098
1026
|
|
|
1099
1027
|
exports.NFT = /*#__PURE__*/function () {
|
|
1100
|
-
var
|
|
1028
|
+
var _ref35 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(_ref34) {
|
|
1101
1029
|
var tokenId, contractAddress, nft;
|
|
1102
|
-
return _regeneratorRuntime.wrap(function
|
|
1030
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
1103
1031
|
while (1) {
|
|
1104
|
-
switch (
|
|
1032
|
+
switch (_context16.prev = _context16.next) {
|
|
1105
1033
|
case 0:
|
|
1106
|
-
tokenId =
|
|
1107
|
-
|
|
1108
|
-
|
|
1034
|
+
tokenId = _ref34.tokenId, contractAddress = _ref34.contractAddress;
|
|
1035
|
+
_context16.t0 = FormatNFTDetails;
|
|
1036
|
+
_context16.next = 4;
|
|
1109
1037
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
1110
1038
|
path: UrlJoin("as", "nft", "info", contractAddress, tokenId),
|
|
1111
1039
|
method: "GET"
|
|
1112
1040
|
}));
|
|
1113
1041
|
|
|
1114
1042
|
case 4:
|
|
1115
|
-
|
|
1116
|
-
nft = (0,
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1043
|
+
_context16.t1 = _context16.sent;
|
|
1044
|
+
nft = (0, _context16.t0)(_context16.t1);
|
|
1045
|
+
_context16.t2 = _objectSpread;
|
|
1046
|
+
_context16.t3 = _objectSpread;
|
|
1047
|
+
_context16.t4 = {};
|
|
1048
|
+
_context16.next = 11;
|
|
1121
1049
|
return this.client.ContentObjectMetadata({
|
|
1122
1050
|
versionHash: nft.details.VersionHash,
|
|
1123
1051
|
metadataSubtree: "public/asset_metadata/nft",
|
|
@@ -1125,39 +1053,39 @@ exports.NFT = /*#__PURE__*/function () {
|
|
|
1125
1053
|
});
|
|
1126
1054
|
|
|
1127
1055
|
case 11:
|
|
1128
|
-
|
|
1056
|
+
_context16.t5 = _context16.sent;
|
|
1129
1057
|
|
|
1130
|
-
if (
|
|
1131
|
-
|
|
1058
|
+
if (_context16.t5) {
|
|
1059
|
+
_context16.next = 14;
|
|
1132
1060
|
break;
|
|
1133
1061
|
}
|
|
1134
1062
|
|
|
1135
|
-
|
|
1063
|
+
_context16.t5 = {};
|
|
1136
1064
|
|
|
1137
1065
|
case 14:
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
nft.metadata = (0,
|
|
1142
|
-
|
|
1066
|
+
_context16.t6 = _context16.t5;
|
|
1067
|
+
_context16.t7 = (0, _context16.t3)(_context16.t4, _context16.t6);
|
|
1068
|
+
_context16.t8 = nft.metadata || {};
|
|
1069
|
+
nft.metadata = (0, _context16.t2)(_context16.t7, _context16.t8);
|
|
1070
|
+
_context16.next = 20;
|
|
1143
1071
|
return this.TenantConfiguration({
|
|
1144
1072
|
contractAddress: contractAddress
|
|
1145
1073
|
});
|
|
1146
1074
|
|
|
1147
1075
|
case 20:
|
|
1148
|
-
nft.config =
|
|
1149
|
-
return
|
|
1076
|
+
nft.config = _context16.sent;
|
|
1077
|
+
return _context16.abrupt("return", FormatNFTMetadata(this, nft));
|
|
1150
1078
|
|
|
1151
1079
|
case 22:
|
|
1152
1080
|
case "end":
|
|
1153
|
-
return
|
|
1081
|
+
return _context16.stop();
|
|
1154
1082
|
}
|
|
1155
1083
|
}
|
|
1156
|
-
},
|
|
1084
|
+
}, _callee16, this);
|
|
1157
1085
|
}));
|
|
1158
1086
|
|
|
1159
1087
|
return function (_x8) {
|
|
1160
|
-
return
|
|
1088
|
+
return _ref35.apply(this, arguments);
|
|
1161
1089
|
};
|
|
1162
1090
|
}();
|
|
1163
1091
|
/**
|
|
@@ -1174,23 +1102,23 @@ exports.NFT = /*#__PURE__*/function () {
|
|
|
1174
1102
|
|
|
1175
1103
|
|
|
1176
1104
|
exports.TransferNFT = /*#__PURE__*/function () {
|
|
1177
|
-
var
|
|
1105
|
+
var _ref37 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(_ref36) {
|
|
1178
1106
|
var contractAddress, tokenId, targetAddress;
|
|
1179
|
-
return _regeneratorRuntime.wrap(function
|
|
1107
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
1180
1108
|
while (1) {
|
|
1181
|
-
switch (
|
|
1109
|
+
switch (_context17.prev = _context17.next) {
|
|
1182
1110
|
case 0:
|
|
1183
|
-
contractAddress =
|
|
1111
|
+
contractAddress = _ref36.contractAddress, tokenId = _ref36.tokenId, targetAddress = _ref36.targetAddress;
|
|
1184
1112
|
|
|
1185
1113
|
if (!(!targetAddress || !Utils.ValidAddress(targetAddress))) {
|
|
1186
|
-
|
|
1114
|
+
_context17.next = 3;
|
|
1187
1115
|
break;
|
|
1188
1116
|
}
|
|
1189
1117
|
|
|
1190
1118
|
throw Error("Eluvio Wallet Client: Invalid or missing target address in UserTransferNFT");
|
|
1191
1119
|
|
|
1192
1120
|
case 3:
|
|
1193
|
-
|
|
1121
|
+
_context17.next = 5;
|
|
1194
1122
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1195
1123
|
path: UrlJoin("as", "wlt", "mkt", "xfer"),
|
|
1196
1124
|
method: "POST",
|
|
@@ -1205,18 +1133,18 @@ exports.TransferNFT = /*#__PURE__*/function () {
|
|
|
1205
1133
|
});
|
|
1206
1134
|
|
|
1207
1135
|
case 5:
|
|
1208
|
-
return
|
|
1136
|
+
return _context17.abrupt("return", _context17.sent);
|
|
1209
1137
|
|
|
1210
1138
|
case 6:
|
|
1211
1139
|
case "end":
|
|
1212
|
-
return
|
|
1140
|
+
return _context17.stop();
|
|
1213
1141
|
}
|
|
1214
1142
|
}
|
|
1215
|
-
},
|
|
1143
|
+
}, _callee17, this);
|
|
1216
1144
|
}));
|
|
1217
1145
|
|
|
1218
1146
|
return function (_x9) {
|
|
1219
|
-
return
|
|
1147
|
+
return _ref37.apply(this, arguments);
|
|
1220
1148
|
};
|
|
1221
1149
|
}();
|
|
1222
1150
|
/** LISTINGS */
|
|
@@ -1233,53 +1161,53 @@ exports.TransferNFT = /*#__PURE__*/function () {
|
|
|
1233
1161
|
|
|
1234
1162
|
|
|
1235
1163
|
exports.ListingStatus = /*#__PURE__*/function () {
|
|
1236
|
-
var
|
|
1164
|
+
var _ref39 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(_ref38) {
|
|
1237
1165
|
var listingId;
|
|
1238
|
-
return _regeneratorRuntime.wrap(function
|
|
1166
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
1239
1167
|
while (1) {
|
|
1240
|
-
switch (
|
|
1168
|
+
switch (_context18.prev = _context18.next) {
|
|
1241
1169
|
case 0:
|
|
1242
|
-
listingId =
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1170
|
+
listingId = _ref38.listingId;
|
|
1171
|
+
_context18.prev = 1;
|
|
1172
|
+
_context18.t0 = Utils;
|
|
1173
|
+
_context18.next = 5;
|
|
1246
1174
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1247
1175
|
path: UrlJoin("as", "mkt", "status", listingId),
|
|
1248
1176
|
method: "GET"
|
|
1249
1177
|
});
|
|
1250
1178
|
|
|
1251
1179
|
case 5:
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
return
|
|
1180
|
+
_context18.t1 = _context18.sent;
|
|
1181
|
+
_context18.next = 8;
|
|
1182
|
+
return _context18.t0.ResponseToJson.call(_context18.t0, _context18.t1);
|
|
1255
1183
|
|
|
1256
1184
|
case 8:
|
|
1257
|
-
return
|
|
1185
|
+
return _context18.abrupt("return", _context18.sent);
|
|
1258
1186
|
|
|
1259
1187
|
case 11:
|
|
1260
|
-
|
|
1261
|
-
|
|
1188
|
+
_context18.prev = 11;
|
|
1189
|
+
_context18.t2 = _context18["catch"](1);
|
|
1262
1190
|
|
|
1263
|
-
if (!(
|
|
1264
|
-
|
|
1191
|
+
if (!(_context18.t2.status === 404)) {
|
|
1192
|
+
_context18.next = 15;
|
|
1265
1193
|
break;
|
|
1266
1194
|
}
|
|
1267
1195
|
|
|
1268
|
-
return
|
|
1196
|
+
return _context18.abrupt("return");
|
|
1269
1197
|
|
|
1270
1198
|
case 15:
|
|
1271
|
-
throw
|
|
1199
|
+
throw _context18.t2;
|
|
1272
1200
|
|
|
1273
1201
|
case 16:
|
|
1274
1202
|
case "end":
|
|
1275
|
-
return
|
|
1203
|
+
return _context18.stop();
|
|
1276
1204
|
}
|
|
1277
1205
|
}
|
|
1278
|
-
},
|
|
1206
|
+
}, _callee18, this, [[1, 11]]);
|
|
1279
1207
|
}));
|
|
1280
1208
|
|
|
1281
1209
|
return function (_x10) {
|
|
1282
|
-
return
|
|
1210
|
+
return _ref39.apply(this, arguments);
|
|
1283
1211
|
};
|
|
1284
1212
|
}();
|
|
1285
1213
|
/**
|
|
@@ -1296,41 +1224,41 @@ exports.ListingStatus = /*#__PURE__*/function () {
|
|
|
1296
1224
|
|
|
1297
1225
|
|
|
1298
1226
|
exports.Listing = /*#__PURE__*/function () {
|
|
1299
|
-
var
|
|
1227
|
+
var _ref41 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(_ref40) {
|
|
1300
1228
|
var listingId;
|
|
1301
|
-
return _regeneratorRuntime.wrap(function
|
|
1229
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
1302
1230
|
while (1) {
|
|
1303
|
-
switch (
|
|
1231
|
+
switch (_context19.prev = _context19.next) {
|
|
1304
1232
|
case 0:
|
|
1305
|
-
listingId =
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1233
|
+
listingId = _ref40.listingId;
|
|
1234
|
+
_context19.t0 = FormatNFT;
|
|
1235
|
+
_context19.t1 = this;
|
|
1236
|
+
_context19.t2 = Utils;
|
|
1237
|
+
_context19.next = 6;
|
|
1310
1238
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1311
1239
|
path: UrlJoin("as", "mkt", "l", listingId),
|
|
1312
1240
|
method: "GET"
|
|
1313
1241
|
});
|
|
1314
1242
|
|
|
1315
1243
|
case 6:
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
return
|
|
1244
|
+
_context19.t3 = _context19.sent;
|
|
1245
|
+
_context19.next = 9;
|
|
1246
|
+
return _context19.t2.ResponseToJson.call(_context19.t2, _context19.t3);
|
|
1319
1247
|
|
|
1320
1248
|
case 9:
|
|
1321
|
-
|
|
1322
|
-
return
|
|
1249
|
+
_context19.t4 = _context19.sent;
|
|
1250
|
+
return _context19.abrupt("return", (0, _context19.t0)(_context19.t1, _context19.t4));
|
|
1323
1251
|
|
|
1324
1252
|
case 11:
|
|
1325
1253
|
case "end":
|
|
1326
|
-
return
|
|
1254
|
+
return _context19.stop();
|
|
1327
1255
|
}
|
|
1328
1256
|
}
|
|
1329
|
-
},
|
|
1257
|
+
}, _callee19, this);
|
|
1330
1258
|
}));
|
|
1331
1259
|
|
|
1332
1260
|
return function (_x11) {
|
|
1333
|
-
return
|
|
1261
|
+
return _ref41.apply(this, arguments);
|
|
1334
1262
|
};
|
|
1335
1263
|
}();
|
|
1336
1264
|
/**
|
|
@@ -1368,22 +1296,22 @@ exports.Listing = /*#__PURE__*/function () {
|
|
|
1368
1296
|
*/
|
|
1369
1297
|
|
|
1370
1298
|
|
|
1371
|
-
exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1372
|
-
var
|
|
1373
|
-
return _regeneratorRuntime.wrap(function
|
|
1299
|
+
exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20() {
|
|
1300
|
+
var _args20 = arguments;
|
|
1301
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
1374
1302
|
while (1) {
|
|
1375
|
-
switch (
|
|
1303
|
+
switch (_context20.prev = _context20.next) {
|
|
1376
1304
|
case 0:
|
|
1377
|
-
return
|
|
1305
|
+
return _context20.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1378
1306
|
mode: "listings"
|
|
1379
|
-
},
|
|
1307
|
+
}, _args20[0] || {})));
|
|
1380
1308
|
|
|
1381
1309
|
case 1:
|
|
1382
1310
|
case "end":
|
|
1383
|
-
return
|
|
1311
|
+
return _context20.stop();
|
|
1384
1312
|
}
|
|
1385
1313
|
}
|
|
1386
|
-
},
|
|
1314
|
+
}, _callee20, this);
|
|
1387
1315
|
}));
|
|
1388
1316
|
/**
|
|
1389
1317
|
* Retrieve stats for listings matching the specified parameters.
|
|
@@ -1418,22 +1346,22 @@ exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRunt
|
|
|
1418
1346
|
* @returns {Promise<Object>} - Statistics about listings. All prices in USD.
|
|
1419
1347
|
*/
|
|
1420
1348
|
|
|
1421
|
-
exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1422
|
-
var
|
|
1423
|
-
return _regeneratorRuntime.wrap(function
|
|
1349
|
+
exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21() {
|
|
1350
|
+
var _args21 = arguments;
|
|
1351
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
1424
1352
|
while (1) {
|
|
1425
|
-
switch (
|
|
1353
|
+
switch (_context21.prev = _context21.next) {
|
|
1426
1354
|
case 0:
|
|
1427
|
-
return
|
|
1355
|
+
return _context21.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1428
1356
|
mode: "listing-stats"
|
|
1429
|
-
},
|
|
1357
|
+
}, _args21[0] || {})));
|
|
1430
1358
|
|
|
1431
1359
|
case 1:
|
|
1432
1360
|
case "end":
|
|
1433
|
-
return
|
|
1361
|
+
return _context21.stop();
|
|
1434
1362
|
}
|
|
1435
1363
|
}
|
|
1436
|
-
},
|
|
1364
|
+
}, _callee21, this);
|
|
1437
1365
|
}));
|
|
1438
1366
|
/**
|
|
1439
1367
|
* Retrieve sales matching the specified parameters.
|
|
@@ -1467,22 +1395,22 @@ exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
|
|
|
1467
1395
|
* @returns {Promise<Object>} - Results of the query and pagination info
|
|
1468
1396
|
*/
|
|
1469
1397
|
|
|
1470
|
-
exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1471
|
-
var
|
|
1472
|
-
return _regeneratorRuntime.wrap(function
|
|
1398
|
+
exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22() {
|
|
1399
|
+
var _args22 = arguments;
|
|
1400
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
1473
1401
|
while (1) {
|
|
1474
|
-
switch (
|
|
1402
|
+
switch (_context22.prev = _context22.next) {
|
|
1475
1403
|
case 0:
|
|
1476
|
-
return
|
|
1404
|
+
return _context22.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1477
1405
|
mode: "sales"
|
|
1478
|
-
},
|
|
1406
|
+
}, _args22[0] || {})));
|
|
1479
1407
|
|
|
1480
1408
|
case 1:
|
|
1481
1409
|
case "end":
|
|
1482
|
-
return
|
|
1410
|
+
return _context22.stop();
|
|
1483
1411
|
}
|
|
1484
1412
|
}
|
|
1485
|
-
},
|
|
1413
|
+
}, _callee22, this);
|
|
1486
1414
|
}));
|
|
1487
1415
|
/**
|
|
1488
1416
|
* Retrieve sales and transfers matching the specified parameters.
|
|
@@ -1516,22 +1444,22 @@ exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
|
|
1516
1444
|
* @returns {Promise<Object>} - Results of the query and pagination info
|
|
1517
1445
|
*/
|
|
1518
1446
|
|
|
1519
|
-
exports.Transfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1520
|
-
var
|
|
1521
|
-
return _regeneratorRuntime.wrap(function
|
|
1447
|
+
exports.Transfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23() {
|
|
1448
|
+
var _args23 = arguments;
|
|
1449
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
1522
1450
|
while (1) {
|
|
1523
|
-
switch (
|
|
1451
|
+
switch (_context23.prev = _context23.next) {
|
|
1524
1452
|
case 0:
|
|
1525
|
-
return
|
|
1453
|
+
return _context23.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1526
1454
|
mode: "transfers"
|
|
1527
|
-
},
|
|
1455
|
+
}, _args23[0] || {})));
|
|
1528
1456
|
|
|
1529
1457
|
case 1:
|
|
1530
1458
|
case "end":
|
|
1531
|
-
return
|
|
1459
|
+
return _context23.stop();
|
|
1532
1460
|
}
|
|
1533
1461
|
}
|
|
1534
|
-
},
|
|
1462
|
+
}, _callee23, this);
|
|
1535
1463
|
}));
|
|
1536
1464
|
/**
|
|
1537
1465
|
* Retrieve stats for listings matching the specified parameters.
|
|
@@ -1565,22 +1493,22 @@ exports.Transfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
|
|
|
1565
1493
|
* @returns {Promise<Object>} - Statistics about sales. All prices in USD.
|
|
1566
1494
|
*/
|
|
1567
1495
|
|
|
1568
|
-
exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1569
|
-
var
|
|
1570
|
-
return _regeneratorRuntime.wrap(function
|
|
1496
|
+
exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24() {
|
|
1497
|
+
var _args24 = arguments;
|
|
1498
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
1571
1499
|
while (1) {
|
|
1572
|
-
switch (
|
|
1500
|
+
switch (_context24.prev = _context24.next) {
|
|
1573
1501
|
case 0:
|
|
1574
|
-
return
|
|
1502
|
+
return _context24.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1575
1503
|
mode: "sales-stats"
|
|
1576
|
-
},
|
|
1504
|
+
}, _args24[0] || {})));
|
|
1577
1505
|
|
|
1578
1506
|
case 1:
|
|
1579
1507
|
case "end":
|
|
1580
|
-
return
|
|
1508
|
+
return _context24.stop();
|
|
1581
1509
|
}
|
|
1582
1510
|
}
|
|
1583
|
-
},
|
|
1511
|
+
}, _callee24, this);
|
|
1584
1512
|
}));
|
|
1585
1513
|
/**
|
|
1586
1514
|
* Get the leaderboard rankings for the specified marketplace. If user address is specified, will return the ranking for the specified user (if present)
|
|
@@ -1596,19 +1524,19 @@ exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRu
|
|
|
1596
1524
|
*/
|
|
1597
1525
|
|
|
1598
1526
|
exports.Leaderboard = /*#__PURE__*/function () {
|
|
1599
|
-
var
|
|
1527
|
+
var _ref48 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(_ref47) {
|
|
1600
1528
|
var userAddress,
|
|
1601
1529
|
marketplaceParams,
|
|
1602
1530
|
params,
|
|
1603
|
-
|
|
1604
|
-
return _regeneratorRuntime.wrap(function
|
|
1531
|
+
_args25 = arguments;
|
|
1532
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
1605
1533
|
while (1) {
|
|
1606
|
-
switch (
|
|
1534
|
+
switch (_context25.prev = _context25.next) {
|
|
1607
1535
|
case 0:
|
|
1608
|
-
userAddress =
|
|
1536
|
+
userAddress = _ref47.userAddress, marketplaceParams = _ref47.marketplaceParams;
|
|
1609
1537
|
|
|
1610
1538
|
if (!userAddress) {
|
|
1611
|
-
|
|
1539
|
+
_context25.next = 20;
|
|
1612
1540
|
break;
|
|
1613
1541
|
}
|
|
1614
1542
|
|
|
@@ -1617,24 +1545,24 @@ exports.Leaderboard = /*#__PURE__*/function () {
|
|
|
1617
1545
|
};
|
|
1618
1546
|
|
|
1619
1547
|
if (!marketplaceParams) {
|
|
1620
|
-
|
|
1548
|
+
_context25.next = 10;
|
|
1621
1549
|
break;
|
|
1622
1550
|
}
|
|
1623
1551
|
|
|
1624
|
-
|
|
1625
|
-
|
|
1552
|
+
_context25.t0 = "tenant:eq:";
|
|
1553
|
+
_context25.next = 7;
|
|
1626
1554
|
return this.MarketplaceInfo({
|
|
1627
1555
|
marketplaceParams: marketplaceParams
|
|
1628
1556
|
});
|
|
1629
1557
|
|
|
1630
1558
|
case 7:
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
params.filter = [
|
|
1559
|
+
_context25.t1 = _context25.sent.tenantId;
|
|
1560
|
+
_context25.t2 = _context25.t0.concat.call(_context25.t0, _context25.t1);
|
|
1561
|
+
params.filter = [_context25.t2];
|
|
1634
1562
|
|
|
1635
1563
|
case 10:
|
|
1636
|
-
|
|
1637
|
-
|
|
1564
|
+
_context25.t4 = Utils;
|
|
1565
|
+
_context25.next = 13;
|
|
1638
1566
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1639
1567
|
path: UrlJoin("as", "wlt", "ranks"),
|
|
1640
1568
|
method: "GET",
|
|
@@ -1642,38 +1570,38 @@ exports.Leaderboard = /*#__PURE__*/function () {
|
|
|
1642
1570
|
});
|
|
1643
1571
|
|
|
1644
1572
|
case 13:
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
return
|
|
1573
|
+
_context25.t5 = _context25.sent;
|
|
1574
|
+
_context25.next = 16;
|
|
1575
|
+
return _context25.t4.ResponseToJson.call(_context25.t4, _context25.t5);
|
|
1648
1576
|
|
|
1649
1577
|
case 16:
|
|
1650
|
-
|
|
1578
|
+
_context25.t3 = _context25.sent;
|
|
1651
1579
|
|
|
1652
|
-
if (
|
|
1653
|
-
|
|
1580
|
+
if (_context25.t3) {
|
|
1581
|
+
_context25.next = 19;
|
|
1654
1582
|
break;
|
|
1655
1583
|
}
|
|
1656
1584
|
|
|
1657
|
-
|
|
1585
|
+
_context25.t3 = [];
|
|
1658
1586
|
|
|
1659
1587
|
case 19:
|
|
1660
|
-
return
|
|
1588
|
+
return _context25.abrupt("return", _context25.t3[0]);
|
|
1661
1589
|
|
|
1662
1590
|
case 20:
|
|
1663
|
-
return
|
|
1591
|
+
return _context25.abrupt("return", this.FilteredQuery(_objectSpread({
|
|
1664
1592
|
mode: "leaderboard"
|
|
1665
|
-
},
|
|
1593
|
+
}, _args25[0] || {})));
|
|
1666
1594
|
|
|
1667
1595
|
case 21:
|
|
1668
1596
|
case "end":
|
|
1669
|
-
return
|
|
1597
|
+
return _context25.stop();
|
|
1670
1598
|
}
|
|
1671
1599
|
}
|
|
1672
|
-
},
|
|
1600
|
+
}, _callee25, this);
|
|
1673
1601
|
}));
|
|
1674
1602
|
|
|
1675
1603
|
return function (_x12) {
|
|
1676
|
-
return
|
|
1604
|
+
return _ref48.apply(this, arguments);
|
|
1677
1605
|
};
|
|
1678
1606
|
}();
|
|
1679
1607
|
/**
|
|
@@ -1693,22 +1621,22 @@ exports.Leaderboard = /*#__PURE__*/function () {
|
|
|
1693
1621
|
|
|
1694
1622
|
|
|
1695
1623
|
exports.CreateListing = /*#__PURE__*/function () {
|
|
1696
|
-
var
|
|
1624
|
+
var _ref50 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(_ref49) {
|
|
1697
1625
|
var contractAddress, tokenId, price, listingId;
|
|
1698
|
-
return _regeneratorRuntime.wrap(function
|
|
1626
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
1699
1627
|
while (1) {
|
|
1700
|
-
switch (
|
|
1628
|
+
switch (_context26.prev = _context26.next) {
|
|
1701
1629
|
case 0:
|
|
1702
|
-
contractAddress =
|
|
1630
|
+
contractAddress = _ref49.contractAddress, tokenId = _ref49.tokenId, price = _ref49.price, listingId = _ref49.listingId;
|
|
1703
1631
|
contractAddress = Utils.FormatAddress(contractAddress);
|
|
1704
1632
|
|
|
1705
1633
|
if (!listingId) {
|
|
1706
|
-
|
|
1634
|
+
_context26.next = 12;
|
|
1707
1635
|
break;
|
|
1708
1636
|
}
|
|
1709
1637
|
|
|
1710
|
-
|
|
1711
|
-
|
|
1638
|
+
_context26.t0 = Utils;
|
|
1639
|
+
_context26.next = 6;
|
|
1712
1640
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1713
1641
|
path: UrlJoin("as", "wlt", "mkt"),
|
|
1714
1642
|
method: "PUT",
|
|
@@ -1722,16 +1650,16 @@ exports.CreateListing = /*#__PURE__*/function () {
|
|
|
1722
1650
|
});
|
|
1723
1651
|
|
|
1724
1652
|
case 6:
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
return
|
|
1653
|
+
_context26.t1 = _context26.sent;
|
|
1654
|
+
_context26.next = 9;
|
|
1655
|
+
return _context26.t0.ResponseToFormat.call(_context26.t0, "text", _context26.t1);
|
|
1728
1656
|
|
|
1729
1657
|
case 9:
|
|
1730
|
-
return
|
|
1658
|
+
return _context26.abrupt("return", _context26.sent);
|
|
1731
1659
|
|
|
1732
1660
|
case 12:
|
|
1733
|
-
|
|
1734
|
-
|
|
1661
|
+
_context26.t2 = Utils;
|
|
1662
|
+
_context26.next = 15;
|
|
1735
1663
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1736
1664
|
path: UrlJoin("as", "wlt", "mkt"),
|
|
1737
1665
|
method: "POST",
|
|
@@ -1746,23 +1674,23 @@ exports.CreateListing = /*#__PURE__*/function () {
|
|
|
1746
1674
|
});
|
|
1747
1675
|
|
|
1748
1676
|
case 15:
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
return
|
|
1677
|
+
_context26.t3 = _context26.sent;
|
|
1678
|
+
_context26.next = 18;
|
|
1679
|
+
return _context26.t2.ResponseToJson.call(_context26.t2, _context26.t3);
|
|
1752
1680
|
|
|
1753
1681
|
case 18:
|
|
1754
|
-
return
|
|
1682
|
+
return _context26.abrupt("return", _context26.sent);
|
|
1755
1683
|
|
|
1756
1684
|
case 19:
|
|
1757
1685
|
case "end":
|
|
1758
|
-
return
|
|
1686
|
+
return _context26.stop();
|
|
1759
1687
|
}
|
|
1760
1688
|
}
|
|
1761
|
-
},
|
|
1689
|
+
}, _callee26, this);
|
|
1762
1690
|
}));
|
|
1763
1691
|
|
|
1764
1692
|
return function (_x13) {
|
|
1765
|
-
return
|
|
1693
|
+
return _ref50.apply(this, arguments);
|
|
1766
1694
|
};
|
|
1767
1695
|
}();
|
|
1768
1696
|
/**
|
|
@@ -1777,14 +1705,14 @@ exports.CreateListing = /*#__PURE__*/function () {
|
|
|
1777
1705
|
|
|
1778
1706
|
|
|
1779
1707
|
exports.RemoveListing = /*#__PURE__*/function () {
|
|
1780
|
-
var
|
|
1708
|
+
var _ref52 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(_ref51) {
|
|
1781
1709
|
var listingId;
|
|
1782
|
-
return _regeneratorRuntime.wrap(function
|
|
1710
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
1783
1711
|
while (1) {
|
|
1784
|
-
switch (
|
|
1712
|
+
switch (_context27.prev = _context27.next) {
|
|
1785
1713
|
case 0:
|
|
1786
|
-
listingId =
|
|
1787
|
-
|
|
1714
|
+
listingId = _ref51.listingId;
|
|
1715
|
+
_context27.next = 3;
|
|
1788
1716
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1789
1717
|
path: UrlJoin("as", "wlt", "mkt", listingId),
|
|
1790
1718
|
method: "DELETE",
|
|
@@ -1795,14 +1723,14 @@ exports.RemoveListing = /*#__PURE__*/function () {
|
|
|
1795
1723
|
|
|
1796
1724
|
case 3:
|
|
1797
1725
|
case "end":
|
|
1798
|
-
return
|
|
1726
|
+
return _context27.stop();
|
|
1799
1727
|
}
|
|
1800
1728
|
}
|
|
1801
|
-
},
|
|
1729
|
+
}, _callee27, this);
|
|
1802
1730
|
}));
|
|
1803
1731
|
|
|
1804
1732
|
return function (_x14) {
|
|
1805
|
-
return
|
|
1733
|
+
return _ref52.apply(this, arguments);
|
|
1806
1734
|
};
|
|
1807
1735
|
}();
|
|
1808
1736
|
/**
|
|
@@ -1819,30 +1747,30 @@ exports.RemoveListing = /*#__PURE__*/function () {
|
|
|
1819
1747
|
|
|
1820
1748
|
|
|
1821
1749
|
exports.SalesNames = /*#__PURE__*/function () {
|
|
1822
|
-
var
|
|
1750
|
+
var _ref54 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref53) {
|
|
1823
1751
|
var marketplaceParams, tenantId;
|
|
1824
|
-
return _regeneratorRuntime.wrap(function
|
|
1752
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
1825
1753
|
while (1) {
|
|
1826
|
-
switch (
|
|
1754
|
+
switch (_context28.prev = _context28.next) {
|
|
1827
1755
|
case 0:
|
|
1828
|
-
marketplaceParams =
|
|
1756
|
+
marketplaceParams = _ref53.marketplaceParams;
|
|
1829
1757
|
|
|
1830
1758
|
if (!marketplaceParams) {
|
|
1831
|
-
|
|
1759
|
+
_context28.next = 5;
|
|
1832
1760
|
break;
|
|
1833
1761
|
}
|
|
1834
1762
|
|
|
1835
|
-
|
|
1763
|
+
_context28.next = 4;
|
|
1836
1764
|
return this.MarketplaceInfo({
|
|
1837
1765
|
marketplaceParams: marketplaceParams
|
|
1838
1766
|
});
|
|
1839
1767
|
|
|
1840
1768
|
case 4:
|
|
1841
|
-
tenantId =
|
|
1769
|
+
tenantId = _context28.sent.tenantId;
|
|
1842
1770
|
|
|
1843
1771
|
case 5:
|
|
1844
|
-
|
|
1845
|
-
|
|
1772
|
+
_context28.t0 = Utils;
|
|
1773
|
+
_context28.next = 8;
|
|
1846
1774
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1847
1775
|
path: UrlJoin("as", "mkt", "names", "hst"),
|
|
1848
1776
|
method: "GET",
|
|
@@ -1852,23 +1780,23 @@ exports.SalesNames = /*#__PURE__*/function () {
|
|
|
1852
1780
|
});
|
|
1853
1781
|
|
|
1854
1782
|
case 8:
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
return
|
|
1783
|
+
_context28.t1 = _context28.sent;
|
|
1784
|
+
_context28.next = 11;
|
|
1785
|
+
return _context28.t0.ResponseToJson.call(_context28.t0, _context28.t1);
|
|
1858
1786
|
|
|
1859
1787
|
case 11:
|
|
1860
|
-
return
|
|
1788
|
+
return _context28.abrupt("return", _context28.sent);
|
|
1861
1789
|
|
|
1862
1790
|
case 12:
|
|
1863
1791
|
case "end":
|
|
1864
|
-
return
|
|
1792
|
+
return _context28.stop();
|
|
1865
1793
|
}
|
|
1866
1794
|
}
|
|
1867
|
-
},
|
|
1795
|
+
}, _callee28, this);
|
|
1868
1796
|
}));
|
|
1869
1797
|
|
|
1870
1798
|
return function (_x15) {
|
|
1871
|
-
return
|
|
1799
|
+
return _ref54.apply(this, arguments);
|
|
1872
1800
|
};
|
|
1873
1801
|
}();
|
|
1874
1802
|
/**
|
|
@@ -1885,30 +1813,30 @@ exports.SalesNames = /*#__PURE__*/function () {
|
|
|
1885
1813
|
|
|
1886
1814
|
|
|
1887
1815
|
exports.ListingNames = /*#__PURE__*/function () {
|
|
1888
|
-
var
|
|
1816
|
+
var _ref56 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref55) {
|
|
1889
1817
|
var marketplaceParams, tenantId;
|
|
1890
|
-
return _regeneratorRuntime.wrap(function
|
|
1818
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
1891
1819
|
while (1) {
|
|
1892
|
-
switch (
|
|
1820
|
+
switch (_context29.prev = _context29.next) {
|
|
1893
1821
|
case 0:
|
|
1894
|
-
marketplaceParams =
|
|
1822
|
+
marketplaceParams = _ref55.marketplaceParams;
|
|
1895
1823
|
|
|
1896
1824
|
if (!marketplaceParams) {
|
|
1897
|
-
|
|
1825
|
+
_context29.next = 5;
|
|
1898
1826
|
break;
|
|
1899
1827
|
}
|
|
1900
1828
|
|
|
1901
|
-
|
|
1829
|
+
_context29.next = 4;
|
|
1902
1830
|
return this.MarketplaceInfo({
|
|
1903
1831
|
marketplaceParams: marketplaceParams
|
|
1904
1832
|
});
|
|
1905
1833
|
|
|
1906
1834
|
case 4:
|
|
1907
|
-
tenantId =
|
|
1835
|
+
tenantId = _context29.sent.tenantId;
|
|
1908
1836
|
|
|
1909
1837
|
case 5:
|
|
1910
|
-
|
|
1911
|
-
|
|
1838
|
+
_context29.t0 = Utils;
|
|
1839
|
+
_context29.next = 8;
|
|
1912
1840
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1913
1841
|
path: UrlJoin("as", "mkt", "names"),
|
|
1914
1842
|
method: "GET",
|
|
@@ -1918,23 +1846,23 @@ exports.ListingNames = /*#__PURE__*/function () {
|
|
|
1918
1846
|
});
|
|
1919
1847
|
|
|
1920
1848
|
case 8:
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
return
|
|
1849
|
+
_context29.t1 = _context29.sent;
|
|
1850
|
+
_context29.next = 11;
|
|
1851
|
+
return _context29.t0.ResponseToJson.call(_context29.t0, _context29.t1);
|
|
1924
1852
|
|
|
1925
1853
|
case 11:
|
|
1926
|
-
return
|
|
1854
|
+
return _context29.abrupt("return", _context29.sent);
|
|
1927
1855
|
|
|
1928
1856
|
case 12:
|
|
1929
1857
|
case "end":
|
|
1930
|
-
return
|
|
1858
|
+
return _context29.stop();
|
|
1931
1859
|
}
|
|
1932
1860
|
}
|
|
1933
|
-
},
|
|
1861
|
+
}, _callee29, this);
|
|
1934
1862
|
}));
|
|
1935
1863
|
|
|
1936
1864
|
return function (_x16) {
|
|
1937
|
-
return
|
|
1865
|
+
return _ref56.apply(this, arguments);
|
|
1938
1866
|
};
|
|
1939
1867
|
}();
|
|
1940
1868
|
/**
|
|
@@ -1949,15 +1877,15 @@ exports.ListingNames = /*#__PURE__*/function () {
|
|
|
1949
1877
|
|
|
1950
1878
|
|
|
1951
1879
|
exports.ListingEditionNames = /*#__PURE__*/function () {
|
|
1952
|
-
var
|
|
1880
|
+
var _ref58 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(_ref57) {
|
|
1953
1881
|
var displayName;
|
|
1954
|
-
return _regeneratorRuntime.wrap(function
|
|
1882
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
1955
1883
|
while (1) {
|
|
1956
|
-
switch (
|
|
1884
|
+
switch (_context30.prev = _context30.next) {
|
|
1957
1885
|
case 0:
|
|
1958
|
-
displayName =
|
|
1959
|
-
|
|
1960
|
-
|
|
1886
|
+
displayName = _ref57.displayName;
|
|
1887
|
+
_context30.t0 = Utils;
|
|
1888
|
+
_context30.next = 4;
|
|
1961
1889
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1962
1890
|
path: UrlJoin("as", "mkt", "editions"),
|
|
1963
1891
|
queryParams: {
|
|
@@ -1967,23 +1895,23 @@ exports.ListingEditionNames = /*#__PURE__*/function () {
|
|
|
1967
1895
|
});
|
|
1968
1896
|
|
|
1969
1897
|
case 4:
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
return
|
|
1898
|
+
_context30.t1 = _context30.sent;
|
|
1899
|
+
_context30.next = 7;
|
|
1900
|
+
return _context30.t0.ResponseToJson.call(_context30.t0, _context30.t1);
|
|
1973
1901
|
|
|
1974
1902
|
case 7:
|
|
1975
|
-
return
|
|
1903
|
+
return _context30.abrupt("return", _context30.sent);
|
|
1976
1904
|
|
|
1977
1905
|
case 8:
|
|
1978
1906
|
case "end":
|
|
1979
|
-
return
|
|
1907
|
+
return _context30.stop();
|
|
1980
1908
|
}
|
|
1981
1909
|
}
|
|
1982
|
-
},
|
|
1910
|
+
}, _callee30, this);
|
|
1983
1911
|
}));
|
|
1984
1912
|
|
|
1985
1913
|
return function (_x17) {
|
|
1986
|
-
return
|
|
1914
|
+
return _ref58.apply(this, arguments);
|
|
1987
1915
|
};
|
|
1988
1916
|
}();
|
|
1989
1917
|
/**
|
|
@@ -2000,46 +1928,46 @@ exports.ListingEditionNames = /*#__PURE__*/function () {
|
|
|
2000
1928
|
*/
|
|
2001
1929
|
|
|
2002
1930
|
|
|
2003
|
-
exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2004
|
-
var
|
|
1931
|
+
exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
|
|
1932
|
+
var _ref60,
|
|
2005
1933
|
marketplaceParams,
|
|
2006
1934
|
displayName,
|
|
2007
1935
|
filters,
|
|
2008
1936
|
attributes,
|
|
2009
|
-
|
|
1937
|
+
_args31 = arguments;
|
|
2010
1938
|
|
|
2011
|
-
return _regeneratorRuntime.wrap(function
|
|
1939
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
2012
1940
|
while (1) {
|
|
2013
|
-
switch (
|
|
1941
|
+
switch (_context31.prev = _context31.next) {
|
|
2014
1942
|
case 0:
|
|
2015
|
-
|
|
1943
|
+
_ref60 = _args31.length > 0 && _args31[0] !== undefined ? _args31[0] : {}, marketplaceParams = _ref60.marketplaceParams, displayName = _ref60.displayName;
|
|
2016
1944
|
filters = [];
|
|
2017
1945
|
|
|
2018
1946
|
if (!marketplaceParams) {
|
|
2019
|
-
|
|
1947
|
+
_context31.next = 10;
|
|
2020
1948
|
break;
|
|
2021
1949
|
}
|
|
2022
1950
|
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
1951
|
+
_context31.t0 = filters;
|
|
1952
|
+
_context31.t1 = "tenant:eq:";
|
|
1953
|
+
_context31.next = 7;
|
|
2026
1954
|
return this.MarketplaceInfo({
|
|
2027
1955
|
marketplaceParams: marketplaceParams
|
|
2028
1956
|
});
|
|
2029
1957
|
|
|
2030
1958
|
case 7:
|
|
2031
|
-
|
|
2032
|
-
|
|
1959
|
+
_context31.t2 = _context31.sent.tenantId;
|
|
1960
|
+
_context31.t3 = _context31.t1.concat.call(_context31.t1, _context31.t2);
|
|
2033
1961
|
|
|
2034
|
-
|
|
1962
|
+
_context31.t0.push.call(_context31.t0, _context31.t3);
|
|
2035
1963
|
|
|
2036
1964
|
case 10:
|
|
2037
1965
|
if (displayName) {
|
|
2038
1966
|
filters.push("nft/display_name:eq:".concat(displayName));
|
|
2039
1967
|
}
|
|
2040
1968
|
|
|
2041
|
-
|
|
2042
|
-
|
|
1969
|
+
_context31.t4 = Utils;
|
|
1970
|
+
_context31.next = 14;
|
|
2043
1971
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
2044
1972
|
path: UrlJoin("as", "mkt", "attributes"),
|
|
2045
1973
|
method: "GET",
|
|
@@ -2049,30 +1977,30 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
|
|
|
2049
1977
|
});
|
|
2050
1978
|
|
|
2051
1979
|
case 14:
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
return
|
|
1980
|
+
_context31.t5 = _context31.sent;
|
|
1981
|
+
_context31.next = 17;
|
|
1982
|
+
return _context31.t4.ResponseToJson.call(_context31.t4, _context31.t5);
|
|
2055
1983
|
|
|
2056
1984
|
case 17:
|
|
2057
|
-
attributes =
|
|
2058
|
-
return
|
|
2059
|
-
var trait_type =
|
|
2060
|
-
values =
|
|
1985
|
+
attributes = _context31.sent;
|
|
1986
|
+
return _context31.abrupt("return", attributes.map(function (_ref61) {
|
|
1987
|
+
var trait_type = _ref61.trait_type,
|
|
1988
|
+
values = _ref61.values;
|
|
2061
1989
|
return {
|
|
2062
1990
|
name: trait_type,
|
|
2063
1991
|
values: values
|
|
2064
1992
|
};
|
|
2065
|
-
}).filter(function (
|
|
2066
|
-
var name =
|
|
1993
|
+
}).filter(function (_ref62) {
|
|
1994
|
+
var name = _ref62.name;
|
|
2067
1995
|
return !["Content Fabric Hash", "Total Minted Supply", "Creator"].includes(name);
|
|
2068
1996
|
}));
|
|
2069
1997
|
|
|
2070
1998
|
case 19:
|
|
2071
1999
|
case "end":
|
|
2072
|
-
return
|
|
2000
|
+
return _context31.stop();
|
|
2073
2001
|
}
|
|
2074
2002
|
}
|
|
2075
|
-
},
|
|
2003
|
+
}, _callee31, this);
|
|
2076
2004
|
}));
|
|
2077
2005
|
/* PURCHASE / CLAIM */
|
|
2078
2006
|
|
|
@@ -2089,21 +2017,21 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
|
|
|
2089
2017
|
*/
|
|
2090
2018
|
|
|
2091
2019
|
exports.ClaimItem = /*#__PURE__*/function () {
|
|
2092
|
-
var
|
|
2020
|
+
var _ref64 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(_ref63) {
|
|
2093
2021
|
var marketplaceParams, sku, email, marketplaceInfo;
|
|
2094
|
-
return _regeneratorRuntime.wrap(function
|
|
2022
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
2095
2023
|
while (1) {
|
|
2096
|
-
switch (
|
|
2024
|
+
switch (_context32.prev = _context32.next) {
|
|
2097
2025
|
case 0:
|
|
2098
|
-
marketplaceParams =
|
|
2099
|
-
|
|
2026
|
+
marketplaceParams = _ref63.marketplaceParams, sku = _ref63.sku, email = _ref63.email;
|
|
2027
|
+
_context32.next = 3;
|
|
2100
2028
|
return this.MarketplaceInfo({
|
|
2101
2029
|
marketplaceParams: marketplaceParams
|
|
2102
2030
|
});
|
|
2103
2031
|
|
|
2104
2032
|
case 3:
|
|
2105
|
-
marketplaceInfo =
|
|
2106
|
-
|
|
2033
|
+
marketplaceInfo = _context32.sent;
|
|
2034
|
+
_context32.next = 6;
|
|
2107
2035
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
2108
2036
|
method: "POST",
|
|
2109
2037
|
path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
|
|
@@ -2120,14 +2048,14 @@ exports.ClaimItem = /*#__PURE__*/function () {
|
|
|
2120
2048
|
|
|
2121
2049
|
case 6:
|
|
2122
2050
|
case "end":
|
|
2123
|
-
return
|
|
2051
|
+
return _context32.stop();
|
|
2124
2052
|
}
|
|
2125
2053
|
}
|
|
2126
|
-
},
|
|
2054
|
+
}, _callee32, this);
|
|
2127
2055
|
}));
|
|
2128
2056
|
|
|
2129
2057
|
return function (_x18) {
|
|
2130
|
-
return
|
|
2058
|
+
return _ref64.apply(this, arguments);
|
|
2131
2059
|
};
|
|
2132
2060
|
}();
|
|
2133
2061
|
/* MINTING STATUS */
|
|
@@ -2145,61 +2073,61 @@ exports.ClaimItem = /*#__PURE__*/function () {
|
|
|
2145
2073
|
|
|
2146
2074
|
|
|
2147
2075
|
exports.ListingPurchaseStatus = /*#__PURE__*/function () {
|
|
2148
|
-
var
|
|
2076
|
+
var _ref66 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(_ref65) {
|
|
2149
2077
|
var listingId, confirmationId, listingStatus, statuses;
|
|
2150
|
-
return _regeneratorRuntime.wrap(function
|
|
2078
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
2151
2079
|
while (1) {
|
|
2152
|
-
switch (
|
|
2080
|
+
switch (_context33.prev = _context33.next) {
|
|
2153
2081
|
case 0:
|
|
2154
|
-
listingId =
|
|
2155
|
-
|
|
2156
|
-
|
|
2082
|
+
listingId = _ref65.listingId, confirmationId = _ref65.confirmationId;
|
|
2083
|
+
_context33.prev = 1;
|
|
2084
|
+
_context33.next = 4;
|
|
2157
2085
|
return this.ListingStatus({
|
|
2158
2086
|
listingId: listingId
|
|
2159
2087
|
});
|
|
2160
2088
|
|
|
2161
2089
|
case 4:
|
|
2162
|
-
listingStatus =
|
|
2090
|
+
listingStatus = _context33.sent;
|
|
2163
2091
|
|
|
2164
2092
|
if (listingStatus) {
|
|
2165
|
-
|
|
2093
|
+
_context33.next = 7;
|
|
2166
2094
|
break;
|
|
2167
2095
|
}
|
|
2168
2096
|
|
|
2169
2097
|
throw Error("Unable to find info for listing " + listingId);
|
|
2170
2098
|
|
|
2171
2099
|
case 7:
|
|
2172
|
-
|
|
2100
|
+
_context33.next = 9;
|
|
2173
2101
|
return this.MintingStatus({
|
|
2174
2102
|
tenantId: listingStatus.tenant
|
|
2175
2103
|
});
|
|
2176
2104
|
|
|
2177
2105
|
case 9:
|
|
2178
|
-
statuses =
|
|
2179
|
-
return
|
|
2106
|
+
statuses = _context33.sent;
|
|
2107
|
+
return _context33.abrupt("return", statuses.find(function (status) {
|
|
2180
2108
|
return status.op === "nft-transfer" && status.extra && status.extra[0] === confirmationId;
|
|
2181
2109
|
}) || {
|
|
2182
2110
|
status: "none"
|
|
2183
2111
|
});
|
|
2184
2112
|
|
|
2185
2113
|
case 13:
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
this.Log(
|
|
2189
|
-
return
|
|
2114
|
+
_context33.prev = 13;
|
|
2115
|
+
_context33.t0 = _context33["catch"](1);
|
|
2116
|
+
this.Log(_context33.t0, true);
|
|
2117
|
+
return _context33.abrupt("return", {
|
|
2190
2118
|
status: "unknown"
|
|
2191
2119
|
});
|
|
2192
2120
|
|
|
2193
2121
|
case 17:
|
|
2194
2122
|
case "end":
|
|
2195
|
-
return
|
|
2123
|
+
return _context33.stop();
|
|
2196
2124
|
}
|
|
2197
2125
|
}
|
|
2198
|
-
},
|
|
2126
|
+
}, _callee33, this, [[1, 13]]);
|
|
2199
2127
|
}));
|
|
2200
2128
|
|
|
2201
2129
|
return function (_x19) {
|
|
2202
|
-
return
|
|
2130
|
+
return _ref66.apply(this, arguments);
|
|
2203
2131
|
};
|
|
2204
2132
|
}();
|
|
2205
2133
|
/**
|
|
@@ -2215,52 +2143,52 @@ exports.ListingPurchaseStatus = /*#__PURE__*/function () {
|
|
|
2215
2143
|
|
|
2216
2144
|
|
|
2217
2145
|
exports.PurchaseStatus = /*#__PURE__*/function () {
|
|
2218
|
-
var
|
|
2146
|
+
var _ref68 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(_ref67) {
|
|
2219
2147
|
var marketplaceParams, confirmationId, marketplaceInfo, statuses;
|
|
2220
|
-
return _regeneratorRuntime.wrap(function
|
|
2148
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
2221
2149
|
while (1) {
|
|
2222
|
-
switch (
|
|
2150
|
+
switch (_context34.prev = _context34.next) {
|
|
2223
2151
|
case 0:
|
|
2224
|
-
marketplaceParams =
|
|
2225
|
-
|
|
2226
|
-
|
|
2152
|
+
marketplaceParams = _ref67.marketplaceParams, confirmationId = _ref67.confirmationId;
|
|
2153
|
+
_context34.prev = 1;
|
|
2154
|
+
_context34.next = 4;
|
|
2227
2155
|
return this.MarketplaceInfo({
|
|
2228
2156
|
marketplaceParams: marketplaceParams
|
|
2229
2157
|
});
|
|
2230
2158
|
|
|
2231
2159
|
case 4:
|
|
2232
|
-
marketplaceInfo =
|
|
2233
|
-
|
|
2160
|
+
marketplaceInfo = _context34.sent;
|
|
2161
|
+
_context34.next = 7;
|
|
2234
2162
|
return this.MintingStatus({
|
|
2235
2163
|
tenantId: marketplaceInfo.tenant_id
|
|
2236
2164
|
});
|
|
2237
2165
|
|
|
2238
2166
|
case 7:
|
|
2239
|
-
statuses =
|
|
2240
|
-
return
|
|
2167
|
+
statuses = _context34.sent;
|
|
2168
|
+
return _context34.abrupt("return", statuses.find(function (status) {
|
|
2241
2169
|
return status.op === "nft-buy" && status.confirmationId === confirmationId;
|
|
2242
2170
|
}) || {
|
|
2243
2171
|
status: "none"
|
|
2244
2172
|
});
|
|
2245
2173
|
|
|
2246
2174
|
case 11:
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
this.Log(
|
|
2250
|
-
return
|
|
2175
|
+
_context34.prev = 11;
|
|
2176
|
+
_context34.t0 = _context34["catch"](1);
|
|
2177
|
+
this.Log(_context34.t0, true);
|
|
2178
|
+
return _context34.abrupt("return", {
|
|
2251
2179
|
status: "unknown"
|
|
2252
2180
|
});
|
|
2253
2181
|
|
|
2254
2182
|
case 15:
|
|
2255
2183
|
case "end":
|
|
2256
|
-
return
|
|
2184
|
+
return _context34.stop();
|
|
2257
2185
|
}
|
|
2258
2186
|
}
|
|
2259
|
-
},
|
|
2187
|
+
}, _callee34, this, [[1, 11]]);
|
|
2260
2188
|
}));
|
|
2261
2189
|
|
|
2262
2190
|
return function (_x20) {
|
|
2263
|
-
return
|
|
2191
|
+
return _ref68.apply(this, arguments);
|
|
2264
2192
|
};
|
|
2265
2193
|
}();
|
|
2266
2194
|
/**
|
|
@@ -2276,52 +2204,52 @@ exports.PurchaseStatus = /*#__PURE__*/function () {
|
|
|
2276
2204
|
|
|
2277
2205
|
|
|
2278
2206
|
exports.ClaimStatus = /*#__PURE__*/function () {
|
|
2279
|
-
var
|
|
2207
|
+
var _ref70 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(_ref69) {
|
|
2280
2208
|
var marketplaceParams, sku, marketplaceInfo, statuses;
|
|
2281
|
-
return _regeneratorRuntime.wrap(function
|
|
2209
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
2282
2210
|
while (1) {
|
|
2283
|
-
switch (
|
|
2211
|
+
switch (_context35.prev = _context35.next) {
|
|
2284
2212
|
case 0:
|
|
2285
|
-
marketplaceParams =
|
|
2286
|
-
|
|
2287
|
-
|
|
2213
|
+
marketplaceParams = _ref69.marketplaceParams, sku = _ref69.sku;
|
|
2214
|
+
_context35.prev = 1;
|
|
2215
|
+
_context35.next = 4;
|
|
2288
2216
|
return this.MarketplaceInfo({
|
|
2289
2217
|
marketplaceParams: marketplaceParams
|
|
2290
2218
|
});
|
|
2291
2219
|
|
|
2292
2220
|
case 4:
|
|
2293
|
-
marketplaceInfo =
|
|
2294
|
-
|
|
2221
|
+
marketplaceInfo = _context35.sent;
|
|
2222
|
+
_context35.next = 7;
|
|
2295
2223
|
return this.MintingStatus({
|
|
2296
2224
|
tenantId: marketplaceInfo.tenantId
|
|
2297
2225
|
});
|
|
2298
2226
|
|
|
2299
2227
|
case 7:
|
|
2300
|
-
statuses =
|
|
2301
|
-
return
|
|
2228
|
+
statuses = _context35.sent;
|
|
2229
|
+
return _context35.abrupt("return", statuses.find(function (status) {
|
|
2302
2230
|
return status.op === "nft-claim" && status.marketplaceId === marketplaceInfo.marketplaceId && status.confirmationId === sku;
|
|
2303
2231
|
}) || {
|
|
2304
2232
|
status: "none"
|
|
2305
2233
|
});
|
|
2306
2234
|
|
|
2307
2235
|
case 11:
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
this.Log(
|
|
2311
|
-
return
|
|
2236
|
+
_context35.prev = 11;
|
|
2237
|
+
_context35.t0 = _context35["catch"](1);
|
|
2238
|
+
this.Log(_context35.t0, true);
|
|
2239
|
+
return _context35.abrupt("return", {
|
|
2312
2240
|
status: "unknown"
|
|
2313
2241
|
});
|
|
2314
2242
|
|
|
2315
2243
|
case 15:
|
|
2316
2244
|
case "end":
|
|
2317
|
-
return
|
|
2245
|
+
return _context35.stop();
|
|
2318
2246
|
}
|
|
2319
2247
|
}
|
|
2320
|
-
},
|
|
2248
|
+
}, _callee35, this, [[1, 11]]);
|
|
2321
2249
|
}));
|
|
2322
2250
|
|
|
2323
2251
|
return function (_x21) {
|
|
2324
|
-
return
|
|
2252
|
+
return _ref70.apply(this, arguments);
|
|
2325
2253
|
};
|
|
2326
2254
|
}();
|
|
2327
2255
|
/**
|
|
@@ -2337,52 +2265,52 @@ exports.ClaimStatus = /*#__PURE__*/function () {
|
|
|
2337
2265
|
|
|
2338
2266
|
|
|
2339
2267
|
exports.PackOpenStatus = /*#__PURE__*/function () {
|
|
2340
|
-
var
|
|
2268
|
+
var _ref72 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(_ref71) {
|
|
2341
2269
|
var contractAddress, tokenId, tenantConfig, statuses;
|
|
2342
|
-
return _regeneratorRuntime.wrap(function
|
|
2270
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context36) {
|
|
2343
2271
|
while (1) {
|
|
2344
|
-
switch (
|
|
2272
|
+
switch (_context36.prev = _context36.next) {
|
|
2345
2273
|
case 0:
|
|
2346
|
-
contractAddress =
|
|
2347
|
-
|
|
2348
|
-
|
|
2274
|
+
contractAddress = _ref71.contractAddress, tokenId = _ref71.tokenId;
|
|
2275
|
+
_context36.prev = 1;
|
|
2276
|
+
_context36.next = 4;
|
|
2349
2277
|
return this.TenantConfiguration({
|
|
2350
2278
|
contractAddress: contractAddress
|
|
2351
2279
|
});
|
|
2352
2280
|
|
|
2353
2281
|
case 4:
|
|
2354
|
-
tenantConfig =
|
|
2355
|
-
|
|
2282
|
+
tenantConfig = _context36.sent;
|
|
2283
|
+
_context36.next = 7;
|
|
2356
2284
|
return this.MintingStatus({
|
|
2357
2285
|
tenantId: tenantConfig.tenant
|
|
2358
2286
|
});
|
|
2359
2287
|
|
|
2360
2288
|
case 7:
|
|
2361
|
-
statuses =
|
|
2362
|
-
return
|
|
2289
|
+
statuses = _context36.sent;
|
|
2290
|
+
return _context36.abrupt("return", statuses.find(function (status) {
|
|
2363
2291
|
return status.op === "nft-open" && Utils.EqualAddress(contractAddress, status.address) && status.tokenId === tokenId;
|
|
2364
2292
|
}) || {
|
|
2365
2293
|
status: "none"
|
|
2366
2294
|
});
|
|
2367
2295
|
|
|
2368
2296
|
case 11:
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
this.Log(
|
|
2372
|
-
return
|
|
2297
|
+
_context36.prev = 11;
|
|
2298
|
+
_context36.t0 = _context36["catch"](1);
|
|
2299
|
+
this.Log(_context36.t0, true);
|
|
2300
|
+
return _context36.abrupt("return", {
|
|
2373
2301
|
status: "unknown"
|
|
2374
2302
|
});
|
|
2375
2303
|
|
|
2376
2304
|
case 15:
|
|
2377
2305
|
case "end":
|
|
2378
|
-
return
|
|
2306
|
+
return _context36.stop();
|
|
2379
2307
|
}
|
|
2380
2308
|
}
|
|
2381
|
-
},
|
|
2309
|
+
}, _callee36, this, [[1, 11]]);
|
|
2382
2310
|
}));
|
|
2383
2311
|
|
|
2384
2312
|
return function (_x22) {
|
|
2385
|
-
return
|
|
2313
|
+
return _ref72.apply(this, arguments);
|
|
2386
2314
|
};
|
|
2387
2315
|
}();
|
|
2388
2316
|
/**
|
|
@@ -2398,60 +2326,60 @@ exports.PackOpenStatus = /*#__PURE__*/function () {
|
|
|
2398
2326
|
|
|
2399
2327
|
|
|
2400
2328
|
exports.CollectionRedemptionStatus = /*#__PURE__*/function () {
|
|
2401
|
-
var
|
|
2329
|
+
var _ref74 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(_ref73) {
|
|
2402
2330
|
var marketplaceParams, confirmationId, statuses;
|
|
2403
|
-
return _regeneratorRuntime.wrap(function
|
|
2331
|
+
return _regeneratorRuntime.wrap(function _callee37$(_context37) {
|
|
2404
2332
|
while (1) {
|
|
2405
|
-
switch (
|
|
2333
|
+
switch (_context37.prev = _context37.next) {
|
|
2406
2334
|
case 0:
|
|
2407
|
-
marketplaceParams =
|
|
2408
|
-
|
|
2409
|
-
|
|
2335
|
+
marketplaceParams = _ref73.marketplaceParams, confirmationId = _ref73.confirmationId;
|
|
2336
|
+
_context37.prev = 1;
|
|
2337
|
+
_context37.next = 4;
|
|
2410
2338
|
return this.MintingStatus({
|
|
2411
2339
|
marketplaceParams: marketplaceParams
|
|
2412
2340
|
});
|
|
2413
2341
|
|
|
2414
2342
|
case 4:
|
|
2415
|
-
statuses =
|
|
2416
|
-
return
|
|
2343
|
+
statuses = _context37.sent;
|
|
2344
|
+
return _context37.abrupt("return", statuses.find(function (status) {
|
|
2417
2345
|
return status.op === "nft-redeem" && status.confirmationId === confirmationId;
|
|
2418
2346
|
}) || {
|
|
2419
2347
|
status: "none"
|
|
2420
2348
|
});
|
|
2421
2349
|
|
|
2422
2350
|
case 8:
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
this.Log(
|
|
2426
|
-
return
|
|
2351
|
+
_context37.prev = 8;
|
|
2352
|
+
_context37.t0 = _context37["catch"](1);
|
|
2353
|
+
this.Log(_context37.t0, true);
|
|
2354
|
+
return _context37.abrupt("return", {
|
|
2427
2355
|
status: "unknown"
|
|
2428
2356
|
});
|
|
2429
2357
|
|
|
2430
2358
|
case 12:
|
|
2431
2359
|
case "end":
|
|
2432
|
-
return
|
|
2360
|
+
return _context37.stop();
|
|
2433
2361
|
}
|
|
2434
2362
|
}
|
|
2435
|
-
},
|
|
2363
|
+
}, _callee37, this, [[1, 8]]);
|
|
2436
2364
|
}));
|
|
2437
2365
|
|
|
2438
2366
|
return function (_x23) {
|
|
2439
|
-
return
|
|
2367
|
+
return _ref74.apply(this, arguments);
|
|
2440
2368
|
};
|
|
2441
2369
|
}();
|
|
2442
2370
|
/* EVENTS */
|
|
2443
2371
|
|
|
2444
2372
|
|
|
2445
2373
|
exports.LoadDrop = /*#__PURE__*/function () {
|
|
2446
|
-
var
|
|
2447
|
-
var
|
|
2374
|
+
var _ref76 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(_ref75) {
|
|
2375
|
+
var _this = this;
|
|
2448
2376
|
|
|
2449
2377
|
var tenantSlug, eventSlug, dropId, mainSiteHash, event, eventId;
|
|
2450
|
-
return _regeneratorRuntime.wrap(function
|
|
2378
|
+
return _regeneratorRuntime.wrap(function _callee38$(_context38) {
|
|
2451
2379
|
while (1) {
|
|
2452
|
-
switch (
|
|
2380
|
+
switch (_context38.prev = _context38.next) {
|
|
2453
2381
|
case 0:
|
|
2454
|
-
tenantSlug =
|
|
2382
|
+
tenantSlug = _ref75.tenantSlug, eventSlug = _ref75.eventSlug, dropId = _ref75.dropId;
|
|
2455
2383
|
|
|
2456
2384
|
if (!this.drops) {
|
|
2457
2385
|
this.drops = {};
|
|
@@ -2466,18 +2394,18 @@ exports.LoadDrop = /*#__PURE__*/function () {
|
|
|
2466
2394
|
}
|
|
2467
2395
|
|
|
2468
2396
|
if (this.drops[tenantSlug][eventSlug][dropId]) {
|
|
2469
|
-
|
|
2397
|
+
_context38.next = 16;
|
|
2470
2398
|
break;
|
|
2471
2399
|
}
|
|
2472
2400
|
|
|
2473
|
-
|
|
2401
|
+
_context38.next = 7;
|
|
2474
2402
|
return this.client.LatestVersionHash({
|
|
2475
2403
|
objectId: this.mainSiteId
|
|
2476
2404
|
});
|
|
2477
2405
|
|
|
2478
2406
|
case 7:
|
|
2479
|
-
mainSiteHash =
|
|
2480
|
-
|
|
2407
|
+
mainSiteHash = _context38.sent;
|
|
2408
|
+
_context38.next = 10;
|
|
2481
2409
|
return this.client.ContentObjectMetadata({
|
|
2482
2410
|
versionHash: mainSiteHash,
|
|
2483
2411
|
metadataSubtree: UrlJoin("public", "asset_metadata", "tenants", tenantSlug, "sites", eventSlug, "info"),
|
|
@@ -2490,58 +2418,58 @@ exports.LoadDrop = /*#__PURE__*/function () {
|
|
|
2490
2418
|
});
|
|
2491
2419
|
|
|
2492
2420
|
case 10:
|
|
2493
|
-
|
|
2421
|
+
_context38.t0 = _context38.sent;
|
|
2494
2422
|
|
|
2495
|
-
if (
|
|
2496
|
-
|
|
2423
|
+
if (_context38.t0) {
|
|
2424
|
+
_context38.next = 13;
|
|
2497
2425
|
break;
|
|
2498
2426
|
}
|
|
2499
2427
|
|
|
2500
|
-
|
|
2428
|
+
_context38.t0 = [];
|
|
2501
2429
|
|
|
2502
2430
|
case 13:
|
|
2503
|
-
event =
|
|
2431
|
+
event = _context38.t0;
|
|
2504
2432
|
eventId = Utils.DecodeVersionHash(event["."].source).objectId;
|
|
2505
2433
|
event.drops.forEach(function (drop) {
|
|
2506
2434
|
drop = _objectSpread(_objectSpread({}, drop), {}, {
|
|
2507
2435
|
eventId: eventId
|
|
2508
2436
|
});
|
|
2509
|
-
|
|
2510
|
-
|
|
2437
|
+
_this.drops[tenantSlug][eventSlug][drop.uuid] = drop;
|
|
2438
|
+
_this.drops[drop.uuid] = drop;
|
|
2511
2439
|
});
|
|
2512
2440
|
|
|
2513
2441
|
case 16:
|
|
2514
|
-
return
|
|
2442
|
+
return _context38.abrupt("return", this.drops[dropId]);
|
|
2515
2443
|
|
|
2516
2444
|
case 17:
|
|
2517
2445
|
case "end":
|
|
2518
|
-
return
|
|
2446
|
+
return _context38.stop();
|
|
2519
2447
|
}
|
|
2520
2448
|
}
|
|
2521
|
-
},
|
|
2449
|
+
}, _callee38, this);
|
|
2522
2450
|
}));
|
|
2523
2451
|
|
|
2524
2452
|
return function (_x24) {
|
|
2525
|
-
return
|
|
2453
|
+
return _ref76.apply(this, arguments);
|
|
2526
2454
|
};
|
|
2527
2455
|
}();
|
|
2528
2456
|
|
|
2529
2457
|
exports.SubmitDropVote = /*#__PURE__*/function () {
|
|
2530
|
-
var
|
|
2458
|
+
var _ref78 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(_ref77) {
|
|
2531
2459
|
var marketplaceParams, eventId, dropId, sku, marketplaceInfo;
|
|
2532
|
-
return _regeneratorRuntime.wrap(function
|
|
2460
|
+
return _regeneratorRuntime.wrap(function _callee39$(_context39) {
|
|
2533
2461
|
while (1) {
|
|
2534
|
-
switch (
|
|
2462
|
+
switch (_context39.prev = _context39.next) {
|
|
2535
2463
|
case 0:
|
|
2536
|
-
marketplaceParams =
|
|
2537
|
-
|
|
2464
|
+
marketplaceParams = _ref77.marketplaceParams, eventId = _ref77.eventId, dropId = _ref77.dropId, sku = _ref77.sku;
|
|
2465
|
+
_context39.next = 3;
|
|
2538
2466
|
return this.MarketplaceInfo({
|
|
2539
2467
|
marketplaceParams: marketplaceParams
|
|
2540
2468
|
});
|
|
2541
2469
|
|
|
2542
2470
|
case 3:
|
|
2543
|
-
marketplaceInfo =
|
|
2544
|
-
|
|
2471
|
+
marketplaceInfo = _context39.sent;
|
|
2472
|
+
_context39.next = 6;
|
|
2545
2473
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
2546
2474
|
path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
|
|
2547
2475
|
method: "POST",
|
|
@@ -2558,27 +2486,27 @@ exports.SubmitDropVote = /*#__PURE__*/function () {
|
|
|
2558
2486
|
|
|
2559
2487
|
case 6:
|
|
2560
2488
|
case "end":
|
|
2561
|
-
return
|
|
2489
|
+
return _context39.stop();
|
|
2562
2490
|
}
|
|
2563
2491
|
}
|
|
2564
|
-
},
|
|
2492
|
+
}, _callee39, this);
|
|
2565
2493
|
}));
|
|
2566
2494
|
|
|
2567
2495
|
return function (_x25) {
|
|
2568
|
-
return
|
|
2496
|
+
return _ref78.apply(this, arguments);
|
|
2569
2497
|
};
|
|
2570
2498
|
}();
|
|
2571
2499
|
|
|
2572
2500
|
exports.DropStatus = /*#__PURE__*/function () {
|
|
2573
|
-
var
|
|
2501
|
+
var _ref80 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(_ref79) {
|
|
2574
2502
|
var marketplace, eventId, dropId, response;
|
|
2575
|
-
return _regeneratorRuntime.wrap(function
|
|
2503
|
+
return _regeneratorRuntime.wrap(function _callee40$(_context40) {
|
|
2576
2504
|
while (1) {
|
|
2577
|
-
switch (
|
|
2505
|
+
switch (_context40.prev = _context40.next) {
|
|
2578
2506
|
case 0:
|
|
2579
|
-
marketplace =
|
|
2580
|
-
|
|
2581
|
-
|
|
2507
|
+
marketplace = _ref79.marketplace, eventId = _ref79.eventId, dropId = _ref79.dropId;
|
|
2508
|
+
_context40.prev = 1;
|
|
2509
|
+
_context40.next = 4;
|
|
2582
2510
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
2583
2511
|
path: UrlJoin("as", "wlt", "act", marketplace.tenant_id, eventId, dropId),
|
|
2584
2512
|
method: "GET",
|
|
@@ -2588,28 +2516,28 @@ exports.DropStatus = /*#__PURE__*/function () {
|
|
|
2588
2516
|
}));
|
|
2589
2517
|
|
|
2590
2518
|
case 4:
|
|
2591
|
-
response =
|
|
2592
|
-
return
|
|
2519
|
+
response = _context40.sent;
|
|
2520
|
+
return _context40.abrupt("return", response.sort(function (a, b) {
|
|
2593
2521
|
return a.ts > b.ts ? 1 : -1;
|
|
2594
2522
|
})[0] || {
|
|
2595
2523
|
status: "none"
|
|
2596
2524
|
});
|
|
2597
2525
|
|
|
2598
2526
|
case 8:
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
this.Log(
|
|
2602
|
-
return
|
|
2527
|
+
_context40.prev = 8;
|
|
2528
|
+
_context40.t0 = _context40["catch"](1);
|
|
2529
|
+
this.Log(_context40.t0, true);
|
|
2530
|
+
return _context40.abrupt("return", "");
|
|
2603
2531
|
|
|
2604
2532
|
case 12:
|
|
2605
2533
|
case "end":
|
|
2606
|
-
return
|
|
2534
|
+
return _context40.stop();
|
|
2607
2535
|
}
|
|
2608
2536
|
}
|
|
2609
|
-
},
|
|
2537
|
+
}, _callee40, this, [[1, 8]]);
|
|
2610
2538
|
}));
|
|
2611
2539
|
|
|
2612
2540
|
return function (_x26) {
|
|
2613
|
-
return
|
|
2541
|
+
return _ref80.apply(this, arguments);
|
|
2614
2542
|
};
|
|
2615
2543
|
}();
|