/** * routes/relay.ts, the handlers behind `relay.reachability.get` and * `relay.pairing.mint`. * * Both read the SAME controller the facade's `getRelayReachability()` hands * back, so an in-process surface and a client over the wire cannot disagree * about whether the relay is up. The controller is composed at start and torn * down at stop, so it is genuinely absent some of the time; absence is reported * as `disabled`, which is what a daemon with no relay controller is. */ import type { GatewayMethodCatalog } from '../method-catalog.js'; import type { GatewayMethodHandler } from '../method-catalog-shared.js'; /** The controller surface these verbs need, declared rather than imported whole. */ export interface RelayReachabilityService { readonly status: string; mintPairing(): Promise; } /** * How the verbs reach the controller. A FUNCTION, not the controller itself: * the daemon builds one at start and drops it at stop, so a handler holding the * instance would keep answering for a relay that is no longer running. */ export type RelayReachabilityAccessor = () => RelayReachabilityService | null; export declare function createRelayReachabilityHandler(accessor: RelayReachabilityAccessor): GatewayMethodHandler; export declare function createRelayPairingMintHandler(accessor: RelayReachabilityAccessor): GatewayMethodHandler; /** Every verb this module owns. */ export declare const RELAY_METHOD_IDS: readonly string[]; export declare function registerRelayGatewayMethods(catalog: GatewayMethodCatalog, accessor: RelayReachabilityAccessor): void; //# sourceMappingURL=relay.d.ts.map