import { PrivateKey, PublicKey } from "../crypto.js"; /** * Encrypts a binary memo payload with Hive memo key agreement. * * @param private_key - Sender memo private key. * @param public_key - Recipient memo public key. * @param message - Serialized plaintext memo bytes. * @param nonce - Optional nonce string for deterministic tests. * @returns Nonce, ciphertext, and checksum for an encrypted memo envelope. * * @remarks * The AES key is derived from the secp256k1 shared secret and nonce, matching * Hive's encrypted memo convention. Application code should normally use * `Memo.encode`, which handles string framing and base58 packaging. * * @example * ```ts * const encrypted = encrypt(senderMemoKey, recipientMemoPublicKey, memoBytes) * ``` */ export declare const encrypt: (private_key: PrivateKey, public_key: PublicKey, message: Uint8Array, nonce?: string | bigint) => { nonce: bigint; message: Uint8Array; checksum: number; }; /** * Decrypts a binary memo payload with Hive memo key agreement. * * @param private_key - Recipient or sender memo private key. * @param public_key - Counterparty memo public key. * @param nonce - Memo nonce from the encrypted envelope. * @param message - Ciphertext bytes. * @param checksum - Shared-secret checksum from the encrypted envelope. * @returns Decrypted memo bytes. * * @throws Error * Thrown when the checksum does not match the derived shared secret. * * @example * ```ts * const plaintext = decrypt(memoKey, otherMemoPublicKey, nonce, encrypted, check) * ``` */ export declare const decrypt: (private_key: PrivateKey, public_key: PublicKey, nonce: string | bigint, message: Uint8Array, checksum: number) => Uint8Array;