import { BehaviorSubject, Subject, Subscription } from 'rxjs'; import type { RxCollection, RxError, RxReplicationHandler, RxTypeError } from '../../types/index.js'; import type { WebRTCConnectionHandler, WebRTCPeerState, WebRTCReplicationCheckpoint, RxWebRTCReplicationState, SyncOptionsWebRTC } from './webrtc-types.js'; export declare function replicateWebRTC(options: SyncOptionsWebRTC): Promise>; /** * Because the WebRTC replication runs between many instances, * we use a Pool instead of returning a single replication state. */ export declare class RxWebRTCReplicationPool { readonly collection: RxCollection; readonly options: SyncOptionsWebRTC; readonly connectionHandler: WebRTCConnectionHandler; peerStates$: BehaviorSubject>>; canceled: boolean; masterReplicationHandler: RxReplicationHandler; subs: Subscription[]; error$: Subject; constructor(collection: RxCollection, options: SyncOptionsWebRTC, connectionHandler: WebRTCConnectionHandler); addPeer(peer: PeerType, replicationState?: RxWebRTCReplicationState): void; removePeer(peer: PeerType): void; awaitFirstPeer(): Promise>>; cancel(): Promise; } export * from './webrtc-helper.js'; export * from './signaling-server.js'; export * from './webrtc-types.js'; export * from './connection-handler-simple-peer.js';