pub fn encode_v1(state: &Value) -> Result<Vec<u8>, StateError>
Encode a state snapshot in the v1 wire format: compact JSON terminated by a newline. Equivalent to Python json.dumps(state).encode() + b"\n".
json.dumps(state).encode() + b"\n"