@1delta/margin-fetcher 0.0.305 → 0.0.306

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.
@@ -1 +1 @@
1
- {"version":3,"file":"fetchFromSubgraph.d.ts","sourceRoot":"","sources":["../../../src/vaults/euler-earn/fetchFromSubgraph.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAI9D,OAAO,EAAkB,eAAe,EAAE,MAAM,SAAS,CAAA;AAyEzD,yEAAyE;AACzE,eAAO,MAAM,yBAAyB,GAAI,SAAS,MAAM,KAAG,OACvB,CAAA;AAErC,8EAA8E;AAC9E,eAAO,MAAM,uBAAuB,GAAI,SAAS,MAAM,KAAG,MAAM,GAAG,SAChC,CAAA;AAuZnC;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gCAAgC,CACpD,OAAO,EAAE,MAAM,EACf,MAAM,GAAE;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAO,EACxC,SAAS,GAAE,gBAAqB,EAChC,cAAc,CAAC,EAAE,sBAAsB,GACtC,OAAO,CAAC,eAAe,CAAC,CAmC1B"}
1
+ {"version":3,"file":"fetchFromSubgraph.d.ts","sourceRoot":"","sources":["../../../src/vaults/euler-earn/fetchFromSubgraph.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAI9D,OAAO,EAAkB,eAAe,EAAE,MAAM,SAAS,CAAA;AAyEzD,yEAAyE;AACzE,eAAO,MAAM,yBAAyB,GAAI,SAAS,MAAM,KAAG,OACvB,CAAA;AAErC,8EAA8E;AAC9E,eAAO,MAAM,uBAAuB,GAAI,SAAS,MAAM,KAAG,MAAM,GAAG,SAChC,CAAA;AA4ZnC;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gCAAgC,CACpD,OAAO,EAAE,MAAM,EACf,MAAM,GAAE;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAO,EACxC,SAAS,GAAE,gBAAqB,EAChC,cAAc,CAAC,EAAE,sBAAsB,GACtC,OAAO,CAAC,eAAe,CAAC,CAmC1B"}
@@ -4,22 +4,23 @@ import { EulerEarnVaults } from './types';
4
4
  /**
5
5
  * One-shot fetcher for all Euler Earn vaults on a chain.
6
6
  *
7
- * Source strategy — Goldsky primary, Euler Data API fallback:
8
- * - When a chain has a Goldsky subgraph, use it *unless* it lags chain head
9
- * (e.g. the BSC subgraph ran ~7 weeks behind) or errors then fall back
10
- * to the Euler Data API, which reads live on-chain figures. The richer
11
- * subgraph result is kept as a last resort if the API is also unavailable.
12
- * - Chains with no subgraph go straight to the API.
7
+ * Source strategy — Euler Data API primary, Goldsky subgraph fallback:
8
+ * - The Euler Data API reads live on-chain figures (APR-converted rates,
9
+ * correct share decimals, cap-aware liquidity), so it's the source of
10
+ * record. Used first on every chain.
11
+ * - The Goldsky subgraph is the fallback when the API is unavailable or
12
+ * returns nothing for the chain (and only on chains that have a
13
+ * subgraph configured). It can lag chain head, so it's no longer the
14
+ * primary path.
13
15
  *
14
- * The subgraph fetch and the staleness probe run concurrently, so the common
15
- * (healthy) path pays no extra latency. See [[euler-v3-data-api]].
16
- *
17
- * @param chainId target chain
18
- * @param prices optional price map keyed by oracle key / underlying
19
- * @param tokenList optional token list for hydrating `asset` metadata
16
+ * @param chainId target chain
17
+ * @param prices optional price map keyed by oracle key / underlying
18
+ * @param tokenList optional token list for hydrating `asset` metadata
19
+ * @param multicallRetry optional multicall executor — only the subgraph
20
+ * fallback uses it (to read earn-vault share decimals)
20
21
  *
21
22
  * @returns `EulerEarnVaults` keyed by lowercased vault address — `{}` when
22
- * the chain has neither a usable subgraph nor API data.
23
+ * neither source returns data.
23
24
  */
24
25
  export declare const fetchEulerEarnVaults: (chainId: string, prices?: {
25
26
  [asset: string]: number;
@@ -1 +1 @@
1
- {"version":3,"file":"fetchPublic.d.ts","sourceRoot":"","sources":["../../../src/vaults/euler-earn/fetchPublic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAS9D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAKzC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAS,MAAM,EACf,SAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAO,EACxC,YAAW,gBAAqB,EAChC,iBAAiB,sBAAsB,KACtC,OAAO,CAAC,eAAe,CA6BzB,CAAA"}
1
+ {"version":3,"file":"fetchPublic.d.ts","sourceRoot":"","sources":["../../../src/vaults/euler-earn/fetchPublic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAM9D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAKzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAS,MAAM,EACf,SAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAO,EACxC,YAAW,gBAAqB,EAChC,iBAAiB,sBAAsB,KACtC,OAAO,CAAC,eAAe,CAoBzB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1delta/margin-fetcher",
3
- "version": "0.0.305",
3
+ "version": "0.0.306",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -24,11 +24,11 @@
24
24
  "lodash": "^4.17.23",
25
25
  "@1delta/abis": "0.0.21",
26
26
  "@1delta/data-sdk": "0.0.28",
27
+ "@1delta/calldata-sdk": "0.0.154",
27
28
  "@1delta/dex-registry": "0.0.101",
28
29
  "@1delta/lender-registry": "0.0.32",
29
- "@1delta/calldata-sdk": "0.0.154",
30
- "@1delta/proxy-fetch": "0.0.1",
31
- "@1delta/providers": "0.0.59"
30
+ "@1delta/providers": "0.0.59",
31
+ "@1delta/proxy-fetch": "0.0.1"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/async-retry": "^1.4.9",