Primitives Reference
All primitives insrc/primitives/. Each is a branded type with colocated TypeScript and Zig implementations.
Core Types
Address
20-byte Ethereum address with EIP-55 checksumming.fromHex, fromBytes, fromPublicKey, toHex, toChecksummed, toBytes, equals, isZero, isValid, calculateCreateAddress, calculateCreate2Address
Hash
32-byte hash type used for block hashes, transaction hashes, storage roots.Hex
Hexadecimal string encoding/decoding utilities.Bytes / Bytes32
Fixed-size byte arrays.Bytes32 is 32 bytes, commonly used for storage keys.
Bytes1 through Bytes8, Bytes16, Bytes20, Bytes32
Numeric Types
Uint256 (Uint)
256-bit unsigned integer as brandedbigint.
from, fromHex, toHex, toBigInt, plus, minus, times, dividedBy, modulo, power, shiftLeft, shiftRight, and, or, xor, not, equals, lt, gt, lte, gte, min, max, clamp, abs, bitLength, popCount, isPowerOf2, gcd, lcm, isEven, isOdd, isZero
Other Integer Types
Encoding
Rlp
Recursive Length Prefix encoding for Ethereum serialization.Abi
Application Binary Interface encoding/decoding for contract calls.Base64
Base64 encoding/decoding.Ssz
Simple Serialize - beacon chain serialization format. Located insrc/primitives/Ssz/ with:
basicTypes.ts- Primitive SSZ typescontainer.ts- Container typesmerkle.ts- Merkle tree operationsvariableTypes.ts- Variable-length types
Transaction Types
Transaction
All Ethereum transaction types with full serialization support.Legacy- Pre-EIP-2718 transactionsEIP2930- Access list transactionsEIP1559- Fee market transactionsEIP4844- Blob transactionsEIP7702- Account abstraction transactions

