/** A symbol use to store the encrypted content of an event in memory */
export declare const EncryptedContentSymbol: unique symbol;
export interface EncryptedContentSigner {
    nip04?: {
        encrypt: (pubkey: string, plaintext: string) => Promise<string> | string;
        decrypt: (pubkey: string, ciphertext: string) => Promise<string> | string;
    };
    nip44?: {
        encrypt: (pubkey: string, plaintext: string) => Promise<string> | string;
        decrypt: (pubkey: string, ciphertext: string) => Promise<string> | string;
    };
}
export type EncryptionMethod = "nip04" | "nip44";
/** A pair of encryption methods for encrypting and decrypting event content */
export interface EncryptionMethods {
    encrypt: (pubkey: string, plaintext: string) => Promise<string> | string;
    decrypt: (pubkey: string, ciphertext: string) => Promise<string> | string;
}
/** Various event kinds that can have encrypted content and which encryption method they use */
export declare const EventContentEncryptionMethod: Record<number, EncryptionMethod>;
/** Sets the encryption method that is used for the contents of a specific event kind */
export declare function setEncryptedContentEncryptionMethod(kind: number, method: EncryptionMethod): number;
/**
 * Returns either nip04 or nip44 encryption methods depending on event kind
 * @param kind The event kind to get the encryption method for
 * @param signer The signer to use to get the encryption methods
 * @param override The encryption method to use instead of the default
 * @throws If the event kind does not support encrypted content
 * @throws If the signer does not support the encryption method
 * @returns The encryption methods for the event kind
 */
export declare function getEncryptedContentEncryptionMethods(kind: number, signer: EncryptedContentSigner, override?: EncryptionMethod): EncryptionMethods;
/** Checks if an event can have encrypted content */
export declare function canHaveEncryptedContent(kind: number): boolean;
/** Checks if an event has encrypted content */
export declare function hasEncryptedContent<T extends {
    content: string;
}>(event: T): boolean;
/** Returns the encrypted content for an event if it is unlocked */
export declare function getEncryptedContent<T extends object>(event: T): string | undefined;
/** Checks if the encrypted content is locked */
export declare function isEncryptedContentLocked<T extends object>(event: T): boolean;
/**
 * Unlocks the encrypted content in an event and caches it
 * @param event The event with content to decrypt
 * @param pubkey The other pubkey that encrypted the content
 * @param signer A signer to use to decrypt the content
 */
export declare function unlockEncryptedContent<T extends {
    kind: number;
    content: string;
}>(event: T, pubkey: string, signer: EncryptedContentSigner): Promise<string>;
/** Sets the encrypted content on an event and updates it if its part of an event store */
export declare function setEncryptedContentCache<T extends object>(event: T, plaintext: string): void;
/** Removes the encrypted content cache on an event */
export declare function lockEncryptedContent<T extends object>(event: T): void;
