Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Package Reference

Tevm Node is modular. These docs target the 1.0.0-rc.151 package set.

Installation

Complete Package

npm install tevm@1.0.0-rc.151 viem
import { createTevmNode } from 'tevm'
import { callHandler } from 'tevm/actions'
import { http } from 'tevm'

Individual Packages

npm install @tevm/node@1.0.0-rc.151 @tevm/actions@1.0.0-rc.151 viem
import { createTevmNode } from '@tevm/node'
import { callHandler } from '@tevm/actions'

Core Packages

Node & Client

  • @tevm/node - Core node implementation; blockchain and state management; mining and block production.
  • @tevm/memory-client - In-memory Ethereum client with Viem-compatible interface; local state and transaction handling.

EVM & Execution

  • @tevm/vm - VM coordinating EVM execution, block building, receipts, and state transitions; backed by ZEVM-compatible EVM, tx, common, and block primitives; emits VM/EVM lifecycle events.
  • @tevm/evm - Low-level EVM operations: ZEVM-backed bytecode execution, gas accounting, step events, custom precompiles, profiling, and direct runCall access.

State & Storage

  • @tevm/state - Account state, storage manipulation, fork-backed reads, snapshots, state roots, and proof support.
  • @tevm/blockchain - Block management, chain reorganization, header validation.

Transaction Handling

Transaction Processing

  • @tevm/tx - ZEVM-backed transaction facade; legacy, EIP-2930, EIP-1559, EIP-4844, EIP-7702 helpers; Tevm impersonated transactions for local execution and fork testing.
  • @tevm/txpool - Pending transaction queue, ordering, replacement handling, txpool_* JSON-RPC support.

Block & Receipt Management

  • @tevm/block - Block creation, validation, chain management.
  • @tevm/receipt-manager - Receipt storage, event logging, gas tracking; eth_getTransactionReceipt, eth_getBlockReceipts, filters, subscriptions.

Client Integration

Communication

  • @tevm/jsonrpc - Standard Ethereum and custom Tevm methods, error handling; HTTP, WebSocket, rate-limit, and load-balance transports.
  • @tevm/http-client - HTTP client; remote node communication, request batching, error handling.

Actions & Procedures

  • @tevm/actions - High-level actions for contract interaction, account management, state queries; eth_*, tevm_*, debug_*, engine_*, txpool_*, anvil_*, hardhat_*, ganache_*, evm_* handlers.
  • @tevm/procedures - State manipulation, chain operations, utility functions.

Smart Contract Tools

Contract Interaction

  • @tevm/contract - ABI handling, function encoding, event parsing.
  • @tevm/precompiles - Standard and custom precompiles; gas calculation.

Contract Management

  • @tevm/predeploys - Pre-deployed standard and network-specific contracts.

Utilities & Helpers

Core Utilities

  • @tevm/utils - Address handling, data encoding, type conversion; ZEVM-backed utilities and EIP-7702 authorization helpers.
  • @tevm/common - Chain configurations and network parameters; ZEVM-backed Common object plus viem chain definitions.

Development Tools

  • @tevm/decorators - Function decorators for method extension and behavior modification.
  • @tevm/errors - Error types, messages, stack traces.

Data Structures

  • @tevm/rlp - ZEVM-backed RLP encoding/decoding for serialization, network protocol, storage.
  • @tevm/trie - ZEVM-backed Merkle Patricia Tree for state storage, proof verification, tree manipulation.

Development & Debugging

Logging & Debugging

  • @tevm/logger - Configurable levels, output formatting, debug information.
  • @tevm/effect - Side effect handling, async operations, error recovery.

Storage & Types

  • @tevm/sync-storage-persister - State synchronization, persistence, cache management.
  • @tevm/client-types - Interface and type definitions.

Best Practices

  • Start simple - Begin with the complete tevm package. Split only to optimize bundle size.
  • Bundle optimization - Import from subpaths (tevm/actions) and use tree-shaking-friendly imports.
  • Version management - Keep all @tevm/* packages on the same version.
  • Development - Use TypeScript; leverage provided type definitions.

Related Topics