@fileverse-dev/formulajs 4.4.11-mod-64-patch-2 → 4.4.11-mod-66
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 +810 -1104
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +255 -531
- package/lib/esm/crypto-constants.mjs +51 -41
- package/lib/esm/index.mjs +254 -532
- package/package.json +3 -5
- package/types/cjs/index.d.cts +23 -12
- package/types/esm/index.d.mts +23 -12
|
@@ -17,19 +17,15 @@ 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
|
-
INVALID_CHAIN: "
|
|
25
|
-
INVALID_TYPE: "
|
|
26
|
-
INVALID_ADDRESS: "
|
|
27
|
-
INVALID_PARAM: "
|
|
28
|
-
MAX_PAGE_LIMIT: "
|
|
29
|
-
NETWORK_ERROR: "NETWORK_ERROR",
|
|
30
|
-
ENS: "ENS",
|
|
31
|
-
CUSTOM: "CUSTOM",
|
|
32
|
-
MISSING_PARAM: "MISSING_PARAM"
|
|
20
|
+
INVALID_API_KEY: "_INVALID_KEY",
|
|
21
|
+
RATE_LIMIT: "_RATE_LIMIT_REACHED",
|
|
22
|
+
DEFAULT: "FETCH_ERROR",
|
|
23
|
+
MISSING_KEY: "_MISSING",
|
|
24
|
+
INVALID_CHAIN: "_INVALID_CHAIN",
|
|
25
|
+
INVALID_TYPE: "_INVALID_TYPE",
|
|
26
|
+
INVALID_ADDRESS: "_INVALID_ADDRESS",
|
|
27
|
+
INVALID_PARAM: "_INVALID_PARAM",
|
|
28
|
+
MAX_PAGE_LIMIT: "Max page limit is 250"
|
|
33
29
|
};
|
|
34
30
|
var UTILITY = {
|
|
35
31
|
ALCHEMY_API_KEY: "ALCHEMY_API_KEY"
|
|
@@ -37,20 +33,20 @@ var UTILITY = {
|
|
|
37
33
|
var MAX_PAGE_LIMIT = 250;
|
|
38
34
|
|
|
39
35
|
// src/crypto-constants.js
|
|
40
|
-
var
|
|
41
|
-
Etherscan: "
|
|
42
|
-
Coingecko: "
|
|
43
|
-
Safe: "
|
|
44
|
-
Basescan: "
|
|
45
|
-
Gnosisscan: "
|
|
46
|
-
Firefly: "
|
|
47
|
-
GnosisPay: "
|
|
48
|
-
Neynar: "
|
|
49
|
-
Defillama: "
|
|
36
|
+
var SERVICE_API_KEY = {
|
|
37
|
+
Etherscan: "ETHERSCAN_API_KEY",
|
|
38
|
+
Coingecko: "COINGECKO_API_KEY",
|
|
39
|
+
Safe: "SAFE_API_KEY",
|
|
40
|
+
Basescan: "BASESCAN_API_KEY",
|
|
41
|
+
Gnosisscan: "GNOSIS_API_KEY",
|
|
42
|
+
Firefly: "FIRE_FLY_API_KEY",
|
|
43
|
+
GnosisPay: "GNOSIS_API_KEY",
|
|
44
|
+
Neynar: "NEYNAR_API_KEY",
|
|
45
|
+
Defillama: "DEFILLAMA_API_KEY"
|
|
50
46
|
};
|
|
51
47
|
var FUNCTION_LOCALE = [
|
|
52
48
|
{
|
|
53
|
-
API_KEY:
|
|
49
|
+
API_KEY: SERVICE_API_KEY.Etherscan,
|
|
54
50
|
LOGO: "https://raw.githubusercontent.com/ethereum/ethereum-org/master/dist/favicon.ico",
|
|
55
51
|
BRAND_COLOR: "#F6F7F8",
|
|
56
52
|
BRAND_SECONDARY_COLOR: "#21325B",
|
|
@@ -148,7 +144,7 @@ var FUNCTION_LOCALE = [
|
|
|
148
144
|
BRAND_SECONDARY_COLOR: "#4bc63d",
|
|
149
145
|
n: "COINGECKO",
|
|
150
146
|
t: 20,
|
|
151
|
-
API_KEY:
|
|
147
|
+
API_KEY: SERVICE_API_KEY.Coingecko,
|
|
152
148
|
d: "Query crypto prices, ecosystem market data, stablecoins, or derivatives from CoinGecko.",
|
|
153
149
|
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.',
|
|
154
150
|
p: [
|
|
@@ -179,7 +175,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
179
175
|
]
|
|
180
176
|
},
|
|
181
177
|
{
|
|
182
|
-
API_KEY:
|
|
178
|
+
API_KEY: SERVICE_API_KEY.Defillama,
|
|
183
179
|
LOGO: "https://defillama.com/favicon-32x32.png",
|
|
184
180
|
BRAND_COLOR: "#f8f5fc",
|
|
185
181
|
BRAND_SECONDARY_COLOR: "#855dcd",
|
|
@@ -198,7 +194,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
198
194
|
]
|
|
199
195
|
},
|
|
200
196
|
{
|
|
201
|
-
API_KEY:
|
|
197
|
+
API_KEY: SERVICE_API_KEY.Basescan,
|
|
202
198
|
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",
|
|
203
199
|
BRAND_COLOR: "#f1f5ff",
|
|
204
200
|
BRAND_SECONDARY_COLOR: "#2752ff",
|
|
@@ -214,6 +210,13 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
214
210
|
require: "m",
|
|
215
211
|
type: "string"
|
|
216
212
|
},
|
|
213
|
+
{
|
|
214
|
+
name: "chain",
|
|
215
|
+
detail: "Must be 'base'.",
|
|
216
|
+
example: `"base"`,
|
|
217
|
+
require: "m",
|
|
218
|
+
type: "string"
|
|
219
|
+
},
|
|
217
220
|
{
|
|
218
221
|
name: "address",
|
|
219
222
|
detail: "Target wallet address (only required for txns, token, and nft queries). Not needed for 'gas'.",
|
|
@@ -252,7 +255,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
252
255
|
]
|
|
253
256
|
},
|
|
254
257
|
{
|
|
255
|
-
API_KEY:
|
|
258
|
+
API_KEY: SERVICE_API_KEY.Gnosisscan,
|
|
256
259
|
LOGO: "https://gnosisscan.io/assets/generic/html/favicon-light.ico",
|
|
257
260
|
BRAND_COLOR: "#f6f7f6",
|
|
258
261
|
BRAND_SECONDARY_COLOR: "#133629",
|
|
@@ -268,6 +271,13 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
268
271
|
require: "m",
|
|
269
272
|
type: "string"
|
|
270
273
|
},
|
|
274
|
+
{
|
|
275
|
+
name: "chain",
|
|
276
|
+
detail: "Must be 'gnosis'.",
|
|
277
|
+
example: `"gnosis"`,
|
|
278
|
+
require: "m",
|
|
279
|
+
type: "string"
|
|
280
|
+
},
|
|
271
281
|
{
|
|
272
282
|
name: "address",
|
|
273
283
|
detail: "Wallet address to query. Required for all types except 'gas'.",
|
|
@@ -306,7 +316,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
306
316
|
]
|
|
307
317
|
},
|
|
308
318
|
{
|
|
309
|
-
API_KEY:
|
|
319
|
+
API_KEY: SERVICE_API_KEY.Etherscan,
|
|
310
320
|
LOGO: "https://etherscan.io/images/favicon3.ico",
|
|
311
321
|
BRAND_COLOR: "#F6F7F8",
|
|
312
322
|
BRAND_SECONDARY_COLOR: "#21325B",
|
|
@@ -333,7 +343,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
333
343
|
name: "address",
|
|
334
344
|
detail: "Wallet address / Ens name to query",
|
|
335
345
|
example: `"vitalik.eth"`,
|
|
336
|
-
require: "
|
|
346
|
+
require: "o",
|
|
337
347
|
type: "string"
|
|
338
348
|
},
|
|
339
349
|
{
|
|
@@ -377,7 +387,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
377
387
|
]
|
|
378
388
|
},
|
|
379
389
|
{
|
|
380
|
-
API_KEY:
|
|
390
|
+
API_KEY: SERVICE_API_KEY.Safe,
|
|
381
391
|
LOGO: "https://safe-transaction-mainnet.safe.global/static/safe/favicon.png",
|
|
382
392
|
BRAND_COLOR: "#ebf9f3",
|
|
383
393
|
BRAND_SECONDARY_COLOR: "#00B460",
|
|
@@ -506,7 +516,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
506
516
|
type: "string"
|
|
507
517
|
},
|
|
508
518
|
{
|
|
509
|
-
name: "
|
|
519
|
+
name: "param2",
|
|
510
520
|
detail: "Token Contract Address for market category or Token symbol",
|
|
511
521
|
example: `"USDT"`,
|
|
512
522
|
require: "m",
|
|
@@ -515,7 +525,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
515
525
|
]
|
|
516
526
|
},
|
|
517
527
|
{
|
|
518
|
-
API_KEY:
|
|
528
|
+
API_KEY: SERVICE_API_KEY.Firefly,
|
|
519
529
|
LOGO: "https://tse3.mm.bing.net/th?id=OIP.1TANdvYNcEadCk6CO1bCcgAAAA&r=0&w=440&h=440&c=7",
|
|
520
530
|
SECONDARY_LOGO: "https://firefly.social/android-chrome-192x192.png",
|
|
521
531
|
BRAND_COLOR: "#f8f5fc",
|
|
@@ -556,7 +566,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
556
566
|
]
|
|
557
567
|
},
|
|
558
568
|
{
|
|
559
|
-
API_KEY:
|
|
569
|
+
API_KEY: SERVICE_API_KEY.Firefly,
|
|
560
570
|
LOGO: "https://farcaster.xyz/favicon.ico",
|
|
561
571
|
SECONDARY_LOGO: "https://firefly.social/android-chrome-192x192.png",
|
|
562
572
|
BRAND_COLOR: "#f8f5fc",
|
|
@@ -597,7 +607,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
597
607
|
]
|
|
598
608
|
},
|
|
599
609
|
{
|
|
600
|
-
API_KEY:
|
|
610
|
+
API_KEY: SERVICE_API_KEY.Firefly,
|
|
601
611
|
LOGO: "https://firefly.social/android-chrome-192x192.png",
|
|
602
612
|
BRAND_COLOR: "#f8f5fc",
|
|
603
613
|
BRAND_SECONDARY_COLOR: "#855dcd",
|
|
@@ -644,7 +654,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
644
654
|
]
|
|
645
655
|
},
|
|
646
656
|
{
|
|
647
|
-
API_KEY:
|
|
657
|
+
API_KEY: SERVICE_API_KEY.Neynar,
|
|
648
658
|
LOGO: "https://framerusercontent.com/images/OS5YeZ2Y7DmszAxL6Zf06pXtKzc.svg",
|
|
649
659
|
BRAND_COLOR: "#e8e6ff",
|
|
650
660
|
BRAND_SECONDARY_COLOR: "#28204A",
|
|
@@ -684,7 +694,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
684
694
|
// ],
|
|
685
695
|
// },
|
|
686
696
|
// {
|
|
687
|
-
// API_KEY:
|
|
697
|
+
// API_KEY: SERVICE_API_KEY.Etherscan,
|
|
688
698
|
// LOGO: "https://www.pendle.finance/uploads/wp-content/uploads/2021/12/cropped-Pendle-Logo-quite-small.png",
|
|
689
699
|
// BRAND_COLOR: "#eafffb",
|
|
690
700
|
// BRAND_SECONDARY_COLOR: "#47e2c2",
|
|
@@ -731,7 +741,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
731
741
|
// ]
|
|
732
742
|
// },
|
|
733
743
|
// {
|
|
734
|
-
// API_KEY:
|
|
744
|
+
// API_KEY: SERVICE_API_KEY.Etherscan,
|
|
735
745
|
// LOGO: "https://cdn.prod.website-files.com/6760e87b474d412dfa9a7a68/6760e8ebe8faad5fb985c89a_Frame%201321316795.png",
|
|
736
746
|
// BRAND_COLOR: "#f6f4ff",
|
|
737
747
|
// BRAND_SECONDARY_COLOR: "#684ff8",
|
|
@@ -778,7 +788,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
778
788
|
// ]
|
|
779
789
|
// },
|
|
780
790
|
// {
|
|
781
|
-
// API_KEY:
|
|
791
|
+
// API_KEY: SERVICE_API_KEY.GnosisPay,
|
|
782
792
|
// LOGO: "https://gnosisscan.io/assets/generic/html/favicon-light.ico",
|
|
783
793
|
// BRAND_COLOR: "#f6f7f6",
|
|
784
794
|
// BRAND_SECONDARY_COLOR: "#133629",
|
|
@@ -825,7 +835,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
|
|
|
825
835
|
// ]
|
|
826
836
|
// },
|
|
827
837
|
// {
|
|
828
|
-
// API_KEY:
|
|
838
|
+
// API_KEY: SERVICE_API_KEY.Etherscan,
|
|
829
839
|
// LOGO: "https://www.tally.xyz/favicon.ico",
|
|
830
840
|
// BRAND_COLOR: "#f9f8ff",
|
|
831
841
|
// BRAND_SECONDARY_COLOR: "#725bff",
|
|
@@ -935,6 +945,6 @@ export {
|
|
|
935
945
|
FUNCTION_LOCALE,
|
|
936
946
|
MAX_PAGE_LIMIT,
|
|
937
947
|
SAFE_CHAIN_MAP,
|
|
938
|
-
|
|
948
|
+
SERVICE_API_KEY,
|
|
939
949
|
UTILITY
|
|
940
950
|
};
|