import { type Context } from 'hono'; import { type Actions } from 'viem/tempo'; import { type Chain } from 'viem'; import * as z from 'zod/mini'; import type * as App from '../../../App.js'; import * as core_EarnVaults from '../../../db/tables/earnVaults.js'; import * as EarnRates from '../../../internal/EarnRates.js'; import * as EarnVaults from '../../../internal/EarnVaults.js'; import * as Response from '../../../internal/Response.js'; import * as Schema from '../../../internal/Schema.js'; import * as Tidx from '../../../internal/Tidx.js'; import * as FxOracle from '../FxOracle.js'; import * as Tokens from './tokens.js'; import * as Valuation from './valuation.js'; /** Returns the smallest useful live-discovery batch. */ export declare function discoveryBatchLimit(options: discoveryBatchLimit.Options): number; export declare namespace discoveryBatchLimit { /** Inputs controlling one discovery batch. */ type Options = { /** Whether filters can reject resolved candidates. */ filtered: boolean; /** Requested response page size. */ limit: number; /** Compatible matches already collected. */ matches: number; /** Candidates remaining within the scan bound. */ remaining: number; }; } /** Returns whether API-key scopes grant read access to one private Zone. */ export declare function hasZoneAccess(options: hasZoneAccess.Options): boolean; export declare namespace hasZoneAccess { /** Inputs selecting one Zone against an optional API-key scope set. */ type Options = { /** Private Zone chain id. */ chainId: number; /** API-key scopes, absent for every other principal. */ scopes?: readonly string[] | undefined; }; } /** Zod schemas owned by the public Earn-vault resource. */ export declare namespace schema { /** One compatible Earn vault resolved from current chain state. */ const Vault: z.ZodMiniObject<{ access: z.ZodMiniOptional; }, z.core.$strict>>>; apy: z.ZodMiniOptional; net: z.ZodMiniString; window: z.ZodMiniEnum<{ "1d": "1d"; "1h": "1h"; "30d": "30d"; "7d": "7d"; }>; }, z.core.$strict>>>; assetToken: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; id: z.ZodMiniString; logoUri: z.ZodMiniOptional>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniBoolean; }, z.core.$strip>; 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>>>; description: z.ZodMiniNullable>; 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>; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; instantLiquidity: z.ZodMiniNullable>; instantLiquidityValue: z.ZodMiniOptional; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>>>; label: z.ZodMiniString; sharePrice: z.ZodMiniNullable; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>>; shareToken: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; id: z.ZodMiniString; logoUri: z.ZodMiniOptional>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniBoolean; }, z.core.$strip>; slug: z.ZodMiniNullable>; 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>; tvl: z.ZodMiniOptional; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>>>; vaultAddress: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; verified: z.ZodMiniBoolean; zone: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>; inputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; name: z.ZodMiniString; outputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; }, z.core.$strict>>>; zones: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>; deploymentBlock: z.ZodMiniNumber; earnRouter: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; inputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; name: z.ZodMiniString; outputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; }, z.core.$strict>>>; }, z.core.$strict>; /** One registry-curated Earn vault. */ const VerifiedVault: z.ZodMiniObject<{ access: z.ZodMiniOptional; }, z.core.$strict>>>; apy: z.ZodMiniOptional; net: z.ZodMiniString; window: z.ZodMiniEnum<{ "1d": "1d"; "1h": "1h"; "30d": "30d"; "7d": "7d"; }>; }, z.core.$strict>>>; assetToken: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; id: z.ZodMiniString; logoUri: z.ZodMiniOptional>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniBoolean; }, z.core.$strip>; 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>>>; description: z.ZodMiniNullable>; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; instantLiquidity: z.ZodMiniNullable>; instantLiquidityValue: z.ZodMiniOptional; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>>>; label: z.ZodMiniString; sharePrice: z.ZodMiniNullable; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>>; shareToken: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; id: z.ZodMiniString; logoUri: z.ZodMiniOptional>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniBoolean; }, z.core.$strip>; 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>; tvl: z.ZodMiniOptional; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>>>; vaultAddress: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; zone: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>; inputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; name: z.ZodMiniString; outputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; }, z.core.$strict>>>; zones: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>; deploymentBlock: z.ZodMiniNumber; earnRouter: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; inputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; name: z.ZodMiniString; outputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; }, z.core.$strict>>>; engine: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; venue: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; type: z.ZodMiniEnum<{ erc4626: "erc4626"; veda: "veda"; }>; }, z.core.$strict>; slug: z.ZodMiniString; verified: z.ZodMiniLiteral; }, z.core.$strict>; /** Schemas for the getEarnVaults operation. */ namespace getEarnVaults { /** Query parameters for all compatible deployed Earn vaults. */ const Query: z.ZodMiniObject<{ asset: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; capability: z.ZodMiniPipe, z.ZodMiniTransform>, z.ZodMiniArray>>; chainId: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>>; cursor: z.ZodMiniOptional>; 'engine.type': z.ZodMiniOptional>; include: z.ZodMiniPipe, z.ZodMiniTransform>, z.ZodMiniArray>>; limit: z.ZodMiniDefault, z.ZodMiniTransform>>; 'apy.window': z.ZodMiniOptional>; }, z.core.$strict>; /** Paginated list of compatible deployed Earn vaults. */ const Response: z.ZodMiniObject<{ data: z.ZodMiniArray; }, z.core.$strict>>>; apy: z.ZodMiniOptional; net: z.ZodMiniString; window: z.ZodMiniEnum<{ "1d": "1d"; "1h": "1h"; "30d": "30d"; "7d": "7d"; }>; }, z.core.$strict>>>; assetToken: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; id: z.ZodMiniString; logoUri: z.ZodMiniOptional>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniBoolean; }, z.core.$strip>; 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>>>; description: z.ZodMiniNullable>; 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>; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; instantLiquidity: z.ZodMiniNullable>; instantLiquidityValue: z.ZodMiniOptional; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>>>; label: z.ZodMiniString; sharePrice: z.ZodMiniNullable; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>>; shareToken: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; id: z.ZodMiniString; logoUri: z.ZodMiniOptional>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniBoolean; }, z.core.$strip>; slug: z.ZodMiniNullable>; 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>; tvl: z.ZodMiniOptional; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>>>; vaultAddress: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; verified: z.ZodMiniBoolean; zone: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>; inputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; name: z.ZodMiniString; outputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; }, z.core.$strict>>>; zones: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>; deploymentBlock: z.ZodMiniNumber; earnRouter: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; inputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; name: z.ZodMiniString; outputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; }, z.core.$strict>>>; }, z.core.$strict>>; meta: z.ZodMiniOptional; source: z.ZodMiniString; }, z.core.$strip>>; }, z.core.$strip>>; nextCursor: z.ZodMiniNullable>; }, z.core.$strict>; } /** Schemas for the getVerifiedEarnVaults operation. */ namespace getVerifiedEarnVaults { /** Collection query without rates or valuation, for surfaces that cannot measure them. */ const BaseQuery: z.ZodMiniObject<{ asset: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; capability: z.ZodMiniPipe, z.ZodMiniTransform>, z.ZodMiniArray>>; chainId: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>>; cursor: z.ZodMiniOptional>; 'engine.type': z.ZodMiniOptional>; limit: z.ZodMiniDefault, z.ZodMiniTransform>>; include: z.ZodMiniPipe, z.ZodMiniTransform>, z.ZodMiniArray>>; }, z.core.$strict>; /** Query parameters for registry-curated Earn vaults. */ const Query: z.ZodMiniObject<{ asset: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; capability: z.ZodMiniPipe, z.ZodMiniTransform>, z.ZodMiniArray>>; chainId: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>>; cursor: z.ZodMiniOptional>; 'engine.type': z.ZodMiniOptional>; include: z.ZodMiniPipe, z.ZodMiniTransform>, z.ZodMiniArray>>; limit: z.ZodMiniDefault, z.ZodMiniTransform>>; 'apy.window': z.ZodMiniOptional>; }, z.core.$strict>; /** Paginated list of registry-curated Earn vaults. */ const Response: z.ZodMiniObject<{ data: z.ZodMiniArray; }, z.core.$strict>>>; apy: z.ZodMiniOptional; net: z.ZodMiniString; window: z.ZodMiniEnum<{ "1d": "1d"; "1h": "1h"; "30d": "30d"; "7d": "7d"; }>; }, z.core.$strict>>>; assetToken: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; id: z.ZodMiniString; logoUri: z.ZodMiniOptional>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniBoolean; }, z.core.$strip>; 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>>>; description: z.ZodMiniNullable>; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; instantLiquidity: z.ZodMiniNullable>; instantLiquidityValue: z.ZodMiniOptional; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>>>; label: z.ZodMiniString; sharePrice: z.ZodMiniNullable; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>>; shareToken: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; id: z.ZodMiniString; logoUri: z.ZodMiniOptional>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniBoolean; }, z.core.$strip>; 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>; tvl: z.ZodMiniOptional; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>>>; vaultAddress: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; zone: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>; inputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; name: z.ZodMiniString; outputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; }, z.core.$strict>>>; zones: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>; deploymentBlock: z.ZodMiniNumber; earnRouter: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; inputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; name: z.ZodMiniString; outputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; }, z.core.$strict>>>; engine: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; venue: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; type: z.ZodMiniEnum<{ erc4626: "erc4626"; veda: "veda"; }>; }, z.core.$strict>; slug: z.ZodMiniString; verified: z.ZodMiniLiteral; }, z.core.$strict>>; meta: z.ZodMiniOptional; source: z.ZodMiniString; }, z.core.$strip>>; }, z.core.$strip>>; nextCursor: z.ZodMiniNullable>; }, z.core.$strict>; } /** Schemas for the getEarnAddressPositions operation. */ namespace getEarnAddressPositions { /** Path parameters identifying the account. */ const Params: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; }, z.core.$strict>; /** Query parameters for listing an account's earn positions. */ const Query: z.ZodMiniObject<{ chainId: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>>; cursor: z.ZodMiniOptional>; include: z.ZodMiniPipe, z.ZodMiniTransform>, z.ZodMiniArray>>; limit: z.ZodMiniDefault, z.ZodMiniTransform>>; 'valuation.currency': z.ZodMiniOptional, z.ZodMiniTransform>>; verified: z.ZodMiniOptional, z.ZodMiniTransform>>; }, z.core.$strict>; /** Page-level valuation rate provenance. */ const Meta: z.ZodMiniObject<{ valuation: z.ZodMiniOptional; source: z.ZodMiniString; }, z.core.$strip>>; }, z.core.$strip>; /** Paginated list of the account's earn vault positions. */ const Response: z.ZodMiniObject<{ data: z.ZodMiniArray; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>; assetToken: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; id: z.ZodMiniString; logoUri: z.ZodMiniOptional>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniBoolean; }, z.core.$strip>; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; lifetimeCashFlows: z.ZodMiniOptional; totalDeposited: z.ZodMiniString; totalWithdrawn: z.ZodMiniString; }, z.core.$strict>, z.ZodMiniObject<{ status: z.ZodMiniLiteral<"incomplete_history">; }, z.core.$strict>]>>; shareAmount: z.ZodMiniObject<{ amount: z.ZodMiniString; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>; shareToken: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; id: z.ZodMiniString; logoUri: z.ZodMiniOptional>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniBoolean; }, z.core.$strip>; valuation: z.ZodMiniOptional; currency: z.ZodMiniString; }, z.core.$strip>>>; vaultAddress: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; verified: z.ZodMiniBoolean; }, z.core.$strict>>; meta: z.ZodMiniOptional; source: z.ZodMiniString; }, z.core.$strip>>; }, z.core.$strip>>; nextCursor: z.ZodMiniNullable>; }, z.core.$strict>; } /** Schemas for the getEarnVault operation. */ namespace getEarnVault { /** Path parameters identifying one earn vault. */ const Params: z.ZodMiniObject<{ vaultId: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; }, z.core.$strict>; /** Detail query without rates or valuation, for surfaces that cannot measure them. */ const BaseQuery: z.ZodMiniObject<{ chainId: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>>; include: z.ZodMiniPipe, z.ZodMiniTransform>, z.ZodMiniArray>>; }, z.core.$strict>; /** Query parameters selecting the chain containing the vault. */ const Query: z.ZodMiniObject<{ chainId: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>>; include: z.ZodMiniPipe, z.ZodMiniTransform>, z.ZodMiniArray>>; 'apy.window': z.ZodMiniOptional>; }, z.core.$strict>; /** One compatible Earn vault resolved directly from current chain state. */ const Response: z.ZodMiniObject<{ access: z.ZodMiniOptional; }, z.core.$strict>>>; apy: z.ZodMiniOptional; net: z.ZodMiniString; window: z.ZodMiniEnum<{ "1d": "1d"; "1h": "1h"; "30d": "30d"; "7d": "7d"; }>; }, z.core.$strict>>>; assetToken: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; id: z.ZodMiniString; logoUri: z.ZodMiniOptional>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniBoolean; }, z.core.$strip>; 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>>>; description: z.ZodMiniNullable>; 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>; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; instantLiquidity: z.ZodMiniNullable>; instantLiquidityValue: z.ZodMiniOptional; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>>>; label: z.ZodMiniString; sharePrice: z.ZodMiniNullable; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>>; shareToken: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; id: z.ZodMiniString; logoUri: z.ZodMiniOptional>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniBoolean; }, z.core.$strip>; slug: z.ZodMiniNullable>; 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>; tvl: z.ZodMiniOptional; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; }, z.core.$strict>>>; vaultAddress: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; verified: z.ZodMiniBoolean; zone: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>; inputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; name: z.ZodMiniString; outputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; }, z.core.$strict>>>; zones: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>; deploymentBlock: z.ZodMiniNumber; earnRouter: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; inputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; name: z.ZodMiniString; outputTokens: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; }, z.core.$strict>>>; meta: z.ZodMiniOptional; source: z.ZodMiniString; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strict>; } /** Schemas for the getEarnVaultPosition operation. */ namespace getEarnVaultPosition { /** Path parameters identifying the Earn vault and account. */ const Params: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; vaultId: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; }, z.core.$strict>; /** Query parameters selecting the chain containing the vault. */ const Query: z.ZodMiniObject<{ asOf: z.ZodMiniOptional; chainId: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>>; }, z.core.$strict>; /** Current or historical asset and Earn-share state for one account in one vault. */ const Response: z.ZodMiniObject<{ account: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; assetAllowance: z.ZodMiniString; assetBalance: z.ZodMiniString; assetToken: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; shareAllowance: z.ZodMiniString; shareBalance: z.ZodMiniString; shareToken: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; value: z.ZodMiniString; asOf: z.ZodMiniOptional; block: z.ZodMiniOptional; timestamp: z.ZodMiniISODateTime; }, z.core.$strict>>; }, z.core.$strict>; } /** Schemas for the getEarnVaultEarnings operation. */ namespace getEarnVaultEarnings { /** Path parameters identifying the Earn vault and account. */ const Params: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; vaultId: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; }, z.core.$strict>; /** Query parameters selecting the chain containing the vault. */ const Query: z.ZodMiniObject<{ chainId: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>>; period: z.ZodMiniDefault>; }, z.core.$strict>; /** Earnings for one account and period in one Earn vault. */ const Response: z.ZodMiniUnion, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; assetToken: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currentValue: z.ZodMiniString; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; lifetimeEarnings: z.ZodMiniString; totalDeposited: z.ZodMiniString; totalWithdrawn: z.ZodMiniString; period: z.ZodMiniLiteral<"lifetime">; status: z.ZodMiniLiteral<"complete">; }, z.core.$strict>, z.ZodMiniObject<{ account: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; assetToken: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currentValue: z.ZodMiniString; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; activeEarnings: z.ZodMiniString; period: z.ZodMiniLiteral<"active">; status: z.ZodMiniLiteral<"complete">; }, z.core.$strict>, z.ZodMiniObject<{ account: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; assetToken: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currentValue: z.ZodMiniString; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; period: z.ZodMiniLiteral<"30d">; status: z.ZodMiniLiteral<"complete">; windowEarnings: z.ZodMiniString; }, z.core.$strict>, z.ZodMiniObject<{ account: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; assetToken: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currentValue: z.ZodMiniString; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; period: z.ZodMiniEnum<{ "30d": "30d"; active: "active"; lifetime: "lifetime"; }>; status: z.ZodMiniLiteral<"incomplete_cost_basis">; }, z.core.$strict>, z.ZodMiniObject<{ account: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; assetToken: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currentValue: z.ZodMiniString; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; period: z.ZodMiniLiteral<"30d">; status: z.ZodMiniLiteral<"pending_redemption">; }, z.core.$strict>, z.ZodMiniObject<{ account: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; assetToken: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currentValue: z.ZodMiniString; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; period: z.ZodMiniLiteral<"lifetime">; status: z.ZodMiniLiteral<"pending_redemption">; totalDeposited: z.ZodMiniString; totalWithdrawn: z.ZodMiniString; }, z.core.$strict>]>; } } /** Creates the public Earn-vault handlers. */ export declare function earn(options?: earn.Options): import("hono/hono-base").HonoBase; export declare namespace earn { /** Options for the public Earn-vault handlers. */ type Options = { /** FX configuration backing TVL valuation. */ fx?: Valuation.addresses.Fx | undefined; }; } /** Reads one account's indexed value and returns earnings when the history is complete. */ export declare function getVaultEarnings(c: Context, options: getVaultEarnings.Options): Promise<{ account: `0x${string}`; assetToken: `0x${string}`; currentValue: string; id: `0x${string}`; period: "active"; status: 'incomplete_cost_basis'; } | { account: `0x${string}`; assetToken: `0x${string}`; currentValue: string; id: `0x${string}`; period: "active"; activeEarnings: string; status: 'complete'; } | { account: `0x${string}`; assetToken: `0x${string}`; currentValue: string; id: `0x${string}`; period: "lifetime"; status: 'incomplete_cost_basis'; } | { account: `0x${string}`; assetToken: `0x${string}`; currentValue: string; id: `0x${string}`; period: "lifetime"; totalDeposited: string; totalWithdrawn: string; status: 'pending_redemption'; } | { account: `0x${string}`; assetToken: `0x${string}`; currentValue: string; id: `0x${string}`; period: "lifetime"; totalDeposited: string; totalWithdrawn: string; lifetimeEarnings: string; status: 'complete'; } | { account: `0x${string}`; assetToken: `0x${string}`; currentValue: string; id: `0x${string}`; period: "30d"; status: 'incomplete_cost_basis'; } | { account: `0x${string}`; assetToken: `0x${string}`; currentValue: string; id: `0x${string}`; period: "30d"; status: 'pending_redemption'; } | { account: `0x${string}`; assetToken: `0x${string}`; currentValue: string; id: `0x${string}`; period: "30d"; status: 'complete'; windowEarnings: string; }>; /** Calculates cash-flow-adjusted earnings between two position snapshots. */ export declare function calculateWindowEarnings(options: calculateWindowEarnings.Options): bigint; export declare namespace calculateWindowEarnings { /** Asset-denominated values spanning one earnings window. */ type Options = { /** Assets deposited during the window. */ deposited: bigint; /** Asset value of shares held at the ending boundary. */ endingValue: bigint; /** Assets received from async redemptions finalized during the window. */ finalized: bigint; /** Asset value of shares held at the opening boundary. */ openingValue: bigint; /** Assets received from redemptions during the window. */ redeemed: bigint; /** Assets received from exact withdrawals during the window. */ withdrewExact: bigint; }; } export declare namespace getVaultEarnings { /** Inputs identifying the account and vault to calculate. */ type Options = { account: z.output; chainId: z.output; period: z.output['period']; vault: z.output; }; } /** Decodes the indexed head and historical position boundary from TIDX rows. */ export declare function parseIndexedBlockAtOrBefore(options: parseIndexedBlockAtOrBefore.Options): { number: number; timestamp: string; }; export declare namespace parseIndexedBlockAtOrBefore { /** Inputs returned by the historical boundary query. */ type Options = { /** Requested historical observation timestamp. */ asOf: string; /** Indexed head and optional boundary rows. */ rows: readonly Record[]; }; } /** Calculates the asset cost basis attached to an account's remaining Earn shares. */ export declare function calculateActiveCostBasis(options: calculateActiveCostBasis.Options): bigint | undefined; export declare namespace calculateActiveCostBasis { /** One indexed share or cost-basis mutation. */ type Action = { /** Action discriminator. */ kind: 'cancel'; /** Async redemption request being cancelled. */ requestId: string; /** Shares restored to the account. */ shares: bigint; } | { /** Assets added to the account's cost basis. */ assets: bigint; /** Action discriminator. */ kind: 'deposit'; /** Shares issued for the deposit. */ shares: bigint; } | { /** Action discriminator. */ kind: 'redeem'; /** Shares removed from the account. */ shares: bigint; } | { /** Action discriminator. */ kind: 'request'; /** Async redemption request holding the removed basis. */ requestId: string; /** Shares removed from the account. */ shares: bigint; } | { /** Action discriminator. */ kind: 'unknown'; /** Shares received without an asset-denominated cost basis. */ shares: bigint; }; /** Inputs for calculating the remaining cost basis. */ type Options = { /** Indexed mutations in chain order. */ actions: readonly Action[]; /** Share balance read at the same indexed block. */ shareBalance: bigint; }; } /** Lists compatible deployed Earn vaults. */ export declare function listVaults(c: Context, options: listVaults.Options): Promise<{ data: { access?: { status: "allowlisted" | "open"; } | undefined; apy?: { asOf: string; methodology: "share-price-growth-annualized:v1"; net: string; window: "1d" | "1h" | "30d" | "7d"; } | null | undefined; assetToken: { address: `0x${string}`; currency: string; decimals: number; id: string; logoUri?: string | undefined; name: string; symbol: string; verified: boolean; }; capabilities?: { asyncRedeem: boolean; boundedRedeem: boolean; deposit: boolean; exactWithdraw: boolean; inKindDeposit: boolean; privateRouting: boolean; redeem: boolean; routerSwaps: boolean; } | undefined; description: string | null; engine: { address: `0x${string}`; type: "erc4626" | "veda" | null; venue: `0x${string}` | null; }; id: `0x${string}`; instantLiquidity: string | null; instantLiquidityValue?: { amount: string; currency: string; decimals: number; formatted: string; } | null | undefined; label: string; sharePrice: { amount: string; currency: string; decimals: number; formatted: string; } | null; shareToken: { address: `0x${string}`; currency: string; decimals: number; id: string; logoUri?: string | undefined; name: string; symbol: string; verified: boolean; }; slug: string | null; state: { depositsPaused: boolean; engineShares: string; feesActive: boolean; isAccountingAligned: boolean; openRedeemRequestCount: number; totalAssets: string; totalEarnShares: string; }; tvl?: { amount: string; currency: string; decimals: number; formatted: string; } | null | undefined; vaultAddress: `0x${string}`; verified: boolean; zone?: { chainId: number; inputTokens: `0x${string}`[]; name: string; outputTokens: `0x${string}`[]; } | null | undefined; zones?: { chainId: number; deploymentBlock: number; earnRouter: `0x${string}`; inputTokens: `0x${string}`[]; name: string; outputTokens: `0x${string}`[]; }[] | undefined; }[]; meta?: { valuation: { asOf: string; basis: 'nominal'; source: string; }; }; nextCursor: string | null; }>; export declare namespace listVaults { /** One compatible deployment found while scanning TIDX. */ type Match = { discovery: EarnVaults.Discovery; position: Position; record?: RegistryRecord | undefined; zoneRoutes: readonly EarnVaults.ResolvedZoneRoute[]; }; /** Options for listing compatible Earn vaults. */ type Options = z.output & { chainId: z.output; /** FX rate oracle backing TVL valuation. */ oracle: FxOracle.Oracle; }; /** TIDX deployment cursor position. */ type Position = [number, number]; } /** Lists registry-curated Earn vaults. */ export declare function listVerifiedVaults(c: Context, options: listVerifiedVaults.Options): Promise<{ data: { access?: { status: "allowlisted" | "open"; } | undefined; apy?: { asOf: string; methodology: "share-price-growth-annualized:v1"; net: string; window: "1d" | "1h" | "30d" | "7d"; } | null | undefined; assetToken: { address: `0x${string}`; currency: string; decimals: number; id: string; logoUri?: string | undefined; name: string; symbol: string; verified: boolean; }; capabilities?: { asyncRedeem: boolean; boundedRedeem: boolean; deposit: boolean; exactWithdraw: boolean; inKindDeposit: boolean; privateRouting: boolean; redeem: boolean; routerSwaps: boolean; } | undefined; description: string | null; id: `0x${string}`; instantLiquidity: string | null; instantLiquidityValue?: { amount: string; currency: string; decimals: number; formatted: string; } | null | undefined; label: string; sharePrice: { amount: string; currency: string; decimals: number; formatted: string; } | null; shareToken: { address: `0x${string}`; currency: string; decimals: number; id: string; logoUri?: string | undefined; name: string; symbol: string; verified: boolean; }; state: { depositsPaused: boolean; engineShares: string; feesActive: boolean; isAccountingAligned: boolean; openRedeemRequestCount: number; totalAssets: string; totalEarnShares: string; }; tvl?: { amount: string; currency: string; decimals: number; formatted: string; } | null | undefined; vaultAddress: `0x${string}`; zone?: { chainId: number; inputTokens: `0x${string}`[]; name: string; outputTokens: `0x${string}`[]; } | null | undefined; zones?: { chainId: number; deploymentBlock: number; earnRouter: `0x${string}`; inputTokens: `0x${string}`[]; name: string; outputTokens: `0x${string}`[]; }[] | undefined; engine: { address: `0x${string}`; venue: `0x${string}` | null; type: "erc4626" | "veda"; }; slug: string; verified: true; }[]; meta?: { valuation: { asOf: string; basis: 'nominal'; source: string; }; }; nextCursor: string | null; }>; export declare namespace listVerifiedVaults { /** One verified vault and its current onchain state. */ type Match = { discovery: EarnVaults.Discovery; record: RegistryRecord; zoneRoutes: readonly EarnVaults.ResolvedZoneRoute[]; }; /** Options for listing verified Earn vaults. */ type Options = z.output & { chainId: z.output; /** FX rate oracle backing TVL valuation. */ oracle: FxOracle.Oracle; }; } /** Lists every vault where an account holds earn shares, ordered by vault address. */ export declare function listPositions(c: Context, options: listPositions.Options): Promise<{ data: { assetAmount: { amount: string; currency: string; decimals: number; formatted: string; }; assetToken: { address: `0x${string}`; currency: string; decimals: number; id: string; logoUri?: string | undefined; name: string; symbol: string; verified: boolean; }; id: `0x${string}`; lifetimeCashFlows?: { status: "complete"; totalDeposited: string; totalWithdrawn: string; } | { status: "incomplete_history"; }; shareAmount: { amount: string; currency: string; decimals: number; formatted: string; }; shareToken: { address: `0x${string}`; currency: string; decimals: number; id: string; logoUri?: string | undefined; name: string; symbol: string; verified: boolean; }; valuation?: { amount: string; currency: string; } | null; vaultAddress: `0x${string}`; verified: boolean; }[]; meta?: { valuation: { asOf: string; basis: 'nominal'; source: string; }; }; nextCursor: string | null; }>; export declare namespace listPositions { /** One candidate vault holding a non-zero position. */ type Match = { position: Actions.earn.getPosition.ReturnValue; record?: RegistryRecord | undefined; vaultAddress: string; }; /** Options for listing an account's earn positions. */ type Options = z.output & { /** Account whose positions to list. */ address: z.output; chainId: z.output; /** FX rate oracle backing per-row valuation. */ oracle: FxOracle.Oracle; }; } /** Reads complete protocol cash flows for one account and a set of vaults. */ export declare function getVaultLifetimeCashFlows(tidx: Tidx.Client, options: getVaultLifetimeCashFlows.Options): Promise>; export declare namespace getVaultLifetimeCashFlows { /** Lifetime cash-flow state for one vault. */ type CashFlows = NonNullable['data'][number]['lifetimeCashFlows']>; /** Indexed boundary and account whose protocol cash flows are read. */ type Options = { account: z.output; blockNumber: number; vaults: readonly z.output[]; }; } /** Gets one compatible Earn vault. */ export declare function getVault(c: Context, options: getVault.Options): Promise<{ access?: { status: "allowlisted" | "open"; } | undefined; apy?: { asOf: string; methodology: "share-price-growth-annualized:v1"; net: string; window: "1d" | "1h" | "30d" | "7d"; } | null | undefined; assetToken: { address: `0x${string}`; currency: string; decimals: number; id: string; logoUri?: string | undefined; name: string; symbol: string; verified: boolean; }; capabilities?: { asyncRedeem: boolean; boundedRedeem: boolean; deposit: boolean; exactWithdraw: boolean; inKindDeposit: boolean; privateRouting: boolean; redeem: boolean; routerSwaps: boolean; } | undefined; description: string | null; engine: { address: `0x${string}`; type: "erc4626" | "veda" | null; venue: `0x${string}` | null; }; id: `0x${string}`; instantLiquidity: string | null; instantLiquidityValue?: { amount: string; currency: string; decimals: number; formatted: string; } | null | undefined; label: string; sharePrice: { amount: string; currency: string; decimals: number; formatted: string; } | null; shareToken: { address: `0x${string}`; currency: string; decimals: number; id: string; logoUri?: string | undefined; name: string; symbol: string; verified: boolean; }; slug: string | null; state: { depositsPaused: boolean; engineShares: string; feesActive: boolean; isAccountingAligned: boolean; openRedeemRequestCount: number; totalAssets: string; totalEarnShares: string; }; tvl?: { amount: string; currency: string; decimals: number; formatted: string; } | null | undefined; vaultAddress: `0x${string}`; verified: boolean; zone?: { chainId: number; inputTokens: `0x${string}`[]; name: string; outputTokens: `0x${string}`[]; } | null | undefined; zones?: { chainId: number; deploymentBlock: number; earnRouter: `0x${string}`; inputTokens: `0x${string}`[]; name: string; outputTokens: `0x${string}`[]; }[] | undefined; meta?: { valuation: { asOf: string; basis: 'nominal'; source: string; }; }; }>; export declare namespace getVault { /** Options for getting one Earn vault. */ type Options = { /** Canonical rate window the vault's APY covers. */ 'apy.window': z.output['apy.window']; chainId: z.output; include: z.output['include']; /** FX rate oracle backing TVL valuation. */ oracle: FxOracle.Oracle; vaultAddress: z.output; }; } /** Builds an Earn-vault cache key partitioned by Zone-visible API keys. */ export declare function vaultCacheKey(c: Context, query: query): string; /** Serializes resolved onchain and curated fields into the shared vault contract. */ export declare function serializeVault(options: serializeVault.Options): z.output; export declare namespace serializeVault { /** Values used to serialize one resolved Earn vault. */ type Options = { /** Measured rate, or null when unavailable; omitted unless `include` carries `apy`. */ apy: EarnRates.Apy | null; /** Resolved asset token. */ assetToken: z.output; /** Live onchain vault state. */ discovery: EarnVaults.Discovery; /** Optional vault fields selected by the request. */ include: z.output['include']; /** USD value of instant liquidity, or null when unavailable; omitted unless `include` carries `tvl`. */ instantLiquidityValue: z.output['instantLiquidityValue']; /** Curated registry row, when verified. */ record?: core_EarnVaults.Record | undefined; /** Resolved share token. */ shareToken: z.output; /** USD value of the assets, or null when unpriced; omitted unless `include` carries `tvl`. */ tvl: z.output['tvl']; /** Verified Zone routes with immutable router bindings. */ zoneRoutes: readonly EarnVaults.ResolvedZoneRoute[]; /** Private Zones available to the vault. */ zones: readonly Chain[]; }; } /** Tests live vault state against the shared collection filters. */ export declare function matchesVaultFilters(discovery: EarnVaults.Discovery, options: matchesVaultFilters.Options): boolean; export declare namespace matchesVaultFilters { /** Filters shared by the all-vault and verified-vault collections. */ type Options = Pick, 'asset' | 'capability' | 'engine.type'>; } /** Returns whether a failed read proves the address is not a compatible Earn vault. */ export declare function isIncompatible(cause: unknown): boolean; type RegistryRecord = Awaited>[number]; /** Thrown when no compatible Earn vault exists at the requested address. */ export declare class NotFoundError extends Error { name: string; } export {}; //# sourceMappingURL=earn.d.ts.map