/** * Answerer-side WebRTC connection with answer creation and offer processing */ import { RondevuConnection } from './base.js'; import { RondevuAPI, IceCandidate } from '../api/client.js'; import { ConnectionConfig } from './config.js'; import { WebRTCAdapter } from '../webrtc/adapter.js'; export interface AnswererOptions { api: RondevuAPI; ownerPublicKey: string; tags: string[]; offerId: string; offerSdp: string; rtcConfig?: RTCConfiguration; webrtcAdapter?: WebRTCAdapter; config?: Partial; matchedTags?: string[]; /** Callback invoked when RTCPeerConnection is created, before signaling starts */ onPeerConnectionCreated?: (pc: RTCPeerConnection) => void; } /** * Answerer connection - processes offers and creates answers */ export declare class AnswererConnection extends RondevuConnection { private api; private ownerPublicKey; private tags; private offerId; private offerSdp; private matchedTags?; private onPeerConnectionCreated?; constructor(options: AnswererOptions); /** * Initialize the connection by processing offer and creating answer */ initialize(): Promise; /** * Send buffered ICE candidates to the server in a single batch */ protected sendBufferedIceCandidates(candidates: RTCIceCandidate[]): void; /** * Get the API instance */ protected getApi(): any; /** * Get the owner public key (implements abstract method) */ protected getOwnerPublicKey(): string; /** * Answerers accept ICE candidates from offerers only */ protected getIceCandidateRole(): 'offerer' | null; /** * Attempt to reconnect to the same peer */ protected attemptReconnect(): void; /** * Get the offer ID we're answering */ getOfferId(): string; /** * Handle remote ICE candidates received from polling * Called by Rondevu when poll:ice event is received */ handleRemoteIceCandidates(candidates: IceCandidate[]): void; }