import { GenericCurrency } from '../../types/general';
import type { VaultClassificationFields } from '../classification';
/**
 * Deposit availability mode reported by the Lagoon API (`state.syncMode`).
 *
 * Lagoon vaults are ERC-7540 async vaults, but expose an optional
 * synchronous deposit (`syncDeposit`) when the NAV is fresh
 * (`isTotalAssetsValid()`). `syncMode` summarises which entrypoints are
 * currently usable:
 *   - `Sync`  — only synchronous deposits accepted right now
 *   - `Async` — only the `requestDeposit` queue is open
 *   - `Both`  — either path works
 * Redeems are always async (request → settle → claim). Kept as a string
 * union with a fallback so an unseen value doesn't break parsing.
 */
export type LagoonSyncMode = 'Sync' | 'Async' | 'Both' | (string & {});
/**
 * Parsed Lagoon vault entry.
 *
 * Lagoon vaults are curator-run, ERC-7540 async vaults (DeFi / RWA
 * strategies) — NOT staking tokens. Unlike the ERC-4626 providers, the
 * share token decimals (18) frequently differ from the underlying asset
 * decimals (e.g. USDC 6, WBTC 8): the majority of Lagoon vaults are
 * 18-decimal shares over a non-18 asset. `assetDecimals` is therefore
 * load-bearing for any share→asset conversion and is carried through to
 * `VaultLookupEntry` so the user-balance endpoint formats assets
 * correctly.
 *
 * All public data (rate/NAV included) is sourced from the Lagoon public
 * GraphQL API (`https://api.lagoon.finance/query`) in one batched call
 * per chain — no multicall, no archival RPC. Mirrors the cross-provider
 * load-bearing fields (`address`, `underlying`, `symbol`, `name`,
 * `decimals`, `totalAssets`, `totalSupply`) so `buildVaultLookup` picks
 * it up without branching.
 */
export interface LagoonVault extends VaultClassificationFields {
    /** Vault (share token) contract address, lowercased. */
    address: string;
    /** Underlying ERC-20 address, lowercased. */
    underlying: string;
    /** Share-token symbol, e.g. `tulipaUSDC`, `9SUSDC`. */
    symbol: string;
    /** Share-token name as returned by the API / `name()`. */
    name: string;
    /** Cross-provider UI label — `${curatorName ?? 'Lagoon'} ${symbol}`. */
    displayName: string;
    /** Curator display name, when the API exposes one. */
    curatorName?: string;
    /** Share-token decimals (18 for virtually every Lagoon vault). */
    decimals: number;
    /** Underlying asset decimals — frequently differs from `decimals`
     *  (USDC 6, WBTC 8). Required for correct share→asset math. */
    assetDecimals: number;
    /** Total underlying held by the vault, raw integer as string
     *  (asset-decimal scaled). From `state.totalAssets`. */
    totalAssets: string;
    /** Total shares minted, raw integer as string (share-decimal scaled). */
    totalSupply: string;
    /** Raw `pricePerShare` — 1 share → X underlying, asset-decimal scaled
     *  (`convertToAssets(10**shareDecimals)`). */
    pricePerShare: string;
    /** USD value of one share, when the API provides it. */
    pricePerShareUsd?: number;
    /** Supply APR in percent (e.g. `10.37` = 10.37 %). Time-weighted net
     *  APR from the Lagoon API — see `aprWindow`. */
    supplyRate: number;
    /** Extra rewards APR in percent. 0 for v1 (incentives/airdrops not
     *  yet decomposed from the headline rate). */
    rewardsRate: number;
    /** Sum of `supplyRate + rewardsRate` — what a depositor earns. */
    depositRate: number;
    /** Which API window `supplyRate` was taken from (`monthly` by
     *  default, falling back through `weekly → yearly → inception`). */
    aprWindow: 'weekly' | 'monthly' | 'yearly' | 'inception' | 'none';
    /** All TWRR net APR windows from the API, percent. Null when the
     *  window has insufficient history. */
    apr: {
        weekly: number | null;
        monthly: number | null;
        yearly: number | null;
        inception: number | null;
    };
    /** True when the vault only accepts async (`requestDeposit`) deposits
     *  right now (`state.isAsyncOnly`). */
    isAsyncOnly: boolean;
    /** Current deposit-path availability — see {@link LagoonSyncMode}. */
    syncMode: LagoonSyncMode;
    /** Hydrated asset metadata from the provided token list, if any. */
    asset?: GenericCurrency;
    /** USD price of one underlying unit, if prices were supplied. */
    priceUsd?: number;
    /** Human-formatted total assets (`totalAssets / 10**assetDecimals`). */
    totalAssetsFormatted: number;
    /** Human-formatted total assets in USD. */
    totalAssetsUsd: number;
}
/**
 * Full parsed payload: per-vault-address map (parity with Morpho / Silo
 * / Euler-Earn / LST). Keyed by lowercased vault address.
 */
export type LagoonVaults = {
    [vaultAddress: string]: LagoonVault;
};
//# sourceMappingURL=types.d.ts.map