Overview
Address is a brandedUint8Array type representing Ethereum addresses. It provides compile-time type safety while maintaining zero runtime overhead.
- Type Definition
- Constants
Quick Start
- Create Address
- Convert & Format
- Checksum (EIP-55)
Why keccak256 Must Be Passed Explicitly
Voltaire requires you to passkeccak256 explicitly for checksumming and contract address derivation. This is intentional:
Tree-shaking: Keccak256 adds ~5-10 KB to your bundle. By requiring explicit injection, bundlers can eliminate this code entirely if you never use checksum methods. Libraries that hardcode crypto dependencies force you to ship code you may never use.
No global crypto dependencies: Voltaire avoids global singletons and hidden imports. Every dependency is explicit in your code, making the dependency graph predictable and auditable.
Flexibility: You can inject any keccak256 implementation - the native Zig/WASM version, a pure JS fallback, or a Web Crypto wrapper. Your choice.
API Reference
Constructors
Conversion Methods
Comparison Methods
Validation Methods
Contract Address Derivation
Batch Operations
Constants
Practical Examples
Deriving Contract Addresses
Comparing and Sorting Addresses
ABI Encoding for Contract Calls
Deriving from Keys
Error Handling
Type Safety
The branded type prevents mixing addresses with other byte arrays:Related
Keccak256
Required for checksumming and contract address derivation
RLP
Required for CREATE address derivation
Signature
Recover addresses from signatures
Branded Types
Type-safe primitives with zero overhead

