import { DBFactory } from '../db/DBFactory';
export declare class ContactManager {
    private dbFactory;
    private existingOwnAddress?;
    private _contactAddressDao?;
    private _initPromise;
    private _ownUserName;
    private autoConfirm;
    constructor(dbFactory: DBFactory, existingOwnAddress?: string | undefined, autoConfirm?: boolean);
    private _init;
    set ownUserName(userName: string | null);
    get ownUserName(): string | null;
    private timeBasedAddresses;
    private ownAddress?;
    private ownTimeBasedAddress?;
    private ownPrivateKey?;
    private ownPublicKey?;
    private _computeRainbowTable;
    getPublicKeyFromTimeBasedAddress(timeBasedAddress: string): Promise<string | undefined>;
    getOwnIdentity(): Promise<string>;
    getOwnAddress(): Promise<string>;
    getOwnTimeBasedAddress(): Promise<string>;
    /**
     *
     * @param address the address of the contact (contact primary key)
     * @param publicKey the public key of the address
     */
    addContactAddress(addressBundle: string): Promise<void>;
    isContact(userId: string): Promise<boolean>;
    getAllContacts(): Promise<{
        address: string;
        userName: string | undefined;
    }[] | undefined>;
    getTimeBasedAddress(userId: string): Promise<string>;
    getAddressFromTimeBasedAddress(from: string): Promise<string>;
    sign(message: string): Promise<string>;
    /**
     * Verifies message signatures against long term public keys of contacts.
     * If no contact is found, false is returned.
     * @param from the from address (time based address)
     * @param message the signed message (usually the dht entry)
     * @param signature the signature
     * @returns true if the signature is valid, false if the contact is unknown, throws an error if the signature is invalid
     */
    verify(from: string, message: string, signature: string): Promise<boolean>;
    getUserName(address: string): Promise<string | undefined>;
}
//# sourceMappingURL=ContactManager.d.ts.map