import { type RequestIdVariables } from 'hono/request-id'; import type { Chain } from 'viem'; import type * as Assets from '../Assets.js'; import type * as Analytics from '../analytics/Analytics.js'; import * as Db from '../db/Db.js'; import type * as Store from '../internal/Store.js'; import * as Response from '../internal/Response.js'; import * as Viem from '../internal/Viem.js'; /** A verified admin identity, as returned by {@link create.Options.identify}. */ export type Identity = { /** The admin's verified email, recorded as `createdBy` on every minted key. */ email: string; }; /** Hono environment for the admin app. */ export type Environment = { Variables: RequestIdVariables & { /** ClickHouse analytics source used by operational usage reads. */ analytics: Analytics.Source; /** Static-asset writer (e.g. the R2 icon bucket), when configured. */ assets: create.Assets | undefined; /** Path where the admin app is mounted. */ basePath: string; /** Authoritative Postgres store, or a per-request factory. Resolve at the leaf with `Db.get`. */ db: Db.Source; /** Gets a Tempo RPC client for a chain id. */ getClient: Viem.GetClient; /** The admin identity, or `null` when unauthenticated (gated routes reject). */ identity: Identity | null; /** KV state store backing API-key records (mint/list/revoke). */ kv: { store: Store.State; }; /** Zone chains available to admin routes. */ zones: readonly Chain[]; }; }; /** The admin portal Hono app. Inferred from {@link create}. */ export type App = ReturnType; /** Creates the admin portal Hono app. */ export declare function create(options: create.Options): import("hono/hono-base").HonoBase | import("hono/types").MergeSchemaPath<{ "/": { $get: { output: { data: { createdAt: string; createdBy: string; entry: string; }[]; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: {}; }; }; } & { "/": { $post: { output: { error: { code: "entry_exists"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { json: { entry: string; }; }; } | { output: { data: { createdAt: string; createdBy: string; entry: string; }; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { json: { entry: string; }; }; }; }; } & { "/": { $delete: { output: { error: { code: "entry_not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { json: { entry: string; }; }; } | { output: { data: { createdAt: string; createdBy: string; entry: string; }; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { json: { entry: string; }; }; }; }; }, "/early-access"> | import("hono/types").MergeSchemaPath<{ "/": { $get: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { query?: { asset?: string | string[]; capability?: string | string[]; chainId?: string | string[]; cursor?: string | string[]; 'engine.type'?: string | string[]; limit?: string | string[]; include?: string | string[]; } | undefined; }; } | { output: { 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; } | undefined; } | undefined; nextCursor: string | null; }; outputFormat: "json"; status: 200; input: { query?: { asset?: string | string[]; capability?: string | string[]; chainId?: string | string[]; cursor?: string | string[]; 'engine.type'?: string | string[]; limit?: string | string[]; include?: string | string[]; } | undefined; }; }; }; } & { "/:vaultId": { $get: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { param: { vaultId: `0x${string}`; }; } & { query?: { chainId?: string | string[]; include?: string | string[]; } | undefined; }; } | { output: { error: { code: "earn_vault_not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { vaultId: `0x${string}`; }; } & { query?: { chainId?: string | string[]; include?: string | string[]; } | undefined; }; } | { output: { 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; }; outputFormat: "json"; status: 200; input: { param: { vaultId: `0x${string}`; }; } & { query?: { chainId?: string | string[]; include?: string | string[]; } | undefined; }; }; }; } & { "/": { $put: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { json: { chainId: unknown; description?: string | null | undefined; label?: string | undefined; privateInputTokens?: `0x${string}`[] | undefined; privateOutputTokens?: `0x${string}`[] | undefined; slug?: string | undefined; vaultAddress: `0x${string}`; zones?: { chainId: unknown; deploymentBlock: number; earnRouter: `0x${string}`; }[] | undefined; }; }; } | { output: { error: { code: "earn_vault_not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { json: { chainId: unknown; description?: string | null | undefined; label?: string | undefined; privateInputTokens?: `0x${string}`[] | undefined; privateOutputTokens?: `0x${string}`[] | undefined; slug?: string | undefined; vaultAddress: `0x${string}`; zones?: { chainId: unknown; deploymentBlock: number; earnRouter: `0x${string}`; }[] | undefined; }; }; } | { output: { error: { code: "body_invalid"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 400; input: { json: { chainId: unknown; description?: string | null | undefined; label?: string | undefined; privateInputTokens?: `0x${string}`[] | undefined; privateOutputTokens?: `0x${string}`[] | undefined; slug?: string | undefined; vaultAddress: `0x${string}`; zones?: { chainId: unknown; deploymentBlock: number; earnRouter: `0x${string}`; }[] | undefined; }; }; } | { output: { error: { code: "earn_vault_verification_failed"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { json: { chainId: unknown; description?: string | null | undefined; label?: string | undefined; privateInputTokens?: `0x${string}`[] | undefined; privateOutputTokens?: `0x${string}`[] | undefined; slug?: string | undefined; vaultAddress: `0x${string}`; zones?: { chainId: unknown; deploymentBlock: number; earnRouter: `0x${string}`; }[] | undefined; }; }; } | { output: { 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; }; outputFormat: "json"; status: 200; input: { json: { chainId: unknown; description?: string | null | undefined; label?: string | undefined; privateInputTokens?: `0x${string}`[] | undefined; privateOutputTokens?: `0x${string}`[] | undefined; slug?: string | undefined; vaultAddress: `0x${string}`; zones?: { chainId: unknown; deploymentBlock: number; earnRouter: `0x${string}`; }[] | undefined; }; }; }; }; } & { "/:vaultId": { $delete: { output: null; outputFormat: "body"; status: 204; input: { param: { vaultId: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; } | { output: { error: { code: "earn_vault_not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { vaultId: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; }; }; }, "/earn/verified-vaults"> | import("hono/types").MergeSchemaPath<{ "/backfill": { $post: { output: { indexed: number; scanned: number; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: {}; }; }; } & { "/": { $post: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { json: { allowedIps?: readonly string[] | undefined; billingActive?: boolean | undefined; environment?: "production" | "sandbox" | undefined; projectId?: string | undefined; rateLimits?: Record | undefined; orgId?: string | undefined; expiresAt?: string | undefined; name: string; scopes: readonly ("*" | "data:read" | "funding:read" | "funding:write" | "indexer:query" | "management:read" | "management:write" | "mpp:write" | "rpc-relay:read" | "rpc-relay:sponsor" | "webhooks:read" | "webhooks:write" | `zone:${number}:read` | `zone:${number}:write`)[]; }; }; } | { output: { error: { code: "not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { json: { allowedIps?: readonly string[] | undefined; billingActive?: boolean | undefined; environment?: "production" | "sandbox" | undefined; projectId?: string | undefined; rateLimits?: Record | undefined; orgId?: string | undefined; expiresAt?: string | undefined; name: string; scopes: readonly ("*" | "data:read" | "funding:read" | "funding:write" | "indexer:query" | "management:read" | "management:write" | "mpp:write" | "rpc-relay:read" | "rpc-relay:sponsor" | "webhooks:read" | "webhooks:write" | `zone:${number}:read` | `zone:${number}:write`)[]; }; }; } | { output: { allowedIps: readonly string[]; billingActive?: boolean | undefined; environment: "production" | "sandbox"; id: string; name?: string | undefined; orgId: string; projectId?: string | undefined; rateLimits?: { [x: string]: { limit: number; period: "minute" | "second"; }; } | undefined; scopes: readonly string[]; createdAt: string; createdBy?: string | undefined; expiresAt?: string | undefined; tokenLast4: string; token: string; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { json: { allowedIps?: readonly string[] | undefined; billingActive?: boolean | undefined; environment?: "production" | "sandbox" | undefined; projectId?: string | undefined; rateLimits?: Record | undefined; orgId?: string | undefined; expiresAt?: string | undefined; name: string; scopes: readonly ("*" | "data:read" | "funding:read" | "funding:write" | "indexer:query" | "management:read" | "management:write" | "mpp:write" | "rpc-relay:read" | "rpc-relay:sponsor" | "webhooks:read" | "webhooks:write" | `zone:${number}:read` | `zone:${number}:write`)[]; }; }; }; }; } & { "/": { $get: { output: { data: { allowedIps: readonly string[]; billingActive?: boolean | undefined; environment: "production" | "sandbox"; id: string; name?: string | undefined; orgId: string; projectId?: string | undefined; rateLimits?: { [x: string]: { limit: number; period: "minute" | "second"; }; } | undefined; scopes: readonly string[]; createdAt: string; createdBy?: string | undefined; expiresAt?: string | undefined; tokenLast4: string; createdByLabel: string | null; organizationName: string | null; projectName: string | null; }[]; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { query?: { orgId?: string | string[]; } | undefined; }; }; }; } & { "/:id": { $delete: { output: { error: { code: "not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { id: string; }; }; } | { output: { id: string; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { param: { id: string; }; }; }; }; } & { "/:id/rotate": { $post: { output: { error: { code: "not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { id: string; }; }; } | { output: { allowedIps: readonly string[]; billingActive?: boolean | undefined; environment: "production" | "sandbox"; id: string; name?: string | undefined; orgId: string; projectId?: string | undefined; rateLimits?: { [x: string]: { limit: number; period: "minute" | "second"; }; } | undefined; scopes: readonly string[]; createdAt: string; createdBy?: string | undefined; expiresAt?: string | undefined; tokenLast4: string; token: string; }; outputFormat: "json"; status: 200; input: { param: { id: string; }; }; }; }; } & { "/:id": { $patch: { output: { error: { code: "not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { id: string; }; } & { json: { allowedIps?: readonly string[] | undefined; name?: string | undefined; orgId?: string | undefined; projectId?: string | undefined; }; }; } | { output: { error: { code: "organization_already_assigned"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { param: { id: string; }; } & { json: { allowedIps?: readonly string[] | undefined; name?: string | undefined; orgId?: string | undefined; projectId?: string | undefined; }; }; } | { output: { allowedIps: readonly string[]; billingActive?: boolean | undefined; environment: "production" | "sandbox"; id: string; name?: string | undefined; orgId: string; projectId?: string | undefined; rateLimits?: { [x: string]: { limit: number; period: "minute" | "second"; }; } | undefined; scopes: readonly string[]; createdAt: string; createdBy?: string | undefined; expiresAt?: string | undefined; tokenLast4: string; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { param: { id: string; }; } & { json: { allowedIps?: readonly string[] | undefined; name?: string | undefined; orgId?: string | undefined; projectId?: string | undefined; }; }; }; }; }, "/api-keys"> | import("hono/types").MergeSchemaPath<{ "/": { $get: { output: { data: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; id: string; }[]; version: string | null; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { query: { chainId: string | string[]; }; }; }; }; } & { "/": { $post: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { json: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; chainId: unknown; logo?: string | undefined; }; }; } | { output: { error: { code: "verified_token_not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { json: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; chainId: unknown; logo?: string | undefined; }; }; } | { output: { error: { code: "assets_not_enabled"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { json: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; chainId: unknown; logo?: string | undefined; }; }; } | { output: { data: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; id: string; }; version: string; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { json: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; chainId: unknown; logo?: string | undefined; }; }; } | { output: { error: { code: string; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 400 | 413 | 415; input: { json: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; chainId: unknown; logo?: string | undefined; }; }; } | { output: { error: { code: "duplicate_address"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { json: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; chainId: unknown; logo?: string | undefined; }; }; } | { output: { error: { code: "duplicate_symbol"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { json: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; chainId: unknown; logo?: string | undefined; }; }; } | { output: { error: { code: "version_mismatch"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 412; input: { json: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; chainId: unknown; logo?: string | undefined; }; }; }; }; } & { "/": { $put: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { query: { chainId: string | string[]; }; } & { json: { tokens: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; }[]; }; }; } | { output: { error: { code: "verified_token_not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { query: { chainId: string | string[]; }; } & { json: { tokens: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; }[]; }; }; } | { output: { error: { code: string; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 400 | 413 | 415; input: { query: { chainId: string | string[]; }; } & { json: { tokens: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; }[]; }; }; } | { output: { error: { code: "duplicate_address"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { query: { chainId: string | string[]; }; } & { json: { tokens: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; }[]; }; }; } | { output: { error: { code: "duplicate_symbol"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { query: { chainId: string | string[]; }; } & { json: { tokens: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; }[]; }; }; } | { output: { error: { code: "version_mismatch"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 412; input: { query: { chainId: string | string[]; }; } & { json: { tokens: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; }[]; }; }; } | { output: { data: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; id: string; }[]; version: string; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { query: { chainId: string | string[]; }; } & { json: { tokens: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; }[]; }; }; }; }; } & { "/:address": { $patch: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; } & { json: { currency?: string | undefined; decimals?: number | undefined; logoUri?: string | undefined; name?: string | undefined; symbol?: string | undefined; }; }; } | { output: { error: { code: "verified_token_not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; } & { json: { currency?: string | undefined; decimals?: number | undefined; logoUri?: string | undefined; name?: string | undefined; symbol?: string | undefined; }; }; } | { output: { data: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; id: string; }; version: string; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; } & { json: { currency?: string | undefined; decimals?: number | undefined; logoUri?: string | undefined; name?: string | undefined; symbol?: string | undefined; }; }; } | { output: { error: { code: string; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 400 | 413 | 415; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; } & { json: { currency?: string | undefined; decimals?: number | undefined; logoUri?: string | undefined; name?: string | undefined; symbol?: string | undefined; }; }; } | { output: { error: { code: "duplicate_address"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; } & { json: { currency?: string | undefined; decimals?: number | undefined; logoUri?: string | undefined; name?: string | undefined; symbol?: string | undefined; }; }; } | { output: { error: { code: "duplicate_symbol"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; } & { json: { currency?: string | undefined; decimals?: number | undefined; logoUri?: string | undefined; name?: string | undefined; symbol?: string | undefined; }; }; } | { output: { error: { code: "version_mismatch"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 412; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; } & { json: { currency?: string | undefined; decimals?: number | undefined; logoUri?: string | undefined; name?: string | undefined; symbol?: string | undefined; }; }; }; }; } & { "/:address": { $delete: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; } | { output: { error: { code: "verified_token_not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; } | { output: { error: { code: string; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 400 | 413 | 415; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; } | { output: { error: { code: "duplicate_address"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; } | { output: { error: { code: "duplicate_symbol"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; } | { output: { error: { code: "version_mismatch"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 412; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; } | { output: { version: string; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; }; }; } & { "/:address/logo": { $get: { output: ArrayBuffer; outputFormat: "body"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; } | { output: { error: { code: "logo_not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; }; }; } & { "/:address/logo": { $put: { output: { error: { code: "body_invalid"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 400; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; } | { output: { error: { code: "assets_not_enabled"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; } | { output: { error: { code: "unsupported_media_type"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 415; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; } | { output: { error: { code: "payload_too_large"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 413; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; } | { output: { key: string; path: string; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { param: { address: `0x${string}`; }; } & { query: { chainId: string | string[]; }; }; }; }; } & { "/requests": { $get: { output: { data: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; chainId: number; createdAt: string; id: string; logo?: string | undefined; note: string | null; orgId: string; requestedBy: string; reviewNote: string | null; reviewedAt: string | null; status: "approved" | "denied" | "pending"; updatedAt: string; orgName: string | null; reviewedBy: string | null; }[]; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { query?: { status?: string | string[]; } | undefined; }; }; }; } & { "/requests/:requestId/approve": { $post: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { param: { requestId: string; }; }; } | { output: { error: { code: "verified_token_not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { requestId: string; }; }; } | { output: { error: { code: "request_not_pending"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { param: { requestId: string; }; }; } | { output: { error: { code: "verified_token_request_not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { requestId: string; }; }; } | { output: { error: { code: "assets_not_enabled"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { requestId: string; }; }; } | { output: { error: { code: string; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 400 | 413 | 415; input: { param: { requestId: string; }; }; } | { output: { error: { code: "duplicate_address"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { param: { requestId: string; }; }; } | { output: { error: { code: "duplicate_symbol"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { param: { requestId: string; }; }; } | { output: { error: { code: "version_mismatch"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 412; input: { param: { requestId: string; }; }; } | { output: { data: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; chainId: number; createdAt: string; id: string; logo?: string | undefined; note: string | null; orgId: string; requestedBy: string; reviewNote: string | null; reviewedAt: string | null; status: "approved" | "denied" | "pending"; updatedAt: string; orgName: string | null; reviewedBy: string | null; }; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { param: { requestId: string; }; }; }; }; } & { "/requests/:requestId/deny": { $post: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { param: { requestId: string; }; } & { json: { reviewNote?: string | undefined; }; }; } | { output: { error: { code: "verified_token_not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { requestId: string; }; } & { json: { reviewNote?: string | undefined; }; }; } | { output: { error: { code: "request_not_pending"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { param: { requestId: string; }; } & { json: { reviewNote?: string | undefined; }; }; } | { output: { error: { code: "verified_token_request_not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { requestId: string; }; } & { json: { reviewNote?: string | undefined; }; }; } | { output: { error: { code: string; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 400 | 413 | 415; input: { param: { requestId: string; }; } & { json: { reviewNote?: string | undefined; }; }; } | { output: { error: { code: "duplicate_address"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { param: { requestId: string; }; } & { json: { reviewNote?: string | undefined; }; }; } | { output: { error: { code: "duplicate_symbol"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 409; input: { param: { requestId: string; }; } & { json: { reviewNote?: string | undefined; }; }; } | { output: { error: { code: "version_mismatch"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 412; input: { param: { requestId: string; }; } & { json: { reviewNote?: string | undefined; }; }; } | { output: { data: { address: `0x${string}`; currency: string; decimals: number; logoUri?: string | undefined; name: string; symbol: string; chainId: number; createdAt: string; id: string; logo?: string | undefined; note: string | null; orgId: string; requestedBy: string; reviewNote: string | null; reviewedAt: string | null; status: "approved" | "denied" | "pending"; updatedAt: string; orgName: string | null; reviewedBy: string | null; }; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; input: { param: { requestId: string; }; } & { json: { reviewNote?: string | undefined; }; }; }; }; }, "/verified-tokens"> | import("hono/types").MergeSchemaPath<{ "/": { $get: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { query?: { cursor?: string | string[]; limit?: string | string[]; query?: string | string[]; } | undefined; }; } | { output: { data: { createdAt: string; createdBy: string | null; id: string; name: string; updatedAt: string; userId: string | null; memberCount: number; projectCount: number; }[]; nextCursor: string | null; }; outputFormat: "json"; status: 200; input: { query?: { cursor?: string | string[]; limit?: string | string[]; query?: string | string[]; } | undefined; }; }; }; } & { "/:orgId": { $get: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { param: { orgId: string; }; }; } | { output: { error: { code: "not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { orgId: string; }; }; } | { output: { createdAt: string; createdBy: string | null; id: string; name: string; updatedAt: string; userId: string | null; memberCount: number; projectCount: number; billing: { enabledSources: ("stripe" | "tempo")[]; production: { settings: { currency: "usd"; period: "month"; spendLimit: string | null; txFeeLimit: string | null; updatedAt: string; } | null; source: { status: "active" | "canceled" | "none" | "past_due"; stripeCustomerId: string; updatedAt: string; } | null; }; sandbox: { settings: { currency: "usd"; period: "month"; spendLimit: string | null; txFeeLimit: string | null; updatedAt: string; } | null; source: { status: "active" | "canceled" | "none" | "past_due"; stripeCustomerId: string; updatedAt: string; } | null; }; }; sponsorshipSubsidy: { durationDays: 90 | null; projectSpendLimit: string | null; }; }; outputFormat: "json"; status: 200; input: { param: { orgId: string; }; }; }; }; } & { "/:orgId/sponsorship": { $put: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { param: { orgId: string; }; } & { json: { enabled: true; projectSpendLimit?: string | undefined; } | { enabled: false; }; }; } | { output: { error: { code: "not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { orgId: string; }; } & { json: { enabled: true; projectSpendLimit?: string | undefined; } | { enabled: false; }; }; } | { output: { durationDays: 90 | null; projectSpendLimit: string | null; }; outputFormat: "json"; status: 200; input: { param: { orgId: string; }; } & { json: { enabled: true; projectSpendLimit?: string | undefined; } | { enabled: false; }; }; }; }; } & { "/:orgId/billing-sources/:source": { $put: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { param: { orgId: string; source: "stripe" | "tempo"; }; }; } | { output: { error: { code: "not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { orgId: string; source: "stripe" | "tempo"; }; }; } | { output: { data: ("stripe" | "tempo")[]; }; outputFormat: "json"; status: 200; input: { param: { orgId: string; source: "stripe" | "tempo"; }; }; }; }; } & { "/:orgId/billing-sources/:source": { $delete: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { param: { orgId: string; source: "stripe" | "tempo"; }; }; } | { output: { error: { code: "not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { orgId: string; source: "stripe" | "tempo"; }; }; } | { output: { data: ("stripe" | "tempo")[]; }; outputFormat: "json"; status: 200; input: { param: { orgId: string; source: "stripe" | "tempo"; }; }; }; }; } & { "/:orgId/members": { $get: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { param: { orgId: string; }; } & { query?: { cursor?: string | string[]; limit?: string | string[]; } | undefined; }; } | { output: { error: { code: "not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { orgId: string; }; } & { query?: { cursor?: string | string[]; limit?: string | string[]; } | undefined; }; } | { output: { data: { address: string | null; createdAt: string; email: string | null; role: "admin" | "member" | "owner"; updatedAt: string; userId: string; }[]; nextCursor: string | null; }; outputFormat: "json"; status: 200; input: { param: { orgId: string; }; } & { query?: { cursor?: string | string[]; limit?: string | string[]; } | undefined; }; }; }; } & { "/:orgId/projects": { $get: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { param: { orgId: string; }; } & { query?: { cursor?: string | string[]; limit?: string | string[]; } | undefined; }; } | { output: { error: { code: "not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { orgId: string; }; } & { query?: { cursor?: string | string[]; limit?: string | string[]; } | undefined; }; } | { output: { data: { createdAt: string; id: string; name: string; updatedAt: string; }[]; nextCursor: string | null; }; outputFormat: "json"; status: 200; input: { param: { orgId: string; }; } & { query?: { cursor?: string | string[]; limit?: string | string[]; } | undefined; }; }; }; } & { "/:orgId/api-keys": { $get: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { param: { orgId: string; }; }; } | { output: { error: { code: "not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { orgId: string; }; }; } | { output: { data: { allowedIps: readonly string[]; billingActive?: boolean | undefined; environment: "production" | "sandbox"; id: string; name?: string | undefined; orgId: string; projectId?: string | undefined; rateLimits?: { [x: string]: { limit: number; period: "minute" | "second"; }; } | undefined; scopes: readonly string[]; createdAt: string; createdBy?: string | undefined; expiresAt?: string | undefined; tokenLast4: string; }[]; }; outputFormat: "json"; status: 200; input: { param: { orgId: string; }; }; }; }; } & { "/:orgId/usage": { $get: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { param: { orgId: string; }; } & { query?: { period?: string | string[]; } | undefined; }; } | { output: { error: { code: "not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { orgId: string; }; } & { query?: { period?: string | string[]; } | undefined; }; } | { output: { byError: { code: string; requests: number; }[]; byRoute: { errors: number; requests: number; averageDurationMs: number; route: string; }[]; byStatus: { requests: number; status: number; }[]; from: string; period: "24h" | "30d" | "7d"; to: string; totals: { errors: number; requests: number; averageDurationMs: number; }; }; outputFormat: "json"; status: 200; input: { param: { orgId: string; }; } & { query?: { period?: string | string[]; } | undefined; }; }; }; } & { "/:orgId/sponsorship": { $get: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { param: { orgId: string; }; }; } | { output: { error: { code: "not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { orgId: string; }; }; } | { output: { production: { committedSpend: string; currency: "usd"; from: string; period: "month"; }; sandbox: { committedSpend: string; currency: "usd"; from: string; period: "month"; }; to: string; }; outputFormat: "json"; status: 200; input: { param: { orgId: string; }; }; }; }; } & { "/:orgId/webhooks": { $get: { output: { error: { code: "upstream_error"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 502; input: { param: { orgId: string; }; }; } | { output: { error: { code: "not_found"; details?: readonly Response.error.Detail[] | undefined; message: string; }; requestId: string; }; outputFormat: "json"; status: 404; input: { param: { orgId: string; }; }; } | { output: { failureCount: number; failures: { attempt: number; createdAt: string; error: string | null; id: string; responseStatus: number | null; subscriptionId: string; }[]; failuresTruncated: boolean; from: string; subscriptions: { chainId: number; createdAt: string; destination: string; eventType: string; failureCount: number; id: string; lastDeliveryAt: string | null; status: "active" | "disabled" | "paused"; }[]; to: string; }; outputFormat: "json"; status: 200; input: { param: { orgId: string; }; }; }; }; }, "/organizations"> | { "/config.json": { $get: { output: { auth: { identity: { email: string; } | null; loginUrl?: string | undefined; logoutUrl?: string | undefined; }; }; outputFormat: "json"; status: 200; input: {}; }; }; }, "/", "/config.json">; export declare namespace create { /** * Static-asset store for the deployment (e.g. `Assets.cloudflareR2(...)`, * shared with the main API). Keyed `/`; `get` enables logo * previews, `put` enables logo uploads. */ type Assets = Assets.Assets; /** Options for {@link create}. */ type Options = { /** ClickHouse analytics source used by operational usage reads. */ analytics: Analytics.Source; /** * Static-asset writer for logo uploads (shared with the main API's `assets` * loader) to enable `PUT /verified-tokens/:address/logo`; omit for `404`. */ assets?: Assets | undefined; /** * Authoritative Postgres store shared with the main API. Pass a long-lived * `Db.postgres(...)` singleton on Node, or a factory * (`() => Db.postgres(...)`) on Workers. */ db: Db.Source; /** * Extracts the verified admin identity from a request, or `null` to deny. * Must only return an identity for an already-authenticated request (a * verified Access JWT, or a header set by a trusted proxy). */ identify: (request: Request) => Identity | null | Promise; /** * KV state store backing API-key records (shared with the main API's * `kv` option), provisioned against by the `/api-keys` routes. */ kv: { store: Store.State; }; /** Tempo RPC options used by onchain verification. */ rpc?: Viem.getClient.Rpc | undefined; /** * Admin UI options, or `false` to disable the bundled UI (JSON API only). * `loginUrl`/`logoutUrl` are surfaced in `GET /config.json`. */ ui?: Ui | false | undefined; /** Zone chains available to admin routes. Pass true to use the hosted Zone list. */ zones?: true | readonly Chain[] | undefined; }; /** Admin UI options surfaced to the SPA via `GET /config.json`. */ type Ui = { /** Where the deployer's sign-in page lives; shown by the UI on a `401`. */ loginUrl?: string | undefined; /** Where to send the user to sign out (e.g. Cloudflare Access logout). */ logoutUrl?: string | undefined; }; } //# sourceMappingURL=App.d.ts.map