import type { RpcRequestGovernor, RpcUsageWindow } from '@origintrail-official/dkg-chain'; import { ethers } from 'ethers'; import type { ResolvedChainConfig } from '../config.js'; import { type RuntimeEvmChainConfig } from '../runtime-chain-config.js'; export interface DaemonRpcEndpointProbe { readonly index: number; readonly role: 'primary' | 'backup'; readonly ok: boolean; readonly status: 'healthy' | 'unhealthy' | 'skipped-local-capacity'; readonly latencyMs: number | null; readonly blockNumber: number | null; readonly error?: string; } /** One bound transport shared by every daemon-owned direct RPC route. */ export interface DaemonRouteRpcTransport { createProvider(rpcUrl: string, rpcUrls?: readonly string[]): ethers.JsonRpcProvider | ethers.FallbackProvider; probeEndpoint(rpcUrl: string, index: number): Promise; } /** Process-owned RPC state assembled once at the daemon composition root. */ export interface DaemonRpcRuntime { readonly governor: RpcRequestGovernor; /** Omitted until the Hub fields required by the EVM adapter are complete. */ readonly chainConfig?: RuntimeEvmChainConfig; readonly routeTransport: DaemonRouteRpcTransport; readonly drainRouteRpcUsage: () => RpcUsageWindow; } export declare function createDaemonRpcRuntime(chain: ResolvedChainConfig | undefined): DaemonRpcRuntime | undefined; //# sourceMappingURL=rpc-runtime.d.ts.map