Expand description
Generic serde helper for fixed-size byte arrays [u8; N].
Default serde serializes [u8; N] for N ≤ 32 as a tuple of u8 elements
(a sequence of numbers in JSON, opaque in non-self-describing formats).
For N > 32 there is no default impl at all.
This module gives a single, length-agnostic shape:
- Human-readable formats (JSON): base64-encoded string (matches
Bytes20/Bytes32/Bytes36/BinaryDatainrs-platform-value) - Binary formats (bincode, CBOR,
platform_value): raw byte sequence (which becomesUint8Arraythroughserde_wasm_bindgenwithserialize_bytes_as_arrays(false))
Used via #[serde(with = "crate::serialization::serde_bytes")] on any
[u8; N] field. The #[json_safe_fields] proc-macro injects this for
every fixed-size byte field.