Try it Live
Run Address examples in the interactive playground
WASM Implementation
WebAssembly-accelerated implementations of Address methods, compiled from Zig using ReleaseSmall mode.Overview
WASM implementations provide performance-critical operations using compiled Zig code targeting WebAssembly. These are purely opt-in replacements for the JavaScript implementations with identical APIs. All WASM methods are compiled from address.zig withReleaseSmall optimization targeting minimal bundle size.
Quick Start
- Direct Import
- Override Static Methods
Performance
WASM implementations provide significant speedup for computationally intensive operations:- Hex parsing - Native byte manipulation vs JavaScript string operations
- Checksumming - keccak256 hashing in compiled code
- Comparisons - Memory-efficient byte-by-byte comparison
- Contract address calculation - RLP encoding and hashing in Zig
API Reference
WASM implementations match the standard Address API. See main documentation:- Constructors -
fromHex,fromBytes,fromNumber,fromPublicKey,fromAbiEncoded - Conversions -
toHex,toChecksummed,toLowercase,toUppercase,toU256,toAbiEncoded,toShortHex - Validation -
isValid,isValidChecksum,is - Comparisons -
equals,compare,lessThan,greaterThan,isZero - Contract Addresses -
calculateCreateAddress,calculateCreate2Address

