import { MessageInterface, MessageListener } from '../communication-interface/MessageInterface';
import { DBFactory } from '../db/DBFactory';
declare enum MessageType {
    PAYLOAD = "p",
    LOOKUP = "l",
    LOOKUP_RESULT = "lr",
    GET_ADDRESS = "ga",
    GET_ADDRESS_RESULT = "gar",
    GET_PREKEY = "gp",
    GET_PREKEY_RESULT = "gpr",
    PROXY_MESSAGE = "pm"
}
declare type PayloadMessage = {
    type: MessageType.PAYLOAD;
    payload: any;
};
declare type LookupMessage = {
    type: MessageType.LOOKUP;
    userId: string;
    path: string[];
};
declare type LookupMessageResult = {
    type: MessageType.LOOKUP_RESULT;
    userId: string;
    path: string[];
};
declare type ProtocolMessage = PayloadMessage | LookupMessage | LookupMessageResult;
export declare class RTCRoutingMessage implements MessageInterface {
    private dbFactory;
    private rtcPushMessage;
    private _messageCallbacks;
    constructor(dbFactory: DBFactory);
    private _messageRecieved;
    lookup(fromId: string, message: LookupMessage): Promise<void>;
    private connectionTargets;
    private connectionTargetsResolvers;
    establishConnectionChain(userId: string, proxyUser?: string): Promise<void>;
    private peerChains;
    extendPeerChain(from: string, payload: LookupMessageResult): Promise<void>;
    send(userId: string, payload: ProtocolMessage | string): Promise<void>;
    addMessageListener(listener: MessageListener): void | Promise<void>;
    addContact(userId: string, keyInformation: any): Promise<string | void>;
    getKeyInformation(): Promise<any>;
    getOwnUserId(): Promise<string>;
}
export {};
//# sourceMappingURL=RTCRoutingMessage.d.ts.map