@defillama/sdk 5.0.219 → 5.0.221

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.
@@ -43,6 +43,7 @@
43
43
  "aura": "Aura Network",
44
44
  "aurora": "Aurora",
45
45
  "avax": "Avalanche",
46
+ "axiome": "Axiome",
46
47
  "b3": "B3",
47
48
  "babylon": "Babylon Genesis",
48
49
  "band": "BandChain",
@@ -77,9 +78,11 @@
77
78
  "bouncebit": "BounceBit",
78
79
  "bsc": "BSC",
79
80
  "bsquared": "BSquared",
81
+ "bsv": "BSV Blockchain",
80
82
  "btn": "Bitnet",
81
83
  "btnx": "Botanix",
82
84
  "btr": "Bitlayer",
85
+ "bullet": "Bullet",
83
86
  "bytomsidechain": "Bytomsidechain",
84
87
  "cabal": "Cabal",
85
88
  "callisto": "Callisto",
@@ -140,12 +143,14 @@
140
143
  "doma": "Doma",
141
144
  "dsc": "DSC",
142
145
  "duckchain": "DuckChain",
146
+ "dungeon": "Dungeon",
143
147
  "dydx": "dYdX",
144
148
  "dymension": "Dymension",
145
149
  "earnm": "Earnm",
146
150
  "echelon": "Echelon",
147
151
  "echelon_initia": "Echelon Initia",
148
152
  "eclipse": "Eclipse",
153
+ "eden": "Eden",
149
154
  "edgex": "edgeX L1",
150
155
  "elastos": "Elastos",
151
156
  "elrond": "MultiversX",
@@ -247,6 +252,7 @@
247
252
  "ink": "Ink",
248
253
  "inri": "INRI",
249
254
  "interlay": "Interlay",
255
+ "intuition": "Intuition",
250
256
  "iota": "IOTA",
251
257
  "iotaevm": "IOTA EVM",
252
258
  "iotex": "IoTeX",
@@ -261,6 +267,7 @@
261
267
  "karak": "K2",
262
268
  "kardia": "Kardia",
263
269
  "karura": "Karura",
270
+ "kaspa": "Kaspa",
264
271
  "kasplex": "Kasplex",
265
272
  "katana": "Katana",
266
273
  "kava": "Kava",
@@ -291,6 +298,7 @@
291
298
  "lumia": "Lumia",
292
299
  "lung": "Lung",
293
300
  "lyra": "Derive Chain",
301
+ "m": "MemeCore",
294
302
  "manta": "Manta",
295
303
  "manta_atlantic": "Manta Atlantic",
296
304
  "mantle": "Mantle",
@@ -386,6 +394,7 @@
386
394
  "pgn": "PGN",
387
395
  "phantasma": "Phantasma",
388
396
  "pharos": "Pharos",
397
+ "pi": "Pi Network",
389
398
  "planq": "Planq",
390
399
  "plasma": "Plasma",
391
400
  "plume": "Plume",
@@ -501,7 +510,7 @@
501
510
  "terra2": "Terra2",
502
511
  "tezos": "Tezos",
503
512
  "theta": "Theta",
504
- "thorchain": "Thorchain",
513
+ "thorchain": "THORChain",
505
514
  "thundercore": "ThunderCore",
506
515
  "titan": "Titan",
507
516
  "tlchain": "Tlchain",
@@ -536,7 +545,7 @@
536
545
  "wc": "World Chain",
537
546
  "wchain": "W Chain",
538
547
  "wemix": "WEMIX3.0",
539
- "winr": "WINR",
548
+ "winr": "WINR Chain",
540
549
  "witnet": "Witnet",
541
550
  "xai": "Xai",
542
551
  "xdai": "Gnosis",
@@ -610,12 +619,14 @@
610
619
  "Aura Network": "aura",
611
620
  "Aurora": "aurora",
612
621
  "Avalanche": "avax",
622
+ "Axiome": "axiome",
613
623
  "B3": "b3",
614
624
  "BCHyper": "bcypher",
615
625
  "BESC Hyperchain": "besc",
616
626
  "BEVM": "chainx",
617
627
  "BOB": "bob",
618
628
  "BSC": "bsc",
629
+ "BSV Blockchain": "bsv",
619
630
  "BSquared": "bsquared",
620
631
  "Babylon Genesis": "babylon",
621
632
  "Bahamut": "ftn",
@@ -648,6 +659,7 @@
648
659
  "Bostrom": "bostrom",
649
660
  "Botanix": "btnx",
650
661
  "BounceBit": "bouncebit",
662
+ "Bullet": "bullet",
651
663
  "Bytomsidechain": "bytomsidechain",
652
664
  "CLV": "clv",
653
665
  "CMP": "cmp",
@@ -712,6 +724,7 @@
712
724
  "Dogechain": "dogechain",
713
725
  "Doma": "doma",
714
726
  "DuckChain": "duckchain",
727
+ "Dungeon": "dungeon",
715
728
  "Dymension": "dymension",
716
729
  "EDU Chain": "occ",
717
730
  "ENI": "eni",
@@ -724,6 +737,7 @@
724
737
  "Echelon Chain": "echelon_initia",
725
738
  "Echelon Initia": "echelon_initia",
726
739
  "Eclipse": "eclipse",
740
+ "Eden": "eden",
727
741
  "Elastos": "elastos",
728
742
  "Electroneum": "etn",
729
743
  "Elrond": "elrond",
@@ -823,6 +837,7 @@
823
837
  "Injective": "injective",
824
838
  "Ink": "ink",
825
839
  "Interlay": "interlay",
840
+ "Intuition": "intuition",
826
841
  "IoTeX": "iotex",
827
842
  "JBC": "jbc",
828
843
  "JOC": "joc",
@@ -837,6 +852,7 @@
837
852
  "Kalshi": "kalshi",
838
853
  "Kardia": "kardia",
839
854
  "Karura": "karura",
855
+ "Kaspa": "kaspa",
840
856
  "Kasplex": "kasplex",
841
857
  "Katana": "katana",
842
858
  "Kava": "kava",
@@ -882,6 +898,7 @@
882
898
  "Matchain": "matchain",
883
899
  "Mayachain": "mayachain",
884
900
  "MegaETH": "megaeth",
901
+ "MemeCore": "m",
885
902
  "Merlin": "merlin",
886
903
  "Meta": "meta",
887
904
  "Meter": "meter",
@@ -975,6 +992,7 @@
975
992
  "Persistence One": "persistence",
976
993
  "Phantasma": "phantasma",
977
994
  "Pharos": "pharos",
995
+ "Pi Network": "pi",
978
996
  "Planq": "planq",
979
997
  "Plasma": "plasma",
980
998
  "Plume": "plume",
@@ -1083,6 +1101,7 @@
1083
1101
  "Syndicate": "syndicate",
1084
1102
  "Syscoin": "syscoin",
1085
1103
  "TAC": "tac",
1104
+ "THORChain": "thorchain",
1086
1105
  "TON": "ton",
1087
1106
  "Taiko": "taiko",
1088
1107
  "Taraxa": "tara",
@@ -1129,6 +1148,7 @@
1129
1148
  "WEMIX": "wemix",
1130
1149
  "WEMIX3.0": "wemix",
1131
1150
  "WINR": "winr",
1151
+ "WINR Chain": "winr",
1132
1152
  "Wanchain": "wan",
1133
1153
  "Waterfall": "water",
1134
1154
  "Waves": "waves",
@@ -1196,6 +1216,7 @@
1196
1216
  "curio": "2026-06-24",
1197
1217
  "dchainmainnet": "2026-06-24",
1198
1218
  "dfs": "2026-06-24",
1219
+ "echelon": "2023-10-20",
1199
1220
  "enuls": "2026-03-25",
1200
1221
  "eon": "2026-02-12",
1201
1222
  "eos_evm": "2026-02-12",
@@ -1215,12 +1236,15 @@
1215
1236
  "kardia": "2026-01-20",
1216
1237
  "kinto": "2026-03-06",
1217
1238
  "kroma": "2026-01-20",
1239
+ "kujira": "2026-08-03",
1218
1240
  "migaloo": "2026-02-12",
1219
1241
  "milkomeda": "2026-02-12",
1220
1242
  "milkomeda_a1": "2026-02-12",
1221
1243
  "milkyway": "2026-01-20",
1222
1244
  "milkyway_rollup": "2026-01-20",
1223
1245
  "mint": "2026-04-17",
1246
+ "moonbeam": "2026-07-31",
1247
+ "moonriver": "2026-07-31",
1224
1248
  "nos": "2026-06-24",
1225
1249
  "nuls": "2026-03-25",
1226
1250
  "onus": "2026-06-05",
@@ -1240,8 +1264,10 @@
1240
1264
  "tara": "2026-03-09",
1241
1265
  "tenet": "2026-04-22",
1242
1266
  "titan": "2026-05-05",
1267
+ "umee": "2026-07-10",
1243
1268
  "vision": "2026-02-20",
1244
1269
  "winr": "2026-05-01",
1270
+ "winr_chain": "2026-05-01",
1245
1271
  "zksync": "2026-05-15"
1246
1272
  }
1247
1273
  }
@@ -2,6 +2,7 @@ import { chainKeyToChainLabelMap, chainLabelsToKeyMap } from './data.json';
2
2
  export { chainKeyToChainLabelMap, chainLabelsToKeyMap, };
3
3
  export declare function updateData(): Promise<void>;
4
4
  export declare const sluggifyString: (name: string) => string;
5
+ export declare function getSluggifiedChainLabel(label: string): string;
5
6
  export declare function getChainKeyFromLabel(label: string): string;
6
7
  export declare function getChainLabelFromKey(id: string): string;
7
8
  export declare function getDeadChains(): string[];
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.sluggifyString = exports.chainLabelsToKeyMap = exports.chainKeyToChainLabelMap = void 0;
7
7
  exports.updateData = updateData;
8
+ exports.getSluggifiedChainLabel = getSluggifiedChainLabel;
8
9
  exports.getChainKeyFromLabel = getChainKeyFromLabel;
9
10
  exports.getChainLabelFromKey = getChainLabelFromKey;
10
11
  exports.getDeadChains = getDeadChains;
@@ -66,6 +67,13 @@ Object.entries(data_json_1.chainLabelsToKeyMap).forEach(([label, id]) => {
66
67
  _chainLabelToChainIdCache[label] = id;
67
68
  _chainLabelToChainIdCache[(0, exports.sluggifyString)(label)] = id;
68
69
  });
70
+ // this is needed because multiple labels can point to the same chain key, so we need to ensure that while writing/reading from the cache, we always use the same label irrespective what is passed in
71
+ // now, Avalance, Avax, avalanche -> avalanche
72
+ function getSluggifiedChainLabel(label) {
73
+ const chainKey = getChainKeyFromLabel(label);
74
+ label = getChainLabelFromKey(chainKey);
75
+ return (0, exports.sluggifyString)(label);
76
+ }
69
77
  // to be used if we are unsure if a label exists in our system, if it is known, use chainLabelsToKeyMap instead
70
78
  function getChainKeyFromLabel(label) {
71
79
  let value = _chainLabelToChainIdCache[label];
@@ -136,8 +136,8 @@ function sumSingleBalance(balances, token, balance, chain) {
136
136
  else {
137
137
  const prevBalance = convertToBigInt(balances[token]);
138
138
  const value = (prevBalance + convertToBigInt(balance));
139
- isValidNumber(Number(value));
140
- balances[token] = Number(value).toString();
139
+ isValidNumber(value);
140
+ balances[token] = value.toString();
141
141
  }
142
142
  function isValidNumber(value) {
143
143
  if (typeof value === 'bigint')
@@ -212,6 +212,7 @@ const chainShortNameMapping = {
212
212
  camp: 'campmainnet',
213
213
  mantra: 'mantrachain',
214
214
  saga: 'sagaevm',
215
+ robinhood: 'robinhoodchain',
215
216
  };
216
217
  async function filterForWorkingRPCs(rpc, chain, chainId) {
217
218
  if (rpc.length < 4)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defillama/sdk",
3
- "version": "5.0.219",
3
+ "version": "5.0.221",
4
4
  "description": "SDK for calculating TVL",
5
5
  "main": "build/index.js",
6
6
  "scripts": {