@fileverse-dev/fortune-react 1.0.2-mod-85 → 1.0.2-mod-86
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/index.umd.js +65 -26
- package/dist/index.umd.min.js +1 -1
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -37208,7 +37208,7 @@
|
|
|
37208
37208
|
}
|
|
37209
37209
|
}
|
|
37210
37210
|
|
|
37211
|
-
async function FIREFLY(
|
|
37211
|
+
async function FIREFLY() {
|
|
37212
37212
|
const API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Firefly);
|
|
37213
37213
|
if (!API_KEY) return `${SERVICE_API_KEY.Firefly}${ERROR_MESSAGES_FLAG.MISSING_KEY}`;
|
|
37214
37214
|
|
|
@@ -37227,6 +37227,9 @@
|
|
|
37227
37227
|
}
|
|
37228
37228
|
};
|
|
37229
37229
|
|
|
37230
|
+
|
|
37231
|
+
const [platform, contentType, identifier, start = 0, end = 10] = argsToArray(arguments);
|
|
37232
|
+
|
|
37230
37233
|
const platformType = typeMap[platform]?.[contentType];
|
|
37231
37234
|
if (!platformType) return `${SERVICE_API_KEY.Firefly}${ERROR_MESSAGES_FLAG.INVALID_TYPE}`;
|
|
37232
37235
|
|
|
@@ -37270,7 +37273,7 @@
|
|
|
37270
37273
|
|
|
37271
37274
|
|
|
37272
37275
|
|
|
37273
|
-
async function BLOCKSCOUT(
|
|
37276
|
+
async function BLOCKSCOUT() {
|
|
37274
37277
|
if (!chain) {
|
|
37275
37278
|
chain = 'ethereum';
|
|
37276
37279
|
}
|
|
@@ -37279,6 +37282,8 @@
|
|
|
37279
37282
|
return 'TYPE_MISSING'
|
|
37280
37283
|
}
|
|
37281
37284
|
|
|
37285
|
+
const [address, type, chain, startTimestamp, endTimestamp, page, offset] = argsToArray(arguments);
|
|
37286
|
+
|
|
37282
37287
|
if (!startTimestamp) {
|
|
37283
37288
|
const currentTimestamp = Date.now();
|
|
37284
37289
|
startTimestamp = currentTimestamp - 30 * 24 * 60 * 60 * 1000;
|
|
@@ -37356,8 +37361,8 @@
|
|
|
37356
37361
|
}
|
|
37357
37362
|
}
|
|
37358
37363
|
|
|
37359
|
-
async function BASESCAN(
|
|
37360
|
-
const [type, chain, address, startDate, endDate, page, limit] =
|
|
37364
|
+
async function BASESCAN() {
|
|
37365
|
+
const [type, chain, address, startDate, endDate, page, limit] = argsToArray(arguments);
|
|
37361
37366
|
return handleScanRequest({
|
|
37362
37367
|
scanKey: SERVICE_API_KEY.Basescan,
|
|
37363
37368
|
baseUrl: 'https://api.basescan.org/api',
|
|
@@ -37370,8 +37375,8 @@
|
|
|
37370
37375
|
offset:limit
|
|
37371
37376
|
});
|
|
37372
37377
|
}
|
|
37373
|
-
async function GNOSISSCAN(
|
|
37374
|
-
const [type, chain, address, startDate, endDate, page, limit] =
|
|
37378
|
+
async function GNOSISSCAN() {
|
|
37379
|
+
const [type, chain, address, startDate, endDate, page, limit] = argsToArray(arguments);
|
|
37375
37380
|
return handleScanRequest({
|
|
37376
37381
|
scanKey: SERVICE_API_KEY.Gnosisscan,
|
|
37377
37382
|
baseUrl: 'https://api.gnosisscan.io/api',
|
|
@@ -37386,16 +37391,18 @@
|
|
|
37386
37391
|
}
|
|
37387
37392
|
|
|
37388
37393
|
async function NEYNAR(
|
|
37389
|
-
|
|
37390
|
-
viewerFid,
|
|
37391
|
-
sortType,
|
|
37392
|
-
limit,
|
|
37393
|
-
cursor
|
|
37394
|
+
|
|
37394
37395
|
) {
|
|
37395
37396
|
const API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Neynar);
|
|
37396
37397
|
if (!API_KEY) return `${SERVICE_API_KEY.Neynar}${ERROR_MESSAGES_FLAG.MISSING_KEY}`;
|
|
37397
37398
|
|
|
37398
|
-
|
|
37399
|
+
const [
|
|
37400
|
+
fid,
|
|
37401
|
+
viewerFid,
|
|
37402
|
+
sortType,
|
|
37403
|
+
limit,
|
|
37404
|
+
cursor
|
|
37405
|
+
] = argsToArray(arguments);
|
|
37399
37406
|
const url = new URL('https://api.neynar.com/v2/farcaster/followers');
|
|
37400
37407
|
url.searchParams.set('fid', fid.toString());
|
|
37401
37408
|
url.searchParams.set('sort_type', sortType);
|
|
@@ -37426,18 +37433,22 @@
|
|
|
37426
37433
|
return ERROR_MESSAGES_FLAG.DEFAULT;
|
|
37427
37434
|
}
|
|
37428
37435
|
}
|
|
37429
|
-
async function GNOSISPAY(
|
|
37430
|
-
|
|
37431
|
-
|
|
37432
|
-
endDate,
|
|
37433
|
-
limit = 20,
|
|
37434
|
-
offset = 0,
|
|
37435
|
-
}) {
|
|
37436
|
+
async function GNOSISPAY(
|
|
37437
|
+
|
|
37438
|
+
) {
|
|
37436
37439
|
const apiKeyKey = SERVICE_API_KEY.GnosisPay;
|
|
37437
37440
|
const API_KEY = window.localStorage.getItem(apiKeyKey);
|
|
37438
37441
|
if (!API_KEY) return `${apiKeyKey}${ERROR_MESSAGES_FLAG.MISSING_KEY}`;
|
|
37439
37442
|
if (!cardId) return `${apiKeyKey}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`;
|
|
37440
37443
|
|
|
37444
|
+
|
|
37445
|
+
|
|
37446
|
+
const [ cardId,
|
|
37447
|
+
startDate,
|
|
37448
|
+
endDate,
|
|
37449
|
+
limit = 20,
|
|
37450
|
+
offset = 0] = argsToArray(arguments);
|
|
37451
|
+
|
|
37441
37452
|
const url = new URL(`https://api.gnosispay.com/cards/${cardId}/transactions`);
|
|
37442
37453
|
url.searchParams.set('limit', limit.toString());
|
|
37443
37454
|
url.searchParams.set('offset', offset.toString());
|
|
@@ -37486,8 +37497,8 @@
|
|
|
37486
37497
|
|
|
37487
37498
|
|
|
37488
37499
|
|
|
37489
|
-
async function ETHERSCAN(
|
|
37490
|
-
const [type, chain, address, startDate, endDate, page, limit] =
|
|
37500
|
+
async function ETHERSCAN() {
|
|
37501
|
+
const [type, chain, address, startDate, endDate, page, limit] = argsToArray(arguments);
|
|
37491
37502
|
return handleScanRequest({
|
|
37492
37503
|
scanKey: SERVICE_API_KEY.Etherscan,
|
|
37493
37504
|
baseUrl: 'https://api.etherscan.io/v2/api',
|
|
@@ -37502,7 +37513,7 @@
|
|
|
37502
37513
|
}
|
|
37503
37514
|
|
|
37504
37515
|
|
|
37505
|
-
async function COINGECKO(
|
|
37516
|
+
async function COINGECKO() {
|
|
37506
37517
|
const API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Coingecko);
|
|
37507
37518
|
if (!API_KEY) return `${SERVICE_API_KEY.Coingecko}${ERROR_MESSAGES_FLAG.MISSING_KEY}`;
|
|
37508
37519
|
|
|
@@ -37512,6 +37523,7 @@
|
|
|
37512
37523
|
};
|
|
37513
37524
|
|
|
37514
37525
|
let url = '';
|
|
37526
|
+
const [category, param1, param2, page = 1, perPage = 2 ] = argsToArray(arguments);
|
|
37515
37527
|
const lowerCategory = (category || '').toLowerCase();
|
|
37516
37528
|
|
|
37517
37529
|
switch (lowerCategory) {
|
|
@@ -37617,7 +37629,11 @@
|
|
|
37617
37629
|
|
|
37618
37630
|
|
|
37619
37631
|
|
|
37620
|
-
async function EOA(
|
|
37632
|
+
async function EOA() {
|
|
37633
|
+
|
|
37634
|
+
|
|
37635
|
+
|
|
37636
|
+
const [
|
|
37621
37637
|
addresses,
|
|
37622
37638
|
category,
|
|
37623
37639
|
chains,
|
|
@@ -37625,11 +37641,29 @@
|
|
|
37625
37641
|
endTime,
|
|
37626
37642
|
page = 1,
|
|
37627
37643
|
offset = 10,
|
|
37628
|
-
|
|
37644
|
+
] = argsToArray(arguments);
|
|
37645
|
+
|
|
37646
|
+
const someError = anyError(addresses, category, chains, startTime, endTime, page, offset);
|
|
37647
|
+
|
|
37648
|
+
if (someError) {
|
|
37649
|
+
return someError
|
|
37650
|
+
}
|
|
37651
|
+
|
|
37652
|
+
|
|
37629
37653
|
const API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Etherscan);
|
|
37630
37654
|
if (!API_KEY) return `${SERVICE_API_KEY.Etherscan}${ERROR_MESSAGES_FLAG.MISSING_KEY}`;
|
|
37631
37655
|
|
|
37632
|
-
|
|
37656
|
+
|
|
37657
|
+
|
|
37658
|
+
let INPUTS;
|
|
37659
|
+
|
|
37660
|
+
if(typeof addresses === 'string'){
|
|
37661
|
+
INPUTS = addresses.split(",").map(a => a.trim()).filter(Boolean);
|
|
37662
|
+
} else if (typeof addresses === 'object'){
|
|
37663
|
+
INPUTS = addresses;
|
|
37664
|
+
}
|
|
37665
|
+
|
|
37666
|
+
|
|
37633
37667
|
const CHAINS = chains.split(",").map(c => c.trim()).filter(Boolean);
|
|
37634
37668
|
const out = [];
|
|
37635
37669
|
|
|
@@ -37741,7 +37775,12 @@
|
|
|
37741
37775
|
});
|
|
37742
37776
|
}
|
|
37743
37777
|
|
|
37744
|
-
async function SAFE(
|
|
37778
|
+
async function SAFE() {
|
|
37779
|
+
|
|
37780
|
+
|
|
37781
|
+
|
|
37782
|
+
|
|
37783
|
+
const [address, utility, chain, limit, offset] = argsToArray(arguments);
|
|
37745
37784
|
|
|
37746
37785
|
if (typeof limit !== 'number' || limit < 0) return 'INVALID_LIMIT';
|
|
37747
37786
|
if (typeof offset !== 'number' || offset < 0) return 'INVALID_OFFSET';
|