//! 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.
use crateError;
/// Decode a hex string (with or without `0x` prefix).
/// Encode bytes as lowercase hex (no `0x` prefix), matching bee-js /
/// bee-go wire format.