@1delta/data-sdk 0.0.41 → 0.0.43

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,53 @@
1
+ /** Per-chain, protocol-level (evergreen) Exactly addresses. */
2
+ export type ExactlyConfigChain = {
3
+ /** Auditor — cross-margin risk controller (enterMarket / accountLiquidity). */
4
+ auditor: string;
5
+ /** Previewer — read-only aggregate view (markets + fixed pools + account). */
6
+ previewer: string;
7
+ /** RatePreviewer — read-only rate projection helper (optional). */
8
+ ratePreviewer?: string | null;
9
+ /** MarketETHRouter — native-ETH wrapper around the WETH market (optional). */
10
+ marketETHRouter?: string | null;
11
+ /** The WETH Market the ETH router wraps (optional convenience). */
12
+ wethMarket?: string | null;
13
+ /** Debt-rollover periphery — Optimism `DebtManager` (all three roll
14
+ * directions + leverage), Base `DebtRoller` (`rollFixed` ONLY). Same
15
+ * field, different deployment name per chain; consumed by the Exactly
16
+ * rollover builder. */
17
+ debtManager?: string | null;
18
+ /** RewardsController — EXA/OP rewards (optional, not used yet). */
19
+ rewardsController?: string | null;
20
+ };
21
+ export type ExactlyConfigType = {
22
+ [chainId: string]: ExactlyConfigChain;
23
+ };
24
+ /** An Exactly Market: one per underlying asset (maturities live inside it). */
25
+ export type ExactlyMarketConfig = {
26
+ /** Market (ERC4626 vault) address — also the per-market lender-key body. */
27
+ market: string;
28
+ /** Underlying asset address. */
29
+ asset: string;
30
+ /** Market share-token symbol, e.g. "exaUSDC". */
31
+ symbol: string;
32
+ /** Underlying asset symbol, e.g. "USDC". */
33
+ assetSymbol: string;
34
+ /** Market share decimals (== asset decimals for Exactly markets). */
35
+ decimals: number;
36
+ /** Underlying asset decimals. */
37
+ assetDecimals: number;
38
+ /** Number of future fixed pools the market maintains (informational). */
39
+ maxFuturePools?: number;
40
+ /** Optional display label, e.g. "Exactly USDC". */
41
+ name?: string;
42
+ };
43
+ export type ExactlyMarketsType = {
44
+ [chainId: string]: ExactlyMarketConfig[];
45
+ };
46
+ export declare const exactlyConfig: () => ExactlyConfigType;
47
+ export declare const exactlyMarkets: () => ExactlyMarketsType;
48
+ /** All Exactly market configs on a chain (empty array if none/unloaded). */
49
+ export declare const exactlyMarketsByChain: (chainId: string | number) => ExactlyMarketConfig[];
50
+ /** Look up one Exactly market config by its Market address (case-insensitive). */
51
+ export declare const exactlyMarketByAddress: (chainId: string | number, market: string) => ExactlyMarketConfig | undefined;
52
+ /** Look up one Exactly market config by its underlying asset (case-insensitive). */
53
+ export declare const exactlyMarketByAsset: (chainId: string | number, asset: string) => ExactlyMarketConfig | undefined;
@@ -0,0 +1,53 @@
1
+ export type FluidResolvers = {
2
+ lendingResolver: string;
3
+ vaultResolver: string;
4
+ liquidityResolver: string;
5
+ };
6
+ export type FluidResolversType = {
7
+ [chainId: string]: FluidResolvers;
8
+ };
9
+ /** One asset on a vault side — underlying token and its fToken wrapper (if any). */
10
+ export type FluidVaultAsset = {
11
+ /** Lowercased underlying ERC20 address. Native ETH is represented by
12
+ * `zeroAddress` (`0x0000…0000`) — the Fluid on-chain EEE sentinel is
13
+ * normalized away at the parser boundary to match the rest of the
14
+ * lending stack's convention. Use `isNativeAddress` in calldata-sdk
15
+ * if you need to accept either form. */
16
+ underlying: string;
17
+ /** Lowercased fToken address wrapping this underlying, or `null` if none.
18
+ * `null` does NOT imply "not borrowable" — borrowability is a separate
19
+ * Liquidity/vault-config property. */
20
+ fToken: string | null;
21
+ };
22
+ /** One side of a Fluid vault — supply or borrow. Uniform shape across all vault
23
+ * types: `assets.length === 1` means simple, `> 1` means smart (DEX LP).
24
+ * `dex !== null` is equivalent. */
25
+ export type FluidVaultSide = {
26
+ /** 1 entry for simple sides, 2 entries for smart (DEX LP) sides. Order matches
27
+ * the vault's `constantsView().{supply|borrow}Token.{token0,token1}`. */
28
+ assets: FluidVaultAsset[];
29
+ /** Fluid DEX pool contract. `null` for simple sides. */
30
+ dex: string | null;
31
+ /** Optional SmartLending wrapper over the DEX LP (ERC4626-like). `null` when unused. */
32
+ smartLending: string | null;
33
+ };
34
+ export type FluidVaultMeta = {
35
+ vaultId: number;
36
+ /** Raw `IFluidVault.TYPE()` — Fluid uses scaled constants 10000/20000/30000/40000
37
+ * for T1/T2/T3/T4. Prefer `side.dex !== null` for smart-side detection. */
38
+ type: 10000 | 20000 | 30000 | 40000;
39
+ supply: FluidVaultSide;
40
+ borrow: FluidVaultSide;
41
+ };
42
+ /** Keyed by vault contract address (lowercased) for O(1) lookup. */
43
+ export type FluidVaultsType = {
44
+ [chainId: string]: {
45
+ [vaultAddress: string]: FluidVaultMeta;
46
+ };
47
+ };
48
+ export declare const fluidResolvers: () => FluidResolversType;
49
+ export declare const fluidVaults: () => FluidVaultsType;
50
+ /** List of chains where Fluid resolvers are registered. */
51
+ export declare const fluidChains: () => string[];
52
+ /** Vault entries for a chain as `[address, meta]` tuples. */
53
+ export declare const fluidVaultEntries: (chainId: string) => [string, FluidVaultMeta][];
@@ -0,0 +1,76 @@
1
+ /** Per-chain Frankencoin deployment seed (hand-maintained). */
2
+ export type FrankencoinConfigChain = {
3
+ /** ZCHF — the only debt asset. */
4
+ zchf: string;
5
+ /** MintingHub V2 — clone/challenge entry point. */
6
+ mintingHub: string;
7
+ /** Equity (FPS) — first-loss tranche holding the withheld reserve. */
8
+ equity: string;
9
+ /** PositionRoller (carries a protocol-native ZCHF flash loan). */
10
+ roller?: string;
11
+ /** Leadrate module — the protocol-wide base rate. */
12
+ leadrate?: string;
13
+ /** Savings module (the savings vault leg lives in SAVINGS_REGISTRY;
14
+ * carried here for completeness). */
15
+ savings?: string;
16
+ /** Chainlink-shaped CHF/USD feed — required for USD normalisation. */
17
+ chfUsdFeed?: string;
18
+ /** Debt decimals (18). */
19
+ debtDecimals?: number;
20
+ /** Legacy MintingHub V1 — dead but deployed; positions carrying this hub
21
+ * must never reach the V2 builders. */
22
+ mintingHubV1?: string;
23
+ };
24
+ export type FrankencoinConfigType = {
25
+ [lender: string]: {
26
+ [chainId: string]: FrankencoinConfigChain;
27
+ };
28
+ };
29
+ /** One Frankencoin market (= one ORIGINAL position). */
30
+ export type FrankencoinMarketConfig = {
31
+ /** The original position contract — also the per-market key suffix
32
+ * (`FRANKENCOIN_<chainId>_<ADDR>`). */
33
+ position: string;
34
+ collToken: string;
35
+ collDecimals: number;
36
+ collSymbol?: string;
37
+ /** Owner-declared liquidation price, 36-dec scaled against the
38
+ * collateral's decimals. NOT an oracle quote. */
39
+ price: string;
40
+ /** ppm — risk premium on top of the hub lead rate. */
41
+ riskPremiumPPM: string;
42
+ /** ppm — withheld into the equity reserve at mint (10-40% observed). */
43
+ reserveContribution: string;
44
+ /** Minimum collateral for a clone (raw collateral units). */
45
+ minimumCollateral: string;
46
+ /** Total ZCHF this original + its clones may mint. */
47
+ limitForClones?: string;
48
+ /** Unix seconds — positions EXPIRE (forced sale after). */
49
+ expiration: string;
50
+ start?: string;
51
+ challengePeriod?: string;
52
+ /** Position version — only 2 is supported; V1 is dead. */
53
+ version?: number;
54
+ name?: string;
55
+ };
56
+ /** Generated per-chain data: the curated original-position roster. */
57
+ export type FrankencoinChainData = {
58
+ markets: FrankencoinMarketConfig[];
59
+ };
60
+ export type FrankencoinMarketsType = {
61
+ [lender: string]: {
62
+ [chainId: string]: FrankencoinChainData;
63
+ };
64
+ };
65
+ export declare const frankencoinConfig: () => FrankencoinConfigType;
66
+ /** Deployment seed for one Frankencoin lender on a chain. */
67
+ export declare const frankencoinConfigFor: (lender: string, chainId: string | number) => FrankencoinConfigChain | undefined;
68
+ export declare const frankencoinMarkets: () => FrankencoinMarketsType;
69
+ /** Generated chain data (curated original-position roster). */
70
+ export declare const frankencoinChainData: (lender: string, chainId: string | number) => FrankencoinChainData | undefined;
71
+ /** Look up one market by its ORIGINAL position address (the key suffix). */
72
+ export declare const frankencoinMarketByPosition: (lender: string, chainId: string | number, position: string) => FrankencoinMarketConfig | undefined;
73
+ /** All Frankencoin lender keys with config on a chain (drives
74
+ * getLendersForChain). Gated on the MintingHub, the one address every
75
+ * flow needs. */
76
+ export declare const frankencoinLendersByChain: (chainId: string | number) => string[];
@@ -0,0 +1,85 @@
1
+ /** One curated Fraxlend pair. Everything not listed here (asset, collateral,
2
+ * LTV, rates, caps, pause flags) is read from the pair itself — these fields
3
+ * exist only to curate and to label. */
4
+ export type FraxlendPairEntry = {
5
+ /** The `FraxlendPair` contract. Doubles as the market id: the lender key is
6
+ * `FRAXLEND_<chainId>_<address>`. */
7
+ address: string;
8
+ /** The pair's own `symbol()`, e.g. `ffrxUSD(sfrxETH)-58`. Carried for
9
+ * labelling and to make a stale allowlist obvious in a diff — NOT used for
10
+ * dispatch. */
11
+ symbol?: string;
12
+ /** Human label for the UI, e.g. `frxUSD / sfrxETH`. */
13
+ label?: string;
14
+ /** Set false to keep a pair in the roster for READS (existing positions
15
+ * stay serviceable, repay/withdraw keep working) while refusing new
16
+ * borrows. The Lista lesson: a market in run-off must not vanish, or users
17
+ * with open debt lose the UI that closes it. */
18
+ borrowEnabled?: boolean;
19
+ };
20
+ /** Per-chain, protocol-level Fraxlend addresses. */
21
+ export type FraxlendConfigChain = {
22
+ /** `FraxlendPairDeployer` — the on-chain pair registry. Carried for
23
+ * AUDITING the allowlist against the chain (a generator can diff the two
24
+ * and flag new listed pairs). NEVER use it for runtime discovery. */
25
+ deployer?: string | null;
26
+ /**
27
+ * The swapper Frax has whitelisted for native leverage, as of the last
28
+ * audit. This is a HINT for the generator and for diagnostics — the runtime
29
+ * MUST still probe `pair.swappers(addr)` per pair, because the mapping is
30
+ * owner-mutable in both directions and is set per pair, not globally.
31
+ * Treating this address as "leverage is available" without the probe would
32
+ * advertise a loop that reverts `BadSwapper()`.
33
+ */
34
+ leverageSwapper?: string | null;
35
+ /** The curated pair roster. Absent or empty ⇒ the provider publishes
36
+ * nothing on this chain (fail closed — never fall back to the deployer). */
37
+ pairs: FraxlendPairEntry[];
38
+ };
39
+ export type FraxlendConfigType = {
40
+ [lender: string]: {
41
+ [chainId: string]: FraxlendConfigChain;
42
+ };
43
+ };
44
+ /**
45
+ * Built-in Ethereum seed.
46
+ *
47
+ * Published `config/fraxlend.json` metadata WINS over this (see
48
+ * `fraxlendConfigFor`); the seed exists so the provider is live before the
49
+ * metadata PR lands, which is the Resupply/Curvance precedent.
50
+ *
51
+ * Curated 2026-08-11 by profiling all 71 deployer pairs on-chain: every pair
52
+ * below held more than ~1,000 units of supply, which reproduces exactly the
53
+ * 13-pair set that frax.com/lend lists. Everything excluded is either a
54
+ * FraxlendV1 contract, a frozen market, or dust (the next-largest omitted pair
55
+ * holds ~900 units and the long tail bottoms out at 2).
56
+ *
57
+ * Totals at curation: ~$8.4M supplied / ~$5.1M borrowed, and ONE pair
58
+ * (`0xaB3cb84c…`, frxUSD/sfrxETH) is 62 % of supply and 69 % of borrows.
59
+ */
60
+ export declare const FRAXLEND_ETHEREUM_CONFIG: FraxlendConfigChain;
61
+ export declare const fraxlendConfig: () => FraxlendConfigType;
62
+ /**
63
+ * Deployment seed for one Fraxlend lender on a chain. Published metadata wins;
64
+ * the built-in Ethereum row is the fallback so the provider works before
65
+ * `config/fraxlend.json` exists.
66
+ *
67
+ * Gated on a NON-EMPTY `pairs` array, not merely on the key existing: an
68
+ * allowlist-driven provider with an empty roster must publish nothing rather
69
+ * than fall through to on-chain discovery.
70
+ */
71
+ export declare const fraxlendConfigFor: (lender: string, chainId: string | number) => FraxlendConfigChain | undefined;
72
+ /** All Fraxlend lender keys with a non-empty roster on a chain (drives
73
+ * getLendersForChain). Union of published metadata and the built-in row. */
74
+ export declare const fraxlendLendersByChain: (chainId: string | number) => string[];
75
+ /** The curated pair roster for a lender/chain, or `[]`. */
76
+ export declare const fraxlendPairsFor: (lender: string, chainId: string | number) => FraxlendPairEntry[];
77
+ /** Build the per-pair lender key. Lower-cased address so the key is stable
78
+ * regardless of how the allowlist was checksummed. */
79
+ export declare const fraxlendPairKey: (chainId: string | number, pair: string) => string;
80
+ /** Inverse of {@link fraxlendPairKey}. Returns undefined for the bare
81
+ * `FRAXLEND` dispatch key. */
82
+ export declare const parseFraxlendPairKey: (lender: string) => {
83
+ chainId: string;
84
+ pair: string;
85
+ } | undefined;
@@ -0,0 +1,74 @@
1
+ export type GearboxChainResolvers = {
2
+ /** curator address (lowercased) → curator display name */
3
+ marketConfigurators: {
4
+ [addr: string]: string;
5
+ };
6
+ /**
7
+ * BotListV3 contract address for this chain. Used by the lender-permission
8
+ * fetch to read `botPermissions(bot, creditManager, borrower)`. Sourced
9
+ * upstream via `AddressProviderV310.getAddressOrRevert("BOT_LIST", 3_10)`.
10
+ */
11
+ botList?: string;
12
+ };
13
+ export type GearboxResolversType = {
14
+ addressProviderV310: string;
15
+ marketCompressorV310: string;
16
+ chains: {
17
+ [chainId: string]: GearboxChainResolvers;
18
+ };
19
+ };
20
+ export declare const gearboxResolvers: () => GearboxResolversType;
21
+ /** List of chains where Gearbox V3.1 configurators are registered. */
22
+ export declare const gearboxChains: () => string[];
23
+ /** V3.1 deterministic MarketCompressor address (same on every chain). */
24
+ export declare const gearboxMarketCompressor: () => string | undefined;
25
+ /** V3.1 deterministic AddressProvider address (same on every chain). */
26
+ export declare const gearboxAddressProviderV310: () => string | undefined;
27
+ /**
28
+ * BotListV3 contract address for a chain — used by the lender-permission
29
+ * fetch to read `botPermissions(bot, creditManager, borrower)`. Read from
30
+ * the per-chain `gearbox-resolvers.json` entry (`chains[chainId].botList`).
31
+ * Returns `undefined` when the metadata layer hasn't provided one yet.
32
+ */
33
+ export declare const gearboxBotListV3: (chainId: string) => string | undefined;
34
+ /**
35
+ * V3.1 deterministic CreditAccountCompressor address.
36
+ *
37
+ * Same CREATE2-derived address on every Gearbox V3.1 chain. Not in the
38
+ * resolvers JSON yet — hardcoded here until we decide whether to surface
39
+ * it in `lender-metadata` (the config gains no flexibility; the address
40
+ * is fixed across chains).
41
+ */
42
+ export declare const GEARBOX_ACCOUNT_COMPRESSOR_V310 = "0x4115708Fc8fe6bB392De2e0C21c2C81dA2222394";
43
+ export declare const gearboxAccountCompressor: () => string;
44
+ /**
45
+ * MarketConfigurator address → curator name for a given chain, or
46
+ * `undefined` if no curator is registered on that chain.
47
+ *
48
+ * Configurators are the entry point into `MarketCompressor.getMarkets`
49
+ * — each one is operated by a known curator (cp0x, Re7, Chaos Labs, …).
50
+ */
51
+ export declare const gearboxMarketConfigurators: (chainId: string) => {
52
+ [addr: string]: string;
53
+ } | undefined;
54
+ /**
55
+ * Synthesize the per-CreditManager lender key for a Gearbox V3 market.
56
+ *
57
+ * Mirrors `siloV2LenderKey` / `aaveV4SpokeLenderKey` — each CreditManager
58
+ * is its own isolated lending venue (positions in CM-A are invisible to
59
+ * CM-B even when both draw from the same pool), so it gets its own lender
60
+ * key rather than a config bucket under a shared parent.
61
+ *
62
+ * Format: `GEARBOX_V3_${creditManagerAddr.slice(2).toUpperCase()}`
63
+ *
64
+ * `isGearboxV3()` works on this because it matches `startsWith('GEARBOX_V3')`.
65
+ */
66
+ export declare function gearboxV3LenderKey(creditManager: string): string;
67
+ /**
68
+ * Inverse of `gearboxV3LenderKey`: given a per-CM lender key, return
69
+ * `{ creditManagerAddrLower }`. Returns `undefined` if the key isn't a
70
+ * per-CM Gearbox V3 key (e.g. someone passed the bare prefix `GEARBOX_V3`).
71
+ */
72
+ export declare function parseGearboxV3LenderKey(lenderKey: string): {
73
+ creditManagerAddrLower: string;
74
+ } | undefined;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Lending data layer — one module per lender family, all re-exported here.
3
+ *
4
+ * `registry.ts` owns the global state and the single writer
5
+ * (`initializeLenderData`); everything else is types + getters for one
6
+ * protocol family. See the package README for the layout and for how to add a
7
+ * lender.
8
+ *
9
+ * `getGlobalData` is deliberately NOT re-exported: it is the internal handle
10
+ * the per-lender getters read through, and consumers should use those instead.
11
+ */
12
+ export { initializeLenderData } from './registry';
13
+ export type { GlobalLenderDataRegistry, LenderDataOverrides } from './registry';
14
+ export * from './common';
15
+ export * from './aave';
16
+ export * from './aaveV4';
17
+ export * from './compoundV2';
18
+ export * from './compoundV3';
19
+ export * from './morpho';
20
+ export * from './euler';
21
+ export * from './silo';
22
+ export * from './fluid';
23
+ export * from './gearbox';
24
+ export * from './dolomite';
25
+ export * from './initProtocol';
26
+ export * from './lista';
27
+ export * from './midnight';
28
+ export * from './term';
29
+ export * from './termMax';
30
+ export * from './exactly';
31
+ export * from './teller';
32
+ export * from './liquity';
33
+ export * from './river';
34
+ export * from './inverse';
35
+ export * from './frankencoin';
36
+ export * from './dss';
37
+ export * from './llamalend';
38
+ export * from './resupply';
39
+ export * from './curvance';
40
+ export * from './fraxlend';
@@ -0,0 +1,11 @@
1
+ export type InitConfigEntry = {
2
+ pool: string;
3
+ underlying: string;
4
+ modes: number[];
5
+ };
6
+ export type InitConfigType = {
7
+ [lender: string]: {
8
+ [chainId: string]: InitConfigEntry[];
9
+ };
10
+ };
11
+ export declare const initConfig: () => InitConfigType;
@@ -0,0 +1,63 @@
1
+ /** Per-chain FiRM deployment seed (hand-maintained). */
2
+ export type InverseConfigChain = {
3
+ /** DOLA — the only debt asset. */
4
+ dola: string;
5
+ /** DBR — the prepaid-interest token (deficit gates borrows AND withdrawals). */
6
+ dbr: string;
7
+ /** Pessimistic oracle (2-day-low `viewPrice`). */
8
+ oracle: string;
9
+ /** BorrowController v4 (contract-caller allowlist; EOAs bypass). */
10
+ borrowController: string;
11
+ /** Debt decimals (18). */
12
+ debtDecimals?: number;
13
+ /** Metadata snapshot of the DBR price in DOLA (= fixed borrow APR as a
14
+ * decimal) — FALLBACK ONLY when the live API/AMM read fails. */
15
+ dbrPriceDolaSnapshot?: string;
16
+ };
17
+ export type InverseConfigType = {
18
+ [lender: string]: {
19
+ [chainId: string]: InverseConfigChain;
20
+ };
21
+ };
22
+ /** One FiRM market (= one Market contract, one collateral). */
23
+ export type InverseMarketConfig = {
24
+ /** Market contract — also the per-market lender-key suffix (`INVERSE_<ADDR>`). */
25
+ address: string;
26
+ collToken: string;
27
+ collDecimals: number;
28
+ /** Escrow implementation the Market clones per user (CREATE2 predict). */
29
+ escrowImplementation: string;
30
+ /** Owner-mutable params, snapshotted each metadata refresh. */
31
+ collateralFactorBps: string;
32
+ liquidationIncentiveBps: string;
33
+ liquidationFactorBps: string;
34
+ /** Replenisher's cut of a force-replenish (1000 = 10%). Optional: older
35
+ * metadata snapshots predate it, and it is bot-side economics — the
36
+ * borrower always pays the full `DBR.replenishmentPriceBps`. */
37
+ replenishmentIncentiveBps?: string;
38
+ /** Smaller borrows revert (DOLA units, human number as string). */
39
+ minDebt: string;
40
+ /** Per-market daily borrow cap (DOLA, human number as string). */
41
+ dailyLimit: string;
42
+ borrowPaused?: boolean;
43
+ name?: string;
44
+ };
45
+ /** Generated per-chain data: the curated Market list. */
46
+ export type InverseChainData = {
47
+ markets: InverseMarketConfig[];
48
+ };
49
+ export type InverseMarketsType = {
50
+ [lender: string]: {
51
+ [chainId: string]: InverseChainData;
52
+ };
53
+ };
54
+ export declare const inverseConfig: () => InverseConfigType;
55
+ /** Deployment seed for one Inverse lender on a chain (undefined if unloaded). */
56
+ export declare const inverseConfigFor: (lender: string, chainId: string | number) => InverseConfigChain | undefined;
57
+ export declare const inverseMarkets: () => InverseMarketsType;
58
+ /** Generated chain data (curated Market list; undefined if unloaded). */
59
+ export declare const inverseChainData: (lender: string, chainId: string | number) => InverseChainData | undefined;
60
+ /** Find one FiRM market by its Market contract address. */
61
+ export declare const inverseMarketByAddress: (lender: string, chainId: string | number, address: string) => InverseMarketConfig | undefined;
62
+ /** All Inverse lender keys with config on a chain (drives getLendersForChain). */
63
+ export declare const inverseLendersByChain: (chainId: string | number) => string[];
@@ -0,0 +1,120 @@
1
+ /** Per-deployment, per-chain shared Liquity-family addresses + deviation params. */
2
+ export type LiquityConfigChain = {
3
+ /** CollateralRegistry — branch enumeration + redemptions. */
4
+ collateralRegistry: string;
5
+ /** The deployment's stable token (BOLD / feUSD / USDaf / USND / USDQ …). */
6
+ boldToken: string;
7
+ /** Stable token decimals (18 for every known deployment). */
8
+ boldDecimals?: number;
9
+ /** HintHelpers — insert-position hints + upfront-fee predictions. */
10
+ hintHelpers: string;
11
+ /** MultiTroveGetter — paginated rate-ordered trove reads. */
12
+ multiTroveGetter: string;
13
+ /** WETH-equivalent used for the gas compensation pull on openTrove. */
14
+ wethToken: string;
15
+ /** Gas compensation pulled on open, wei (vanilla 0.0375e18; Felix 0; Nerite 1e15). */
16
+ gasCompensation: string;
17
+ /** Minimum trove debt in stable units, WAD (vanilla 2000e18; Nerite/Quill 500e18). */
18
+ minDebt: string;
19
+ /** Interest-rate bounds, WAD annual (vanilla 0.5%–250%; Quill 6%–350%). */
20
+ minAnnualInterestRate: string;
21
+ maxAnnualInterestRate: string;
22
+ /** Upfront-fee averaging period, seconds (vanilla 7 days). */
23
+ upfrontInterestPeriodSeconds?: string;
24
+ /** Premature rate-adjustment cooldown, seconds (vanilla 7 days). */
25
+ interestRateAdjCooldownSeconds?: string;
26
+ /** Share of borrow interest routed to SP depositors, WAD (vanilla 0.75e18). */
27
+ spYieldSplit?: string;
28
+ /** Fork exposes per-branch debt caps (Nerite getDebtLimit / Felix MaxCapDebt). */
29
+ hasDebtCaps?: boolean;
30
+ /** Fork exposes deploy-parameterized constants as TroveManager getters (Quill). */
31
+ hasForkParamGetters?: boolean;
32
+ /** Proxied deployment (Felix/Ebisu): constants are admin-mutable → refresh required. */
33
+ mutableParams?: boolean;
34
+ /**
35
+ * Known trove-opening periphery contracts (WETH / GasComp / Leverage
36
+ * zappers). Troves opened through a zapper have NFT ids salted by the
37
+ * zapper address AND a transformed owner index — user-data discovery must
38
+ * probe these in addition to direct opens (the official frontends open
39
+ * through zappers, so most real troves are zapper-salted).
40
+ */
41
+ zappers?: string[];
42
+ /**
43
+ * Fork wrapper tokens: collIndex → the user-facing asset the branch
44
+ * collateral wraps. The generator copies these onto branch records
45
+ * (`LiquityBranchConfig.collWrapper`).
46
+ */
47
+ collWrappers?: {
48
+ [collIndex: string]: string;
49
+ };
50
+ /** Subgraph endpoint for trove discovery enrichment (optional, may be down). */
51
+ subgraphUrl?: string | null;
52
+ /** api.liquity.org-style stats endpoint for APY smoothing (optional, may be down). */
53
+ apiBaseUrl?: string | null;
54
+ };
55
+ export type LiquityConfigType = {
56
+ [lender: string]: {
57
+ [chainId: string]: LiquityConfigChain;
58
+ };
59
+ };
60
+ /** One collateral branch of a Liquity-family deployment (= one market). */
61
+ export type LiquityBranchConfig = {
62
+ /** CollateralRegistry index — also the per-branch lender-key suffix. */
63
+ collIndex: number;
64
+ collToken: string;
65
+ collDecimals: number;
66
+ /**
67
+ * The user-facing asset the branch collateral wraps, when the fork inserts a
68
+ * wrapper (Felix feUBTC←UBTC, USDaf WBTC18←WBTC / ysyBOLD←yBOLD). Deposit /
69
+ * withdraw builders add a wrap/unwrap leg when set. Null/absent = no wrapper.
70
+ */
71
+ collWrapper?: string | null;
72
+ addressesRegistry: string;
73
+ borrowerOperations: string;
74
+ troveManager: string;
75
+ troveNFT: string;
76
+ stabilityPool: string;
77
+ activePool: string;
78
+ defaultPool?: string;
79
+ sortedTroves: string;
80
+ priceFeed: string;
81
+ /**
82
+ * Decimals of `PriceFeed.lastGoodPrice()`. 18 on canonical (18-dec) collateral
83
+ * and omitted there; forks that list NON-18-dec collateral split into two camps
84
+ * and only metadata tells them apart — see `liquityCollateralPrice` in
85
+ * margin-fetcher. Ebisu bakes the scaling into the feed (`36 - collDecimals`);
86
+ * Enosys keeps the feed at 18 and normalizes collateral inside its CR math.
87
+ */
88
+ priceDecimals?: number;
89
+ gasPool?: string;
90
+ collSurplusPool?: string;
91
+ /** Branch risk ratios, WAD (snapshotted; proxied forks can change them). */
92
+ ccr: string;
93
+ mcr: string;
94
+ scr: string;
95
+ bcr?: string;
96
+ /** Liquidation penalties, WAD (SP offset / redistribution). */
97
+ liquidationPenaltySP?: string;
98
+ liquidationPenaltyRedistribution?: string;
99
+ /** Branch debt cap in stable units, WAD (only forks with `hasDebtCaps`). */
100
+ debtCap?: string | null;
101
+ /** Optional display label, e.g. "Liquity V2 wstETH". */
102
+ name?: string;
103
+ };
104
+ export type LiquityMarketsType = {
105
+ [lender: string]: {
106
+ [chainId: string]: LiquityBranchConfig[];
107
+ };
108
+ };
109
+ export declare const liquityConfig: () => LiquityConfigType;
110
+ /** Shared config for one Liquity-family deployment on a chain (undefined if unloaded). */
111
+ export declare const liquityConfigFor: (lender: string, chainId: string | number) => LiquityConfigChain | undefined;
112
+ export declare const liquityMarkets: () => LiquityMarketsType;
113
+ /** All branches of one Liquity-family deployment on a chain (empty if none/unloaded). */
114
+ export declare const liquityBranchesByChain: (lender: string, chainId: string | number) => LiquityBranchConfig[];
115
+ /** Look up one branch by its CollateralRegistry index (the per-branch key suffix). */
116
+ export declare const liquityBranchByIndex: (lender: string, chainId: string | number, collIndex: number | string) => LiquityBranchConfig | undefined;
117
+ /** Look up one branch by its TroveManager address (the marketUid address). */
118
+ export declare const liquityBranchByTroveManager: (lender: string, chainId: string | number, troveManager: string) => LiquityBranchConfig | undefined;
119
+ /** All Liquity-family lender keys with config on a chain (drives getLendersForChain). */
120
+ export declare const liquityLendersByChain: (chainId: string | number) => string[];
@@ -0,0 +1,6 @@
1
+ export type ListaNativeProviderType = {
2
+ [chainId: string]: {
3
+ nativeProvider: string;
4
+ };
5
+ };
6
+ export declare const listaNativeProvider: () => ListaNativeProviderType;