pub fn encode(identity: &SlotIdentity) -> Result<Vec<u8>, &'static str>
UTF-8 JSON with lexicographically ordered object keys, no whitespace/newline. This envelope is distinct from every historical lifecycle slot format.