@eluvio/elv-client-js 3.2.11 → 3.2.12
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/ElvWalletClient-min.js +1 -1
- package/dist/ElvWalletClient-node-min.js +1 -1
- package/dist/src/walletClient/ClientMethods.js +13 -11
- package/dist/src/walletClient/index.js +95 -98
- package/package.json +1 -1
- package/src/walletClient/ClientMethods.js +13 -11
- package/src/walletClient/index.js +61 -42
- package/testScripts/Test.js +33 -0
|
@@ -295,7 +295,7 @@ exports.UserItemInfo = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
|
|
|
295
295
|
* @param {string=} contractAddress - Filter results by the address of the NFT contract
|
|
296
296
|
* @param {string=} tokenId - Filter by token ID (if filtering by contract address)
|
|
297
297
|
* @param {Object=} marketplaceParams - Filter results by marketplace
|
|
298
|
-
* @param {integer
|
|
298
|
+
* @param {Array<integer>=} collectionIndexes - If filtering by marketplace, filter by collection(s). The index refers to the index in the array `marketplace.collections`
|
|
299
299
|
*
|
|
300
300
|
* @returns {Promise<Object>} - Results of the query and pagination info
|
|
301
301
|
*/
|
|
@@ -1072,7 +1072,7 @@ exports.Listing = /*#__PURE__*/function () {
|
|
|
1072
1072
|
* <br /><br />
|
|
1073
1073
|
* NOTE: This string must be an <b>exact match</b> on the item name.
|
|
1074
1074
|
* You can retrieve all available item names from the <a href="#.ListingNames">ListingNames method</a>.
|
|
1075
|
-
* @param {string
|
|
1075
|
+
* @param {Array<string>=} editionFilters - Filter results by item edition.
|
|
1076
1076
|
* <br /><br />
|
|
1077
1077
|
* NOTE: This string must be an <b>exact match</b> on the edition name.
|
|
1078
1078
|
* You can retrieve all available item edition names from the <a href="#.ListingEditionNames">ListingEditionNames method</a>.
|
|
@@ -1080,12 +1080,13 @@ exports.Listing = /*#__PURE__*/function () {
|
|
|
1080
1080
|
* <br /><br />
|
|
1081
1081
|
* NOTE: These filters must be an <b>exact match</b> on the attribute name and value.
|
|
1082
1082
|
* You can retrieve all available item attributes from the <a href="#.ListingAttributes">ListingAttributes method</a>.
|
|
1083
|
+
* @param {Object=} priceRange - Filter min and/or max price (e.g. `{min: 1}` `{max: 2}` `{min: 1.50, max: 10.50})
|
|
1083
1084
|
* @param {string=} sellerAddress - Filter by a specific seller
|
|
1084
1085
|
* @param {string=} contractAddress - Filter results by the address of the NFT contract
|
|
1085
1086
|
* @param {string=} tokenId - Filter by token ID (if filtering by contract address)
|
|
1086
1087
|
* @param {string=} currency - Filter results by purchase currency. Available options: `usdc`
|
|
1087
1088
|
* @param {Object=} marketplaceParams - Filter results by marketplace
|
|
1088
|
-
* @param {integer
|
|
1089
|
+
* @param {Array<integer>=} collectionIndexes - If filtering by marketplace, filter by collection(s). The index refers to the index in the array `marketplace.collections`
|
|
1089
1090
|
* @param {integer=} lastNDays - Filter by results listed in the past N days
|
|
1090
1091
|
*
|
|
1091
1092
|
* @returns {Promise<Object>} - Results of the query and pagination info
|
|
@@ -1122,7 +1123,7 @@ exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRunt
|
|
|
1122
1123
|
* <br /><br />
|
|
1123
1124
|
* NOTE: This string must be an <b>exact match</b> on the item name.
|
|
1124
1125
|
* You can retrieve all available item names from the <a href="#.ListingNames">ListingNames method</a>.
|
|
1125
|
-
* @param {string
|
|
1126
|
+
* @param {Array<string>} editionFilters - Filter results by item edition.
|
|
1126
1127
|
* <br /><br />
|
|
1127
1128
|
* NOTE: This string must be an <b>exact match</b> on the edition name.
|
|
1128
1129
|
* You can retrieve all available item edition names from the <a href="#.ListingEditionNames">ListingEditionNames method</a>.
|
|
@@ -1130,12 +1131,13 @@ exports.Listings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRunt
|
|
|
1130
1131
|
* <br /><br />
|
|
1131
1132
|
* NOTE: These filters must be an <b>exact match</b> on the attribute name and value.
|
|
1132
1133
|
* You can retrieve all available item attributes from the <a href="#.ListingAttributes">ListingAttributes method</a>.
|
|
1134
|
+
* @param {Object=} priceRange - Filter min and/or max price (e.g. `{min: 1}` `{max: 2}` `{min: 1.50, max: 10.50})
|
|
1133
1135
|
* @param {string=} sellerAddress - Filter by a specific seller
|
|
1134
1136
|
* @param {string=} contractAddress - Filter results by the address of the NFT contract
|
|
1135
1137
|
* @param {string=} tokenId - Filter by token ID (if filtering by contract address)
|
|
1136
1138
|
* @param {string=} currency - Filter results by purchase currency. Available options: `usdc`
|
|
1137
1139
|
* @param {Object=} marketplaceParams - Filter results by marketplace
|
|
1138
|
-
* @param {integer
|
|
1140
|
+
* @param {Array<integer>=} collectionIndexes - If filtering by marketplace, filter by collection(s). The index refers to the index in the array `marketplace.collections`
|
|
1139
1141
|
* @param {integer=} lastNDays - Filter by results listed in the past N days
|
|
1140
1142
|
*
|
|
1141
1143
|
* @returns {Promise<Object>} - Statistics about listings. All prices in USD.
|
|
@@ -1171,7 +1173,7 @@ exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
|
|
|
1171
1173
|
* <br /><br />
|
|
1172
1174
|
* NOTE: This string must be an <b>exact match</b> on the item name.
|
|
1173
1175
|
* You can retrieve all available item names from the <a href="#.ListingNames">ListingNames method</a>.
|
|
1174
|
-
* @param {string
|
|
1176
|
+
* @param {Array<string>} editionFilters - Filter results by item edition.
|
|
1175
1177
|
* <br /><br />
|
|
1176
1178
|
* NOTE: This string must be an <b>exact match</b> on the edition name.
|
|
1177
1179
|
* You can retrieve all available item edition names from the <a href="#.ListingEditionNames">ListingEditionNames method</a>.
|
|
@@ -1184,7 +1186,7 @@ exports.ListingStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
|
|
|
1184
1186
|
* @param {string=} tokenId - Filter by token ID (if filtering by contract address)
|
|
1185
1187
|
* @param {string=} currency - Filter results by purchase currency. Available options: `usdc`
|
|
1186
1188
|
* @param {Object=} marketplaceParams - Filter results by marketplace
|
|
1187
|
-
* @param {integer
|
|
1189
|
+
* @param {Array<integer>=} collectionIndexes - If filtering by marketplace, filter by collection(s). The index refers to the index in the array `marketplace.collections`
|
|
1188
1190
|
* @param {integer=} lastNDays - Filter by results listed in the past N days
|
|
1189
1191
|
*
|
|
1190
1192
|
* @returns {Promise<Object>} - Results of the query and pagination info
|
|
@@ -1220,7 +1222,7 @@ exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
|
|
1220
1222
|
* <br /><br />
|
|
1221
1223
|
* NOTE: This string must be an <b>exact match</b> on the item name.
|
|
1222
1224
|
* You can retrieve all available item names from the <a href="#.ListingNames">ListingNames method</a>.
|
|
1223
|
-
* @param {string
|
|
1225
|
+
* @param {Array<string>} editionFilters - Filter results by item edition.
|
|
1224
1226
|
* <br /><br />
|
|
1225
1227
|
* NOTE: This string must be an <b>exact match</b> on the edition name.
|
|
1226
1228
|
* You can retrieve all available item edition names from the <a href="#.ListingEditionNames">ListingEditionNames method</a>.
|
|
@@ -1233,7 +1235,7 @@ exports.Sales = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
|
|
1233
1235
|
* @param {string=} tokenId - Filter by token ID (if filtering by contract address)
|
|
1234
1236
|
* @param {string=} currency - Filter results by purchase currency. Available options: `usdc`
|
|
1235
1237
|
* @param {Object=} marketplaceParams - Filter results by marketplace
|
|
1236
|
-
* @param {integer
|
|
1238
|
+
* @param {Array<integer>=} collectionIndexes - If filtering by marketplace, filter by collection(s). The index refers to the index in the array `marketplace.collections`
|
|
1237
1239
|
* @param {integer=} lastNDays - Filter by results listed in the past N days
|
|
1238
1240
|
*
|
|
1239
1241
|
* @returns {Promise<Object>} - Results of the query and pagination info
|
|
@@ -1269,7 +1271,7 @@ exports.Transfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
|
|
|
1269
1271
|
* <br /><br />
|
|
1270
1272
|
* NOTE: This string must be an <b>exact match</b> on the item name.
|
|
1271
1273
|
* You can retrieve all available item names from the <a href="#.ListingNames">ListingNames method</a>.
|
|
1272
|
-
* @param {string
|
|
1274
|
+
* @param {Array<string>} editionFilters - Filter results by item edition.
|
|
1273
1275
|
* <br /><br />
|
|
1274
1276
|
* NOTE: This string must be an <b>exact match</b> on the edition name.
|
|
1275
1277
|
* You can retrieve all available item edition names from the <a href="#.ListingEditionNames">ListingEditionNames method</a>.
|
|
@@ -1282,7 +1284,7 @@ exports.Transfers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRun
|
|
|
1282
1284
|
* @param {string=} tokenId - Filter by token ID (if filtering by contract address)
|
|
1283
1285
|
* @param {string=} currency - Filter results by purchase currency. Available options: `usdc`
|
|
1284
1286
|
* @param {Object=} marketplaceParams - Filter results by marketplace
|
|
1285
|
-
* @param {integer
|
|
1287
|
+
* @param {Array<integer>=} collectionIndexes - If filtering by marketplace, filter by collection(s). The index refers to the index in the array `marketplace.collections`
|
|
1286
1288
|
* @param {integer=} lastNDays - Filter by results listed in the past N days
|
|
1287
1289
|
*
|
|
1288
1290
|
* @returns {Promise<Object>} - Statistics about sales. All prices in USD.
|
|
@@ -1241,15 +1241,17 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1241
1241
|
_ref14$sortDesc,
|
|
1242
1242
|
sortDesc,
|
|
1243
1243
|
filter,
|
|
1244
|
-
|
|
1244
|
+
editionFilters,
|
|
1245
1245
|
attributeFilters,
|
|
1246
1246
|
contractAddress,
|
|
1247
1247
|
tokenId,
|
|
1248
1248
|
currency,
|
|
1249
1249
|
marketplaceParams,
|
|
1250
1250
|
tenantId,
|
|
1251
|
-
|
|
1252
|
-
|
|
1251
|
+
collectionIndexes,
|
|
1252
|
+
priceRange,
|
|
1253
|
+
tokenIdRange,
|
|
1254
|
+
capLimit,
|
|
1253
1255
|
sellerAddress,
|
|
1254
1256
|
_ref14$lastNDays,
|
|
1255
1257
|
lastNDays,
|
|
@@ -1261,7 +1263,6 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1261
1263
|
marketplaceInfo,
|
|
1262
1264
|
marketplace,
|
|
1263
1265
|
filters,
|
|
1264
|
-
collection,
|
|
1265
1266
|
path,
|
|
1266
1267
|
_ref16,
|
|
1267
1268
|
contents,
|
|
@@ -1272,8 +1273,10 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1272
1273
|
while (1) {
|
|
1273
1274
|
switch (_context16.prev = _context16.next) {
|
|
1274
1275
|
case 0:
|
|
1275
|
-
_ref14 = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {}, _ref14$mode = _ref14.mode, mode = _ref14$mode === void 0 ? "listings" : _ref14$mode, _ref14$sortBy = _ref14.sortBy, sortBy = _ref14$sortBy === void 0 ? "created" : _ref14$sortBy, _ref14$sortDesc = _ref14.sortDesc, sortDesc = _ref14$sortDesc === void 0 ? false : _ref14$sortDesc, filter = _ref14.filter,
|
|
1276
|
-
|
|
1276
|
+
_ref14 = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {}, _ref14$mode = _ref14.mode, mode = _ref14$mode === void 0 ? "listings" : _ref14$mode, _ref14$sortBy = _ref14.sortBy, sortBy = _ref14$sortBy === void 0 ? "created" : _ref14$sortBy, _ref14$sortDesc = _ref14.sortDesc, sortDesc = _ref14$sortDesc === void 0 ? false : _ref14$sortDesc, filter = _ref14.filter, editionFilters = _ref14.editionFilters, attributeFilters = _ref14.attributeFilters, contractAddress = _ref14.contractAddress, tokenId = _ref14.tokenId, currency = _ref14.currency, marketplaceParams = _ref14.marketplaceParams, tenantId = _ref14.tenantId, collectionIndexes = _ref14.collectionIndexes, priceRange = _ref14.priceRange, tokenIdRange = _ref14.tokenIdRange, capLimit = _ref14.capLimit, sellerAddress = _ref14.sellerAddress, _ref14$lastNDays = _ref14.lastNDays, lastNDays = _ref14$lastNDays === void 0 ? -1 : _ref14$lastNDays, _ref14$start = _ref14.start, start = _ref14$start === void 0 ? 0 : _ref14$start, _ref14$limit = _ref14.limit, limit = _ref14$limit === void 0 ? 50 : _ref14$limit;
|
|
1277
|
+
collectionIndexes = (collectionIndexes || []).map(function (i) {
|
|
1278
|
+
return parseInt(i);
|
|
1279
|
+
});
|
|
1277
1280
|
params = {
|
|
1278
1281
|
sort_by: sortBy,
|
|
1279
1282
|
sort_descending: sortDesc,
|
|
@@ -1294,7 +1297,7 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1294
1297
|
case 6:
|
|
1295
1298
|
marketplaceInfo = _context16.sent;
|
|
1296
1299
|
|
|
1297
|
-
if (!(
|
|
1300
|
+
if (!(collectionIndexes.length > 0)) {
|
|
1298
1301
|
_context16.next = 11;
|
|
1299
1302
|
break;
|
|
1300
1303
|
}
|
|
@@ -1315,65 +1318,33 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1315
1318
|
filters.push("seller:eq:".concat(this.client.utils.FormatAddress(sellerAddress)));
|
|
1316
1319
|
}
|
|
1317
1320
|
|
|
1318
|
-
if (
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
if (!sku) {
|
|
1326
|
-
return;
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
var item = marketplace.items.find(function (item) {
|
|
1330
|
-
return item.sku === sku;
|
|
1331
|
-
});
|
|
1332
|
-
|
|
1333
|
-
if (!item) {
|
|
1334
|
-
return;
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
var address = Utils.SafeTraverse(item, "nft_template", "nft", "address");
|
|
1338
|
-
|
|
1339
|
-
if (address) {
|
|
1340
|
-
filters.push("".concat(mode === "owned" ? "contract_addr" : "contract", ":eq:").concat(Utils.FormatAddress(address)));
|
|
1341
|
-
}
|
|
1342
|
-
}); // No valid items, so there must not be anything relevant in the collection
|
|
1343
|
-
|
|
1344
|
-
if (!(filters.length === 0)) {
|
|
1345
|
-
_context16.next = 23;
|
|
1346
|
-
break;
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
if (!mode.includes("stats")) {
|
|
1350
|
-
_context16.next = 22;
|
|
1351
|
-
break;
|
|
1352
|
-
}
|
|
1321
|
+
if (marketplace && collectionIndexes.length >= 0) {
|
|
1322
|
+
collectionIndexes.forEach(function (collectionIndex) {
|
|
1323
|
+
var collection = marketplace.collections[collectionIndex];
|
|
1324
|
+
collection.items.forEach(function (sku) {
|
|
1325
|
+
if (!sku) {
|
|
1326
|
+
return;
|
|
1327
|
+
}
|
|
1353
1328
|
|
|
1354
|
-
|
|
1329
|
+
var item = marketplace.items.find(function (item) {
|
|
1330
|
+
return item.sku === sku;
|
|
1331
|
+
});
|
|
1355
1332
|
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
start: params.start,
|
|
1360
|
-
limit: params.limit,
|
|
1361
|
-
total: 0,
|
|
1362
|
-
more: false
|
|
1363
|
-
},
|
|
1364
|
-
results: []
|
|
1365
|
-
});
|
|
1333
|
+
if (!item) {
|
|
1334
|
+
return;
|
|
1335
|
+
}
|
|
1366
1336
|
|
|
1367
|
-
|
|
1368
|
-
_context16.next = 26;
|
|
1369
|
-
break;
|
|
1337
|
+
var address = Utils.SafeTraverse(item, "nft_template", "nft", "address");
|
|
1370
1338
|
|
|
1371
|
-
|
|
1372
|
-
|
|
1339
|
+
if (address) {
|
|
1340
|
+
filters.push("".concat(mode === "owned" ? "contract_addr" : "contract", ":eq:").concat(Utils.FormatAddress(address)));
|
|
1341
|
+
}
|
|
1342
|
+
});
|
|
1343
|
+
});
|
|
1344
|
+
} else if (mode !== "owned" && marketplaceInfo || tenantId) {
|
|
1373
1345
|
filters.push("tenant:eq:".concat(marketplaceInfo ? marketplaceInfo.tenantId : tenantId));
|
|
1374
1346
|
}
|
|
1375
1347
|
|
|
1376
|
-
case 26:
|
|
1377
1348
|
if (contractAddress) {
|
|
1378
1349
|
if (mode === "owned") {
|
|
1379
1350
|
filters.push("contract_addr:eq:".concat(Utils.FormatAddress(contractAddress)));
|
|
@@ -1395,15 +1366,17 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1395
1366
|
}
|
|
1396
1367
|
}
|
|
1397
1368
|
|
|
1398
|
-
if (
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1369
|
+
if (editionFilters) {
|
|
1370
|
+
editionFilters.forEach(function (editionFilter) {
|
|
1371
|
+
if (mode.includes("listing")) {
|
|
1372
|
+
filters.push("nft/edition_name:eq:".concat(editionFilter));
|
|
1373
|
+
} else if (mode === "owned") {
|
|
1374
|
+
filters.push("meta:@>:{\"edition_name\":\"".concat(editionFilter, "\"}"));
|
|
1375
|
+
params.exact = false;
|
|
1376
|
+
} else {
|
|
1377
|
+
filters.push("edition:eq:".concat(editionFilter));
|
|
1378
|
+
}
|
|
1379
|
+
});
|
|
1407
1380
|
}
|
|
1408
1381
|
|
|
1409
1382
|
if (attributeFilters) {
|
|
@@ -1427,65 +1400,89 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1427
1400
|
filters.push("created:gt:".concat((Date.now() / 1000 - lastNDays * 24 * 60 * 60).toFixed(0)));
|
|
1428
1401
|
}
|
|
1429
1402
|
|
|
1403
|
+
if (priceRange) {
|
|
1404
|
+
if (priceRange.min) {
|
|
1405
|
+
filters.push("price:gt:".concat(parseFloat(priceRange.min) - 0.01));
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
if (priceRange.max) {
|
|
1409
|
+
filters.push("price:lt:".concat(parseFloat(priceRange.max) + 0.01));
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
if (tokenIdRange) {
|
|
1414
|
+
if (tokenIdRange.min) {
|
|
1415
|
+
filters.push("info/ordinal:gt:".concat(parseInt(tokenIdRange.min) - 1));
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
if (tokenIdRange.max) {
|
|
1419
|
+
filters.push("info/ordinal:lt:".concat(parseInt(tokenIdRange.max) + 1));
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
if (capLimit) {
|
|
1424
|
+
filters.push("info/cap:lt:".concat(parseInt(capLimit) + 1));
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1430
1427
|
_context16.t0 = mode;
|
|
1431
|
-
_context16.next = _context16.t0 === "owned" ?
|
|
1428
|
+
_context16.next = _context16.t0 === "owned" ? 26 : _context16.t0 === "listings" ? 29 : _context16.t0 === "transfers" ? 31 : _context16.t0 === "sales" ? 35 : _context16.t0 === "listing-stats" ? 38 : _context16.t0 === "sales-stats" ? 40 : 42;
|
|
1432
1429
|
break;
|
|
1433
1430
|
|
|
1434
|
-
case
|
|
1431
|
+
case 26:
|
|
1435
1432
|
path = UrlJoin("as", "wlt", "nfts");
|
|
1436
1433
|
|
|
1437
1434
|
if (marketplaceInfo) {
|
|
1438
1435
|
path = UrlJoin("as", "wlt", "nfts", marketplaceInfo.tenantId);
|
|
1439
1436
|
}
|
|
1440
1437
|
|
|
1441
|
-
return _context16.abrupt("break",
|
|
1438
|
+
return _context16.abrupt("break", 42);
|
|
1442
1439
|
|
|
1443
|
-
case
|
|
1440
|
+
case 29:
|
|
1444
1441
|
path = UrlJoin("as", "mkt", "f");
|
|
1445
|
-
return _context16.abrupt("break",
|
|
1442
|
+
return _context16.abrupt("break", 42);
|
|
1446
1443
|
|
|
1447
|
-
case
|
|
1444
|
+
case 31:
|
|
1448
1445
|
path = UrlJoin("as", "mkt", "hst", "f");
|
|
1449
1446
|
filters.push("action:eq:TRANSFERRED");
|
|
1450
1447
|
filters.push("action:eq:SOLD");
|
|
1451
|
-
return _context16.abrupt("break",
|
|
1448
|
+
return _context16.abrupt("break", 42);
|
|
1452
1449
|
|
|
1453
|
-
case
|
|
1450
|
+
case 35:
|
|
1454
1451
|
path = UrlJoin("as", "mkt", "hst", "f");
|
|
1455
1452
|
filters.push("action:eq:SOLD");
|
|
1456
|
-
return _context16.abrupt("break",
|
|
1453
|
+
return _context16.abrupt("break", 42);
|
|
1457
1454
|
|
|
1458
|
-
case
|
|
1455
|
+
case 38:
|
|
1459
1456
|
path = UrlJoin("as", "mkt", "stats", "listed");
|
|
1460
|
-
return _context16.abrupt("break",
|
|
1457
|
+
return _context16.abrupt("break", 42);
|
|
1461
1458
|
|
|
1462
|
-
case
|
|
1459
|
+
case 40:
|
|
1463
1460
|
path = UrlJoin("as", "mkt", "stats", "sold");
|
|
1464
|
-
return _context16.abrupt("break",
|
|
1461
|
+
return _context16.abrupt("break", 42);
|
|
1465
1462
|
|
|
1466
|
-
case
|
|
1463
|
+
case 42:
|
|
1467
1464
|
if (filters.length > 0) {
|
|
1468
1465
|
params.filter = filters;
|
|
1469
1466
|
}
|
|
1470
1467
|
|
|
1471
1468
|
if (!mode.includes("stats")) {
|
|
1472
|
-
_context16.next =
|
|
1469
|
+
_context16.next = 47;
|
|
1473
1470
|
break;
|
|
1474
1471
|
}
|
|
1475
1472
|
|
|
1476
|
-
_context16.next =
|
|
1473
|
+
_context16.next = 46;
|
|
1477
1474
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
1478
1475
|
path: path,
|
|
1479
1476
|
method: "GET",
|
|
1480
1477
|
queryParams: params
|
|
1481
1478
|
}));
|
|
1482
1479
|
|
|
1483
|
-
case
|
|
1480
|
+
case 46:
|
|
1484
1481
|
return _context16.abrupt("return", _context16.sent);
|
|
1485
1482
|
|
|
1486
|
-
case
|
|
1483
|
+
case 47:
|
|
1487
1484
|
_context16.t2 = Utils;
|
|
1488
|
-
_context16.next =
|
|
1485
|
+
_context16.next = 50;
|
|
1489
1486
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1490
1487
|
path: path,
|
|
1491
1488
|
method: "GET",
|
|
@@ -1495,22 +1492,22 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1495
1492
|
} : {}
|
|
1496
1493
|
});
|
|
1497
1494
|
|
|
1498
|
-
case
|
|
1495
|
+
case 50:
|
|
1499
1496
|
_context16.t3 = _context16.sent;
|
|
1500
|
-
_context16.next =
|
|
1497
|
+
_context16.next = 53;
|
|
1501
1498
|
return _context16.t2.ResponseToJson.call(_context16.t2, _context16.t3);
|
|
1502
1499
|
|
|
1503
|
-
case
|
|
1500
|
+
case 53:
|
|
1504
1501
|
_context16.t1 = _context16.sent;
|
|
1505
1502
|
|
|
1506
1503
|
if (_context16.t1) {
|
|
1507
|
-
_context16.next =
|
|
1504
|
+
_context16.next = 56;
|
|
1508
1505
|
break;
|
|
1509
1506
|
}
|
|
1510
1507
|
|
|
1511
1508
|
_context16.t1 = [];
|
|
1512
1509
|
|
|
1513
|
-
case
|
|
1510
|
+
case 56:
|
|
1514
1511
|
_ref16 = _context16.t1;
|
|
1515
1512
|
contents = _ref16.contents;
|
|
1516
1513
|
paging = _ref16.paging;
|
|
@@ -1526,12 +1523,12 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1526
1523
|
})
|
|
1527
1524
|
});
|
|
1528
1525
|
|
|
1529
|
-
case
|
|
1530
|
-
_context16.prev =
|
|
1526
|
+
case 62:
|
|
1527
|
+
_context16.prev = 62;
|
|
1531
1528
|
_context16.t4 = _context16["catch"](11);
|
|
1532
1529
|
|
|
1533
1530
|
if (!(_context16.t4.status && _context16.t4.status.toString() === "404")) {
|
|
1534
|
-
_context16.next =
|
|
1531
|
+
_context16.next = 66;
|
|
1535
1532
|
break;
|
|
1536
1533
|
}
|
|
1537
1534
|
|
|
@@ -1545,15 +1542,15 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1545
1542
|
results: []
|
|
1546
1543
|
});
|
|
1547
1544
|
|
|
1548
|
-
case
|
|
1545
|
+
case 66:
|
|
1549
1546
|
throw _context16.t4;
|
|
1550
1547
|
|
|
1551
|
-
case
|
|
1548
|
+
case 67:
|
|
1552
1549
|
case "end":
|
|
1553
1550
|
return _context16.stop();
|
|
1554
1551
|
}
|
|
1555
1552
|
}
|
|
1556
|
-
}, _callee16, this, [[11,
|
|
1553
|
+
}, _callee16, this, [[11, 62]]);
|
|
1557
1554
|
}));
|
|
1558
1555
|
|
|
1559
1556
|
function FilteredQuery() {
|
package/package.json
CHANGED
|
@@ -195,7 +195,7 @@ exports.UserItemInfo = async function ({userAddress}={}) {
|
|
|
195
195
|
* @param {string=} contractAddress - Filter results by the address of the NFT contract
|
|
196
196
|
* @param {string=} tokenId - Filter by token ID (if filtering by contract address)
|
|
197
197
|
* @param {Object=} marketplaceParams - Filter results by marketplace
|
|
198
|
-
* @param {integer
|
|
198
|
+
* @param {Array<integer>=} collectionIndexes - If filtering by marketplace, filter by collection(s). The index refers to the index in the array `marketplace.collections`
|
|
199
199
|
*
|
|
200
200
|
* @returns {Promise<Object>} - Results of the query and pagination info
|
|
201
201
|
*/
|
|
@@ -604,7 +604,7 @@ exports.Listing = async function({listingId}) {
|
|
|
604
604
|
* <br /><br />
|
|
605
605
|
* NOTE: This string must be an <b>exact match</b> on the item name.
|
|
606
606
|
* You can retrieve all available item names from the <a href="#.ListingNames">ListingNames method</a>.
|
|
607
|
-
* @param {string
|
|
607
|
+
* @param {Array<string>=} editionFilters - Filter results by item edition.
|
|
608
608
|
* <br /><br />
|
|
609
609
|
* NOTE: This string must be an <b>exact match</b> on the edition name.
|
|
610
610
|
* You can retrieve all available item edition names from the <a href="#.ListingEditionNames">ListingEditionNames method</a>.
|
|
@@ -612,12 +612,13 @@ exports.Listing = async function({listingId}) {
|
|
|
612
612
|
* <br /><br />
|
|
613
613
|
* NOTE: These filters must be an <b>exact match</b> on the attribute name and value.
|
|
614
614
|
* You can retrieve all available item attributes from the <a href="#.ListingAttributes">ListingAttributes method</a>.
|
|
615
|
+
* @param {Object=} priceRange - Filter min and/or max price (e.g. `{min: 1}` `{max: 2}` `{min: 1.50, max: 10.50})
|
|
615
616
|
* @param {string=} sellerAddress - Filter by a specific seller
|
|
616
617
|
* @param {string=} contractAddress - Filter results by the address of the NFT contract
|
|
617
618
|
* @param {string=} tokenId - Filter by token ID (if filtering by contract address)
|
|
618
619
|
* @param {string=} currency - Filter results by purchase currency. Available options: `usdc`
|
|
619
620
|
* @param {Object=} marketplaceParams - Filter results by marketplace
|
|
620
|
-
* @param {integer
|
|
621
|
+
* @param {Array<integer>=} collectionIndexes - If filtering by marketplace, filter by collection(s). The index refers to the index in the array `marketplace.collections`
|
|
621
622
|
* @param {integer=} lastNDays - Filter by results listed in the past N days
|
|
622
623
|
*
|
|
623
624
|
* @returns {Promise<Object>} - Results of the query and pagination info
|
|
@@ -639,7 +640,7 @@ exports.Listings = async function() {
|
|
|
639
640
|
* <br /><br />
|
|
640
641
|
* NOTE: This string must be an <b>exact match</b> on the item name.
|
|
641
642
|
* You can retrieve all available item names from the <a href="#.ListingNames">ListingNames method</a>.
|
|
642
|
-
* @param {string
|
|
643
|
+
* @param {Array<string>} editionFilters - Filter results by item edition.
|
|
643
644
|
* <br /><br />
|
|
644
645
|
* NOTE: This string must be an <b>exact match</b> on the edition name.
|
|
645
646
|
* You can retrieve all available item edition names from the <a href="#.ListingEditionNames">ListingEditionNames method</a>.
|
|
@@ -647,12 +648,13 @@ exports.Listings = async function() {
|
|
|
647
648
|
* <br /><br />
|
|
648
649
|
* NOTE: These filters must be an <b>exact match</b> on the attribute name and value.
|
|
649
650
|
* You can retrieve all available item attributes from the <a href="#.ListingAttributes">ListingAttributes method</a>.
|
|
651
|
+
* @param {Object=} priceRange - Filter min and/or max price (e.g. `{min: 1}` `{max: 2}` `{min: 1.50, max: 10.50})
|
|
650
652
|
* @param {string=} sellerAddress - Filter by a specific seller
|
|
651
653
|
* @param {string=} contractAddress - Filter results by the address of the NFT contract
|
|
652
654
|
* @param {string=} tokenId - Filter by token ID (if filtering by contract address)
|
|
653
655
|
* @param {string=} currency - Filter results by purchase currency. Available options: `usdc`
|
|
654
656
|
* @param {Object=} marketplaceParams - Filter results by marketplace
|
|
655
|
-
* @param {integer
|
|
657
|
+
* @param {Array<integer>=} collectionIndexes - If filtering by marketplace, filter by collection(s). The index refers to the index in the array `marketplace.collections`
|
|
656
658
|
* @param {integer=} lastNDays - Filter by results listed in the past N days
|
|
657
659
|
*
|
|
658
660
|
* @returns {Promise<Object>} - Statistics about listings. All prices in USD.
|
|
@@ -674,7 +676,7 @@ exports.ListingStats = async function() {
|
|
|
674
676
|
* <br /><br />
|
|
675
677
|
* NOTE: This string must be an <b>exact match</b> on the item name.
|
|
676
678
|
* You can retrieve all available item names from the <a href="#.ListingNames">ListingNames method</a>.
|
|
677
|
-
* @param {string
|
|
679
|
+
* @param {Array<string>} editionFilters - Filter results by item edition.
|
|
678
680
|
* <br /><br />
|
|
679
681
|
* NOTE: This string must be an <b>exact match</b> on the edition name.
|
|
680
682
|
* You can retrieve all available item edition names from the <a href="#.ListingEditionNames">ListingEditionNames method</a>.
|
|
@@ -687,7 +689,7 @@ exports.ListingStats = async function() {
|
|
|
687
689
|
* @param {string=} tokenId - Filter by token ID (if filtering by contract address)
|
|
688
690
|
* @param {string=} currency - Filter results by purchase currency. Available options: `usdc`
|
|
689
691
|
* @param {Object=} marketplaceParams - Filter results by marketplace
|
|
690
|
-
* @param {integer
|
|
692
|
+
* @param {Array<integer>=} collectionIndexes - If filtering by marketplace, filter by collection(s). The index refers to the index in the array `marketplace.collections`
|
|
691
693
|
* @param {integer=} lastNDays - Filter by results listed in the past N days
|
|
692
694
|
*
|
|
693
695
|
* @returns {Promise<Object>} - Results of the query and pagination info
|
|
@@ -709,7 +711,7 @@ exports.Sales = async function() {
|
|
|
709
711
|
* <br /><br />
|
|
710
712
|
* NOTE: This string must be an <b>exact match</b> on the item name.
|
|
711
713
|
* You can retrieve all available item names from the <a href="#.ListingNames">ListingNames method</a>.
|
|
712
|
-
* @param {string
|
|
714
|
+
* @param {Array<string>} editionFilters - Filter results by item edition.
|
|
713
715
|
* <br /><br />
|
|
714
716
|
* NOTE: This string must be an <b>exact match</b> on the edition name.
|
|
715
717
|
* You can retrieve all available item edition names from the <a href="#.ListingEditionNames">ListingEditionNames method</a>.
|
|
@@ -722,7 +724,7 @@ exports.Sales = async function() {
|
|
|
722
724
|
* @param {string=} tokenId - Filter by token ID (if filtering by contract address)
|
|
723
725
|
* @param {string=} currency - Filter results by purchase currency. Available options: `usdc`
|
|
724
726
|
* @param {Object=} marketplaceParams - Filter results by marketplace
|
|
725
|
-
* @param {integer
|
|
727
|
+
* @param {Array<integer>=} collectionIndexes - If filtering by marketplace, filter by collection(s). The index refers to the index in the array `marketplace.collections`
|
|
726
728
|
* @param {integer=} lastNDays - Filter by results listed in the past N days
|
|
727
729
|
*
|
|
728
730
|
* @returns {Promise<Object>} - Results of the query and pagination info
|
|
@@ -744,7 +746,7 @@ exports.Transfers = async function() {
|
|
|
744
746
|
* <br /><br />
|
|
745
747
|
* NOTE: This string must be an <b>exact match</b> on the item name.
|
|
746
748
|
* You can retrieve all available item names from the <a href="#.ListingNames">ListingNames method</a>.
|
|
747
|
-
* @param {string
|
|
749
|
+
* @param {Array<string>} editionFilters - Filter results by item edition.
|
|
748
750
|
* <br /><br />
|
|
749
751
|
* NOTE: This string must be an <b>exact match</b> on the edition name.
|
|
750
752
|
* You can retrieve all available item edition names from the <a href="#.ListingEditionNames">ListingEditionNames method</a>.
|
|
@@ -757,7 +759,7 @@ exports.Transfers = async function() {
|
|
|
757
759
|
* @param {string=} tokenId - Filter by token ID (if filtering by contract address)
|
|
758
760
|
* @param {string=} currency - Filter results by purchase currency. Available options: `usdc`
|
|
759
761
|
* @param {Object=} marketplaceParams - Filter results by marketplace
|
|
760
|
-
* @param {integer
|
|
762
|
+
* @param {Array<integer>=} collectionIndexes - If filtering by marketplace, filter by collection(s). The index refers to the index in the array `marketplace.collections`
|
|
761
763
|
* @param {integer=} lastNDays - Filter by results listed in the past N days
|
|
762
764
|
*
|
|
763
765
|
* @returns {Promise<Object>} - Statistics about sales. All prices in USD.
|