pub fn encode_payload(payload: &Payload) -> Res<Vec<u8>>
Encodes a bare Payload envelope for at-rest retention (PRD-0013) — the same codec as the wire, so stored history is byte-identical to what crossed it (E2E ciphertext included).
Payload
Returns an error if encoding fails.