/**
 * The class to handling the *calling* side of the RPC.
 */
import { type TAddress } from '@flux/shared/types';
import type { OutgoingMessageRouter } from '../../outgoing-message-router.class';
import type { ProcessMessageRouter } from '../../process-message-router.class';
export declare class GlobalRPCClient<TMethods> {
    private readonly _outgoingMessageRouter;
    private readonly _processMessageRouter;
    private requestId;
    private readonly pendingRequests;
    private readonly processAddress;
    constructor(_outgoingMessageRouter: OutgoingMessageRouter, _processMessageRouter: ProcessMessageRouter);
    /**
     * Calls a function on the other side.
     *
     * @param { TAddress } rpcServerClientAddress - The address of the RPC server client
     * @param { TMethods } method - The method name to call
     * @param { any[] } params - The parameters to pass
     *
     * @returns { Promise<any> } The result from the remote method
     */
    call(rpcServerClientAddress: TAddress, method: TMethods, ...params: any): Promise<any>;
    /**
     * Handles the response from the server.
     *
     * @param { RPCResponse } response - The response from the RPC server
     */
    private handleResponseMessage;
}
export declare class GlobalRPCClient2<TMethods> {
    private readonly _rpcServerClientAddress;
    private readonly _outgoingMessageRouter;
    private readonly _processMessageRouter;
    private requestId;
    private readonly pendingRequests;
    private readonly processAddress;
    constructor(_rpcServerClientAddress: TAddress, _outgoingMessageRouter: OutgoingMessageRouter, _processMessageRouter: ProcessMessageRouter);
    /**
     * Calls a function on the other side.
     *
     * @param { TMethods } method - The method name to call
     * @param { any[] } params - The parameters to pass
     *
     * @returns { Promise<any> } The result from the remote method
     */
    call(method: TMethods, ...params: any): Promise<any>;
    /**
     * Handles the response from the server.
     *
     * @param { RPCResponse } response - The response from the RPC server
     */
    private handleResponseMessage;
}
