Skip to main content

Dependencies

All external dependencies used by Voltaire and their purposes.

Zig Dependencies

From build.zig.zon:

zbench

Performance benchmarking framework.
.zbench = .{
    .url = "https://github.com/hendriknielaender/zBench/archive/refs/heads/main.tar.gz",
}
Used for: Zig benchmarks in *.bench.zig files

clap

Command-line argument parsing.
.clap = .{
    .url = "https://github.com/Hejsil/zig-clap/archive/refs/heads/master.tar.gz",
}
Used for: CLI tools and examples

z_ens_normalize

ENS name normalization (ENSIP-15).
.z_ens_normalize = .{
    .url = "git+https://github.com/evmts/z-ens-normalize#...",
}
Used for: Ens.normalize() in primitives

libwally-core

Wallet utilities (BIP39, BIP32).
.libwally_core = .{
    .path = "lib/libwally-core",
}
Used for: Mnemonic generation, HD wallet derivation

Rust Dependencies

From Cargo.toml. Compiled to libcrypto_wrappers.a static library.

arkworks (ark-*)

Elliptic curve cryptography.
ark-bn254 = "0.5.0"
ark-bls12-381 = "0.5.0"
ark-ec = "0.5.0"
ark-ff = "0.5.0"
ark-serialize = "0.5.0"
Used for:
  • BN254 curve operations (precompiles 0x06-0x08)
  • BLS12-381 curve operations (precompiles 0x0B-0x13)
  • Field arithmetic, point serialization

keccak-asm

Assembly-optimized Keccak256.
keccak-asm = { version = "0.1.4", optional = true }
Feature: asm (default, native only) Used for: High-performance Keccak256 hashing

tiny-keccak

Pure Rust Keccak256.
tiny-keccak = { version = "2.0", features = ["keccak"], optional = true }
Feature: portable (WASM builds) Used for: WASM-compatible Keccak256

C Libraries

Vendored in lib/ directory.

blst

BLS12-381 signature library from Supranational. Location: lib/blst/ Used for: BLS12-381 precompile implementations Built by: zig build (compiles as static library)

c-kzg-4844

KZG commitment library for EIP-4844. Location: lib/c-kzg-4844/ Used for: Blob commitments, point evaluation precompile Built by: zig build

libwally-core

Wallet operations (git submodule). Location: lib/libwally-core/ Used for: BIP39 mnemonics, BIP32 HD derivation Setup: git submodule update --init

Node.js Dependencies

From package.json.

Runtime Dependencies

PackagePurpose
@adraffy/ens-normalizeENS name normalization (JS fallback)
@scure/bip32HD wallet derivation (TypeScript)
@scure/bip39Mnemonic generation (TypeScript)
@shazow/whatsabiABI detection from bytecode
c-kzgKZG bindings (Node.js)

Development Dependencies

PackagePurpose
@biomejs/biomeCode formatting and linting
@noble/curvesReference crypto (testing)
@noble/hashesReference hashes (testing)
@noble/secp256k1Reference secp256k1 (testing)
@types/bunBun type definitions
@types/nodeNode.js type definitions
abitypeABI TypeScript types
effectFunctional programming utilities
mitataJavaScript benchmarking
tsupTypeScript bundling
typescriptTypeScript compiler
vitestTest framework

Hardware Wallet Support

PackagePurpose
@ledgerhq/hw-app-ethLedger Ethereum app
@ledgerhq/hw-transportLedger transport base
@ledgerhq/hw-transport-webusbWebUSB transport
@trezor/connect-webTrezor web integration

Peer Dependencies

PackageRequired
abitypeOptional - for advanced ABI types

Dependency Graph

┌─────────────────────────────────────────────────────┐
│                   TypeScript                         │
│  @noble/*, @scure/*, whatsabi, abitype, effect      │
└─────────────────────┬───────────────────────────────┘

┌─────────────────────┴───────────────────────────────┐
│                    Zig Core                          │
│           zbench, clap, z_ens_normalize              │
└─────────────────────┬───────────────────────────────┘

        ┌─────────────┼─────────────┐
        ▼             ▼             ▼
┌───────────┐  ┌───────────┐  ┌───────────┐
│   Rust    │  │     C     │  │     C     │
│ arkworks  │  │   blst    │  │  c-kzg    │
│ keccak-*  │  └───────────┘  └───────────┘
└───────────┘

Installing Dependencies

# Node.js dependencies
bun install

# Zig dependencies (automatic via build)
zig build deps

# Git submodules (libwally-core)
git submodule update --init --recursive

# Full build (includes C/Rust libs)
zig build

Updating Dependencies

Zig

Edit build.zig.zon with new URLs/hashes, then:
zig build

Rust

Edit Cargo.toml, then:
cargo update
zig build

Node.js

bun update

Version Requirements

ToolMinimum Version
Zig0.15.1
Bun1.0+
Node.js18+ (for native modules)
Rust1.70+ (for arkworks)

Vendored vs External

Vendored (in repo)

  • lib/blst/ - BLS12-381
  • lib/c-kzg-4844/ - KZG

Git Submodule

  • lib/libwally-core/ - Wallet utils

Fetched by Zig

  • zbench, clap, z_ens_normalize

Fetched by Cargo

  • arkworks, keccak-asm, tiny-keccak

Fetched by bun/npm

  • All Node.js packages