Voltaire primitives are designed to be identical across TypeScript, Zig, Swift, and Rust. The APIs match as closely as possible while respecting each language’s idioms.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.
Data-First Design
Every primitive is represented using the simplest possible data structure in each language:| Language | Address Representation |
|---|---|
| TypeScript | Uint8Array (branded) |
| Zig | [20]u8 |
| Swift | Data (20 bytes) |
| Rust | [u8; 20] |
Functions Operate on Data
Methods take the data as the first parameter, similar to Go or Zig:- TypeScript
- Zig
- Swift
Why This Matters
Portable knowledge — Learn the API once, use it everywhere. AtoHex in TypeScript works the same as toHex in Zig.
LLM-friendly — AI assistants trained on one language can help with another. The patterns transfer directly.
Predictable — No surprises when switching languages. Same function names, same parameter order, same behavior.
Language-Specific Conveniences
Each language adds idiomatic conveniences on top of the core API:- TypeScript: Instance methods (
addr.toHex()) alongside static methods - Zig: Comptime validation and formatting
- Swift: Protocol conformances (
Equatable,Hashable,CustomStringConvertible)
Colocated Source Files
All language implementations live together in the same directory:Learn More
Branded Types
Type safety in TypeScript
Tree-Shakeable API
Functional imports for minimal bundles

