@fileverse-dev/formulajs 4.4.41 → 4.4.42-yield-a

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
@@ -18011,7 +18011,7 @@ function toTimestamp(dateStr) {
18011
18011
 
18012
18012
  async function EOA() {
18013
18013
  try {
18014
- const [addresses, category, chains, startTime, endTime, page = 1, offset = 10, columnName = null] =
18014
+ const [addresses, category, chains, startTime, endTime, page = 1, offset = 10, columnName] =
18015
18015
  argsToArray(arguments);
18016
18016
  validateParams(eoaParamsSchema, { addresses, category, chains, startTime, endTime, page, offset, columnName });
18017
18017
 
@@ -18352,7 +18352,7 @@ const coingeckoParamsSchema = discriminatedUnionType('category', [
18352
18352
 
18353
18353
  async function COINGECKO() {
18354
18354
  try {
18355
- const [category, param1, param2, columnName = null] = argsToArray(arguments);
18355
+ const [category, param1, param2, columnName] = argsToArray(arguments);
18356
18356
  validateParams(coingeckoParamsSchema, { category, param1, param2, columnName });
18357
18357
 
18358
18358
  const apiKey = window.localStorage.getItem(SERVICES_API_KEY.Coingecko);
@@ -18446,7 +18446,7 @@ const CATEGORY_URLS = {
18446
18446
 
18447
18447
  async function DEFILLAMA() {
18448
18448
  try {
18449
- const [category, columnName = null] = argsToArray(arguments);
18449
+ const [category, columnName] = argsToArray(arguments);
18450
18450
  validateParams(defillamaParamsSchema, { category, columnName });
18451
18451
  const url = CATEGORY_URLS[category];
18452
18452
  if (!url) throw new ValidationError(`Invalid category: ${category}`)
@@ -18470,6 +18470,7 @@ async function DEFILLAMA() {
18470
18470
  const filterColumnName = columnName?.split(',').map(s => s.trim());
18471
18471
 
18472
18472
  return (Array.isArray(json) ? json : [json]).map(item => {
18473
+ if (!filterColumnName) return item
18473
18474
  const out = {};
18474
18475
  for (const [k, v] of Object.entries(item)) {
18475
18476
  if ((columnName && filterColumnName.includes(k)) && (v === null || typeof v !== 'object')) out[k] = v;
@@ -18512,7 +18513,7 @@ const etherscanParamsSchema = discriminatedUnionType('type', [gasSchema, txnSche
18512
18513
 
18513
18514
  async function ETHERSCAN() {
18514
18515
  try {
18515
- const [type, chain, address, startDate, endDate, page = 1, limit = 10, columnName = null] =
18516
+ const [type, chain, address, startDate, endDate, page = 1, limit = 10, columnName] =
18516
18517
  argsToArray(arguments);
18517
18518
 
18518
18519
 
@@ -19487,17 +19488,18 @@ async function WALLET() {
19487
19488
  // WALLET("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "ethereum", "balance").then(console.log)
19488
19489
 
19489
19490
  const yieldParamsSchema = objectType({
19490
- category: enumType(['all', 'stablecoins'])
19491
+ category: enumType(['all', 'stablecoins']),
19492
+ columnName: stringType().optional(),
19491
19493
  });
19492
19494
 
19493
19495
  async function YIELD () {
19494
19496
 
19495
19497
  try {
19496
- const [category] = argsToArray(arguments);
19498
+ const [category, columnName] = argsToArray(arguments);
19497
19499
 
19498
- validateParams(yieldParamsSchema, { category });
19500
+ validateParams(yieldParamsSchema, { category, columnName });
19499
19501
 
19500
- const response = await DEFILLAMA('yields');
19502
+ const response = await DEFILLAMA('yields', columnName);
19501
19503
 
19502
19504
  if(response.functionName){
19503
19505
  response.functionName = 'YIELD';
@@ -244,7 +244,16 @@ var EOA_metadata = {
244
244
  require: "o",
245
245
  type: "string"
246
246
  }
247
- ]
247
+ ],
248
+ examples: [{
249
+ title: "EOA",
250
+ argumentString: '"vitalik.eth", "txns", "ethereum", "01/01/2023", "01/05/2024", 1, 2',
251
+ description: "returns the transaction history for the address vitalik.eth on the Ethereum blockchain between January 1, 2023 and January 5, 2024, returning page 1 with 2 transactions per page."
252
+ }, {
253
+ title: "EOA",
254
+ argumentString: '"vitalik.eth", "balance", "gnosis"',
255
+ description: "returns the balance for the address vitalik.eth on the Gnosis blockchain."
256
+ }]
248
257
  };
249
258
 
250
259
  // src/crypto/uniswap/metadata.js
@@ -285,6 +294,18 @@ var UNISWAP_metadata = {
285
294
  require: "o",
286
295
  type: "string"
287
296
  }
297
+ ],
298
+ examples: [
299
+ {
300
+ title: "UNISWAP",
301
+ argumentString: '"v3", "tokens", "eth"',
302
+ description: "returns data for the ETH token from Uniswap V3."
303
+ },
304
+ {
305
+ title: "UNISWAP",
306
+ argumentString: '"v3-raw", "markets", "0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8"',
307
+ description: "returns data for the Uniswap V3 market with the specified contract address."
308
+ }
288
309
  ]
289
310
  };
290
311
 
@@ -327,6 +348,18 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
327
348
  require: "o",
328
349
  type: "string"
329
350
  }
351
+ ],
352
+ examples: [
353
+ {
354
+ title: "COINGECKO",
355
+ argumentString: '"stablecoins", "yield-bearing-stablecoins", "1h,24h,7d"',
356
+ description: "returns the yield-bearing stablecoins with percentage changes over 1 hour, 24 hours, and 7 days."
357
+ },
358
+ {
359
+ title: "COINGECKO",
360
+ argumentString: '"derivatives", "binance_futures"',
361
+ description: "returns the derivatives data from the Binance Futures exchange."
362
+ }
330
363
  ]
331
364
  };
332
365
 
@@ -338,7 +371,7 @@ var DEFILLAMA_metadata = {
338
371
  BRAND_SECONDARY_COLOR: "#855dcd",
339
372
  n: "DEFILLAMA",
340
373
  t: 20,
341
- d: "Fetches content from Defillama.",
374
+ d: "returns content from Defillama.",
342
375
  a: "Retrieves data from Defillama.",
343
376
  p: [
344
377
  {
@@ -355,7 +388,16 @@ var DEFILLAMA_metadata = {
355
388
  require: "o",
356
389
  type: "string"
357
390
  }
358
- ]
391
+ ],
392
+ examples: [{
393
+ title: "DEFILLAMA",
394
+ argumentString: '"protocols"',
395
+ description: "returns a list of DeFi protocols from Defillama."
396
+ }, {
397
+ title: "DEFILLAMA",
398
+ argumentString: '"dex"',
399
+ description: "returns decentralized exchange (DEX) data from Defillama."
400
+ }]
359
401
  };
360
402
 
361
403
  // src/crypto/base/metadata.js
@@ -418,6 +460,18 @@ var BASE_metadata = {
418
460
  require: "o",
419
461
  type: "string"
420
462
  }
463
+ ],
464
+ examples: [
465
+ {
466
+ title: "BASE",
467
+ argumentString: '"token-txns", "0x7FD624f3f97A7dd36195E8379F28dB6147C270ff", "01/01/2024", "07/07/2024", 1, 2',
468
+ description: "returns list ofERC-20 token transfer history for the specified address on the Base network between January 1, 2024 and July 7, 2024, returning page 1 with 2 results per page."
469
+ },
470
+ {
471
+ title: "BASE",
472
+ argumentString: '"gas"',
473
+ description: "returns gas price metrics for the Base network."
474
+ }
421
475
  ]
422
476
  };
423
477
 
@@ -474,7 +528,16 @@ var GNOSIS_metadata = {
474
528
  require: "o",
475
529
  type: "number"
476
530
  }
477
- ]
531
+ ],
532
+ examples: [{
533
+ title: "GNOSIS",
534
+ argumentString: '"nft-txns", "0x90830Ed558f12D826370DC52E9D87947A7F18De9", "01/01/2024", "14/06/2025", 1, 50',
535
+ description: "returns NFT transaction history for the address 0x90830Ed558f12D826370DC52E9D87947A7F18De9 on the Gnosis Chain between January 1, 2024 and June 14, 2025, returning page 1 with 50 transactions per page."
536
+ }, {
537
+ title: "GNOSIS",
538
+ argumentString: '"gas"',
539
+ description: "returns current gas price metrics for the Gnosis Chain."
540
+ }]
478
541
  };
479
542
 
480
543
  // src/crypto/etherscan/metadata.js
@@ -530,6 +593,18 @@ var ETHERSCAN_metadata = {
530
593
  require: "o",
531
594
  type: "string"
532
595
  }
596
+ ],
597
+ examples: [
598
+ {
599
+ title: "ETHERSCAN",
600
+ argumentString: '"all-txns", "ethereum", "vitalik.eth"',
601
+ description: "returns the complete transaction history for the address vitalik.eth on the Ethereum blockchain."
602
+ },
603
+ {
604
+ title: "ETHERSCAN",
605
+ argumentString: '"token-txns", "gnosis", "vitalik.eth", "01/01/2024", "01/05/2024"',
606
+ description: "returns the token transaction history for the address vitalik.eth on the Gnosis blockchain between January 1, 2024 and January 5, 2024."
607
+ }
533
608
  ]
534
609
  };
535
610
 
@@ -556,7 +631,16 @@ var PNL_metadata = {
556
631
  repeat: "n",
557
632
  type: "range"
558
633
  }
559
- ]
634
+ ],
635
+ examples: [{
636
+ title: "PNL",
637
+ argumentString: "A1:A10, B1:B10",
638
+ description: "returns the total profit or loss by subtracting the costs in range A1:A10 from the revenues in range B1:B10."
639
+ }, {
640
+ title: "PNL",
641
+ argumentString: '"{100, 200, 150}", "{250, 300, 200}"',
642
+ description: "returns the total profit or loss by subtracting the costs {100, 200, 150} from the revenues {250, 300, 200}."
643
+ }]
560
644
  };
561
645
 
562
646
  // src/crypto/safe/metadata.js
@@ -602,7 +686,16 @@ var SAFE_metadata = {
602
686
  require: "o",
603
687
  repeat: "n"
604
688
  }
605
- ]
689
+ ],
690
+ examples: [{
691
+ title: "SAFE",
692
+ argumentString: '"0xe9A6378d8FD4983C2999DB0735f258397E8C2253", "txns", "gnosis", 10, 0',
693
+ description: "returns the last 10 transactions for the specified Safe address on the Gnosis chain."
694
+ }, {
695
+ title: "SAFE",
696
+ argumentString: '"0x1234567890abcdef1234567890abcdef12345678", "txns", "ethereum"',
697
+ description: "returns the last 100 transactions for the specified Safe address on the Ethereum chain."
698
+ }]
606
699
  };
607
700
 
608
701
  // src/crypto/blockscout/metadata.js
@@ -666,7 +759,16 @@ var BLOCKSCOUT_metadata = {
666
759
  repeat: "n",
667
760
  type: "rangenumber"
668
761
  }
669
- ]
762
+ ],
763
+ examples: [{
764
+ title: "BLOCKSCOUT",
765
+ argumentString: '"vitalik.eth", "txns", "ethereum", "01/01/2023", "01/05/2024", 1, 2',
766
+ description: "returns transaction history for the address vitalik.eth on the Ethereum blockchain between January 1, 2023 and January 5, 2024, returning page 1 with 2 transactions per page."
767
+ }, {
768
+ title: "BLOCKSCOUT",
769
+ argumentString: '"vitalik.eth", "balance", "gnosis"',
770
+ description: "returns the balance for the address vitalik.eth on the Gnosis blockchain."
771
+ }]
670
772
  };
671
773
 
672
774
  // src/crypto/aave/metadata.js
@@ -707,6 +809,18 @@ var AAVE_metadata = {
707
809
  require: "o",
708
810
  type: "string"
709
811
  }
812
+ ],
813
+ examples: [
814
+ {
815
+ title: "AAVE",
816
+ argumentString: '"v2", "tokens", "USDT"',
817
+ description: "returns list data for the USDT token from Aave V2."
818
+ },
819
+ {
820
+ title: "AAVE",
821
+ argumentString: '"v2-raw", "markets", "AAVE"',
822
+ description: "returns list data for the AAVE token from Aave V2."
823
+ }
710
824
  ]
711
825
  };
712
826
 
@@ -750,6 +864,18 @@ var LENS_metadata = {
750
864
  require: "o",
751
865
  type: "number"
752
866
  }
867
+ ],
868
+ examples: [
869
+ {
870
+ title: "LENS",
871
+ argumentString: '"posts", "toka,miroyato"',
872
+ description: "returns posts made by the users with the usernames toka and miroyato on Lens."
873
+ },
874
+ {
875
+ title: "LENS",
876
+ argumentString: '"replies", "0x123abc456def789ghi012jkl345mno678pqr901stu234vwx567yz890abc123d"',
877
+ description: "returns replies to the post with the specified hash on Lens."
878
+ }
753
879
  ]
754
880
  };
755
881
 
@@ -793,6 +919,18 @@ var FARCASTER_metadata = {
793
919
  require: "o",
794
920
  type: "number"
795
921
  }
922
+ ],
923
+ examples: [
924
+ {
925
+ title: "FARCASTER",
926
+ argumentString: '"posts", "miroyato"',
927
+ description: "returns posts made by the user with the username miroyato."
928
+ },
929
+ {
930
+ title: "FARCASTER",
931
+ argumentString: '"replies", "0x123abc456def789ghi012jkl345mno678pqr901stu234vwx567yz890abc123d"',
932
+ description: "returns replies to the post with the specified hash."
933
+ }
796
934
  ]
797
935
  };
798
936
 
@@ -842,6 +980,18 @@ var FIREFLY_metadata = {
842
980
  require: "o",
843
981
  type: "number"
844
982
  }
983
+ ],
984
+ examples: [
985
+ {
986
+ title: "FIREFLY",
987
+ argumentString: '"farcaster", "posts", "miroyato"',
988
+ description: "returns posts made by the user with the username miroyato on Farcaster."
989
+ },
990
+ {
991
+ title: "FIREFLY",
992
+ argumentString: '"lens", "posts", "toka"',
993
+ description: "returns posts made by the user with the username toka on Lens."
994
+ }
845
995
  ]
846
996
  };
847
997
 
@@ -863,36 +1013,50 @@ var Neynar_metadata = {
863
1013
  require: "m",
864
1014
  type: "number"
865
1015
  }
866
- ]
1016
+ ],
1017
+ examples: [{
1018
+ title: "NEYNAR",
1019
+ argumentString: '"miroyato"',
1020
+ description: "returns followers for the Farcaster user with the username miroyato."
1021
+ }, {
1022
+ title: "NEYNAR",
1023
+ argumentString: '"alice"',
1024
+ description: "returns followers for the Farcaster user with the username alice."
1025
+ }]
867
1026
  };
868
1027
 
869
1028
  // src/crypto/smart-contract/metadata.js
870
1029
  var SMARTCONTRACT_metadata = {
871
1030
  n: "SMARTCONTRACT",
872
1031
  t: 20,
873
- d: "Query smart contracts in cells.",
874
- r: "Call a read-only function on a given smart contract",
1032
+ d: "Query smart contract in cells. Returning a list of available functions and arguments that you can use to get data.",
1033
+ r: "Query smart contract in cells. Returning a list of available functions and arguments that you can use to get data.",
875
1034
  p: [
876
1035
  {
877
- name: "contractName",
878
- detail: "Name of the contract you want to pull data from",
879
- example: '"USDC"',
1036
+ name: "contract_address",
1037
+ detail: "Address of the contract you want to query",
1038
+ example: '"0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb"',
880
1039
  require: "m",
881
1040
  type: "string"
882
1041
  },
883
1042
  {
884
- name: "functionName",
885
- detail: "Name of the function you want to call from the give contract",
886
- example: '"balanceOf"',
1043
+ name: "chain",
1044
+ detail: 'Blockchain network(s) to query. Supported values: "ethereum", "gnosis", "base". Accepts comma-separated values.',
1045
+ example: '"GNOSIS"',
887
1046
  require: "m",
888
1047
  type: "string"
1048
+ }
1049
+ ],
1050
+ examples: [
1051
+ {
1052
+ title: "SMARTCONTRACT",
1053
+ argumentString: '"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "ETHEREUM"',
1054
+ description: "returns the list of functions and their arguments for Circle USDC contract on Ethereum."
889
1055
  },
890
1056
  {
891
- name: "...functionArgs",
892
- detail: "Optional arguments to pass to the contract function.",
893
- example: '"0x50Aa3435E310d5a2d15a989Bc353ce7f5682E1d4"',
894
- require: "o",
895
- type: "any"
1057
+ title: "SMARTCONTRACT",
1058
+ argumentString: '"0xdac17f958d2ee523a2206206994597c13d831ec7", "ETHEREUM"',
1059
+ description: "returns the list of functions and their arguments for Tether USD (USDT) contract on Ethereum."
896
1060
  }
897
1061
  ]
898
1062
  };
@@ -921,7 +1085,16 @@ var TALLY_metadata = {
921
1085
  require: "m",
922
1086
  type: "string"
923
1087
  }
924
- ]
1088
+ ],
1089
+ examples: [{
1090
+ title: "TALLY",
1091
+ argumentString: '"organization", "arbitrum"',
1092
+ description: "returns details about the Arbitrum organization from Tally."
1093
+ }, {
1094
+ title: "TALLY",
1095
+ argumentString: '"proposals", "aave"',
1096
+ description: "returns proposals for the Aave organization from Tally."
1097
+ }]
925
1098
  };
926
1099
 
927
1100
  // src/crypto/dune-sim/metadata.js
@@ -970,6 +1143,18 @@ var DUNESIM_metadata = {
970
1143
  require: "o",
971
1144
  type: "number"
972
1145
  }
1146
+ ],
1147
+ examples: [
1148
+ {
1149
+ title: "DUNE",
1150
+ argumentString: '"price", "base", 1, "0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca", 5',
1151
+ description: "returns the price of the specified token on the Base chain with a 1-hour historical offset, limiting results to 5 entries."
1152
+ },
1153
+ {
1154
+ title: "DUNE",
1155
+ argumentString: '"activity", "vitalik.eth", "eth", 10',
1156
+ description: "returns the latest 10 wallet activities for the address vitalik.eth on the Ethereum chain."
1157
+ }
973
1158
  ]
974
1159
  };
975
1160
 
@@ -1001,6 +1186,18 @@ var PRICE_metadata = {
1001
1186
  require: "o",
1002
1187
  type: "string"
1003
1188
  }
1189
+ ],
1190
+ examples: [
1191
+ {
1192
+ title: "PRICE",
1193
+ argumentString: '"0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca", "base", "1,24"',
1194
+ description: "returns the price of the specified token on the Base chain with 1-hour and 24-hour historical offsets."
1195
+ },
1196
+ {
1197
+ title: "PRICE",
1198
+ argumentString: '"ETH,BTC", "1,24,168"',
1199
+ description: "returns the prices of ETH and BTC with 1-hour, 24-hour, and 168-hour (7-day) historical offsets."
1200
+ }
1004
1201
  ]
1005
1202
  };
1006
1203
 
@@ -1039,6 +1236,18 @@ var WALLET_metadata = {
1039
1236
  require: "o",
1040
1237
  type: "string"
1041
1238
  }
1239
+ ],
1240
+ examples: [
1241
+ {
1242
+ title: "WALLET",
1243
+ argumentString: '"0x7FD624f3f97A7dd36195E8379F28dB6147C270ff", "ethereum", "txns", "17520"',
1244
+ description: "returns transactions for the specified wallet address on the Ethereum chain within the last 17520 hours (approximately 2 years)."
1245
+ },
1246
+ {
1247
+ title: "WALLET",
1248
+ argumentString: '"vitalik.eth", "base", "balance"',
1249
+ description: "returns the latest balance for the address vitalik.eth on the Base chain."
1250
+ }
1042
1251
  ]
1043
1252
  };
1044
1253
 
@@ -1055,8 +1264,24 @@ var YIELD_metadata = {
1055
1264
  example: `"stablecoins"`,
1056
1265
  require: "m",
1057
1266
  type: "string"
1267
+ },
1268
+ {
1269
+ name: "columnsName",
1270
+ detail: "Filter columns by name in output. Comma separated list.",
1271
+ example: `"id,address"`,
1272
+ require: "o",
1273
+ type: "string"
1058
1274
  }
1059
- ]
1275
+ ],
1276
+ examples: [{
1277
+ title: "YIELD",
1278
+ argumentString: '"stablecoins"',
1279
+ description: "returns yield data for stablecoins."
1280
+ }, {
1281
+ title: "YIELD",
1282
+ argumentString: '"all"',
1283
+ description: "returns yield data for all categories."
1284
+ }]
1060
1285
  };
1061
1286
 
1062
1287
  // src/crypto/circles/metadata.js
@@ -1093,7 +1318,16 @@ var CIRCLES_metadata = {
1093
1318
  require: "o",
1094
1319
  type: "string"
1095
1320
  }
1096
- ]
1321
+ ],
1322
+ examples: [{
1323
+ title: "CIRCLES",
1324
+ argumentString: '"trust", "0xe9A6378d8FD4983C2999DB0735f258397E8C2253"',
1325
+ description: "returns the trust relationships for the specified Circles address."
1326
+ }, {
1327
+ title: "CIRCLES",
1328
+ argumentString: '"transactions", "0xe9A6378d8FD4983C2999DB0735f258397E8C2253", 5',
1329
+ description: "returns the last 5 transactions for the specified Circles address."
1330
+ }]
1097
1331
  };
1098
1332
 
1099
1333
  // src/crypto/crypto-metadata.js
package/lib/esm/index.mjs CHANGED
@@ -18009,7 +18009,7 @@ function toTimestamp(dateStr) {
18009
18009
 
18010
18010
  async function EOA() {
18011
18011
  try {
18012
- const [addresses, category, chains, startTime, endTime, page = 1, offset = 10, columnName = null] =
18012
+ const [addresses, category, chains, startTime, endTime, page = 1, offset = 10, columnName] =
18013
18013
  argsToArray(arguments);
18014
18014
  validateParams(eoaParamsSchema, { addresses, category, chains, startTime, endTime, page, offset, columnName });
18015
18015
 
@@ -18350,7 +18350,7 @@ const coingeckoParamsSchema = discriminatedUnionType('category', [
18350
18350
 
18351
18351
  async function COINGECKO() {
18352
18352
  try {
18353
- const [category, param1, param2, columnName = null] = argsToArray(arguments);
18353
+ const [category, param1, param2, columnName] = argsToArray(arguments);
18354
18354
  validateParams(coingeckoParamsSchema, { category, param1, param2, columnName });
18355
18355
 
18356
18356
  const apiKey = window.localStorage.getItem(SERVICES_API_KEY.Coingecko);
@@ -18444,7 +18444,7 @@ const CATEGORY_URLS = {
18444
18444
 
18445
18445
  async function DEFILLAMA() {
18446
18446
  try {
18447
- const [category, columnName = null] = argsToArray(arguments);
18447
+ const [category, columnName] = argsToArray(arguments);
18448
18448
  validateParams(defillamaParamsSchema, { category, columnName });
18449
18449
  const url = CATEGORY_URLS[category];
18450
18450
  if (!url) throw new ValidationError(`Invalid category: ${category}`)
@@ -18468,6 +18468,7 @@ async function DEFILLAMA() {
18468
18468
  const filterColumnName = columnName?.split(',').map(s => s.trim());
18469
18469
 
18470
18470
  return (Array.isArray(json) ? json : [json]).map(item => {
18471
+ if (!filterColumnName) return item
18471
18472
  const out = {};
18472
18473
  for (const [k, v] of Object.entries(item)) {
18473
18474
  if ((columnName && filterColumnName.includes(k)) && (v === null || typeof v !== 'object')) out[k] = v;
@@ -18510,7 +18511,7 @@ const etherscanParamsSchema = discriminatedUnionType('type', [gasSchema, txnSche
18510
18511
 
18511
18512
  async function ETHERSCAN() {
18512
18513
  try {
18513
- const [type, chain, address, startDate, endDate, page = 1, limit = 10, columnName = null] =
18514
+ const [type, chain, address, startDate, endDate, page = 1, limit = 10, columnName] =
18514
18515
  argsToArray(arguments);
18515
18516
 
18516
18517
 
@@ -19485,17 +19486,18 @@ async function WALLET() {
19485
19486
  // WALLET("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "ethereum", "balance").then(console.log)
19486
19487
 
19487
19488
  const yieldParamsSchema = objectType({
19488
- category: enumType(['all', 'stablecoins'])
19489
+ category: enumType(['all', 'stablecoins']),
19490
+ columnName: stringType().optional(),
19489
19491
  });
19490
19492
 
19491
19493
  async function YIELD () {
19492
19494
 
19493
19495
  try {
19494
- const [category] = argsToArray(arguments);
19496
+ const [category, columnName] = argsToArray(arguments);
19495
19497
 
19496
- validateParams(yieldParamsSchema, { category });
19498
+ validateParams(yieldParamsSchema, { category, columnName });
19497
19499
 
19498
- const response = await DEFILLAMA('yields');
19500
+ const response = await DEFILLAMA('yields', columnName);
19499
19501
 
19500
19502
  if(response.functionName){
19501
19503
  response.functionName = 'YIELD';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/formulajs",
3
- "version": "4.4.41",
3
+ "version": "4.4.42-yield-a",
4
4
  "description": "JavaScript implementation of most Microsoft Excel formula functions",
5
5
  "author": "Formulajs",
6
6
  "publishConfig": {
@@ -1187,7 +1187,7 @@ declare function DEC2OCT(number: any, places: any): any;
1187
1187
  * @returns
1188
1188
  */
1189
1189
  declare function DECIMAL(text: any, radix: any, ...args: any[]): any;
1190
- declare function DEFILLAMA(...args: any[]): Promise<{
1190
+ declare function DEFILLAMA(...args: any[]): Promise<any[] | {
1191
1191
  message: string;
1192
1192
  functionName: any;
1193
1193
  type: string;
@@ -1205,7 +1205,7 @@ declare function DEFILLAMA(...args: any[]): Promise<{
1205
1205
  type: string;
1206
1206
  reason: any;
1207
1207
  apiKeyName?: undefined;
1208
- } | {}[]>;
1208
+ }>;
1209
1209
  /**
1210
1210
  * Converts radians to degrees.
1211
1211
  *
@@ -1126,7 +1126,7 @@ export function DEC2OCT(number: any, places: any): any;
1126
1126
  * @returns
1127
1127
  */
1128
1128
  export function DECIMAL(text: any, radix: any, ...args: any[]): any;
1129
- export function DEFILLAMA(...args: any[]): Promise<{
1129
+ export function DEFILLAMA(...args: any[]): Promise<any[] | {
1130
1130
  message: string;
1131
1131
  functionName: any;
1132
1132
  type: string;
@@ -1144,7 +1144,7 @@ export function DEFILLAMA(...args: any[]): Promise<{
1144
1144
  type: string;
1145
1145
  reason: any;
1146
1146
  apiKeyName?: undefined;
1147
- } | {}[]>;
1147
+ }>;
1148
1148
  /**
1149
1149
  * Converts radians to degrees.
1150
1150
  *