Expand description
Top-level encoder per spec §13.3.
Structs§
- Descriptor
- Top-level descriptor parsed/built from a v0.30 wire payload.
Functions§
- encode_
md1_ string - Encode a Descriptor into a complete codex32 md1 string (HRP + payload + BCH checksum). Returns the canonical single-string form.
- encode_
payload - Encode a
Descriptorinto the canonical payload bit stream and return(bytes, total_bit_count). The bytes are zero-padded;total_bit_countis the exact unpadded length needed for round-trip decoding (see §3.7’s “TLV section ends when codex32 total-length is exhausted” rule). - render_
codex32_ grouped - Render a codex32 string with optional N-char hyphen grouping for
transcription aid. Per spec §10.2, every 4-5 chars optionally separated by
-for human readability.group_size = 0returns the input unchanged (no grouping).