/**
 * TLV (Type-Length-Value) serialization for Xail messages.
 *
 * Format: [Type: 1 byte][Length: 4 bytes uint32 BE][Value: Length bytes]
 *
 * Serialization order: MESSAGE_UUID, SENDER_ID, TIMESTAMP, CONTENT_TYPE,
 * MESSAGE_BODY, ATTACHMENT(s).
 *
 * HMAC key/signature and per-share metadata are NOT in the TLV payload —
 * they travel in the share envelope.
 */
import type { Result, SerializationError, XailMessage } from '@private.me/shared';
/**
 * Serialize a XailMessage into a TLV byte stream.
 *
 * @param message - Message to serialize
 * @returns TLV-encoded byte array
 */
export declare function serializeMessage(message: XailMessage): Uint8Array;
/**
 * Deserialize a TLV byte stream into a XailMessage.
 *
 * @param data - TLV-encoded byte array
 * @returns Deserialized message, or SerializationError if invalid
 */
export declare function deserializeMessage(data: Uint8Array): Result<XailMessage, SerializationError>;
