import type { RosTransport } from "../transport.js"; import type { ConnectionStatus, ConnectionHandler, Subscription, PublishOptions, SubscribeOptions, ServiceCallOptions, ServiceCallResult, ActionGoalOptions, ActionResult, TopicInfo, ServiceInfo, ActionInfo, MessageHandler, RTCIceServerConfig } from "../types.js"; export interface WebRTCTransportOptions { /** WebSocket URL of the signaling server (e.g., wss://signal-host). */ signalingUrl: string; /** REST API URL of the signaling server (e.g., https://signal-host). */ apiUrl: string; /** Target robot's ID on the signaling server. */ robotId: string; /** Robot key secret — validated by the robot, not the signaling server. */ robotKey: string; /** STUN/TURN server configuration. */ iceServers?: RTCIceServerConfig[]; } /** * Mode C transport: WebRTC data channel for cloud/remote deployments. * * The frontend (this class) acts as the answering peer: * 1. POST /api/robots/{robotId}/connect → get session_id, room_id * 2. Open signaling WebSocket → JOIN_ROOM * 3. Wait for robot's SDP offer * 4. Create RTCPeerConnection, set remote description, create answer * 5. Exchange ICE candidates * 6. Data channel opens → rosbridge JSON over WebRTC */ export declare class WebRTCTransport implements RosTransport { private options; private signaling; private ndc; private pc; private dataChannel; private status; private connectionHandlers; private topicHandlers; private pendingRequests; private idCounter; private sessionId; private roomId; private peerId; private robotPeerId; constructor(options: WebRTCTransportOptions); connect(): Promise; disconnect(): Promise; getStatus(): ConnectionStatus; onConnection(handler: ConnectionHandler): () => void; publish(options: PublishOptions): void; subscribe(options: SubscribeOptions, handler: MessageHandler): Subscription; callService(options: ServiceCallOptions): Promise; sendActionGoal(options: ActionGoalOptions): Promise; cancelActionGoal(action: string): Promise; listTopics(): Promise; listServices(): Promise; listActions(): Promise; private nextId; private setStatus; private sendOverDataChannel; private registerPending; private resolvePending; /** Handle incoming rosbridge JSON from the data channel. */ private handleDataChannelMessage; /** Handle signaling messages during connection setup. */ private handleSignalingMessage; /** Handle SDP offer from the robot and create an answer. */ private handleOffer; private cleanup; private rejectAllPending; } //# sourceMappingURL=transport.d.ts.map