import { NostrEvent } from "nostr-tools";
import { EncryptedContentSigner } from "./encrypted-content.js";
/** Checks if a legacy direct message content is encrypted */
export declare function isLegacyMessageLocked(event: NostrEvent): boolean;
/**
 * Returns the corraspondant of a legacy direct message
 * @throws if no corraspondant is found
 */
export declare function getLegacyMessageCorraspondant(message: NostrEvent, self: string): string;
/**
 * Returns the receiver of a legacy direct message
 * @throws if no receiver is found
 */
export declare const getLegacyMessageReceiver: typeof getLegacyMessageCorraspondant;
/** Returns the sender of a legacy direct message */
export declare function getLegacyMessageSender(message: NostrEvent): string;
/** Returns the parent message id of a legacy message */
export declare function getLegacyMessageParent(message: NostrEvent): string | undefined;
/**
 * Returns the decrypted content of a direct message
 * @param message - The message to decrypt
 * @param self - The public key of the user
 * @param signer - The signer to use to decrypt the message
 * @returns The decrypted content of the message
 */
export declare function unlockLegacyMessage(message: NostrEvent, self: string, signer: EncryptedContentSigner): Promise<string>;
/** Clears the cached plaintext of a direct message */
export declare function lockLegacyMessage(message: NostrEvent): Promise<void>;
