@1delta/data-sdk 0.0.41 → 0.0.42

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.
@@ -0,0 +1,44 @@
1
+ import type { GeneralReservesMap, OracleMap } from './common';
2
+ export type AaveTokensType = {
3
+ [fork: string]: {
4
+ [chainId: string]: {
5
+ [underlying: string]: {
6
+ aToken: string;
7
+ sToken: string;
8
+ vToken: string;
9
+ };
10
+ };
11
+ };
12
+ };
13
+ export type AavePoolsType = {
14
+ [fork: string]: {
15
+ [chainId: string]: {
16
+ pool: string;
17
+ protocolDataProvider: string;
18
+ };
19
+ };
20
+ };
21
+ export type AaveOraclesConfigEntry = {
22
+ /** Base asset address (if lender uses non-USD base) */
23
+ baseAsset?: string;
24
+ /** Fallback BASE_CURRENCY_UNIT as string (converted to bigint at usage) */
25
+ baseCurrencyUnit?: string;
26
+ /** Another AAVE fork on the same chain to use as source for base asset USD price */
27
+ baseAssetSource?: string;
28
+ };
29
+ export type AaveOraclesConfigType = {
30
+ [lender: string]: {
31
+ [chainId: string]: AaveOraclesConfigEntry;
32
+ };
33
+ };
34
+ export type AaveWethGatewayType = {
35
+ [fork: string]: {
36
+ [chainId: string]: string;
37
+ };
38
+ };
39
+ export declare const aaveTokens: () => AaveTokensType;
40
+ export declare const aavePools: () => AavePoolsType;
41
+ export declare const aaveOracles: () => OracleMap;
42
+ export declare const aaveReserves: () => GeneralReservesMap;
43
+ export declare const aaveOraclesConfig: () => AaveOraclesConfigType;
44
+ export declare const aaveWethGateway: () => AaveWethGatewayType;
@@ -0,0 +1,168 @@
1
+ export type AaveV4ReserveEntry = {
2
+ reserveId: number;
3
+ /** Hub-side asset id (scoped to the entry's `hub`) */
4
+ assetId: number;
5
+ underlying: string;
6
+ /**
7
+ * Per-reserve hub address. Set at reserve init on-chain — different
8
+ * reserves on the same spoke can have different hubs.
9
+ */
10
+ hub: string;
11
+ /** Optional per-reserve oracle override (defaults to spoke.oracle) */
12
+ oracle?: string;
13
+ oracleDecimals?: number;
14
+ };
15
+ export type AaveV4SpokeEntry = {
16
+ spoke: string;
17
+ oracle: string;
18
+ label: string;
19
+ dynamicConfigKeyMax?: number;
20
+ /**
21
+ * UI/grouping hint only (`AAVE_V4_CORE` / `AAVE_V4_PLUS` / `AAVE_V4_PRIME`).
22
+ * NOT used for routing or lender keying.
23
+ */
24
+ baseHubAttribution?: string;
25
+ reserves: AaveV4ReserveEntry[];
26
+ };
27
+ /** Top-level: chainId → spokeAddrLower → entry */
28
+ export type AaveV4SpokesType = {
29
+ [chainId: string]: {
30
+ [spokeAddrLower: string]: AaveV4SpokeEntry;
31
+ };
32
+ };
33
+ export type AaveV4OracleEntry = {
34
+ underlying: string;
35
+ spoke: string;
36
+ reserveId: number;
37
+ oracle: string;
38
+ decimals?: number;
39
+ source?: string;
40
+ };
41
+ /** Top-level chainId only — no fork dimension. */
42
+ export type AaveV4OraclesType = {
43
+ [chainId: string]: AaveV4OracleEntry[];
44
+ };
45
+ export type AaveV4PerHubGateways = {
46
+ nativeGateway?: string;
47
+ signatureGateway?: string;
48
+ };
49
+ /**
50
+ * Per-spoke peripherals — extra metadata the lender-metadata repo carries
51
+ * for spoke-scoped concerns (curated names, position manager registry, …).
52
+ * Opaque to the data-sdk; surfaced as `any` so consumers (worker-api,
53
+ * frontend) can read it without dragging the schema into this package.
54
+ */
55
+ export type AaveV4PerSpokeMeta = {
56
+ spokeName?: string;
57
+ spokeId?: string;
58
+ positionManagers?: Array<{
59
+ name?: string;
60
+ address: string;
61
+ active?: boolean;
62
+ }>;
63
+ [k: string]: unknown;
64
+ };
65
+ export type AaveV4ChainPeripherals = {
66
+ /** Chain-wide fallback gateway addresses */
67
+ nativeGateway?: string;
68
+ signatureGateway?: string;
69
+ /** Per-hub gateway overrides (keyed by lowercase hub address) */
70
+ perHub?: {
71
+ [hubAddrLower: string]: AaveV4PerHubGateways;
72
+ };
73
+ /** Per-spoke metadata (curated names, position managers, …) */
74
+ perSpoke?: {
75
+ [spokeAddrLower: string]: AaveV4PerSpokeMeta;
76
+ };
77
+ };
78
+ export type AaveV4PeripheralsType = {
79
+ [chainId: string]: AaveV4ChainPeripherals;
80
+ };
81
+ export declare const aaveV4Spokes: () => AaveV4SpokesType;
82
+ export declare const aaveV4Oracles: () => AaveV4OraclesType;
83
+ export declare const aaveV4Peripherals: () => AaveV4PeripheralsType;
84
+ /**
85
+ * Look up the spoke entry for a per-spoke V4 lender key (`AAVE_V4_<HEX>`).
86
+ * Returns `undefined` if no entry exists for that chain/spoke.
87
+ */
88
+ export declare function getAaveV4SpokeEntry(chainId: string, lenderKey: string): AaveV4SpokeEntry | undefined;
89
+ /**
90
+ * Native / signature gateway addresses for Aave V4.
91
+ *
92
+ * Resolves the spoke from the per-spoke lender key (`AAVE_V4_<HEX>`),
93
+ * picks the spoke's first reserve to learn its hub, and looks up
94
+ * `peripherals[chainId].perHub[hub]`. Falls back to the chain-level
95
+ * default gateways if no per-hub override is set.
96
+ *
97
+ * If the caller passes a hub address directly via `hubOverride`, that
98
+ * takes precedence.
99
+ */
100
+ export declare function getAaveV4GatewayAddresses(chainId: string, lender: string, hubOverride?: string): {
101
+ nativeGateway?: string;
102
+ signatureGateway?: string;
103
+ };
104
+ /**
105
+ * Look up the per-spoke peripherals metadata for a V4 spoke.
106
+ *
107
+ * Sourced from `aave-v4-peripherals.json` `perSpoke[<spokeAddrLower>]`.
108
+ * Carries curated extras the metadata team maintains alongside the core
109
+ * registry — most usefully the position-manager registry. Returns
110
+ * `undefined` if no entry exists for the spoke or if the lender key is
111
+ * not a per-spoke V4 key.
112
+ *
113
+ * Note: the spoke's `label` (curated UI name) lives directly on the
114
+ * `AaveV4SpokeEntry` from `aaveV4Spokes()` — `perSpoke.spokeName` is a
115
+ * duplicate of that and is intentionally not surfaced through the public-
116
+ * data normalizer. Read it through this helper if a consumer needs the
117
+ * exact value from the peripherals file.
118
+ */
119
+ export declare function getAaveV4SpokePeripherals(chainId: string, lenderKey: string): AaveV4PerSpokeMeta | undefined;
120
+ /**
121
+ * Active position-manager addresses for an Aave V4 spoke.
122
+ *
123
+ * Returns the lowercase addresses of every entry in
124
+ * `perSpoke[<spoke>].positionManagers` whose `active` flag is truthy.
125
+ * Empty array if the spoke has no peripherals entry or no active PMs.
126
+ *
127
+ * Use the `byName` lookup form when you need a specific PM (e.g. the
128
+ * native gateway). Names are matched case-insensitively against the
129
+ * curated `name` field; partial matches are accepted.
130
+ */
131
+ export declare function getAaveV4PositionManagers(chainId: string, lenderKey: string): string[];
132
+ /**
133
+ * Look up a single position-manager address by curated name (partial,
134
+ * case-insensitive). Returns `undefined` if no match. Useful for
135
+ * targeting specific PMs like `"native gateway"` or `"signature gateway"`
136
+ * without hardcoding the addresses.
137
+ */
138
+ export declare function findAaveV4PositionManager(chainId: string, lenderKey: string, nameQuery: string): string | undefined;
139
+ /**
140
+ * Synthesize the per-spoke lender key for an Aave V4 spoke.
141
+ *
142
+ * Mirrors the Morpho `MORPHO_BLUE_<HEX_NO_0X_UPPER>` convention so the rest
143
+ * of the codebase can treat each spoke as an isolated market — exactly like a
144
+ * Morpho Blue market or a Compound V3 Comet — without any V4-specific logic.
145
+ *
146
+ * Format: `AAVE_V4_${spokeAddr.slice(2).toUpperCase()}`
147
+ *
148
+ * Example:
149
+ * spoke = "0x94e7a5dcbe816e498b89ab752661904e2f56c485"
150
+ * → = "AAVE_V4_94E7A5DCBE816E498B89AB752661904E2F56C485"
151
+ *
152
+ * The full spoke address is preserved (no truncation) so the key is globally
153
+ * unique and stable across spoke implementation upgrades (proxy address).
154
+ * Note: chainId is intentionally NOT in the lender token — the same spoke
155
+ * address can in principle exist on multiple chains via deterministic
156
+ * deploys, and chain scoping happens at the marketUid level instead.
157
+ *
158
+ * `isAaveV4Type()` continues to work because it uses `startsWith('AAVE_V4')`.
159
+ */
160
+ export declare function aaveV4SpokeLenderKey(spoke: string): string;
161
+ /**
162
+ * Inverse of `aaveV4SpokeLenderKey`: given a per-spoke lender key, return
163
+ * `{ spokeAddrLower }`. Returns `undefined` if the key isn't a per-spoke V4
164
+ * key (e.g. someone passed the bare prefix `AAVE_V4`).
165
+ */
166
+ export declare function parseAaveV4SpokeLenderKey(lenderKey: string): {
167
+ spokeAddrLower: string;
168
+ } | undefined;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Shapes shared by more than one lender family. Anything used by a single
3
+ * family belongs in that family's module instead.
4
+ */
5
+ /** `fork → chainId → reserve/underlying addresses`. Aave, Compound V2 and Compound V3 all use it. */
6
+ export type GeneralReservesMap = {
7
+ [fork: string]: {
8
+ [chainId: string]: string[];
9
+ };
10
+ };
11
+ /** `lender → chainId → oracle address`. Used by the Aave and Compound V2 families. */
12
+ export type OracleMap = {
13
+ [lender: string]: {
14
+ [chainId: string]: string;
15
+ };
16
+ };
@@ -0,0 +1,38 @@
1
+ import type { GeneralReservesMap, OracleMap } from './common';
2
+ export type CompoundV2PoolsType = {
3
+ [fork: string]: {
4
+ [chainId: string]: string;
5
+ };
6
+ };
7
+ export type CompoundV2TokensType = {
8
+ [lender: string]: {
9
+ [chainId: string]: {
10
+ [address: string]: string;
11
+ };
12
+ };
13
+ };
14
+ export type CompoundV2TokenArrayType = {
15
+ [lender: string]: {
16
+ [chainId: string]: {
17
+ cToken: string;
18
+ underlying: string;
19
+ }[];
20
+ };
21
+ };
22
+ export type CompoundV2OraclesConfigEntry = {
23
+ /** Base asset address (if oracle quotes in a non-USD asset, e.g. native token) */
24
+ baseAsset?: string;
25
+ /** Fixed scaling decimals override (defaults to 36 - underlyingDecimals) */
26
+ scalingDecimals?: number;
27
+ };
28
+ export type CompoundV2OraclesConfigType = {
29
+ [lender: string]: {
30
+ [chainId: string]: CompoundV2OraclesConfigEntry;
31
+ };
32
+ };
33
+ export declare const compoundV2Pools: () => CompoundV2PoolsType;
34
+ export declare const compoundV2Tokens: () => CompoundV2TokensType;
35
+ export declare const compoundV2TokenArray: () => CompoundV2TokenArrayType;
36
+ export declare const compoundV2Reserves: () => GeneralReservesMap;
37
+ export declare const compoundV2Oracles: () => OracleMap;
38
+ export declare const compoundV2OraclesConfig: () => CompoundV2OraclesConfigType;
@@ -0,0 +1,35 @@
1
+ import type { GeneralReservesMap } from './common';
2
+ export type CompoundV3PoolsType = {
3
+ [chainId: string]: {
4
+ [comet: string]: string;
5
+ };
6
+ };
7
+ export type CompoundV3BulkerType = {
8
+ [lender: string]: {
9
+ [chainId: string]: string;
10
+ };
11
+ };
12
+ export type CompoundV3BaseDataType = {
13
+ [lender: string]: {
14
+ [chainId: string]: {
15
+ baseAsset: string;
16
+ baseBorrowMin: bigint;
17
+ };
18
+ };
19
+ };
20
+ export type CompoundV3OracleEntry = {
21
+ oracle: string;
22
+ description: string;
23
+ };
24
+ export type CompoundV3OracleDataMap = {
25
+ [lender: string]: {
26
+ [chainId: string]: {
27
+ [assetAddress: string]: CompoundV3OracleEntry;
28
+ };
29
+ };
30
+ };
31
+ export declare const compoundV3Pools: () => CompoundV3PoolsType;
32
+ export declare const compoundV3BaseData: () => CompoundV3BaseDataType;
33
+ export declare const compoundV3Reserves: () => GeneralReservesMap;
34
+ export declare const compoundV3OraclesData: () => CompoundV3OracleDataMap;
35
+ export declare const compoundV3Bulker: () => CompoundV3BulkerType;
@@ -0,0 +1,112 @@
1
+ /** The Position Manager variants Curvance deploys, keyed as the app keys them. */
2
+ export type CurvancePositionManagers = {
3
+ /** Generic non-native ERC-20 legs. The common case (20 of 20 PM'd markets). */
4
+ simplePositionManager?: string;
5
+ /** ERC-4626-style collateral that is entered on leverage. */
6
+ vaultPositionManager?: string;
7
+ /** Wrapped-native collateral — unwraps / swaps into native before depositing. */
8
+ nativeVaultPositionManager?: string;
9
+ /** Pendle principal-token collateral. */
10
+ pendlePtPositionManager?: string;
11
+ };
12
+ /** Per-chain, protocol-level (evergreen) Curvance addresses. */
13
+ export type CurvanceConfigChain = {
14
+ /** `CentralRegistry` — `marketManagers()` IS the market discovery, and every
15
+ * other singleton hangs off it. The one address the provider bootstraps
16
+ * from. */
17
+ centralRegistry: string;
18
+ /** `OracleManager` — `getPrice(asset, inUSD, getLower)`. Prices are WAD USD
19
+ * and carry an `errorCode` that GATES actions (see the abis header). */
20
+ oracleManager?: string;
21
+ /** `ProtocolReader` — `getStaticMarketData()` + `getAllDynamicState(account)`
22
+ * return the entire public book and one account's whole portfolio in two
23
+ * calls. Optional: the fetchers fall back to a plain multicall over the
24
+ * MarketManagers when it is absent. */
25
+ protocolReader?: string;
26
+ /** `OptimizerReader` — lens for the LendingOptimizer ("Vaults") surface. */
27
+ optimizerReader?: string;
28
+ /**
29
+ * Native-leverage Position Managers, keyed by MARKET MANAGER address
30
+ * (lowercase-insensitive on read). A market absent here has no native
31
+ * leverage — which is a real state, not a gap: 5 of 25 markets on Monad
32
+ * have none registered.
33
+ */
34
+ positionManagers?: {
35
+ [marketManager: string]: CurvancePositionManagers;
36
+ };
37
+ /**
38
+ * `LendingOptimizer` vaults by symbol. Their shares are collateralisable
39
+ * through `LendingOptimizerShareCToken`, which is why `hyAUSD` appears as
40
+ * collateral in two markets.
41
+ */
42
+ optimizers?: {
43
+ [symbol: string]: string;
44
+ };
45
+ /**
46
+ * Swap targets with a registered `externalCalldataChecker`, i.e. the ONLY
47
+ * routers the native leverage path will accept. Cached here as a hint; the
48
+ * mapping is DAO-mutable in both directions, so a builder must still probe
49
+ * `externalCalldataChecker(target)` live and fail closed.
50
+ */
51
+ swapTargets?: {
52
+ [aggregator: string]: string;
53
+ };
54
+ /** Optional allowlist of MarketManager addresses. When set, on-chain
55
+ * discovery is INTERSECTED with it; absent (the default) publishes every
56
+ * listed market. */
57
+ marketAllowlist?: string[] | null;
58
+ };
59
+ export type CurvanceConfigType = {
60
+ [lender: string]: {
61
+ [chainId: string]: CurvanceConfigChain;
62
+ };
63
+ };
64
+ /**
65
+ * Built-in Monad deployment seed for Curvance.
66
+ *
67
+ * Same arrangement as Resupply: a published `config/curvance.json` still WINS
68
+ * (see `curvanceConfigFor`), but the provider is live with nothing to publish
69
+ * because `centralRegistry` is an immutable protocol singleton and the whole
70
+ * market roster is discovered from it at runtime.
71
+ *
72
+ * The `positionManagers` map is the exception and the reason this seed carries
73
+ * more than one address: PM registration is an un-enumerable mapping, and Monad
74
+ * public RPCs cap `eth_getLogs` at 100 blocks so `PositionManagerUpdated`
75
+ * cannot be scanned. Every entry below was verified on-chain 2026-08-07 —
76
+ * 23/23 answered `isPositionManager == true` on their market AND reported that
77
+ * same market back from `marketManager()`.
78
+ *
79
+ * FIVE live markets have NO Position Manager and therefore no native leverage:
80
+ * `PT-AUSD-8OCT2026 | AUSD` (the largest market at ~$45M), `PT-earnAUSD | AUSD`,
81
+ * both `High Yield AUSD Vault` markets, and `aguaUSDCgc | USDC`. Their absence
82
+ * here is the truth, not a gap to fill in.
83
+ */
84
+ export declare const CURVANCE_MONAD_CONFIG: CurvanceConfigChain;
85
+ export declare const curvanceConfig: () => CurvanceConfigType;
86
+ /**
87
+ * Deployment seed for one Curvance lender on a chain. Published metadata wins;
88
+ * the built-in Monad row is the fallback so the provider works before
89
+ * `config/curvance.json` exists.
90
+ */
91
+ export declare const curvanceConfigFor: (lender: string, chainId: string | number) => CurvanceConfigChain | undefined;
92
+ /**
93
+ * All Curvance lender keys with config on a chain (drives getLendersForChain).
94
+ * Gated on the CENTRAL REGISTRY — the one address the provider bootstraps from.
95
+ */
96
+ export declare const curvanceLendersByChain: (chainId: string | number) => string[];
97
+ /**
98
+ * Position Managers registered for one Curvance market. Returns `undefined`
99
+ * when the market has none — a real state (5 of 25 on Monad, including the
100
+ * largest market), and the signal that native leverage is unavailable there.
101
+ *
102
+ * Lookup is case-insensitive because market-manager addresses arrive from
103
+ * `queryTokensListed`/config in mixed checksum forms.
104
+ */
105
+ export declare const curvancePositionManagersFor: (lender: string, chainId: string | number, marketManager: string) => CurvancePositionManagers | undefined;
106
+ /**
107
+ * The Position Manager to drive for a market, preferring an explicit `kind` and
108
+ * otherwise falling back to `simplePositionManager` — which is the right default
109
+ * because every PM'd market has one, and the vault/native variants exist only as
110
+ * ALTERNATIVES for legs whose collateral needs an extra wrap step.
111
+ */
112
+ export declare const curvancePositionManager: (lender: string, chainId: string | number, marketManager: string, kind?: keyof CurvancePositionManagers) => string | undefined;
@@ -0,0 +1,54 @@
1
+ export type DolomiteAggregator = 'odos' | 'paraswap' | 'oogabooga' | 'enso';
2
+ export type DolomiteConfigEntry = {
3
+ dolomiteMargin: string;
4
+ expiry?: string;
5
+ markets?: {
6
+ [marketId: string]: string;
7
+ };
8
+ depositWithdrawalProxy?: string;
9
+ /**
10
+ * Modern DepositWithdrawalRouter — required for NATIVE (ETH/BNB) wrap/unwrap
11
+ * ops. The legacy `depositWithdrawalProxy` rejects direct EOA native sends
12
+ * ("invalid ETH sender"); ERC-20 deposits/withdrawals still use the proxy.
13
+ */
14
+ depositWithdrawalRouter?: string;
15
+ borrowPositionProxy?: string;
16
+ genericTraderProxy?: string;
17
+ aggregatorTraders?: {
18
+ [K in DolomiteAggregator]?: string;
19
+ };
20
+ };
21
+ export type DolomiteConfigsType = {
22
+ [chainId: string]: DolomiteConfigEntry;
23
+ };
24
+ export type DolomiteCategoryParam = {
25
+ marginRatioOverride: number;
26
+ liquidationRewardOverride: number;
27
+ };
28
+ export type DolomiteSingleCollateral = {
29
+ debtMarketIds: string[];
30
+ marginRatioOverride: number;
31
+ liquidationRewardOverride: number;
32
+ };
33
+ export type DolomiteEmodeChain = {
34
+ setter: string;
35
+ categories: {
36
+ [category: string]: DolomiteCategoryParam;
37
+ };
38
+ marketCategories: {
39
+ [marketId: string]: string;
40
+ };
41
+ riskFeatures: {
42
+ [marketId: string]: {
43
+ feature: string;
44
+ singleCollateral?: DolomiteSingleCollateral[];
45
+ };
46
+ };
47
+ };
48
+ export type DolomiteEmodeType = {
49
+ [chainId: string]: DolomiteEmodeChain;
50
+ };
51
+ export declare const dolomiteConfigs: () => DolomiteConfigsType;
52
+ export declare const dolomiteChains: () => string[];
53
+ export declare const dolomiteEmode: () => DolomiteEmodeType;
54
+ export declare const dolomiteMarketIdByToken: (chainId: string, token: string) => string | undefined;
@@ -0,0 +1,139 @@
1
+ /** One USDD PSM (1:1 stable swap module; NOT a lending market). */
2
+ export type UsddPsmConfig = {
3
+ ilk: string;
4
+ psm: string;
5
+ /** Approval target for `sellGem` (the PSM's own gem adapter). */
6
+ gemJoin: string;
7
+ gem: string;
8
+ gemSymbol?: string;
9
+ /** 6 on Ethereum (USDT/USDC), 18 on BNB (BSC-USDT). */
10
+ gemDecimals: number;
11
+ };
12
+ /** Per-chain dss deployment seed (hand-maintained). */
13
+ export type UsddConfigChain = {
14
+ /** Core accounting engine — ilk params + urns live here. */
15
+ vat: string;
16
+ /** Stability-fee module (`ilks(ilk).duty`, per-second ray). */
17
+ jug: string;
18
+ /** Oracle liaison (`ilks(ilk)` → pip + mat). */
19
+ spot: string;
20
+ /** Liquidation module (clip, chop, hole per ilk). */
21
+ dog: string;
22
+ /** DssCdpManager — CDP ids, urn handles, `cdpAllow` grants. */
23
+ cdpManager: string;
24
+ /** DssProxyActions — the atomic one-shot target (via DSProxy.execute). */
25
+ proxyActions: string;
26
+ /** ProxyRegistry — `proxies(user)` / `build()` for the DSProxy route. */
27
+ proxyRegistry: string;
28
+ /** The debt token. USDD publishes it as `usdd`; Sky (and any future dss
29
+ * fork) publishes the neutral `debtToken`. Read via `dssDebtToken`. */
30
+ usdd?: string;
31
+ debtToken?: string;
32
+ /** DaiJoin-equivalent for debt enter/exit — `usddJoin` on USDD,
33
+ * `debtJoin` elsewhere. Read via `dssDebtJoin`. */
34
+ usddJoin?: string;
35
+ debtJoin?: string;
36
+ /** Display symbol for the debt asset (`USDD`, `DAI`, …). */
37
+ debtSymbol?: string;
38
+ /** Maker's `IlkRegistry` — enumerates ilks and classifies them
39
+ * (`info(ilk).class`). Present on Sky; USDD ships no registry. */
40
+ ilkRegistry?: string;
41
+ /** Maker chainlog (address book) — Sky only. */
42
+ chainlog?: string;
43
+ end?: string;
44
+ /** Debt decimals (18). */
45
+ debtDecimals?: number;
46
+ /** The savings Pot (sDAI-style; savings side lives in margin-fetcher's
47
+ * SAVINGS_REGISTRY, carried here for completeness). */
48
+ pot?: string;
49
+ susdd?: string;
50
+ /** 1:1 stable PSMs (swap modules — not lending markets). */
51
+ psms?: UsddPsmConfig[];
52
+ };
53
+ export type UsddConfigType = {
54
+ [lender: string]: {
55
+ [chainId: string]: UsddConfigChain;
56
+ };
57
+ };
58
+ /** One dss market (= one collateral ilk). */
59
+ export type UsddMarketConfig = {
60
+ /** Ilk string (e.g. `WBTC-A`) — also the per-market key suffix
61
+ * (`USDD_<chainId>_<ILK>`). bytes32-encode via stringToHex(size 32). */
62
+ ilk: string;
63
+ /** Collateral adapter — approval target for deposits. */
64
+ gemJoin: string;
65
+ collToken: string;
66
+ collDecimals: number;
67
+ collSymbol?: string;
68
+ /** Price feed behind the Spot (OSM/Median). */
69
+ pip?: string;
70
+ /** Liquidation ratio, ray (Spot.mat). */
71
+ mat: string;
72
+ /** Per-second stability fee, ray (Jug.duty). */
73
+ duty: string;
74
+ /** Dutch-auction contract (Dog.clip). */
75
+ clip?: string;
76
+ /** Liquidation penalty, wad (Dog.chop; 1e18 = none). */
77
+ chop?: string;
78
+ /** Debt ceiling, rad (Vat.ilks.line). */
79
+ line: string;
80
+ /** Per-CDP debt floor, rad (Vat.ilks.dust). */
81
+ dust: string;
82
+ /** `line == 0` ⇒ the ilk was OFFBOARDED: borrowing is disabled but the
83
+ * existing debt is real and repay/withdraw stay open. Set by the Sky
84
+ * generator; absent on USDD rows. */
85
+ offboarded?: boolean;
86
+ name?: string;
87
+ };
88
+ /** Generated per-chain data: verified ilk list + the cdpi trigger snapshot. */
89
+ export type UsddChainData = {
90
+ markets: UsddMarketConfig[];
91
+ /** `cdpManager.cdpi()` at generation time — the USDD.md
92
+ * re-evaluation trigger (0 = no CDP ever opened on this chain). */
93
+ cdpi?: string;
94
+ };
95
+ export type UsddMarketsType = {
96
+ [lender: string]: {
97
+ [chainId: string]: UsddChainData;
98
+ };
99
+ };
100
+ export declare const usddConfig: () => UsddConfigType;
101
+ /** Deployment seed for one USDD lender on a chain (undefined if unloaded). */
102
+ export declare const usddConfigFor: (lender: string, chainId: string | number) => UsddConfigChain | undefined;
103
+ export declare const usddMarkets: () => UsddMarketsType;
104
+ /** Generated chain data (verified ilk list + cdpi snapshot; undefined if unloaded). */
105
+ export declare const usddChainData: (lender: string, chainId: string | number) => UsddChainData | undefined;
106
+ /** Look up one USDD market by its ilk string (the per-market key suffix). */
107
+ export declare const usddMarketByIlk: (lender: string, chainId: string | number, ilk: string) => UsddMarketConfig | undefined;
108
+ /** All USDD lender keys with config on a chain (drives getLendersForChain).
109
+ * NB: config presence (`vat`) — not market presence — gates the fan-out, so
110
+ * the (empty-roster) provider still runs and reports zero markets rather
111
+ * than being invisible; the per-ilk keys only exist once metadata fills. */
112
+ export declare const usddLendersByChain: (chainId: string | number) => string[];
113
+ export declare const skyConfig: () => UsddConfigType;
114
+ export declare const skyConfigFor: (lender: string, chainId: string | number) => UsddConfigChain | undefined;
115
+ export declare const skyMarkets: () => UsddMarketsType;
116
+ export declare const skyChainData: (lender: string, chainId: string | number) => UsddChainData | undefined;
117
+ /** All Sky lender keys with config on a chain (drives getLendersForChain). */
118
+ export declare const skyLendersByChain: (chainId: string | number) => string[];
119
+ /** Deployment seed for ANY dss lender (Sky or a fork such as USDD). */
120
+ export declare const dssConfigFor: (lender: string, chainId: string | number) => UsddConfigChain | undefined;
121
+ /** Generated ilk roster for ANY dss lender. */
122
+ export declare const dssChainData: (lender: string, chainId: string | number) => UsddChainData | undefined;
123
+ /**
124
+ * One ilk of ANY dss lender, by its ilk string.
125
+ *
126
+ * Matches on the SEPARATOR-NORMALISED ilk so that both the on-chain spelling
127
+ * (`WBTC-A`) and the market-key segment (`WBTC_A`) resolve to the same row.
128
+ * Market keys are hyphen-free by construction — see margin-fetcher's
129
+ * `dssLenderKey` — and this is the safety net that keeps a caller passing
130
+ * either form from silently getting `undefined` (which surfaces as a bogus
131
+ * "no market roster on this chain" error). Injective because Maker ilks never
132
+ * contain `_`.
133
+ */
134
+ export declare const dssMarketByIlk: (lender: string, chainId: string | number, ilk: string) => UsddMarketConfig | undefined;
135
+ /** The debt token of a dss deployment, tolerating both field spellings
136
+ * (`usdd` on the published USDD config, `debtToken` on Sky). */
137
+ export declare const dssDebtToken: (cfg?: UsddConfigChain) => string | undefined;
138
+ /** The debt join of a dss deployment (`usddJoin` / `debtJoin`). */
139
+ export declare const dssDebtJoin: (cfg?: UsddConfigChain) => string | undefined;
@@ -0,0 +1,26 @@
1
+ export type EulerConfigEntry = {
2
+ evc: string;
3
+ eVaultFactory: string;
4
+ protocolConfig: string;
5
+ vaultLens: string;
6
+ accountLens: string;
7
+ oracleLens: string;
8
+ irmLens: string;
9
+ utilsLens: string;
10
+ };
11
+ export type EulerConfigsType = {
12
+ [fork: string]: {
13
+ [chainId: string]: EulerConfigEntry;
14
+ };
15
+ };
16
+ export type EulerVaultEntry = {
17
+ underlying: string;
18
+ vault: string;
19
+ };
20
+ export type EulerVaultsType = {
21
+ [fork: string]: {
22
+ [chainId: string]: EulerVaultEntry[];
23
+ };
24
+ };
25
+ export declare const eulerConfigs: () => EulerConfigsType;
26
+ export declare const eulerVaults: () => EulerVaultsType;