import { MarketData, Unarray } from "./types.js"; import { Address, Hex } from "viem"; //#region src/onchain/base/token-types.d.ts type TokenData = Unarray; export declare const PHANTOM_TOKEN_CONTRACT_TYPES: readonly ["PHANTOM_TOKEN::CONVEX", "PHANTOM_TOKEN::INFINIFI_UNWIND", "PHANTOM_TOKEN::INFRARED", "PHANTOM_TOKEN::MELLOW_WITHDRAWAL", "PHANTOM_TOKEN::MIDAS_REDEMPTION", "PHANTOM_TOKEN::SECURITIZE_RD", "PHANTOM_TOKEN::STAKING_REWARDS", "PHANTOM_TOKEN::UPSHIFT_WITHDRAW"]; export declare const RWA_UNDERLYING_DEFAULT = "RWA_UNDERLYING::DEFAULT"; export declare const RWA_UNDERLYING_ON_DEMAND = "RWA_UNDERLYING::ON_DEMAND"; export type RWAUnderlyingContractType = typeof RWA_UNDERLYING_DEFAULT | typeof RWA_UNDERLYING_ON_DEMAND; export declare const RWA_ON_DEMAND_LP_MONOPOLIZED = "ON_DEMAND_LP::MONOPOLIZED"; export type RWAOnDemandLpContractType = typeof RWA_ON_DEMAND_LP_MONOPOLIZED; export type PhantomTokenContractType = (typeof PHANTOM_TOKEN_CONTRACT_TYPES)[number]; /** * Withdrawal and redemption phantom tokens that can never be acquired as a * strategy target. Other `PHANTOM_TOKEN::*` types (Convex, Infrared, staking * rewards) can. */ export declare const NON_STRATEGY_PHANTOM_TOKEN_TYPES: readonly ["PHANTOM_TOKEN::INFINIFI_UNWIND", "PHANTOM_TOKEN::MELLOW_WITHDRAWAL", "PHANTOM_TOKEN::MIDAS_REDEMPTION", "PHANTOM_TOKEN::SECURITIZE_RD", "PHANTOM_TOKEN::UPSHIFT_WITHDRAW"]; /** * Token metadata stored in {@link TokensMeta}. * * `symbol` is a display ticker. The SDK may rewrite it (curated pretty names, * `"target redemption from source"` for redemption phantom tokens) and it is not guaranteed * to match the ERC-20 `symbol()` on chain. */ export interface SimpleTokenMeta extends TokenData { contractType?: string; /** * Raw output of the token's `serialize()` call, when it implements * `IStateSerializer`. Decoding is left to the consumer that knows the * layout of the given {@link contractType}. **/ serializedParams?: Hex; /** * Result of the token's `isExpired()` call, when it implements it * (e.g. Pendle PT tokens). Undefined for tokens without this method. **/ isExpired?: boolean; } export type PhantomTokenMeta = SimpleTokenMeta & { contractType: PhantomTokenContractType; }; export interface RWADefaultTokenMeta extends SimpleTokenMeta { contractType: typeof RWA_UNDERLYING_DEFAULT; rwaFactory: Address; asset: Address; } export interface LPMonopolizedPoolMeta { pool: Address; wrappedUnderlying: Address; unwrappedUnderlying: Address; depositAllowance: bigint; claimableAmount: bigint; } export interface RWAOnDemandLPMonopolizedMeta { addr: Address; version: bigint; contractType: typeof RWA_ON_DEMAND_LP_MONOPOLIZED; marketConfigurator: Address; /** * Only this user can deposit into the pool and withdraw * Other users should not see it at all */ depositor: Address; pools: LPMonopolizedPoolMeta[]; } export type RWAOnDemandLPMeta = RWAOnDemandLPMonopolizedMeta; export interface RWAOnDemandTokenMeta extends SimpleTokenMeta { contractType: typeof RWA_UNDERLYING_ON_DEMAND; rwaFactory: Address; asset: Address; pool: Address; marketConfigurator: Address; allowedDepositors: Address[]; liquidityProvider: RWAOnDemandLPMeta; } export type RWATokenMeta = RWADefaultTokenMeta | RWAOnDemandTokenMeta; export type TokenMetaData = SimpleTokenMeta | PhantomTokenMeta | RWATokenMeta; //#endregion export {};