import type { Address, Chain } from 'viem'; import * as z from 'zod/mini'; import * as Viem from './Viem.js'; /** Zod schemas owned by the Earn vault resolver. */ export declare namespace schema { /** Schema selecting one onchain Earn vault. */ const ResolveInput: z.ZodMiniObject<{ chainId: z.ZodMiniPipe, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>; vaultAddress: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; }, z.core.$strict>; /** Schema for one curated Earn route through a private Zone. */ const ZoneRoute: z.ZodMiniObject<{ chainId: z.ZodMiniPipe, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>; deploymentBlock: z.ZodMiniNumber; earnRouter: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; }, z.core.$strict>; /** Schema for live state resolved from one Earn vault. */ const Discovery: z.ZodMiniObject<{ access: z.ZodMiniOptional; }, z.core.$strict>>; assetToken: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; name: z.ZodMiniString; symbol: z.ZodMiniString; }, z.core.$strict>; capabilities: z.ZodMiniOptional; boundedRedeem: z.ZodMiniBoolean; deposit: z.ZodMiniBoolean; exactWithdraw: z.ZodMiniBoolean; inKindDeposit: z.ZodMiniBoolean; privateRouting: z.ZodMiniBoolean; redeem: z.ZodMiniBoolean; routerSwaps: z.ZodMiniBoolean; }, z.core.$strict>>; chainId: z.ZodMiniPipe, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>; engine: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; type: z.ZodMiniNullable>; venue: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; }, z.core.$strict>; instantLiquidity: z.ZodMiniNullable>; sharePrice: z.ZodMiniNullable>; shareToken: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; name: z.ZodMiniString; symbol: z.ZodMiniString; }, z.core.$strict>; state: z.ZodMiniObject<{ depositsPaused: z.ZodMiniBoolean; engineShares: z.ZodMiniString; feesActive: z.ZodMiniBoolean; isAccountingAligned: z.ZodMiniBoolean; openRedeemRequestCount: z.ZodMiniNumber; totalAssets: z.ZodMiniString; totalEarnShares: z.ZodMiniString; }, z.core.$strict>; vaultAddress: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; }, z.core.$strict>; } /** Live state resolved from an Earn vault. */ export type Discovery = z.output; /** Onchain identity of an Earn vault. */ export type ResolveInput = z.output; /** Curated Earn route through one private Zone. */ export type ZoneRoute = z.output; /** Curated Zone route with immutable router bindings resolved onchain. */ export type ResolvedZoneRoute = ZoneRoute & { /** Tokens accepted by private deposits. */ inputTokens: readonly Address[]; /** Configured private Zone name. */ name: string; /** Tokens returned by private redemptions. */ outputTokens: readonly Address[]; }; /** Adds capabilities proven by a verified private Zone route. */ export declare function addZoneRouteCapabilities(capabilities: NonNullable): NonNullable; /** Derives a Zone ID from any supported Zone chain-ID scheme. */ export declare function deriveZoneId(chainId: number): number; /** Stable code describing an onchain verification issue. */ export type VerificationIssueCode = 'chain-mismatch' | 'engine-asset-mismatch' | 'policy-unsupported' | 'read-failed' | 'zone-deployment-block-mismatch' | 'zone-flow-unsupported' | 'zone-id-mismatch' | 'zone-router-invalid' | 'zone-share-mismatch' | 'zone-vault-asset-mismatch' | 'zone-vault-mismatch'; /** One onchain verification issue. */ export type VerificationIssue = { /** Observed value, when available. */ actual?: string | undefined; /** Stable machine-readable issue code. */ code: VerificationIssueCode; /** Expected value, when available. */ expected?: string | undefined; /** Human-readable issue detail. */ message: string; }; /** Token and vault state observed during verification. */ export type VerificationSnapshot = { /** Asset token observed onchain. */ assetToken?: Discovery['assetToken'] | undefined; /** Whether vault supply matches its engine backing. */ isSynced?: boolean | undefined; /** Share token observed onchain. */ shareToken?: Discovery['shareToken'] | undefined; }; type VerificationMismatch = { /** Issues found while reading the deployment. */ issues: readonly VerificationIssue[]; /** Token and vault state observed during verification. */ snapshot: VerificationSnapshot; /** Indicates that onchain state is incompatible. */ status: 'mismatch'; }; type VerificationUnavailable = { /** Issue that prevented verification. */ issues: readonly VerificationIssue[]; /** Indicates that verification could not complete. */ status: 'unavailable'; }; type VerificationFailure = VerificationMismatch | VerificationUnavailable; /** Resolves one Earn vault from its onchain identity. */ export declare function resolve(options: resolve.ProjectedOptions): Promise; /** Resolves every optional Earn vault field. */ export declare function resolve(options: resolve.Options): Promise; export declare namespace resolve { /** Fully resolved Earn vault state. */ type CompleteDiscovery = Discovery & { /** Vault share-token access. */ access: NonNullable; /** Actions supported by the vault. */ capabilities: NonNullable; }; /** Optional onchain fields to resolve. */ type Include = 'access' | 'capabilities'; /** Options for resolving one Earn vault. */ type Options = { /** Resolves the onchain client used to read the vault. */ getClient: Viem.GetClient; /** Chain and vault identity to resolve. */ input: unknown; /** Private zones available to Earn routers. */ zones: readonly Chain[]; }; /** Options for resolving selected optional fields. */ type ProjectedOptions = Options & { /** Optional onchain fields to resolve. */ include: readonly Include[]; }; } /** Resolves and verifies every curated Zone route for one Earn vault. */ export declare function resolveZoneRoutes(options: resolveZoneRoutes.Options): Promise; export declare namespace resolveZoneRoutes { /** Inputs for resolving and verifying curated Zone routes. */ type Options = { /** Live state of the Earn vault bound by every router. */ discovery: Discovery; /** Resolves the parent-chain client used to read each router. */ getClient: Viem.GetClient; /** Curated Zone routes to verify. */ routes: unknown; /** Private Zones configured by the API. */ zones: readonly Chain[]; }; } /** Infers the supported engine type from its capability fingerprint. */ export declare function classifyEngineType(options: classifyEngineType.Options): classifyEngineType.ReturnType; export declare namespace classifyEngineType { /** Capability fingerprint used to classify an engine. */ type Options = { /** Whether queued redemptions are supported. */ asyncRedeem: boolean; /** Whether venue-share deposits are supported. */ inKindDeposit: boolean; }; /** Supported engine type, or null for an unknown fingerprint. */ type ReturnType = 'erc4626' | 'veda' | null; } /** Thrown when an Earn resolver value fails schema validation. */ export declare class InvalidRegistryError extends Error { name: string; } /** Thrown when a requested Earn vault does not exist. */ export declare class NotFoundError extends Error { name: string; } /** Thrown when onchain verification rejects an Earn vault. */ export declare class VerificationError extends Error { /** Failed verification result. */ result: VerificationFailure; constructor(result: VerificationFailure); name: string; } export {}; //# sourceMappingURL=EarnVaults.d.ts.map