import type { Context } from 'hono'; import * as z from 'zod/mini'; import type * as App from '../../App.js'; import * as Db from '../../db/Db.js'; import * as core_Catalog from '../../db/tables/fundingCatalog.js'; import * as Chain from './Chain.js'; import * as Route from './Route.js'; import * as Token from './Token.js'; /** Funding catalog schemas. */ export declare namespace schema { /** Funding capabilities enabled on one provider route. */ const Capabilities: z.ZodMiniObject<{ depositAddress: z.ZodMiniOptional>; transfer: z.ZodMiniOptional>>; }, z.core.$strip>>; }, z.core.$strip>; /** Provider-specific configuration for one funding route. */ const Configuration: z.ZodMiniRecord, z.ZodMiniUnknown>; /** Complete funding catalog content accepted by the publish boundary. */ const Data: z.ZodMiniObject<{ chainTokens: z.ZodMiniReadonly; chainId: z.ZodMiniString; decimals: z.ZodMiniNumber; name: z.ZodMiniNullable>; standard: z.ZodMiniString; tokenId: z.ZodMiniString; }, z.core.$strip>>>; chains: z.ZodMiniReadonly; parentChainId: z.ZodMiniNullable>; aliases: z.ZodMiniReadonly>>; name: z.ZodMiniString; rpcUrls: z.ZodMiniDefault>>; slug: z.ZodMiniString; }, z.core.$strip>>>; routes: z.ZodMiniReadonly>; transfer: z.ZodMiniOptional>>; }, z.core.$strip>>; }, z.core.$strip>>>; configuration: z.ZodMiniOptional, z.ZodMiniUnknown>>>; destinationChainId: z.ZodMiniString; destinationTokenId: z.ZodMiniString; providerId: z.ZodMiniString; sourceChainId: z.ZodMiniString; sourceTokenId: z.ZodMiniString; }, z.core.$strip>>>; tokens: z.ZodMiniReadonly; id: z.ZodMiniString; name: z.ZodMiniString; symbol: z.ZodMiniString; }, z.core.$strip>>>; }, z.core.$strip>; } /** Funding capabilities enabled on one provider route. */ export type Capabilities = z.output; /** Provider-specific configuration for one funding route. */ export type Configuration = z.output; /** One hydrated provider route in a funding catalog snapshot. */ export type ProviderRoute = { /** Funding capabilities; absent means the route is quote-only. */ capabilities?: Capabilities | undefined; /** Provider-specific route configuration. */ configuration?: Configuration | undefined; /** Funding provider that supports the route. */ providerId: string; /** Hydrated source-to-destination funding route. */ route: Route.Route; }; /** Compiled and indexed funding catalog. */ export type Snapshot = { /** Funding chains indexed by CAIP-2 id, slug, and alias. */ chainsByKey: ReadonlyMap; /** Hydrated provider routes in stable catalog order. */ routes: readonly ProviderRoute[]; /** Hydrated provider routes grouped by provider id. */ routesByProvider: ReadonlyMap; /** Canonical funding tokens indexed by stable id. */ tokensById: ReadonlyMap; /** ISO timestamp of the catalog's last publish. */ updatedAt: string; /** Opaque catalog version. */ version: string; }; /** Compiles stored funding catalog rows into a validated snapshot. */ export declare function compile(rows: core_Catalog.Rows): Snapshot; /** Reads and compiles the current funding catalog from Postgres. */ export declare function read(db: Db.Db): Promise; /** Publishes a complete funding catalog and primes the current isolate. */ export declare function publish(db: Db.Db, input: publish.Input): Promise; export declare namespace publish { /** Complete funding catalog content. */ type Input = z.input; } /** Replaces the current isolate's compiled catalog snapshot. */ export declare function prime(source: Db.Source, snapshot: Snapshot): Snapshot; /** Returns the current funding catalog snapshot with soft background refresh. */ export declare function snapshot(c: Context): Promise; /** Error thrown when funding catalog references cannot be compiled. */ export declare class InvalidCatalogError extends Error { name: string; } //# sourceMappingURL=Catalog.d.ts.map