/**
 * Types for Aave V4 Hub & Spoke data fetching.
 *
 * Mirrors the on-chain structs from IHub.Asset, ISpoke.Reserve,
 * ISpoke.ReserveConfig, ISpoke.DynamicReserveConfig, ISpoke.LiquidationConfig.
 */
/** Hub asset struct (from IHub.getAsset) */
export interface HubAsset {
    liquidity: bigint;
    realizedFees: bigint;
    decimals: number;
    addedShares: bigint;
    swept: bigint;
    premiumOffsetRay: bigint;
    drawnShares: bigint;
    premiumShares: bigint;
    liquidityFee: number;
    drawnIndex: bigint;
    drawnRate: bigint;
    lastUpdateTimestamp: number;
    underlying: string;
    irStrategy: string;
    reinvestmentController: string;
    feeReceiver: string;
    deficitRay: bigint;
    /** Total added assets across all spokes (from getAddedAssets) */
    totalAddedAssets: bigint;
    /** Total owed assets across all spokes (from getAssetTotalOwed) */
    totalOwedAssets: bigint;
}
/** Spoke reserve struct (from ISpoke.getReserve) */
export interface SpokeReserve {
    underlying: string;
    hub: string;
    assetId: number;
    decimals: number;
    collateralRisk: number;
    flags: number;
    dynamicConfigKey: number;
}
/** Reserve config (from ISpoke.getReserveConfig) */
export interface SpokeReserveConfig {
    collateralRisk: number;
    paused: boolean;
    frozen: boolean;
    borrowable: boolean;
    receiveSharesEnabled: boolean;
}
/** Dynamic reserve config (from ISpoke.getDynamicReserveConfig) */
export interface DynamicReserveConfig {
    collateralFactor: number;
    maxLiquidationBonus: number;
    liquidationFee: number;
}
/** Liquidation config (from ISpoke.getLiquidationConfig) */
export interface LiquidationConfig {
    targetHealthFactor: bigint;
    healthFactorForMaxBonus: bigint;
    liquidationBonusFactor: number;
}
/**
 * Spoke binding (from IHub.getSpoke(assetId, spoke)).
 *
 * Subset of fields we surface publicly. The relevant one for the rate UI is
 * `riskPremiumThreshold` (BPS) — the per-spoke cap on how much premium any
 * single borrower can accrue against this Hub asset, i.e. the upper bound
 * for the borrow APR uplift on this asset in this spoke.
 */
export interface SpokeBinding {
    riskPremiumThreshold: number;
    active: boolean;
    halted: boolean;
    /**
     * Per-spoke supply cap, in **whole tokens** (not scaled by decimals).
     * From `IHub.getSpoke(assetId, spoke).addCap` (uint40).
     * IHub.sol:71 documents this explicitly; Hub.sol:822-828 enforces
     * `addCap × 10^decimals ≥ addedAssets + amount`.
     *
     * The sentinel `MAX_ALLOWED_SPOKE_CAP` (== `type(uint40).max`) means
     * "uncapped" — consumers should treat the max value as no limit.
     * A value of `0` means **no additions allowed** (on-chain: `0 >= existing + amount` always reverts).
     */
    addCap: number;
    /**
     * Per-spoke borrow cap, in **whole tokens** (not scaled by decimals).
     * From `IHub.getSpoke(assetId, spoke).drawCap` (uint40). Same scaling
     * and sentinel semantics as `addCap`.
     * A value of `0` means **no draws allowed** (on-chain: `0 >= owed + amount` always reverts).
     */
    drawCap: number;
    /**
     * Per-spoke deficit in RAY. From `IHub.getSpoke(assetId, spoke).deficitRay`.
     * Counts against the draw cap headroom on-chain:
     * `drawCap * 10^d >= owed + amount + ceil(deficitRay / RAY)`.
     */
    deficitRay: bigint;
}
/** Parsed per-reserve data (assembled from multiple calls) */
export interface ParsedReserveData {
    reserveId: number;
    reserve: SpokeReserve;
    config: SpokeReserveConfig;
    dynamicConfigs: {
        [configKey: number]: DynamicReserveConfig;
    };
    suppliedAssets: bigint;
    drawnDebt: bigint;
    premiumDebt: bigint;
    totalDebt: bigint;
    hubAsset: HubAsset;
    price: bigint;
    /**
     * Spoke binding for this reserve's hub asset, fetched via
     * `IHub.getSpoke(assetId, spoke)`. Undefined when the reserve's
     * `assetId` is not known at call-build time (legacy metadata).
     */
    spokeBinding?: SpokeBinding;
}
/** Per-spoke parsed data */
export interface ParsedSpokeData {
    spoke: string;
    oracle: string;
    label: string;
    oracleDecimals: number;
    liquidationConfig: LiquidationConfig;
    reserves: ParsedReserveData[];
}
//# sourceMappingURL=types.d.ts.map