import type { HashFunction } from '../../types/index.js'; import type { WebRTCConnectionHandler, WebRTCMessage, WebRTCResponse } from './webrtc-types.js'; /** * To deterministically define which peer is master and * which peer is fork, we compare the storage tokens. * But we have to hash them before, to ensure that * a storageToken like 'aaaaaa' is not always the master * for all peers. */ export declare function isMasterInWebRTCReplication(hashFunction: HashFunction, ownStorageToken: string, otherStorageToken: string): Promise; /** * Send a message to the peer and await the answer. * @throws with an EmptyErrorImpl if the peer connection * was closed before an answer was received. */ export declare function sendMessageAndAwaitAnswer(handler: WebRTCConnectionHandler, peer: PeerType, message: WebRTCMessage): Promise;