Expand description
Hex parsing / display helpers shared by every typed-byte newtype.
Mirrors bee-go’s pkg/swarm/bytes.go Bytes base type, but in
Rust we don’t need a runtime base struct — instead we expose
free helpers that the define_typed_bytes! macro (in
swarm::typed_bytes) uses to build each newtype’s from_hex,
to_hex, and serde impls.
Functions§
- decode_
hex - Decode a hex string (with or without
0xprefix). - encode_
hex - Encode bytes as lowercase hex (no
0xprefix), matching bee-js / bee-go wire format.