@fileverse-dev/fortune-react 1.0.2-mod-87 → 1.0.2-mod-89

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