@fileverse-dev/formulajs 4.4.11-mod-55 → 4.4.11-mod-57

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/lib/cjs/index.cjs CHANGED
@@ -13669,7 +13669,6 @@ async function COINGECKO(category, param1, param2) {
13669
13669
  const trend = param2 ? `&price_change_percentage=${param2}` : '';
13670
13670
 
13671
13671
  url = `https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&include_tokens=top&page=1&per_page=100`;
13672
- if (key && !categoryVal) return `${SERVICE_API_KEY.Coingecko}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`;
13673
13672
  if (categoryVal) url += `&category=${categoryVal}`;
13674
13673
  if (trend) url += trend;
13675
13674
  break;
@@ -13928,11 +13927,12 @@ async function DEFILLAMA() {
13928
13927
  let [category] = argsToArray(arguments);
13929
13928
  const apiKey = window.localStorage.getItem(SERVICE_API_KEY.Defillama);
13930
13929
  if (!apiKey) return `${SERVICE_API_KEY.Defillama}_MISSING`;
13931
- const categoryList = ['protocols', 'yields', 'dex'];
13930
+ const categoryList = ['protocols', 'yields', 'dex', 'fees'];
13932
13931
  const categoryMap = {
13933
13932
  [categoryList[0]]: 'https://api.llama.fi/protocols',
13934
13933
  [categoryList[1]]: 'https://yields.llama.fi/pools',
13935
- [categoryList[2]]: 'https://api.llama.fi/overview/dexs?excludeTotalDataChart=true&excludeTotalDataChartBreakdown=true'
13934
+ [categoryList[2]]: 'https://api.llama.fi/overview/dexs?excludeTotalDataChart=true&excludeTotalDataChartBreakdown=true',
13935
+ [categoryList[3]]: 'https://api.llama.fi/overview/fees?excludeTotalDataChart=true&excludeTotalDataChartBreakdown=true&dataType=dailyFees'
13936
13936
  };
13937
13937
  let url = categoryMap[category];
13938
13938
 
@@ -13955,6 +13955,10 @@ async function DEFILLAMA() {
13955
13955
  json = json.protocols.slice(0, 500);
13956
13956
  break;
13957
13957
  }
13958
+ case categoryList[3]: {
13959
+ json = json.protocols.slice(0, 500);
13960
+ break;
13961
+ }
13958
13962
  }
13959
13963
 
13960
13964
  return removeNestedStructure(Array.isArray(json) ? json : [json]);
@@ -45,7 +45,7 @@ var SERVICE_API_KEY = {
45
45
  var FUNCTION_LOCALE = [
46
46
  {
47
47
  API_KEY: SERVICE_API_KEY.Etherscan,
48
- LOGO: "https://etherscan.io/images/favicon3.ico",
48
+ LOGO: "https://raw.githubusercontent.com/ethereum/ethereum-org/master/dist/favicon.ico",
49
49
  BRAND_COLOR: "#F6F7F8",
50
50
  BRAND_SECONDARY_COLOR: "#21325B",
51
51
  n: "EOA",
@@ -191,17 +191,10 @@ If "derivatives": exchange name (e.g., "binance_futures").`,
191
191
  p: [
192
192
  {
193
193
  name: "category",
194
- detail: "Type of content to fetch. Supports 'protocols', 'yields', or 'dex'.",
194
+ detail: "Type of content to fetch. Supports 'protocols', 'yields', 'dex', or 'fees'.",
195
195
  example: `"protocols"`,
196
196
  require: "m",
197
197
  type: "string"
198
- },
199
- {
200
- name: "param1",
201
- detail: "For protocols, it's the protocol name. (optional)",
202
- example: `"aave"`,
203
- require: "m",
204
- type: "string"
205
198
  }
206
199
  ]
207
200
  },
@@ -545,7 +538,8 @@ If "derivatives": exchange name (e.g., "binance_futures").`,
545
538
  },
546
539
  {
547
540
  API_KEY: SERVICE_API_KEY.Firefly,
548
- LOGO: "https://firefly.social/android-chrome-192x192.png",
541
+ LOGO: "https://tse3.mm.bing.net/th?id=OIP.1TANdvYNcEadCk6CO1bCcgAAAA&r=0&w=440&h=440&c=7",
542
+ SECONDARY_LOGO: "https://firefly.social/android-chrome-192x192.png",
549
543
  BRAND_COLOR: "#f8f5fc",
550
544
  BRAND_SECONDARY_COLOR: "#855dcd",
551
545
  n: "LENS",
@@ -585,7 +579,8 @@ If "derivatives": exchange name (e.g., "binance_futures").`,
585
579
  },
586
580
  {
587
581
  API_KEY: SERVICE_API_KEY.Firefly,
588
- LOGO: "https://firefly.social/android-chrome-192x192.png",
582
+ LOGO: "https://farcaster.xyz/favicon.ico",
583
+ SECONDARY_LOGO: "https://firefly.social/android-chrome-192x192.png",
589
584
  BRAND_COLOR: "#f8f5fc",
590
585
  BRAND_SECONDARY_COLOR: "#855dcd",
591
586
  n: "FARCASTER",
package/lib/esm/index.mjs CHANGED
@@ -13667,7 +13667,6 @@ async function COINGECKO(category, param1, param2) {
13667
13667
  const trend = param2 ? `&price_change_percentage=${param2}` : '';
13668
13668
 
13669
13669
  url = `https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&include_tokens=top&page=1&per_page=100`;
13670
- if (key && !categoryVal) return `${SERVICE_API_KEY.Coingecko}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`;
13671
13670
  if (categoryVal) url += `&category=${categoryVal}`;
13672
13671
  if (trend) url += trend;
13673
13672
  break;
@@ -13926,11 +13925,12 @@ async function DEFILLAMA() {
13926
13925
  let [category] = argsToArray(arguments);
13927
13926
  const apiKey = window.localStorage.getItem(SERVICE_API_KEY.Defillama);
13928
13927
  if (!apiKey) return `${SERVICE_API_KEY.Defillama}_MISSING`;
13929
- const categoryList = ['protocols', 'yields', 'dex'];
13928
+ const categoryList = ['protocols', 'yields', 'dex', 'fees'];
13930
13929
  const categoryMap = {
13931
13930
  [categoryList[0]]: 'https://api.llama.fi/protocols',
13932
13931
  [categoryList[1]]: 'https://yields.llama.fi/pools',
13933
- [categoryList[2]]: 'https://api.llama.fi/overview/dexs?excludeTotalDataChart=true&excludeTotalDataChartBreakdown=true'
13932
+ [categoryList[2]]: 'https://api.llama.fi/overview/dexs?excludeTotalDataChart=true&excludeTotalDataChartBreakdown=true',
13933
+ [categoryList[3]]: 'https://api.llama.fi/overview/fees?excludeTotalDataChart=true&excludeTotalDataChartBreakdown=true&dataType=dailyFees'
13934
13934
  };
13935
13935
  let url = categoryMap[category];
13936
13936
 
@@ -13953,6 +13953,10 @@ async function DEFILLAMA() {
13953
13953
  json = json.protocols.slice(0, 500);
13954
13954
  break;
13955
13955
  }
13956
+ case categoryList[3]: {
13957
+ json = json.protocols.slice(0, 500);
13958
+ break;
13959
+ }
13956
13960
  }
13957
13961
 
13958
13962
  return removeNestedStructure(Array.isArray(json) ? json : [json]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/formulajs",
3
- "version": "4.4.11-mod-55",
3
+ "version": "4.4.11-mod-57",
4
4
  "description": "JavaScript implementation of most Microsoft Excel formula functions",
5
5
  "author": "Formulajs",
6
6
  "publishConfig": {