@1delta/data-sdk 0.0.49 → 0.0.50

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/dist/index.js CHANGED
@@ -95,6 +95,7 @@ var LENDER_DATA_DEFAULTS = () => ({
95
95
  llamaLendMarkets: {},
96
96
  resupplyConfig: {},
97
97
  curvanceConfig: {},
98
+ coolerConfig: {},
98
99
  twyneConfig: {},
99
100
  twyneMarkets: {},
100
101
  fraxlendConfig: {},
@@ -747,6 +748,40 @@ var curvancePositionManager = (lender, chainId, marketManager, kind) => {
747
748
  return pms.simplePositionManager ?? pms.vaultPositionManager ?? pms.nativeVaultPositionManager ?? pms.pendlePtPositionManager;
748
749
  };
749
750
 
751
+ // src/lending/cooler.ts
752
+ var COOLER_ETHEREUM_CONFIG = {
753
+ monoCooler: "0xdb591Ea2e5Db886dA872654D58f6cc584b68e7cC",
754
+ ltvOracle: "0x9ee9f0c2e91E4f6B195B988a9e6e19efcf91e8dc",
755
+ treasuryBorrower: "0xD58d7406E9CE34c90cf849Fc3eed3764EB3779B0",
756
+ composites: "0x6593768feBF9C95aC857Fb7Ef244D5738D1C57Fd",
757
+ treasury: "0xa8687A15D4BE32CC8F0a8a7B9704a4C3993D9613",
758
+ susds: "0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD",
759
+ gohm: "0x0ab87046fBb341D058F17CBC4c1133F25a20a52f",
760
+ usds: "0xdC035D45d973E3EC169d2276DDab16f1e407384F",
761
+ debtDecimals: 18
762
+ };
763
+ var COOLER_BUILTIN = {
764
+ COOLER: { "1": COOLER_ETHEREUM_CONFIG }
765
+ };
766
+ var coolerConfig = () => getGlobalData2()?.coolerConfig;
767
+ var coolerConfigFor = (lender, chainId) => {
768
+ const published = getGlobalData2()?.coolerConfig?.[lender]?.[String(chainId)];
769
+ if (published?.monoCooler) return published;
770
+ return COOLER_BUILTIN[lender]?.[String(chainId)];
771
+ };
772
+ var coolerLendersByChain = (chainId) => {
773
+ const chain = String(chainId);
774
+ const cfg = getGlobalData2()?.coolerConfig ?? {};
775
+ const keys = /* @__PURE__ */ new Set();
776
+ for (const lender of Object.keys(cfg)) {
777
+ if (cfg[lender]?.[chain]?.monoCooler) keys.add(lender);
778
+ }
779
+ for (const lender of Object.keys(COOLER_BUILTIN)) {
780
+ if (COOLER_BUILTIN[lender]?.[chain]?.monoCooler) keys.add(lender);
781
+ }
782
+ return [...keys];
783
+ };
784
+
750
785
  // src/lending/twyne.ts
751
786
  var twyneConfig = () => getGlobalData2()?.twyneConfig;
752
787
  var twyneConfigFor = (lender, chainId) => getGlobalData2()?.twyneConfig?.[twyneBaseKey(lender)]?.[String(chainId)];
@@ -1080,6 +1115,7 @@ async function fetchMainTokensMap() {
1080
1115
  }
1081
1116
  }
1082
1117
 
1118
+ exports.COOLER_ETHEREUM_CONFIG = COOLER_ETHEREUM_CONFIG;
1083
1119
  exports.CURVANCE_MONAD_CONFIG = CURVANCE_MONAD_CONFIG;
1084
1120
  exports.FRAXLEND_ETHEREUM_CONFIG = FRAXLEND_ETHEREUM_CONFIG;
1085
1121
  exports.GEARBOX_ACCOUNT_COMPRESSOR_V310 = GEARBOX_ACCOUNT_COMPRESSOR_V310;
@@ -1111,6 +1147,9 @@ exports.compoundV3Bulker = compoundV3Bulker;
1111
1147
  exports.compoundV3OraclesData = compoundV3OraclesData;
1112
1148
  exports.compoundV3Pools = compoundV3Pools;
1113
1149
  exports.compoundV3Reserves = compoundV3Reserves;
1150
+ exports.coolerConfig = coolerConfig;
1151
+ exports.coolerConfigFor = coolerConfigFor;
1152
+ exports.coolerLendersByChain = coolerLendersByChain;
1114
1153
  exports.curvanceConfig = curvanceConfig;
1115
1154
  exports.curvanceConfigFor = curvanceConfigFor;
1116
1155
  exports.curvanceLendersByChain = curvanceLendersByChain;
package/dist/index.mjs CHANGED
@@ -93,6 +93,7 @@ var LENDER_DATA_DEFAULTS = () => ({
93
93
  llamaLendMarkets: {},
94
94
  resupplyConfig: {},
95
95
  curvanceConfig: {},
96
+ coolerConfig: {},
96
97
  twyneConfig: {},
97
98
  twyneMarkets: {},
98
99
  fraxlendConfig: {},
@@ -745,6 +746,40 @@ var curvancePositionManager = (lender, chainId, marketManager, kind) => {
745
746
  return pms.simplePositionManager ?? pms.vaultPositionManager ?? pms.nativeVaultPositionManager ?? pms.pendlePtPositionManager;
746
747
  };
747
748
 
749
+ // src/lending/cooler.ts
750
+ var COOLER_ETHEREUM_CONFIG = {
751
+ monoCooler: "0xdb591Ea2e5Db886dA872654D58f6cc584b68e7cC",
752
+ ltvOracle: "0x9ee9f0c2e91E4f6B195B988a9e6e19efcf91e8dc",
753
+ treasuryBorrower: "0xD58d7406E9CE34c90cf849Fc3eed3764EB3779B0",
754
+ composites: "0x6593768feBF9C95aC857Fb7Ef244D5738D1C57Fd",
755
+ treasury: "0xa8687A15D4BE32CC8F0a8a7B9704a4C3993D9613",
756
+ susds: "0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD",
757
+ gohm: "0x0ab87046fBb341D058F17CBC4c1133F25a20a52f",
758
+ usds: "0xdC035D45d973E3EC169d2276DDab16f1e407384F",
759
+ debtDecimals: 18
760
+ };
761
+ var COOLER_BUILTIN = {
762
+ COOLER: { "1": COOLER_ETHEREUM_CONFIG }
763
+ };
764
+ var coolerConfig = () => getGlobalData2()?.coolerConfig;
765
+ var coolerConfigFor = (lender, chainId) => {
766
+ const published = getGlobalData2()?.coolerConfig?.[lender]?.[String(chainId)];
767
+ if (published?.monoCooler) return published;
768
+ return COOLER_BUILTIN[lender]?.[String(chainId)];
769
+ };
770
+ var coolerLendersByChain = (chainId) => {
771
+ const chain = String(chainId);
772
+ const cfg = getGlobalData2()?.coolerConfig ?? {};
773
+ const keys = /* @__PURE__ */ new Set();
774
+ for (const lender of Object.keys(cfg)) {
775
+ if (cfg[lender]?.[chain]?.monoCooler) keys.add(lender);
776
+ }
777
+ for (const lender of Object.keys(COOLER_BUILTIN)) {
778
+ if (COOLER_BUILTIN[lender]?.[chain]?.monoCooler) keys.add(lender);
779
+ }
780
+ return [...keys];
781
+ };
782
+
748
783
  // src/lending/twyne.ts
749
784
  var twyneConfig = () => getGlobalData2()?.twyneConfig;
750
785
  var twyneConfigFor = (lender, chainId) => getGlobalData2()?.twyneConfig?.[twyneBaseKey(lender)]?.[String(chainId)];
@@ -1078,4 +1113,4 @@ async function fetchMainTokensMap() {
1078
1113
  }
1079
1114
  }
1080
1115
 
1081
- export { CURVANCE_MONAD_CONFIG, FRAXLEND_ETHEREUM_CONFIG, GEARBOX_ACCOUNT_COMPRESSOR_V310, REMOTE_CACHE_STORE_TTL_S, RESUPPLY_ETHEREUM_CONFIG, RemoteFetchError, aaveOracles, aaveOraclesConfig, aavePools, aaveReserves, aaveTokens, aaveV4Oracles, aaveV4Peripherals, aaveV4SpokeLenderKey, aaveV4Spokes, aaveWethGateway, assertTwyneKeysUnique, chainLogoURI, chains, clearRemoteCache, compoundV2Oracles, compoundV2OraclesConfig, compoundV2Pools, compoundV2Reserves, compoundV2TokenArray, compoundV2Tokens, compoundV3BaseData, compoundV3Bulker, compoundV3OraclesData, compoundV3Pools, compoundV3Reserves, curvanceConfig, curvanceConfigFor, curvanceLendersByChain, curvancePositionManager, curvancePositionManagersFor, dolomiteChains, dolomiteConfigs, dolomiteEmode, dolomiteMarketIdByToken, dssChainData, dssConfigFor, dssDebtJoin, dssDebtToken, dssMarketByIlk, eulerConfigs, eulerVaults, exactlyConfig, exactlyMarketByAddress, exactlyMarketByAsset, exactlyMarkets, exactlyMarketsByChain, fetchMainTokensMap, fetchRemoteJson, fetchTokenList, fetchTokenListFile, fetchTokenLists, findAaveV4PositionManager, fluidChains, fluidResolvers, fluidVaultEntries, fluidVaults, frankencoinChainData, frankencoinConfig, frankencoinConfigFor, frankencoinLendersByChain, frankencoinMarketByPosition, frankencoinMarkets, fraxlendConfig, fraxlendConfigFor, fraxlendLendersByChain, fraxlendPairKey, fraxlendPairsFor, gearboxAccountCompressor, gearboxAddressProviderV310, gearboxBotListV3, gearboxChains, gearboxMarketCompressor, gearboxMarketConfigurators, gearboxResolvers, gearboxV3LenderKey, getAaveV4GatewayAddresses, getAaveV4PositionManagers, getAaveV4SpokeAccess, getAaveV4SpokeEntry, getAaveV4SpokePeripherals, getChainEntries, getSiloV2MarketEntry, getSiloV3MarketEntry, initConfig, initializeChainData, initializeLenderData, inverseChainData, inverseConfig, inverseConfigFor, inverseLendersByChain, inverseMarketByAddress, inverseMarkets, isAaveV4OperationRestricted, isListaSmartLpAsset, liquityBranchByIndex, liquityBranchByTroveManager, liquityBranchesByChain, liquityConfig, liquityConfigFor, liquityLendersByChain, liquityMarkets, listaCollateralProvider, listaCollateralProviders, listaNativeProvider, listaSmartLpByCollateral, llamaLendApiBaseUrl, llamaLendChainData, llamaLendConfig, llamaLendConfigFor, llamaLendLenderKey, llamaLendLendersByChain, llamaLendLeverageZap, llamaLendMarketByController, llamaLendMarketByVault, llamaLendMarkets, llamaLendSupportsDelegation, llamaLendSupportsLeverage, loadCached, loadCachedJson, midnightApiBaseOverride, midnightConfig, midnightMarketById, midnightMarkets, midnightMarketsByChain, morphoBundler3, morphoOracles, morphoPools, morphoTypeMarkets, morphoTypeOracles, morphoTypeVaults, parseAaveV4SpokeLenderKey, parseFraxlendPairKey, parseGearboxV3LenderKey, parseLlamaLendLenderKey, parseSiloV2LenderKey, parseSiloV3LenderKey, parseTermMaxLenderKey, resolveMidnightApiBase, resolveTermApiBase, resupplyConfig, resupplyConfigFor, resupplyLendersByChain, riverChainData, riverConfig, riverConfigFor, riverLendersByChain, riverMarketByIndex, riverMarkets, setMidnightApiBase, setRemoteCacheGithubToken, setRemoteCacheStore, setTermApiBase, siloMarkets, siloMarketsV3, siloPeripherals, siloPeripheralsV3, siloV2LenderKey, siloV3LenderKey, skyChainData, skyConfig, skyConfigFor, skyLendersByChain, skyMarkets, tellerConfig, tellerConfigByChain, tellerPoolByAddress, tellerPools, tellerPoolsByChain, termApiBaseOverride, termConfig, termMarketById, termMarkets, termMarketsByChain, termMaxApiBaseUrl, termMaxChainIds, termMaxConfig, termMaxConfigByChain, termMaxLenderKey, twyneBaseKey, twyneBeaconFor, twyneChainData, twyneConfig, twyneConfigFor, twyneLendersByChain, twyneMarketByKey, twyneMarketFor, twyneMarketKey, twyneMarkets, twyneMarketsForIntermediateVault, twyneOperator, usddChainData, usddConfig, usddConfigFor, usddLendersByChain, usddMarketByIlk, usddMarkets };
1116
+ export { COOLER_ETHEREUM_CONFIG, CURVANCE_MONAD_CONFIG, FRAXLEND_ETHEREUM_CONFIG, GEARBOX_ACCOUNT_COMPRESSOR_V310, REMOTE_CACHE_STORE_TTL_S, RESUPPLY_ETHEREUM_CONFIG, RemoteFetchError, aaveOracles, aaveOraclesConfig, aavePools, aaveReserves, aaveTokens, aaveV4Oracles, aaveV4Peripherals, aaveV4SpokeLenderKey, aaveV4Spokes, aaveWethGateway, assertTwyneKeysUnique, chainLogoURI, chains, clearRemoteCache, compoundV2Oracles, compoundV2OraclesConfig, compoundV2Pools, compoundV2Reserves, compoundV2TokenArray, compoundV2Tokens, compoundV3BaseData, compoundV3Bulker, compoundV3OraclesData, compoundV3Pools, compoundV3Reserves, coolerConfig, coolerConfigFor, coolerLendersByChain, curvanceConfig, curvanceConfigFor, curvanceLendersByChain, curvancePositionManager, curvancePositionManagersFor, dolomiteChains, dolomiteConfigs, dolomiteEmode, dolomiteMarketIdByToken, dssChainData, dssConfigFor, dssDebtJoin, dssDebtToken, dssMarketByIlk, eulerConfigs, eulerVaults, exactlyConfig, exactlyMarketByAddress, exactlyMarketByAsset, exactlyMarkets, exactlyMarketsByChain, fetchMainTokensMap, fetchRemoteJson, fetchTokenList, fetchTokenListFile, fetchTokenLists, findAaveV4PositionManager, fluidChains, fluidResolvers, fluidVaultEntries, fluidVaults, frankencoinChainData, frankencoinConfig, frankencoinConfigFor, frankencoinLendersByChain, frankencoinMarketByPosition, frankencoinMarkets, fraxlendConfig, fraxlendConfigFor, fraxlendLendersByChain, fraxlendPairKey, fraxlendPairsFor, gearboxAccountCompressor, gearboxAddressProviderV310, gearboxBotListV3, gearboxChains, gearboxMarketCompressor, gearboxMarketConfigurators, gearboxResolvers, gearboxV3LenderKey, getAaveV4GatewayAddresses, getAaveV4PositionManagers, getAaveV4SpokeAccess, getAaveV4SpokeEntry, getAaveV4SpokePeripherals, getChainEntries, getSiloV2MarketEntry, getSiloV3MarketEntry, initConfig, initializeChainData, initializeLenderData, inverseChainData, inverseConfig, inverseConfigFor, inverseLendersByChain, inverseMarketByAddress, inverseMarkets, isAaveV4OperationRestricted, isListaSmartLpAsset, liquityBranchByIndex, liquityBranchByTroveManager, liquityBranchesByChain, liquityConfig, liquityConfigFor, liquityLendersByChain, liquityMarkets, listaCollateralProvider, listaCollateralProviders, listaNativeProvider, listaSmartLpByCollateral, llamaLendApiBaseUrl, llamaLendChainData, llamaLendConfig, llamaLendConfigFor, llamaLendLenderKey, llamaLendLendersByChain, llamaLendLeverageZap, llamaLendMarketByController, llamaLendMarketByVault, llamaLendMarkets, llamaLendSupportsDelegation, llamaLendSupportsLeverage, loadCached, loadCachedJson, midnightApiBaseOverride, midnightConfig, midnightMarketById, midnightMarkets, midnightMarketsByChain, morphoBundler3, morphoOracles, morphoPools, morphoTypeMarkets, morphoTypeOracles, morphoTypeVaults, parseAaveV4SpokeLenderKey, parseFraxlendPairKey, parseGearboxV3LenderKey, parseLlamaLendLenderKey, parseSiloV2LenderKey, parseSiloV3LenderKey, parseTermMaxLenderKey, resolveMidnightApiBase, resolveTermApiBase, resupplyConfig, resupplyConfigFor, resupplyLendersByChain, riverChainData, riverConfig, riverConfigFor, riverLendersByChain, riverMarketByIndex, riverMarkets, setMidnightApiBase, setRemoteCacheGithubToken, setRemoteCacheStore, setTermApiBase, siloMarkets, siloMarketsV3, siloPeripherals, siloPeripheralsV3, siloV2LenderKey, siloV3LenderKey, skyChainData, skyConfig, skyConfigFor, skyLendersByChain, skyMarkets, tellerConfig, tellerConfigByChain, tellerPoolByAddress, tellerPools, tellerPoolsByChain, termApiBaseOverride, termConfig, termMarketById, termMarkets, termMarketsByChain, termMaxApiBaseUrl, termMaxChainIds, termMaxConfig, termMaxConfigByChain, termMaxLenderKey, twyneBaseKey, twyneBeaconFor, twyneChainData, twyneConfig, twyneConfigFor, twyneLendersByChain, twyneMarketByKey, twyneMarketFor, twyneMarketKey, twyneMarkets, twyneMarketsForIntermediateVault, twyneOperator, usddChainData, usddConfig, usddConfigFor, usddLendersByChain, usddMarketByIlk, usddMarkets };
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Olympus Cooler V2 (MonoCooler) — Ethereum-only single-market CDP: gOHM
3
+ * collateral → USDS debt at a protocol-set rate, positions keyed by account
4
+ * address on ONE monolithic contract. `COOLER` is both the dispatch key and
5
+ * the market key — there is exactly one market and no roster to curate, so
6
+ * this module follows the Curvance built-in-seed pattern: published metadata
7
+ * wins if it ever exists, the built-in Ethereum row is the working fallback,
8
+ * and there is NO `coolerMarkets` registry slot.
9
+ *
10
+ * Address provenance: every address verified on-chain 2026-08-19 against the
11
+ * live MonoCooler's own getters (`collateralToken()`, `debtToken()`,
12
+ * `ltvOracle()`, `treasuryBorrower()`) — see OLYMPUS_COOLER.md. The debt
13
+ * token is governance-swappable via a new CoolerTreasuryBorrower, which is
14
+ * why fetchers must read `debtToken()` live and treat the seed's `usds` as
15
+ * a display/approval hint, not an invariant.
16
+ */
17
+ export interface CoolerConfigChain {
18
+ /** The MonoCooler position book — the one write/read surface. */
19
+ monoCooler: string;
20
+ /** CoolerLtvOracle — the governance OLTV drip (prices, not ratios). */
21
+ ltvOracle: string;
22
+ /** CoolerTreasuryBorrower — funds borrows from TRSRY. */
23
+ treasuryBorrower: string;
24
+ /**
25
+ * CoolerV2Composites — Olympus's own atomic deposit+borrow /
26
+ * repay+withdraw batcher. `onlyEnabled` and owner-disableable: routes
27
+ * MUST read `isEnabled()` live and fall back to sequential when off.
28
+ * Acts strictly for `msg.sender`, so a user's authorization grant to it
29
+ * is only exercisable by the user's own calls.
30
+ *
31
+ * OPTIONAL: an absent router is the same case as a disabled one — the
32
+ * one-shots fall back to the sequential two-tx build either way.
33
+ */
34
+ composites?: string;
35
+ /** Olympus treasury (TRSRY) — holds the sUSDS that caps instant borrows. */
36
+ treasury: string;
37
+ /** sUSDS — `maxWithdraw(treasury)` is the live borrow headroom. */
38
+ susds: string;
39
+ /** gOHM collateral token (18 dec). */
40
+ gohm: string;
41
+ /** USDS debt token AT SEED TIME (18 dec) — read `debtToken()` live. */
42
+ usds: string;
43
+ /** Debt-token decimals (MonoCooler math is WAD regardless). */
44
+ debtDecimals?: number;
45
+ }
46
+ export type CoolerConfigType = {
47
+ [lender: string]: {
48
+ [chainId: string]: CoolerConfigChain;
49
+ };
50
+ };
51
+ export declare const COOLER_ETHEREUM_CONFIG: CoolerConfigChain;
52
+ export declare const coolerConfig: () => CoolerConfigType;
53
+ /**
54
+ * Deployment config for the Cooler lender on a chain. Published metadata
55
+ * wins; the built-in Ethereum row is the fallback so the provider works
56
+ * with no `config/cooler.json` publish (none is planned — the deployment
57
+ * is a single immutable policy set).
58
+ */
59
+ export declare const coolerConfigFor: (lender: string, chainId: string | number) => CoolerConfigChain | undefined;
60
+ /**
61
+ * All Cooler lender keys with config on a chain (drives getLendersForChain).
62
+ * Gated on `monoCooler` — the one address everything bootstraps from.
63
+ */
64
+ export declare const coolerLendersByChain: (chainId: string | number) => string[];
@@ -37,5 +37,6 @@ export * from './dss';
37
37
  export * from './llamalend';
38
38
  export * from './resupply';
39
39
  export * from './curvance';
40
+ export * from './cooler';
40
41
  export * from './twyne';
41
42
  export * from './fraxlend';
@@ -24,6 +24,7 @@ import type { GeneralReservesMap, OracleMap } from './common';
24
24
  import type { CompoundV2OraclesConfigType, CompoundV2PoolsType, CompoundV2TokenArrayType, CompoundV2TokensType } from './compoundV2';
25
25
  import type { CompoundV3BaseDataType, CompoundV3BulkerType, CompoundV3OracleDataMap, CompoundV3PoolsType } from './compoundV3';
26
26
  import type { CurvanceConfigType } from './curvance';
27
+ import type { CoolerConfigType } from './cooler';
27
28
  import type { TwyneConfigType, TwyneMarketsType } from './twyne';
28
29
  import type { DolomiteConfigsType, DolomiteEmodeType } from './dolomite';
29
30
  import type { UsddConfigType, UsddMarketsType } from './dss';
@@ -106,6 +107,7 @@ export interface GlobalLenderDataRegistry {
106
107
  llamaLendMarkets: LlamaLendMarketsType;
107
108
  resupplyConfig: ResupplyConfigType;
108
109
  curvanceConfig: CurvanceConfigType;
110
+ coolerConfig: CoolerConfigType;
109
111
  twyneConfig: TwyneConfigType;
110
112
  twyneMarkets: TwyneMarketsType;
111
113
  fraxlendConfig: FraxlendConfigType;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.0.49",
7
+ "version": "0.0.50",
8
8
  "description": "Hold and initialize lending protocol data across a stack",
9
9
  "files": [
10
10
  "dist"