@fileverse-dev/formulajs 4.4.11-mod-66 → 4.4.11-mod-68
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/browser/formula.js +6477 -1241
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +4914 -645
- package/lib/esm/crypto-constants.mjs +36 -52
- package/lib/esm/index.mjs +4915 -645
- package/package.json +7 -4
- package/types/cjs/index.d.cts +101 -25
- package/types/esm/index.d.mts +101 -25
|
@@ -17,15 +17,13 @@ var SAFE_CHAIN_MAP = {
|
|
|
17
17
|
gnosis: "gno"
|
|
18
18
|
};
|
|
19
19
|
var ERROR_MESSAGES_FLAG = {
|
|
20
|
-
INVALID_API_KEY: "
|
|
21
|
-
RATE_LIMIT: "
|
|
22
|
-
DEFAULT: "
|
|
23
|
-
MISSING_KEY: "
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
INVALID_PARAM: "_INVALID_PARAM",
|
|
28
|
-
MAX_PAGE_LIMIT: "Max page limit is 250"
|
|
20
|
+
INVALID_API_KEY: "INVALID_API_KEY",
|
|
21
|
+
RATE_LIMIT: "RATE_LIMIT",
|
|
22
|
+
DEFAULT: "DEFAULT",
|
|
23
|
+
MISSING_KEY: "MISSING_KEY",
|
|
24
|
+
INVALID_PARAM: "INVALID_PARAM",
|
|
25
|
+
NETWORK_ERROR: "NETWORK_ERROR",
|
|
26
|
+
ENS: "ENS"
|
|
29
27
|
};
|
|
30
28
|
var UTILITY = {
|
|
31
29
|
ALCHEMY_API_KEY: "ALCHEMY_API_KEY"
|
|
@@ -33,20 +31,20 @@ var UTILITY = {
|
|
|
33
31
|
var MAX_PAGE_LIMIT = 250;
|
|
34
32
|
|
|
35
33
|
// src/crypto-constants.js
|
|
36
|
-
var
|
|
37
|
-
Etherscan: "
|
|
38
|
-
Coingecko: "
|
|
39
|
-
Safe: "
|
|
40
|
-
Basescan: "
|
|
41
|
-
Gnosisscan: "
|
|
42
|
-
Firefly: "
|
|
43
|
-
GnosisPay: "
|
|
44
|
-
Neynar: "
|
|
45
|
-
Defillama: "
|
|
34
|
+
var SERVICES_API_KEY = {
|
|
35
|
+
Etherscan: "Etherscan",
|
|
36
|
+
Coingecko: "Coingecko",
|
|
37
|
+
Safe: "Safe",
|
|
38
|
+
Basescan: "Basescan",
|
|
39
|
+
Gnosisscan: "Gnosisscan",
|
|
40
|
+
Firefly: "Firefly",
|
|
41
|
+
GnosisPay: "GnosisPay",
|
|
42
|
+
Neynar: "Neynar",
|
|
43
|
+
Defillama: "Defillama"
|
|
46
44
|
};
|
|
47
45
|
var FUNCTION_LOCALE = [
|
|
48
46
|
{
|
|
49
|
-
API_KEY:
|
|
47
|
+
API_KEY: SERVICES_API_KEY.Etherscan,
|
|
50
48
|
LOGO: "https://raw.githubusercontent.com/ethereum/ethereum-org/master/dist/favicon.ico",
|
|
51
49
|
BRAND_COLOR: "#F6F7F8",
|
|
52
50
|
BRAND_SECONDARY_COLOR: "#21325B",
|
|
@@ -144,7 +142,7 @@ var FUNCTION_LOCALE = [
|
|
|
144
142
|
BRAND_SECONDARY_COLOR: "#4bc63d",
|
|
145
143
|
n: "COINGECKO",
|
|
146
144
|
t: 20,
|
|
147
|
-
API_KEY:
|
|
145
|
+
API_KEY: SERVICES_API_KEY.Coingecko,
|
|
148
146
|
d: "Query crypto prices, ecosystem market data, stablecoins, or derivatives from CoinGecko.",
|
|
149
147
|
a: 'Supports querying: "price" for specific tokens "market" for ecosystem categories (ETH, BASE, SOL, GNOSIS, HYPERLIQUID, BITCOIN, PUMP)\n- "stablecoins" for stablecoin categories like "crypto-backed-stablecoin"\n- "derivatives" globally or per exchange.\nPagination is supported for all except single-exchange derivatives.',
|
|
150
148
|
p: [
|
|
@@ -175,7 +173,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
175
173
|
]
|
|
176
174
|
},
|
|
177
175
|
{
|
|
178
|
-
API_KEY:
|
|
176
|
+
API_KEY: SERVICES_API_KEY.Defillama,
|
|
179
177
|
LOGO: "https://defillama.com/favicon-32x32.png",
|
|
180
178
|
BRAND_COLOR: "#f8f5fc",
|
|
181
179
|
BRAND_SECONDARY_COLOR: "#855dcd",
|
|
@@ -194,7 +192,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
194
192
|
]
|
|
195
193
|
},
|
|
196
194
|
{
|
|
197
|
-
API_KEY:
|
|
195
|
+
API_KEY: SERVICES_API_KEY.Basescan,
|
|
198
196
|
LOGO: "https://2064089921-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FevP3L0cUvP9xmRefuzCm%2Fuploads%2F2K1pvFsE7JAfcI3LAxYl%2Fbase-logo-in-blue.webp?alt=media&token=32c80439-dbdc-432a-b199-220e012efc3c",
|
|
199
197
|
BRAND_COLOR: "#f1f5ff",
|
|
200
198
|
BRAND_SECONDARY_COLOR: "#2752ff",
|
|
@@ -210,13 +208,6 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
210
208
|
require: "m",
|
|
211
209
|
type: "string"
|
|
212
210
|
},
|
|
213
|
-
{
|
|
214
|
-
name: "chain",
|
|
215
|
-
detail: "Must be 'base'.",
|
|
216
|
-
example: `"base"`,
|
|
217
|
-
require: "m",
|
|
218
|
-
type: "string"
|
|
219
|
-
},
|
|
220
211
|
{
|
|
221
212
|
name: "address",
|
|
222
213
|
detail: "Target wallet address (only required for txns, token, and nft queries). Not needed for 'gas'.",
|
|
@@ -255,7 +246,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
255
246
|
]
|
|
256
247
|
},
|
|
257
248
|
{
|
|
258
|
-
API_KEY:
|
|
249
|
+
API_KEY: SERVICES_API_KEY.Gnosisscan,
|
|
259
250
|
LOGO: "https://gnosisscan.io/assets/generic/html/favicon-light.ico",
|
|
260
251
|
BRAND_COLOR: "#f6f7f6",
|
|
261
252
|
BRAND_SECONDARY_COLOR: "#133629",
|
|
@@ -271,13 +262,6 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
271
262
|
require: "m",
|
|
272
263
|
type: "string"
|
|
273
264
|
},
|
|
274
|
-
{
|
|
275
|
-
name: "chain",
|
|
276
|
-
detail: "Must be 'gnosis'.",
|
|
277
|
-
example: `"gnosis"`,
|
|
278
|
-
require: "m",
|
|
279
|
-
type: "string"
|
|
280
|
-
},
|
|
281
265
|
{
|
|
282
266
|
name: "address",
|
|
283
267
|
detail: "Wallet address to query. Required for all types except 'gas'.",
|
|
@@ -316,7 +300,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
316
300
|
]
|
|
317
301
|
},
|
|
318
302
|
{
|
|
319
|
-
API_KEY:
|
|
303
|
+
API_KEY: SERVICES_API_KEY.Etherscan,
|
|
320
304
|
LOGO: "https://etherscan.io/images/favicon3.ico",
|
|
321
305
|
BRAND_COLOR: "#F6F7F8",
|
|
322
306
|
BRAND_SECONDARY_COLOR: "#21325B",
|
|
@@ -343,7 +327,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
343
327
|
name: "address",
|
|
344
328
|
detail: "Wallet address / Ens name to query",
|
|
345
329
|
example: `"vitalik.eth"`,
|
|
346
|
-
require: "
|
|
330
|
+
require: "m",
|
|
347
331
|
type: "string"
|
|
348
332
|
},
|
|
349
333
|
{
|
|
@@ -387,7 +371,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
387
371
|
]
|
|
388
372
|
},
|
|
389
373
|
{
|
|
390
|
-
API_KEY:
|
|
374
|
+
API_KEY: SERVICES_API_KEY.Safe,
|
|
391
375
|
LOGO: "https://safe-transaction-mainnet.safe.global/static/safe/favicon.png",
|
|
392
376
|
BRAND_COLOR: "#ebf9f3",
|
|
393
377
|
BRAND_SECONDARY_COLOR: "#00B460",
|
|
@@ -455,7 +439,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
455
439
|
},
|
|
456
440
|
{
|
|
457
441
|
name: "chain",
|
|
458
|
-
detail: "The blockchain to query. By default on Ethereum mainnet.",
|
|
442
|
+
detail: "The blockchain to query. By default on Ethereum mainnet. Can be gnosis, arbitrum, optimism, soneium, unichain ",
|
|
459
443
|
example: `"ethereum"`,
|
|
460
444
|
require: "o",
|
|
461
445
|
type: "string"
|
|
@@ -516,7 +500,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
516
500
|
type: "string"
|
|
517
501
|
},
|
|
518
502
|
{
|
|
519
|
-
name: "
|
|
503
|
+
name: "param1",
|
|
520
504
|
detail: "Token Contract Address for market category or Token symbol",
|
|
521
505
|
example: `"USDT"`,
|
|
522
506
|
require: "m",
|
|
@@ -525,7 +509,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
525
509
|
]
|
|
526
510
|
},
|
|
527
511
|
{
|
|
528
|
-
API_KEY:
|
|
512
|
+
API_KEY: SERVICES_API_KEY.Firefly,
|
|
529
513
|
LOGO: "https://tse3.mm.bing.net/th?id=OIP.1TANdvYNcEadCk6CO1bCcgAAAA&r=0&w=440&h=440&c=7",
|
|
530
514
|
SECONDARY_LOGO: "https://firefly.social/android-chrome-192x192.png",
|
|
531
515
|
BRAND_COLOR: "#f8f5fc",
|
|
@@ -566,7 +550,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
566
550
|
]
|
|
567
551
|
},
|
|
568
552
|
{
|
|
569
|
-
API_KEY:
|
|
553
|
+
API_KEY: SERVICES_API_KEY.Firefly,
|
|
570
554
|
LOGO: "https://farcaster.xyz/favicon.ico",
|
|
571
555
|
SECONDARY_LOGO: "https://firefly.social/android-chrome-192x192.png",
|
|
572
556
|
BRAND_COLOR: "#f8f5fc",
|
|
@@ -607,7 +591,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
607
591
|
]
|
|
608
592
|
},
|
|
609
593
|
{
|
|
610
|
-
API_KEY:
|
|
594
|
+
API_KEY: SERVICES_API_KEY.Firefly,
|
|
611
595
|
LOGO: "https://firefly.social/android-chrome-192x192.png",
|
|
612
596
|
BRAND_COLOR: "#f8f5fc",
|
|
613
597
|
BRAND_SECONDARY_COLOR: "#855dcd",
|
|
@@ -654,7 +638,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
654
638
|
]
|
|
655
639
|
},
|
|
656
640
|
{
|
|
657
|
-
API_KEY:
|
|
641
|
+
API_KEY: SERVICES_API_KEY.Neynar,
|
|
658
642
|
LOGO: "https://framerusercontent.com/images/OS5YeZ2Y7DmszAxL6Zf06pXtKzc.svg",
|
|
659
643
|
BRAND_COLOR: "#e8e6ff",
|
|
660
644
|
BRAND_SECONDARY_COLOR: "#28204A",
|
|
@@ -694,7 +678,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
694
678
|
// ],
|
|
695
679
|
// },
|
|
696
680
|
// {
|
|
697
|
-
// API_KEY:
|
|
681
|
+
// API_KEY: SERVICES_API_KEY.Etherscan,
|
|
698
682
|
// LOGO: "https://www.pendle.finance/uploads/wp-content/uploads/2021/12/cropped-Pendle-Logo-quite-small.png",
|
|
699
683
|
// BRAND_COLOR: "#eafffb",
|
|
700
684
|
// BRAND_SECONDARY_COLOR: "#47e2c2",
|
|
@@ -741,7 +725,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
741
725
|
// ]
|
|
742
726
|
// },
|
|
743
727
|
// {
|
|
744
|
-
// API_KEY:
|
|
728
|
+
// API_KEY: SERVICES_API_KEY.Etherscan,
|
|
745
729
|
// LOGO: "https://cdn.prod.website-files.com/6760e87b474d412dfa9a7a68/6760e8ebe8faad5fb985c89a_Frame%201321316795.png",
|
|
746
730
|
// BRAND_COLOR: "#f6f4ff",
|
|
747
731
|
// BRAND_SECONDARY_COLOR: "#684ff8",
|
|
@@ -788,7 +772,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
788
772
|
// ]
|
|
789
773
|
// },
|
|
790
774
|
// {
|
|
791
|
-
// API_KEY:
|
|
775
|
+
// API_KEY: SERVICES_API_KEY.GnosisPay,
|
|
792
776
|
// LOGO: "https://gnosisscan.io/assets/generic/html/favicon-light.ico",
|
|
793
777
|
// BRAND_COLOR: "#f6f7f6",
|
|
794
778
|
// BRAND_SECONDARY_COLOR: "#133629",
|
|
@@ -835,7 +819,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
835
819
|
// ]
|
|
836
820
|
// },
|
|
837
821
|
// {
|
|
838
|
-
// API_KEY:
|
|
822
|
+
// API_KEY: SERVICES_API_KEY.Etherscan,
|
|
839
823
|
// LOGO: "https://www.tally.xyz/favicon.ico",
|
|
840
824
|
// BRAND_COLOR: "#f9f8ff",
|
|
841
825
|
// BRAND_SECONDARY_COLOR: "#725bff",
|
|
@@ -945,6 +929,6 @@ export {
|
|
|
945
929
|
FUNCTION_LOCALE,
|
|
946
930
|
MAX_PAGE_LIMIT,
|
|
947
931
|
SAFE_CHAIN_MAP,
|
|
948
|
-
|
|
932
|
+
SERVICES_API_KEY,
|
|
949
933
|
UTILITY
|
|
950
934
|
};
|