import type { TProcessAddress } from '@flux/shared/types';
import { GlobalRPCClient2 } from '../routing/rpc/core/global-rpc-client.class';
import { type TRPCResponseCallbackFunction, RPCClient } from '@flux/shared/ws';
export declare class WebRTCClient extends RPCClient<'createOffer' | 'acceptOffer' | 'acceptAnswer' | 'answerAcceptedByInitiator'> {
    private readonly _originProcessAddress;
    private readonly _sendToRPCServer;
    private readonly _handleResponseMessage;
    constructor(_originProcessAddress: TProcessAddress, _sendToRPCServer: (data: any, // ! Use 'unknown' or Bun.BufferSource (does not work)
    compress?: boolean | undefined) => number, _handleResponseMessage: (fn: TRPCResponseCallbackFunction) => void);
    /**
     * Creates a WebRTC offer.
     *
     * @returns { Promise<unknown> } The WebRTC offer
     */
    createOffer(): Promise<unknown>;
    /**
     * Accepts a WebRTC offer and creates an answer.
     *
     * @param { unknown } offer - The WebRTC offer from remote
     *
     * @returns { Promise<unknown> } The answer
     */
    acceptOfferAndCreateAnswer(offer: unknown): Promise<unknown>;
    /**
     * Accepts a WebRTC answer from the remote client.
     *
     * @param { unknown } answer - The WebRTC answer
     *
     * @returns { Promise<boolean> } True if accepted
     */
    acceptAnswer(answer: unknown): Promise<boolean>;
    /**
     * Notifies the remote client that the answer was accepted.
     *
     * @param { boolean } answerAccepted - Whether the answer was accepted
     *
     * @returns { Promise<boolean> }
     */
    answerWasAccepted(answerAccepted: boolean): Promise<boolean>;
}
export declare class GlobalWebRTCClient extends GlobalRPCClient2<'createOffer' | 'acceptOffer' | 'acceptAnswer' | 'answerAcceptedByInitiator'> {
    /**
     * Creates a WebRTC offer.
     *
     * @returns { Promise<unknown> } The WebRTC offer
     */
    createOffer(): Promise<unknown>;
    /**
     * Accepts a WebRTC offer and creates an answer.
     *
     * @param { unknown } offer - The WebRTC offer from remote
     *
     * @returns { Promise<unknown> } The answer
     */
    acceptOfferAndCreateAnswer(offer: unknown): Promise<unknown>;
    /**
     * Accepts a WebRTC answer from the remote client.
     *
     * @param { unknown } answer - The WebRTC answer
     *
     * @returns { Promise<boolean> } True if accepted
     */
    acceptAnswer(answer: unknown): Promise<boolean>;
    /**
     * Notifies the remote client that the answer was accepted.
     *
     * @param { boolean } answerAccepted - Whether the answer was accepted
     *
     * @returns { Promise<boolean> }
     */
    answerWasAccepted(answerAccepted: boolean): Promise<boolean>;
}
