/** * Composition Fragment * * Typed shape of `Vault.composition: CompositionData` (the v0.6+ replacement * for the retired `vaultComposition(walletAddress)` JSONObject query). */ /** * Protocol-level allocation within `Vault.composition`. Sorted by * `repartition` descending in the backend response. */ export interface ProtocolComposition { /** Protocol display name (e.g., "morphoblue", "spark", "Other") */ protocol: string; /** USD value deployed to this protocol */ valueInUsd: number; /** Percentage of total vault value (0–100) */ repartition: number; /** Drill-down for grouped items (currently only used by the "Other" bucket) */ details?: ProtocolComposition[]; /** Protocol logo URL (from Octav) */ logoUrl?: string | null; } /** * Token/position-level allocation within `Vault.composition`. * * Caveat (per live probe May 2026): `contract` and `chainKey` are empty * strings in production, and `symbol`/`name` are human-readable display * strings (e.g., "Spark - reth"), not real ERC20 contracts. Useful for * display but NOT for programmatic cross-referencing. */ export interface TokenComposition { symbol: string; name: string; contract: string; chainKey: string; valueInUsd: number; repartition: number; details?: TokenComposition[]; logoUrl?: string | null; } /** * Top-level shape of `Vault.composition`. `totalValueInUsd` is nullable — * the backend returns null when no Octav data has been fetched yet. */ export interface CompositionData { compositions: ProtocolComposition[]; tokenCompositions: TokenComposition[]; totalValueInUsd: number | null; } /** * GraphQL fragment for the typed CompositionData. Inlined inside a * `vaultByAddress { composition { ... } }` query — NOT a standalone query. */ export declare const COMPOSITION_FRAGMENT = "\n fragment CompositionFragment on CompositionData {\n totalValueInUsd\n compositions {\n protocol\n valueInUsd\n repartition\n logoUrl\n details {\n protocol\n valueInUsd\n repartition\n logoUrl\n }\n }\n tokenCompositions {\n symbol\n name\n contract\n chainKey\n valueInUsd\n repartition\n logoUrl\n details {\n symbol\n name\n contract\n chainKey\n valueInUsd\n repartition\n logoUrl\n }\n }\n }\n"; //# sourceMappingURL=composition.fragment.d.ts.map