@defillama/sdk 5.0.233 → 5.0.235

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.
@@ -501,7 +501,7 @@
501
501
  "step": "Step",
502
502
  "strat": "Strat",
503
503
  "stratis": "Stratis",
504
- "strato": "Strato",
504
+ "strato": "Strato Chain",
505
505
  "stride": "Stride",
506
506
  "sty": "Data Network",
507
507
  "sui": "Sui",
@@ -1117,6 +1117,7 @@
1117
1117
  "Strat": "strat",
1118
1118
  "Stratis": "stratis",
1119
1119
  "Strato": "strato",
1120
+ "Strato Chain": "strato",
1120
1121
  "Stride": "stride",
1121
1122
  "Sui": "sui",
1122
1123
  "Superposition": "spn",
@@ -1248,6 +1249,7 @@
1248
1249
  "curio": "2026-06-24",
1249
1250
  "dchainmainnet": "2026-06-24",
1250
1251
  "degen": "2026-08-31",
1252
+ "dexit": "2024-01-20",
1251
1253
  "dfs": "2026-06-24",
1252
1254
  "dogechain": "2026-08-08",
1253
1255
  "duckchain": "2026-07-20",
@@ -1275,6 +1277,7 @@
1275
1277
  "heco": "2026-02-12",
1276
1278
  "hoo": "2025-01-01",
1277
1279
  "hpb": "2026-08-01",
1280
+ "idex": "2026-02-20",
1278
1281
  "inevm": "2026-04-08",
1279
1282
  "inri": "2026-08-03",
1280
1283
  "interlay": "2026-07-22",
@@ -1323,6 +1326,7 @@
1323
1326
  "spn": "2026-09-08",
1324
1327
  "srx": "2026-08-03",
1325
1328
  "stargaze": "2026-06-01",
1329
+ "svm": "2026-01-09",
1326
1330
  "swellchain": "2026-06-23",
1327
1331
  "sx": "2026-04-23",
1328
1332
  "tara": "2026-03-09",
@@ -28,8 +28,7 @@ const LLAMA_INDEXER_V2_ENDPOINT = (0, env_1.getEnvValue)("LLAMA_INDEXER_V2_ENDPO
28
28
  const LLAMA_INDEXER_V2_API_KEY = (0, env_1.getEnvValue)("LLAMA_INDEXER_V2_API_KEY");
29
29
  const LLAMA_INDEXER_V4_ENDPOINT = (0, env_1.getEnvValue)("LLAMA_INDEXER_V4_ENDPOINT");
30
30
  const LLAMA_INDEXER_V4_API_KEY = (_a = (0, env_1.getEnvValue)("LLAMA_INDEXER_V4_API_KEY")) !== null && _a !== void 0 ? _a : LLAMA_INDEXER_V2_API_KEY;
31
- // route every supported chain through v4 (v2 stays available as explicit config)
32
- const LLAMA_INDEXER_PREFER_V4 = (0, env_1.getEnvValue)("LLAMA_INDEXER_PREFER_V4") === "true";
31
+ const LLAMA_INDEXER_PREFER_V4 = (0, env_1.getEnvValue)("LLAMA_INDEXER_PREFER_V4") === "true"; // route all chains through v4
33
32
  const addressChunkSize = +(0, env_1.getEnvValue)("LLAMA_INDEXER_ADDRESS_CHUNK_SIZE") || 100;
34
33
  const INDEXER_REQUEST_TIMEOUT_MS = +(0, env_1.getEnvValue)("LLAMA_INDEXER_TIMEOUT_MS");
35
34
  const indexerChainIdChainMapping = {
@@ -101,9 +100,7 @@ function checkIndexerConfig(version) {
101
100
  if (!endpoint || !apiKey)
102
101
  throw new Error(`Llama Indexer (${version}) URL/api key is not set`);
103
102
  }
104
- // pick which indexer serves a given chain:
105
- // - v4-only chains (not indexed on v2) always go to v4
106
- // - everything else goes to v2, unless LLAMA_INDEXER_PREFER_V4 is set or v2 is not configured
103
+ // v4-only chains always go to v4; the rest go to v2 unless PREFER_V4 is set or v2 is not configured
107
104
  function getChainIndexerVersion(chain) {
108
105
  if (v4OnlyChainSet.has(chain))
109
106
  return "v4";
@@ -366,8 +366,7 @@ async function getLogParams(options, isIndexerCall = false) {
366
366
  }
367
367
  if (!parsed && !parseFailureTolerated)
368
368
  throw new Error(`Failed to parse log: ${JSON.stringify(log.transactionHash)}`);
369
- // tolerated failures must stay visible: a targeted call where logs silently fail
370
- // to decode is usually a bug in the caller eventAbi (warn once per call)
369
+ // keep tolerated failures visible (once per call)
371
370
  if (!parsed && !allowParseFailure && !parseFailureWarned) {
372
371
  parseFailureWarned = true;
373
372
  console.warn(`[sdk.getLogs] some logs did not decode against the provided eventAbi and were returned without .args ` +
@@ -213,6 +213,8 @@ const chainShortNameMapping = {
213
213
  mantra: 'mantrachain',
214
214
  saga: 'sagaevm',
215
215
  robinhood: 'robinhoodchain',
216
+ bcypher: 'bchyper',
217
+ area: 'areum',
216
218
  };
217
219
  async function filterForWorkingRPCs(rpc, chain, chainId) {
218
220
  if (rpc.length < 4)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defillama/sdk",
3
- "version": "5.0.233",
3
+ "version": "5.0.235",
4
4
  "description": "SDK for calculating TVL",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -12,7 +12,7 @@
12
12
  "test": "npm run load-providers && TEST_MODE=true LLAMA_DEBUG_MODE='' SDK_DEBUG='' LLAMA_DEBUG_LEVEL2='' LLAMA_DEBUG_LEVEL3='' jest",
13
13
  "test-only": "echo 'skipped building providers.json' && TEST_MODE=true LLAMA_DEBUG_MODE='' SDK_DEBUG='' LLAMA_DEBUG_LEVEL2='' LLAMA_DEBUG_LEVEL3='' jest",
14
14
  "test-debug": "TEST_MODE=true jest",
15
- "test-indexer": "TEST_MODE=true jest src/util/indexer.routing.test.ts src/util/indexer.test.ts src/util/indexer.robinhood.test.ts src/util/indexer.e2e.test.ts --runInBand",
15
+ "test-indexer": "TEST_MODE=true jest src/util/indexer.routing.test.ts src/util/indexer.test.ts src/util/indexer.v4.test.ts src/util/indexer.e2e.test.ts --runInBand",
16
16
  "update-providers": "ts-node src/util/updateProviderList.ts",
17
17
  "remove-rpcs": "ts-node src/util/removeRedundantRPCs.ts",
18
18
  "format": "prettier --write \"src/**/*.ts\"",