Skip to main content

Documentation Index

Fetch the complete documentation index at: https://voltaire.tevm.sh/llms.txt

Use this file to discover all available pages before exploring further.

Try it Live

Run Bytecode examples in the interactive playground

Bytecode.hash(code): Hash

Compute keccak256 hash of bytecode (with auto-injected crypto).Parameters:
  • code: BrandedBytecode - Bytecode to hash
Returns: HashType - Bytecode hash (32 bytes)Example:
import * as Bytecode from 'tevm/Bytecode'

const code = Bytecode('0x6001')
const hash = Bytecode.hash(code)
// Uint8Array(32) [...]

Performance

Hash computation depends on imported keccak256 implementation. Factory API enables explicit control over crypto bundling.