/**
 * Normalization layer: Euler V2 cluster → AaveV3-like response format.
 *
 * ## Conceptual mapping
 *
 * Euler V2 is pair-wise (vault A's LTV for collateral vault B), while
 * the target format has per-asset configs indexed by a key.
 *
 * The `config` map on each vault entry is keyed by **borrow vault address**
 * (lowercase). Each entry's LTV values describe this vault's collateral
 * standing when used with that borrow vault.
 *
 * This means:
 *   1. For vault V, `V.config[borrowVault]` = V's collateral LTV for that borrow vault
 *   2. All vaults with `config[B]` are eligible collateral for borrow vault B
 *
 * ### Example
 *
 * Euler cluster with 3 vaults:
 *   Vault W (WETH, 0xaaa...) - borrow vault, accepts [U, D] as collateral
 *   Vault U (USDC, 0xbbb...) - borrow vault, accepts [W] as collateral
 *   Vault D (DAI,  0xccc...) - collateral only
 *
 * Maps to:
 *   data["0xaaa..."]: {          ← WETH vault entry
 *     config: {
 *       "0xbbb...": { bcf: 0.82, cf: 0.87 }  ← WETH as collateral for USDC borrow vault
 *     }
 *   }
 *   data["0xbbb..."]: {          ← USDC vault entry
 *     config: {
 *       "0xaaa...": { bcf: 0.75, cf: 0.80 }  ← USDC as collateral for WETH borrow vault
 *     }
 *   }
 *   data["0xccc..."]: {          ← DAI vault entry
 *     config: {
 *       "0xaaa...": { bcf: 0.80, cf: 0.88 }  ← DAI as collateral for WETH borrow vault
 *     }
 *   }
 */
import type { Cluster } from './types.js';
export interface GenericCurrency {
    chainId: string;
    address: string;
    name?: string;
    symbol?: string;
    decimals: number;
    [k: string]: any;
}
export interface LenderConfigData {
    /** Lowercase borrow vault address that defines this config */
    category: string;
    /** Counterparty vault name for display */
    label: string;
    borrowCollateralFactor: number;
    collateralFactor: number;
    borrowFactor: number;
    /**
     * Liquidation penalty as a fraction (e.g. 0.05 = 5%). For Euler this is
     * the seized collateral vault's `maxLiquidationDiscount`, which is the
     * maximum discount a liquidator can realise on that collateral.
     */
    liquidationPenalty: number;
    closeFactor: number;
    collateralDisabled?: boolean;
    debtDisabled?: boolean;
}
export interface EModeData {
    /** Lowercase borrow vault address */
    category: string;
    label: string;
    borrowCollateralFactor: number;
    collateralFactor: number;
    priceSource: string;
}
export interface BaseYields {
    variableBorrowRate: number;
    stableBorrowRate: number;
    depositRate: number;
}
/** Euler-specific metadata for a vault (analogous to Aave's aToken/vToken/sToken) */
export interface EulerVaultMetadata {
    /** The EVault contract address (ERC-4626 share token) */
    vault: string;
    /** Debt token address (read-only ERC-20 representing borrows) */
    dToken: string;
    /** Oracle used for pricing */
    oracle: string;
    /** Interest rate model contract */
    interestRateModel: string;
    /** Unit of account for this vault's oracle pricing */
    unitOfAccount: string;
    /** EVC address this vault is registered with */
    evc: string;
    /** Governor admin address */
    governorAdmin: string;
}
export interface TokenEntry {
    /** Display name (e.g. "Euler V2 eWETH") */
    name: string;
    asset: GenericCurrency;
    totalDeposits: number;
    totalDebtStable: number;
    totalDebt: number;
    totalDepositsUSD: number;
    totalDebtStableUSD: number;
    totalDebtUSD: number;
    /** Borrow utilization (0..1) — `totalDebt / totalDeposits`. */
    utilization: number;
    depositRate: number;
    variableBorrowRate: number;
    stableBorrowRate: number;
    averageStableBorrowRate: number;
    liquidityIndex: string;
    variableBorrowIndex: string;
    lastUpdateTimestamp: number;
    config: {
        [counterpartyVaultAddress: string]: LenderConfigData;
    };
    collateralActive: boolean;
    borrowingEnabled: boolean;
    depositsEnabled: boolean;
    hasStable: boolean;
    isActive: boolean;
    isFrozen: boolean;
    borrowCap: number;
    supplyCap: number;
    debtCeiling: number;
    eMode: {
        label: string;
        category: string;
        borrowCollateralFactor: number;
        collateralFactor: number;
        priceSource: string;
    };
    decimals: number;
    params: {
        metadata: EulerVaultMetadata;
    };
}
export interface NormalizedClusterResponse {
    data: {
        [vaultAddressLower: string]: TokenEntry;
    };
    chainId: string;
    /** Keyed by lowercase borrow vault address */
    eModes: {
        [borrowVaultAddress: string]: EModeData;
    };
}
export type GenericTokenList = {
    [addressLowerCase: string]: GenericCurrency;
};
export interface NormalizeOptions {
    chainId: string;
    /**
     * Optional token list for looking up asset metadata.
     * If not provided, metadata comes from the vault's own fields.
     */
    tokenList?: GenericTokenList;
}
/**
 * Normalizes an Euler V2 cluster into the AaveV3-like response format.
 *
 * ## Config keyed by borrow vault address
 *
 * Each borrow vault in the cluster is a key in the config and eModes maps.
 * For each token/vault, `config[borrowVaultAddr]` contains its collateral
 * parameters when used as collateral for that borrow vault.
 *
 * This is the most native representation for Euler V2 where LTVs are
 * defined per collateral-vault pair.
 *
 * ## Data keyed by vault address
 *
 * The `data` map is keyed by **lowercase vault address** (not token symbol)
 * because multiple vaults in a cluster could share the same underlying
 * asset with different risk parameters.
 */
export declare function normalizeCluster(cluster: Cluster, opts: NormalizeOptions): NormalizedClusterResponse;
//# sourceMappingURL=normalize.d.ts.map