Skip to main content

Try it Live

Run Address examples in the interactive playground

Address

Ethereum addresses are 20-byte identifiers for accounts (both externally-owned and contracts). They’re derived from public keys (EOAs) or calculated deterministically during contract deployment.
New to Ethereum addresses? Start with Fundamentals to learn address derivation, EIP-55 checksumming, and CREATE/CREATE2 contract deployment.

Overview

Address is a specialized branded Uint8Array that extends the 20-byte (Bytes20) type with address-specific semantics, including EIP-55 mixed-case checksumming for error detection and validation.
Address is a branded Uint8Array (20 bytes). TypeScript enforces type safety through a unique Symbol brand, preventing accidental mixing with other Uint8Arrays while maintaining zero runtime overhead.
Voltaire handles checksums automatically while storing addresses as raw bytes internally to avoid case-sensitivity bugs.

Developer Experience

Despite being a Uint8Array, addresses display formatted in most environments:
This makes debugging more readable than raw byte arrays while maintaining the performance and compatibility benefits of Uint8Array.

API Styles

Voltaire offers two API styles for Address:
OOP-style with instance methods. Good for method chaining.

Quick Start

Practical Examples

See Fundamentals for detailed explanations of address derivation, checksumming, and contract address calculation.

API Methods

Constructors

Conversions

Validation

Comparisons

Contract Addresses

Reference

  • Fundamentals - Address derivation, checksumming, and deployment
  • Usage Patterns - Common patterns and best practices
  • AddressType - Type definition and branded type pattern
  • Variants - Additional utilities and variants
  • WASM - WebAssembly implementation details

Complete API

    Types

    Main branded type. Runtime is Uint8Array (20 bytes), TypeScript enforces type safety through Symbol branding.

    Constants

    NATIVE_ASSET_ADDRESS (ERC-7528)

    Standard address representing native ETH in token-related operations, as defined in ERC-7528. Use cases:
    • Representing ETH in token lists alongside ERC-20 tokens
    • Multicall operations mixing ETH and token transfers
    • DEX interfaces treating ETH as a “token”
    Example:

    Usage Patterns

    Validating User Input

    Sorting and Deduplicating

    Predicting Contract Addresses

    Tree-Shaking

    Import only what you need for optimal bundle size:
    Importing from tevm/Address instead of the main entry point enables tree-shaking. For example, if you only need fromHex and toChecksummed, contract address calculation and public key derivation are excluded from your bundle.
    • Address (Effect) - Effect.ts integration with Schema validation
    • Keccak256 - Keccak256 hashing for address derivation and verification
    • Bytes - Fixed-size byte types including Bytes32 for salts
    • Uint - Unsigned integer types for address arithmetic

    Try It Yourself

    Specification References