Bytes32 (Bytes32Type) is a branded fixed-length 32-byte Uint8Array representing a single 256-bit EVM word, Solidity bytes32 value, storage slot value, or CREATE2 salt. Unlike Hash, Bytes32 carries no semantic claim that its contents are a cryptographic digest.
Quick Start
@tevm/voltaire.
Layout & Constants
When encoding integers with
fromNumber or fromBigint, bytes are big-endian and left-padded with 0x00 to 32 bytes. toAddress extracts the rightmost 20 bytes ([12:32]).
API Reference
Constructors & Factories
Conversions & Operations
Notice method casing:
Bytes32.fromBigint and Bytes32.toBigint use lowercase i, whereas Bytes.fromBigInt and Hex.fromBigInt use capital I.Edge Cases
fromBytesandfromHexthrowInvalidLengthErrorif the input is not exactly 32 bytes.fromBigintrejects negative values and values>= 2n ** 256n.Bytes32.ZEROis a shared constant; useBytes32.zero()orBytes32.clone()when mutating bytes.

