Comparison
How Voltaire’s request builders compare to other Ethereum libraries.vs Raw EIP-1193
| Feature | Raw EIP-1193 | Voltaire Request Builders |
|---|---|---|
| Method calls | request({ method, params }) | Request builder + request() |
| Parameters | Plain strings/objects | Branded primitive types |
| Type safety | None (manual typing) | Full compile-time checking |
| Errors | Throws exceptions | Throws exceptions |
| Autocompletion | No | Yes |
Example Comparison
vs ethers.js
| Feature | ethers.js | Voltaire |
|---|---|---|
| Method style | Abstracted (getBalance) | Direct JSON-RPC (eth_getBalance) |
| Types | Runtime classes | Branded primitives (zero overhead) |
| Type safety | Good | Excellent (branded types) |
| Tree-shaking | Limited | Full |
vs viem
| Feature | viem | Voltaire |
|---|---|---|
| API style | Actions | Request builders |
| Type system | Narrow types | Branded primitives |
| Tree-shaking | ✅ Yes | ✅ Yes |
| WASM | ❌ No | ✅ Yes (optional) |
| Multi-language | ❌ No | ✅ Yes (TS/Zig/Rust/C) |
When to Use Voltaire
- Type safety - Branded primitives catch errors at compile time
- Tree-shaking - Import only what you need
- Multi-language - Building for TypeScript + Zig/Rust/C
- WASM acceleration - Performance-critical crypto operations
- Direct JSON-RPC - Work directly with JSON-RPC spec
Related
- Getting Started - Installation and setup
- Method API - Request builders

