Skip to main content

Module header

Module header 

Source
Expand description

5-bit-symbol-aligned string-layer header (single-string + chunked variants).

Per design/SPEC_mk_v0_1.md §2.5 and closure Q-5, mk1’s string-layer header lives at the bech32 5-bit symbol layer rather than the byte layer. Encoders emit either a 2-symbol StringLayerHeader::SingleString header (version + type=0x00) or an 8-symbol StringLayerHeader::Chunked header (version + type=0x01 + chunk_set_id + total_chunks + chunk_index).

All field widths are exactly 5 bits unless otherwise noted. The chunk_set_id is the only multi-symbol field — 20 bits = 4 symbols.

Enums§

StringLayerHeader
String-layer header for one mk1 chunk.

Constants§

CHUNKED_HEADER_SYMBOLS
Number of 5-bit symbols in the chunked header (version + type + 4·chunk_set_id + total_chunks + chunk_index).
MAX_CHUNK_SET_ID
Maximum allowed value of chunk_set_id (20-bit field).
SINGLE_HEADER_SYMBOLS
Number of 5-bit symbols in the single-string header (version + type).
VERSION_V0_1
Format-version field value emitted in v0.1.