import { type ClientFrame, type ServerFrame } from "../protocol/v2/index.js"; import type { RelayClient } from "./relay_client.js"; import { type RouteFrame, type RoutePurpose } from "../vendor/protocol/outer/index.js"; export type { RouteFrame, RoutePurpose } from "../vendor/protocol/outer/index.js"; export type HostRouteIdentity = { deviceId: string; endpointId: string; runtimeInstanceId: string; }; export interface V2Channel { getPeerId(): string; sendV2(msg: ServerFrame): void; detach(): void; } /** * A Host-side protocol-v2 channel for one authorized Owner. The relay * authenticates and injects `source_owner_id` for Owner-to-Host routes; this * channel only accepts routes for its immutable endpoint identity and owner. */ export declare class V2PeerChannel implements V2Channel { private readonly relay; private readonly ownerId; private readonly host; private readonly onMessage; private readonly unsubscribe; constructor(relay: RelayClient, ownerId: string, host: HostRouteIdentity, onMessage: (msg: ClientFrame) => void); getPeerId(): string; sendV2(msg: ServerFrame): boolean; detach(): void; private onLine; private sendUpgradeRequired; } export declare function parseIncomingRoute(line: string, host: HostRouteIdentity, ownerId?: string): RouteFrame | null; export declare function sendRoute(relay: RelayClient, host: HostRouteIdentity, ownerId: string, purpose: RoutePurpose, ct: string): void;