Skip to main content
@tevm/voltaire/signers (also exported as Signers from @tevm/voltaire) provides the Signer interface and PrivateKeySignerImpl, a WASM-backed signer that encapsulates the 32-byte private key inside a private closure and exposes only the checksummed address, 64-byte publicKey, and signing methods.

Signing Flows

Quick Start

PrivateKeySignerImpl uses the Zig WASM primitives (Keccak256Wasm, secp256k1Sign, Eip712Wasm). Initialize the WASM module once before creating a signer.

API Reference

Signer Interface

Exports (@tevm/voltaire/signers)

Security Notes

PrivateKeySignerImpl isolates the private key in a closure to prevent accidental property serialization (JSON.stringify, Object.keys), but the bytes still reside in JS/WASM heap memory for the lifetime of the instance. For high-value production keys, isolate signing behind a dedicated HSM, KMS, or hardware wallet.
  • fromPrivateKey throws Error if the key is not exactly 32 bytes (64 hex characters).
  • Calling PrivateKeySignerImpl.fromPrivateKey before initializing WASM (await Keccak256Wasm.init()) throws because Keccak256Wasm.hash requires an initialized WASM instance.