@defillama/sdk 5.0.219 → 5.0.220

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",
@@ -146,6 +147,7 @@
146
147
  "echelon": "Echelon",
147
148
  "echelon_initia": "Echelon Initia",
148
149
  "eclipse": "Eclipse",
150
+ "eden": "Eden",
149
151
  "edgex": "edgeX L1",
150
152
  "elastos": "Elastos",
151
153
  "elrond": "MultiversX",
@@ -247,6 +249,7 @@
247
249
  "ink": "Ink",
248
250
  "inri": "INRI",
249
251
  "interlay": "Interlay",
252
+ "intuition": "Intuition",
250
253
  "iota": "IOTA",
251
254
  "iotaevm": "IOTA EVM",
252
255
  "iotex": "IoTeX",
@@ -610,6 +613,7 @@
610
613
  "Aura Network": "aura",
611
614
  "Aurora": "aurora",
612
615
  "Avalanche": "avax",
616
+ "Axiome": "axiome",
613
617
  "B3": "b3",
614
618
  "BCHyper": "bcypher",
615
619
  "BESC Hyperchain": "besc",
@@ -724,6 +728,7 @@
724
728
  "Echelon Chain": "echelon_initia",
725
729
  "Echelon Initia": "echelon_initia",
726
730
  "Eclipse": "eclipse",
731
+ "Eden": "eden",
727
732
  "Elastos": "elastos",
728
733
  "Electroneum": "etn",
729
734
  "Elrond": "elrond",
@@ -823,6 +828,7 @@
823
828
  "Injective": "injective",
824
829
  "Ink": "ink",
825
830
  "Interlay": "interlay",
831
+ "Intuition": "intuition",
826
832
  "IoTeX": "iotex",
827
833
  "JBC": "jbc",
828
834
  "JOC": "joc",
@@ -1196,6 +1202,7 @@
1196
1202
  "curio": "2026-06-24",
1197
1203
  "dchainmainnet": "2026-06-24",
1198
1204
  "dfs": "2026-06-24",
1205
+ "echelon": "2023-10-20",
1199
1206
  "enuls": "2026-03-25",
1200
1207
  "eon": "2026-02-12",
1201
1208
  "eos_evm": "2026-02-12",
@@ -1240,6 +1247,7 @@
1240
1247
  "tara": "2026-03-09",
1241
1248
  "tenet": "2026-04-22",
1242
1249
  "titan": "2026-05-05",
1250
+ "umee": "2026-07-10",
1243
1251
  "vision": "2026-02-20",
1244
1252
  "winr": "2026-05-01",
1245
1253
  "zksync": "2026-05-15"
@@ -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.220",
4
4
  "description": "SDK for calculating TVL",
5
5
  "main": "build/index.js",
6
6
  "scripts": {