import { MessageInterface, MessageListener } from '../communication-interface/MessageInterface';
import { TransportInterface } from '../communication-interface/TransportInterface';
import { BaseDto } from '../db/DBAccess';
import { DBFactory } from '../db/DBFactory';
export declare class EcdheAesGcmContactDto implements BaseDto {
    id: string;
    keyInformation: string;
    static get dbName(): string;
    get userId(): string;
    constructor(userId: string, keyInformation: string);
}
export declare class EcdheAesGcmMessage implements MessageInterface {
    private transport;
    private userId;
    private _initPromise;
    private encryptionKey?;
    private signingKey?;
    private factory?;
    private contactDao?;
    constructor(transport: TransportInterface, userId: string, encryptionKey?: string, signingKey?: string, factory?: DBFactory);
    init(encryptionKey?: string, signingKey?: string): Promise<void>;
    /**
     * CONTAINS PRIVATE KEY! DO NOT SEND ANYWHERE! ONLY USE FOR LOCAL STORAGE!
     * @returns jwk encoded **private** and public key
     */
    getEdchKey(): Promise<string>;
    send(userId: string, payload: string): Promise<void>;
    messageReceived(message: {
        encrypted: string;
        signature: string;
        iv: string;
        from: string;
        fromPK: string;
    }): Promise<void>;
    private messagelisteners;
    addMessageListener(listener: MessageListener): void;
    private addContactListeners;
    addAddContactListener(listener: (userId: string, keyInformation: string) => void): void;
    private contacts;
    addContact(userId: string, keyInformation: any, noNotify?: boolean, replaceExisting?: boolean): Promise<string | void>;
    private addContactAtomic;
    getKeyInformation(): Promise<string>;
    getOwnUserId(): Promise<string>;
    getContactPk(userId: string): Promise<string>;
}
//# sourceMappingURL=ecdhe-aes-gcm-message.d.ts.map