import type { LstAcceptedInput } from '@1delta/calldata-sdk';
import { GenericCurrency } from '../../types/general';
import type { VaultClassificationFields } from '../classification';
import type { LstDelegation, LstValidator } from './validators';
/**
 * Withdrawal exit mode for an LST. Drives downstream UX: queued LSTs
 * need a withdrawal-request flow, instant ones can burn-to-asset right
 * away, off-chain ones must be routed through the issuer or a DEX.
 *
 * See LST_WITHDRAWAL_QUEUES.md for the per-LST mechanism details.
 */
export type LstWithdrawalMode = 'queued' | 'fixed-cooldown' | 'instant-or-queued' | 'fee-or-queued' | 'off-chain' | 'dex-only';
/**
 * Parsed LST share-token entry.
 *
 * LSTs are protocol-issued staking-share tokens (Lido stETH, Rocket
 * Pool rETH, EtherFi weETH, …). Some are real ERC-4626 vaults
 * (pufETH), most use a custom share/exchange-rate interface.
 *
 * Modeled to mirror the existing vault provider shapes (`MorphoVault`,
 * `FluidFToken`, `EulerEarnVault`) so the cross-provider lookup picks
 * them up without branching. The required cross-provider fields
 * (`address`, `underlying`, `symbol`, `name`, `decimals`, `totalAssets`,
 * `totalSupply`) match `buildVaultLookup`'s structural constraint —
 * extending this type while dropping one of them will break the
 * compile.
 */
export interface LstShareToken extends VaultClassificationFields {
    /** Share-token contract address, lowercased. */
    address: string;
    /** Underlying asset address, lowercased. `zeroAddress` for LSTs whose
     *  underlying is native ETH (most ETH LSTs). For pufETH the
     *  underlying is wstETH. */
    underlying: string;
    /** Share-token symbol, e.g. `wstETH`, `weETH`, `rETH`. */
    symbol: string;
    /** Share-token name as returned by `name()`, or a falsy-safe fallback
     *  composed from the brand + symbol. */
    name: string;
    /** Cross-provider UI label — `${brand} ${symbol}` (e.g. `Lido wstETH`,
     *  `EtherFi weETH`). Always non-empty. */
    displayName: string;
    /** Brand label — `Lido`, `EtherFi`, `Rocket Pool`, … */
    brand: string;
    /** Alias for `brand` to match `curatorName` on the other providers'
     *  vault types — keeps cross-provider UI code uniform. */
    curatorName: string;
    /** Share decimals. */
    decimals: number;
    /** Underlying asset decimals. Equals `decimals` for the vast majority
     *  of LSTs (share and underlying share a decimal count); diverges for
     *  e.g. 18-dec SolvBTC over 8-dec WBTC, or 8-dec bridged pumpBTC over
     *  18-dec SolvBTC.CORE. Load-bearing for share→asset formatting and the
     *  cross-provider `sharePrice` (parity with Lagoon/Yearn). */
    assetDecimals: number;
    /** Total underlying held, raw integer in **underlying** units as string.
     *  Computed as `totalSupply * exchangeRate / 1e18` (rescaled to the
     *  underlying decimals) when the share token does not expose a direct
     *  `totalAssets()`. */
    totalAssets: string;
    /** Total shares minted, raw integer in **share** units as string. */
    totalSupply: string;
    /** Raw `convertToShares(10**assetDecimals)` — 1 underlying → X shares,
     *  in raw share units. */
    convertToShares: string;
    /** Raw `convertToAssets(10**decimals)` — 1 share → X underlying, in raw
     *  underlying units. */
    convertToAssets: string;
    /** 1e18-scaled exchange rate: value of 1 whole share in whole underlying
     *  (decimal-agnostic). The canonical pricing primitive —
     *  `convertToAssets`/`convertToShares` are derived from it together with
     *  the share/underlying decimals. */
    exchangeRate: string;
    /** Supply APR in percent (e.g. `3.12` = 3.12 %). Sourced from the
     *  matching intrinsic-yield fetcher. */
    supplyRate: number;
    /** Extra rewards APR in percent — usually 0 for LSTs; populated only
     *  when the protocol layers a separate reward stream on top. */
    rewardsRate: number;
    /** Sum of `supplyRate + rewardsRate` — what a depositor actually
     *  earns. */
    depositRate: number;
    /** True if the share token is a real ERC-4626. Drives whether the
     *  calldata builder uses `deposit(uint256,address)` or a
     *  protocol-specific entry. */
    isErc4626: boolean;
    /** True if the share token rebases (e.g. stETH, eETH). Most LSTs
     *  covered here are non-rebasing wrappers (wstETH, weETH). */
    isRebasing: boolean;
    /** False when the share token cannot be minted permissionlessly
     *  on-chain — e.g. cbETH (Coinbase off-chain mint). */
    isMintable: boolean;
    /** True if the mint entry accepts native ETH (`payable`). */
    isNativeUnderlying: boolean;
    /** Mint entry contract address, lowercased. Undefined when
     *  `isMintable === false`. */
    mintContract?: string;
    /** Input asset for the mint call. `native` for `payable` entries,
     *  otherwise a lowercased ERC-20 address. Undefined when not
     *  mintable. The primary input; see `acceptedInputs` for the full set. */
    mintInputAsset?: 'native' | string;
    /**
     * Full set of pay assets the mint accepts, with each path's shape and any
     * required options — the machine-readable answer to "what can I pay with".
     * Sourced from calldata-sdk's `LST_INPUT_CAPABILITIES`; falls back to a
     * single entry derived from `mintInputAsset` for kinds with no alternatives.
     * Empty when `isMintable === false`. Use this to drive the deposit-action
     * request (`payAsset` + the per-path `needs` options). */
    acceptedInputs: LstAcceptedInput[];
    /** Validator-selection descriptor — present only for LSTs that require or
     *  allow the depositor to pick a validator / group / node / pool the stake
     *  is delegated to (Core, Celo, Solv, …). Absent for pooled LSTs (the
     *  majority). Mirrors `acceptedInputs` — the machine-readable "do I have to
     *  choose a validator, and from where". See `validators`. */
    delegation?: LstDelegation;
    /** The live, selectable validator set for `delegation.optionKey`, when the
     *  descriptor's `source` is `endpoint`. Each `id` is the value to pass back
     *  as the deposit option. Empty/absent for pooled or off-chain-selected
     *  (Solv poolId) LSTs. */
    validators?: LstValidator[];
    /** Withdrawal mechanism — see `LstWithdrawalMode`. */
    withdrawalMode: LstWithdrawalMode;
    /** Fixed cooldown in seconds for `fixed-cooldown` mode. Undefined
     *  otherwise. Queue-finalization protocols (Lido, EtherFi, …) have
     *  no fixed delay — their wait depends on the validator-exit queue. */
    withdrawalCooldownSeconds?: number;
    /** 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**decimals`). */
    totalAssetsFormatted: number;
    /** Human-formatted total assets in USD. */
    totalAssetsUsd: number;
    /** Instantly-withdrawable underlying right now, raw integer as string —
     *  **always populated** (parity with the 4626 vault providers). It is the
     *  amount a holder of all shares could redeem on-chain this block:
     *    - a protocol redemption buffer where one is exposed (Rocket Pool
     *      `RocketDepositPool.getBalance()`, Beets stS `totalPool()`);
     *    - the vault's idle underlying for instant-capable ERC-4626 LSTs;
     *    - `0` for queue / fixed-cooldown / dex-only / off-chain LSTs, which
     *      have no same-block on-chain redemption (the wait *is* the exit).
     *  Like the vault `liquidity`, it's a right-now estimate, not a guarantee. */
    liquidity: string;
    /** Human-formatted instant-exit liquidity (`liquidity / 10**decimals`). */
    liquidityFormatted: number;
    /** Human-formatted instant-exit liquidity in USD. */
    liquidityUsd: number;
}
/**
 * Full parsed payload: per-share-token-address map.
 *
 * Keyed by lowercased share-token address (parity with Morpho / Silo /
 * Euler-Earn). LSTs do not naturally key by underlying — many LSTs
 * share `zeroAddress` (native ETH) as their underlying, so the
 * underlying-keyed shape used by Fluid/Gearbox would collide.
 */
export type LstShareTokens = {
    [shareAddress: string]: LstShareToken;
};
//# sourceMappingURL=types.d.ts.map