export declare type MessageListener = (fromId: string, payload: string) => void;
/**
 * The MessageInterface is meant for secure communication.
 * It offers confidentiality, integrity and authenticity guarantees.
 * These guarantees are always specific to the userId string.
 */
export interface MessageInterface {
    /**
     * Encrypts and sends a message to a user
     * @param userId the id of the user to send to
     * @param payload the plain text payload to send
     */
    send(userId: string, payload: string): Promise<void>;
    /**
     * Define a function that should be called when a message is received
     * @param listener a callback function
     */
    addMessageListener(listener: MessageListener): void;
    /**
     * Adds a contact to send encrypted messages to
     * @param userId the id of the new contact
     * @param keyInformation some key information required for encryption (can be for exmple be diffie-hellman parameters or a signal prekey bundle)
     */
    addContact(userId: string, keyInformation: any): Promise<void | string>;
    /**
     * @returns cryptographic keying information required to start an encrypted channel; needs to be provided to the addContact function of the user user
     */
    getKeyInformation(): Promise<any>;
    /**
     * @returns provides the user id of the current user
     */
    getOwnUserId(): Promise<string>;
}
//# sourceMappingURL=MessageInterface.d.ts.map