Ssz implements Ethereum Consensus Layer Simple Serialize (SSZ) primitives: little-endian fixed-width basic type encoding/decoding and 32-byte chunk SHA-256 hashTreeRoot Merkleization.
Quick Start
Ssz from @tevm/voltaire.
Basic Type Wire Layout
Unlike execution-layer ABI and RLP (big-endian), SSZ encodes all unsigned integers in little-endian byte order with fixed widths and no length prefixes:API Reference
Edge Cases & Errors
encodeBasicthrowsRangeErrorfor out-of-range or non-integer values onuint8,uint16, anduint32, andErrorfor unsupported type names.decodeBasicthrowsErrorif byte length does not match the type width, or if aboolbyte is neither0x00nor0x01.hashTreeRoot(new Uint8Array(0))returns 32 zero bytes.

