import { GenericCurrency } from '../../types/general';
import type { VaultClassificationFields } from '../classification';
import type { VaultMarketExposure } from '../exposure';
export type { VaultMarketExposure } from '../exposure';
/** Curator metadata as surfaced by the Morpho API. */
export interface VaultCuratorMeta {
    /** Curator slug, e.g. `gauntlet`, `kpk`, `steakhouse`. */
    id: string;
    /** Display name, e.g. `Gauntlet`, `KPK`, `Steakhouse Financial`. */
    name: string;
    /** Logo URL (typically a CDN-hosted SVG). */
    image?: string;
    /** Whether Morpho has verified this curator. */
    verified?: boolean;
}
/**
 * Parsed MetaMorpho vault entry.
 *
 * MetaMorpho vaults are standalone ERC-4626 yield vaults that allocate
 * their deposits across one or more Morpho Blue markets (per-vault
 * strategy configured by a curator). They are NOT a lending market — no
 * collateral, no borrow, no liquidation — just a deposit → earn shape,
 * modeled separately from the per-market borrow side in
 * `src/lending/public-data/morpho/`.
 *
 * Multiple vaults typically exist per underlying (different curators /
 * risk profiles), so the top-level map is keyed by vault address rather
 * than underlying — differs from Fluid/Gearbox where one vault per
 * underlying is the norm.
 */
export interface MorphoVault extends VaultClassificationFields {
    /** MetaMorpho vault (share token) contract address, lowercased. */
    address: string;
    /** Lowercased underlying ERC20 address. */
    underlying: string;
    /** Vault share-token symbol, e.g. `bbUSDC`, `steakUSDC`. */
    symbol: string;
    /** Vault share-token name as returned by `name()`, e.g.
     *  `Morpho USDC Steakhouse`. Raw — may be inconsistently formatted
     *  across vaults; use `displayName` for UI. */
    name: string;
    /** Cross-provider UI label — `${curatorName ?? 'Morpho'} ${asset.symbol}`
     *  (e.g. `Steakhouse USDC`, `Gauntlet WETH`). Always non-empty. */
    displayName: string;
    /** Share and underlying decimals (ERC-4626 keeps them aligned). */
    decimals: number;
    /** Total underlying assets held by the vault, raw integer as string. */
    totalAssets: string;
    /** Total shares minted, raw integer as string. */
    totalSupply: string;
    /** Raw `convertToAssets(10**shareDecimals)` — 1 share → X underlying,
     *  asset-scaled. Derived from `totalAssets / totalSupply`. */
    convertToAssets: string;
    /** Supply APR in percent, net of vault fee (e.g. `4.12` = 4.12 %). */
    supplyRate: number;
    /** Extra rewards APR in percent, on top of `supplyRate`. */
    rewardsRate: number;
    /** Sum of `supplyRate + rewardsRate` — what a depositor actually earns. */
    depositRate: number;
    /** Performance fee in percent (e.g. `5.0` = 5 %). */
    fee: number;
    /** Timelock for vault config changes, in seconds. */
    timelock: number;
    /** Whether the vault is listed by the Morpho frontend. Goldsky-sourced
     *  chains default to `true` (listing is Morpho-API-only). */
    whitelisted: boolean;
    /** Owner address, lowercased — may be absent if not set. */
    owner?: string;
    /** Curator address, lowercased — may be absent if not set. */
    curator?: string;
    /** Guardian address, lowercased — may be absent if not set. */
    guardian?: string;
    /** Human-readable curator label for UI (e.g. `Steakhouse`, `Gauntlet`).
     *  Populated from the Morpho API's `state.curators[].name`; undefined on
     *  Goldsky-sourced chains where the subgraph carries only the address. */
    curatorName?: string;
    /** Curator logo URL from the Morpho API (CDN-hosted SVG). Undefined on
     *  Goldsky-sourced chains. */
    curatorImage?: string;
    /** Full curator list — set when a vault has co-curators. First entry
     *  matches `curatorName` / `curatorImage`. Undefined on Goldsky-sourced
     *  chains. */
    curators?: VaultCuratorMeta[];
    /** Hydrated asset metadata from the provided token list, if any. */
    asset?: GenericCurrency;
    /** USD price of one underlying unit, if prices were supplied / returned. */
    priceUsd?: number;
    /** Human-formatted total assets (`totalAssets / 10^decimals`). */
    totalAssetsFormatted: number;
    /** Human-formatted total assets in USD. */
    totalAssetsUsd: number;
    /** Underlying currently withdrawable *right now*, raw integer as string.
     *  Caps immediate withdrawals — the rest of `totalAssets` is locked in
     *  markets up to their utilisation. A vault's `publicAllocatorConfig`
     *  (when present) can expand this at tx time by reallocating between
     *  markets before the exit. Not a withdrawal timelock — MetaMorpho has
     *  no per-deposit timelock; the `timelock` field is governance-only. */
    liquidity: string;
    /** Human-formatted immediate withdrawable liquidity. */
    liquidityFormatted: number;
    /** Human-formatted immediate withdrawable liquidity in USD. */
    liquidityUsd: number;
    /** Per-market allocation breakdown — which Morpho/Moolah markets the
     *  vault lends into and how much, ordered by weight descending. Populated
     *  by the on-chain Lista (Moolah) path; undefined on paths that don't
     *  surface allocations (API/subgraph/standard on-chain). */
    exposures?: VaultMarketExposure[];
}
/**
 * Full parsed payload: per-vault-address map.
 *
 * Morpho has many vaults per underlying (one per curator strategy), so
 * keying by vault address keeps every entry distinct. Callers that want a
 * per-underlying view can group by `underlying` downstream.
 */
export type MorphoVaults = {
    /** Keyed by lowercased vault address. */
    [vaultAddress: string]: MorphoVault;
};
//# sourceMappingURL=types.d.ts.map