import type { WebServer, ProtocolMap, HTTPRoute } from './index.ts'; import type { ComponentLogger } from '@libp2p/interface'; import type { Registrar } from '@libp2p/interface-internal'; export interface HTTPRegistrarComponents { logger: ComponentLogger; registrar: Registrar; } export interface HTTPRegistrarInit { server?: WebServer; } export declare class HTTPRegistrar { private readonly log; private readonly components; private protocols; private readonly endpoint?; constructor(components: HTTPRegistrarComponents, init?: HTTPRegistrarInit); start(): Promise; stop(): Promise; private onStream; canHandle(req: { url?: string; }): boolean; onRequest(request: Request): Promise; onWebSocket(ws: WebSocket): void; private findHandler; handle(protocol: string, route: HTTPRoute): void; unhandle(protocol: string): void; getProtocolMap(): ProtocolMap; } //# sourceMappingURL=registrar.d.ts.map