> ## 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.

# Getting Started

> Install Voltaire and explore the API

<Tip>
  Looking to learn more about why to use Voltaire? Check out [What is Voltaire?](/introduction)
</Tip>

<Tip>
  Try it live: open the <a href="/playground">Playground</a> to experiment with Voltaire primitives in your browser.
</Tip>

## Prerequisites

* **Node.js:** 18+ (20+ recommended)
* **Package Manager:** npm, bun, pnpm, or yarn
* **Knowledge:** Basic JavaScript/TypeScript

<Tip>
  New to Ethereum? Check out our [Skills](/skills) for example-based patterns with working code you can copy into your project.
</Tip>

## Installation

<Tabs>
  <Tab title="npm">
    ```bash theme={null}
    npm install @tevm/voltaire
    ```
  </Tab>

  <Tab title="bun">
    ```bash theme={null}
    bun add @tevm/voltaire
    ```
  </Tab>

  <Tab title="pnpm">
    ```bash theme={null}
    pnpm add @tevm/voltaire
    ```
  </Tab>

  <Tab title="yarn">
    ```bash theme={null}
    yarn add @tevm/voltaire
    ```
  </Tab>

  <Tab title="Zig">
    Zig requires building native dependencies first. See [Multiplatform Installation](/getting-started/multiplatform#installation-by-language) for complete instructions.

    ```bash theme={null}
    # Clone and build (requires Rust/Cargo)
    git clone https://github.com/evmts/voltaire.git
    cd voltaire && zig build
    ```

    <Warning>
      `zig fetch` alone will not work - native Rust crypto libraries must be built via Cargo first.
    </Warning>
  </Tab>
</Tabs>

<Tip>
  Prefer importing from `"voltaire"` instead of `"@tevm/voltaire"`? Install with an alias:

  ```bash theme={null}
  # npm
  npm install voltaire@npm:@tevm/voltaire

  # bun
  bun add voltaire@npm:@tevm/voltaire

  # pnpm
  pnpm add voltaire@npm:@tevm/voltaire

  # yarn
  yarn add voltaire@npm:@tevm/voltaire
  ```

  Then import as `import { Address } from "voltaire"`.
</Tip>

<Warning>
  Runtime support: Native FFI is currently supported on <strong>Bun</strong>. In <strong>Node.js</strong>, use the regular TypeScript API or the WASM modules. Browsers use WASM.
</Warning>

## Imports

<Tabs>
  <Tab title="Primitives">
    ```typescript theme={null}
    import {
      Abi,
      AccessList,
      Address,
      Authorization,
      Base64,
      BinaryTree,
      Blob,
      BloomFilter,
      Bytecode,
      Chain,
      ChainId,
      Denomination,
      Ens,
      EventLog,
      FeeMarket,
      GasConstants,
      Hardfork,
      Hash,
      Hex,
      Int,
      Nonce,
      Opcode,
      PrivateKey,
      PublicKey,
      Rlp,
      Signature,
      Siwe,
      State,
      Transaction,
      Uint
    } from "@tevm/voltaire";
    ```
  </Tab>

  <Tab title="Cryptography">
    ```typescript theme={null}
    import {
      AesGcm,
      Bip39,
      Blake2,
      Bls12381,
      Bn254,
      Ed25519,
      EIP712,
      HDWallet,
      Keccak256,
      Kzg,
      P256,
      Pbkdf2,
      Poseidon,
      Ripemd160,
      Schnorr,
      Secp256k1,
      Secp256r1,
      Sha256,
      Sha3,
      Sha512,
      X25519
    } from "@tevm/voltaire";
    ```
  </Tab>

  <Tab title="EVM">
    ```typescript theme={null}
    import {
      Opcode,
      Bytecode,
      GasConstants
    } from "@tevm/voltaire";
    ```
  </Tab>

  <Tab title="Utils">
    ```typescript theme={null}
    import {
      Base64,
      Hex,
      Rlp
    } from "@tevm/voltaire";
    ```
  </Tab>

  <Tab title="JSON-RPC Provider">
    ```typescript theme={null}
    import { Provider } from "@tevm/voltaire";
    ```
  </Tab>
</Tabs>

## Import Paths

* Default ergonomic: `import { Address, Hex } from '@tevm/voltaire'`
* Tree-shakable subpaths: `import { Address } from '@tevm/voltaire/Address'`
* Avoid: `@tevm/voltaire/primitives/*`, `tevm/*`, `@voltaire/*`
* Aliasing: with `voltaire@npm:@tevm/voltaire`, you can `import { Address } from 'voltaire'` and still use the same subpaths for tree-shaking.

## Learn More

<CardGroup cols={2}>
  <Card title="Skills" icon="wand-magic-sparkles" href="/skills">
    Copyable implementations: providers, contracts, React hooks, and more
  </Card>

  <Card title="Playground" icon="flask" href="/playground">
    Experiment interactively with Voltaire primitives in your browser
  </Card>

  <Card title="What is Voltaire?" icon="circle-question" href="/introduction">
    Learn why to use Voltaire and what makes it unique
  </Card>

  <Card title="Core Concepts" icon="lightbulb" href="/concepts/branded-types">
    Understand branded types and the data-first design pattern
  </Card>

  <Card title="MCP Server" icon="robot" href="/model-context-protocol">
    Use AI to generate custom Skills for your contracts
  </Card>
</CardGroup>

## API Reference

### Primitives

#### ABI

ABI encoding and decoding. Supports functions, events, errors, and constructors per the [ABI specification](https://docs.soliditylang.org/en/latest/abi-spec.html).

[View docs →](/primitives/abi)

#### AccessList

EIP-2930 transaction access lists for optimized state access costs.

[View docs →](/primitives/accesslist)

#### Address

20-byte Ethereum addresses with EIP-55 checksumming and CREATE/CREATE2 calculation.

[View docs →](/primitives/address)

#### Authorization

EIP-7702 authorization lists for account abstraction code delegation.

[View docs →](/primitives/authorization)

#### Base64

RFC 4648 Base64 encoding and decoding.

[View docs →](/primitives/base64)

#### BinaryTree

Binary tree structures for Merkle trees and similar data structures.

[View docs →](/primitives/binarytree)

#### Blob

EIP-4844 blob transaction data (128KB blobs).

[View docs →](/primitives/blob)

#### BloomFilter

Ethereum log bloom filters for efficient log filtering.

[View docs →](/primitives/bloomfilter)

#### Bytecode

Contract bytecode manipulation, analysis, and metadata handling.

[View docs →](/primitives/bytecode)

#### Chain

Chain configuration and network parameters.

[View docs →](/primitives/chain)

#### ChainId

Network identifiers (mainnet, testnets, L2s).

[View docs →](/primitives/chainid)

#### Denomination

Ether denomination conversions (wei, gwei, ether).

[View docs →](/primitives/denomination)

#### Ens

ENS name normalization per ENSIP-15.

[View docs →](/primitives/ens)

#### EventLog

Transaction event log parsing and filtering.

[View docs →](/primitives/eventlog)

#### FeeMarket

EIP-1559 fee market calculations (base fee, priority fee).

[View docs →](/primitives/feemarket)

#### GasConstants

EVM gas costs per the Yellow Paper specification.

[View docs →](/primitives/gasconstants)

#### Hardfork

Network hardfork detection and feature flags.

[View docs →](/primitives/hardfork)

#### Hash

32-byte hash type with constant-time operations.

[View docs →](/primitives/hash)

#### Hex

Hexadecimal encoding with sized types and manipulation utilities.

[View docs →](/primitives/hex)

#### Int

Signed integer types (Int8, Int16, Int32, Int64, Int128, Int256).

[View docs →](/primitives/int)

#### Nonce

Transaction nonce management.

[View docs →](/primitives/nonce)

#### Opcode

EVM opcodes with gas costs and metadata.

[View docs →](/primitives/opcode)

#### PrivateKey

Private key operations including signing and address derivation.

[View docs →](/primitives/privatekey)

#### PublicKey

Public key operations including verification and address derivation.

[View docs →](/primitives/publickey)

#### Rlp

Recursive Length Prefix encoding and decoding.

[View docs →](/primitives/rlp)

#### Signature

ECDSA signatures (secp256k1, P-256, Ed25519) with recovery and normalization.

[View docs →](/primitives/signature)

#### Siwe

Sign-In with Ethereum (EIP-4361) authentication.

[View docs →](/primitives/siwe)

#### State

Account state management and storage slots.

[View docs →](/primitives/state)

#### Transaction

All Ethereum transaction types (Legacy, EIP-2930, EIP-1559, EIP-4844, EIP-7702).

[View docs →](/primitives/transaction)

#### Uint

Unsigned integer types (Uint8, Uint16, Uint32, Uint64, Uint128, Uint256).

[View docs →](/primitives/uint)

### Cryptography

#### AesGcm

AES-GCM authenticated encryption per NIST SP 800-38D.

[View docs →](/crypto/aesgcm)

#### Bip39

BIP-39 mnemonic phrase generation and validation.

[View docs →](/crypto/bip39)

#### Blake2

Blake2 hash function per RFC 7693.

[View docs →](/crypto/blake2)

#### Bls12381

BLS12-381 elliptic curve operations for Ethereum consensus layer.

[View docs →](/crypto/bls12381)

#### Bn254

BN254 (alt\_bn128) elliptic curve for zkSNARK verification.

[View docs →](/crypto/bn254)

#### Ed25519

Ed25519 EdDSA signatures per RFC 8032.

[View docs →](/crypto/ed25519)

#### EIP712

EIP-712 typed structured data signing.

[View docs →](/crypto/eip712)

#### HDWallet

BIP-32/BIP-44 hierarchical deterministic wallet key derivation.

[View docs →](/crypto/hdwallet)

#### Keccak256

Keccak-256 hash function (primary Ethereum hash) per FIPS 202.

[View docs →](/crypto/keccak256)

#### Kzg

KZG polynomial commitments for EIP-4844 blob verification.

[View docs →](/crypto/kzg)

#### P256

NIST P-256 (secp256r1) elliptic curve per FIPS 186-5.

[View docs →](/crypto/p256)

#### Pbkdf2

PBKDF2 key derivation function.

[View docs →](/crypto/pbkdf2)

#### Poseidon

Poseidon hash function for zero-knowledge proofs.

[View docs →](/crypto/poseidon)

#### Ripemd160

RIPEMD-160 hash function.

[View docs →](/crypto/ripemd160)

#### Schnorr

Schnorr signatures for Bitcoin compatibility.

[View docs →](/crypto/schnorr)

#### Secp256k1

Secp256k1 ECDSA for Ethereum transaction signing.

[View docs →](/crypto/secp256k1)

#### Secp256r1

Secp256r1 (P-256) ECDSA signatures.

[View docs →](/crypto/secp256r1)

#### Sha256

SHA-256 hash function per FIPS 180-4.

[View docs →](/crypto/sha256)

#### Sha3

SHA-3 hash function family per FIPS 202.

[View docs →](/crypto/sha3)

#### Sha512

SHA-512 hash function per FIPS 180-4.

[View docs →](/crypto/sha512)

#### X25519

X25519 ECDH key exchange per RFC 7748.

[View docs →](/crypto/x25519)
