Overview
Signers provide a unified interface for cryptographic signing operations in Ethereum. TheSigner interface abstracts private key management and supports:
- EIP-191 Personal Sign - Sign human-readable messages with Ethereum prefix
- Transaction Signing - Sign all transaction types (Legacy, EIP-2930, EIP-1559, EIP-4844, EIP-7702)
- EIP-712 Typed Data - Sign structured data for dApps and protocols
Quick Start
Signer Interface
All signers implement theSigner interface:
PrivateKeySignerImpl
WASM-based implementation using Zig cryptographic primitives.Construction
Error if private key is not exactly 32 bytes.
Properties
| Property | Type | Description |
|---|---|---|
address | string | EIP-55 checksummed Ethereum address |
publicKey | Uint8Array | 64-byte uncompressed public key |
signMessage
Signs a message using EIP-191 personal sign format.\x19Ethereum Signed Message:\n${length}${message}
The message is prefixed, then hashed with Keccak256 before signing.
signTransaction
Signs Ethereum transactions of any type.- Legacy (Type 0)
- EIP-1559 (Type 2)
- EIP-4844 (Type 3)
- Type 0 (Legacy):
vincludes chainId per EIP-155 (v = recovery_id + 35 + chainId * 2) - Type 1+ (Modern): Uses
yParity(0 or 1) instead ofv
signTypedData
Signs EIP-712 structured typed data.EIP-712 provides protection against signature replay across different dApps through domain separation.
Utility Functions
getAddress
Extract address from any signer instance.recoverTransactionAddress
Security Considerations
Best practices:- Never log or serialize the private key
- Clear sensitive data from memory when possible
- Use hardware wallets or secure enclaves for production
- Validate all inputs before signing
Implementation Details
PrivateKeySignerImpl uses:
- @noble/curves/secp256k1 for public key derivation
- WASM Zig primitives for signing operations (
primitives.secp256k1Sign) - Keccak256Wasm for message and address hashing
- Eip712Wasm for typed data hashing
- Audited public key derivation (noble)
- High-performance signing (native Zig via WASM)
- Consistent cross-platform behavior
Usage Patterns
Wallet Integration
Multi-Signature Workflow
SIWE (Sign-In with Ethereum)
Related
- Secp256k1 - Underlying ECDSA curve operations
- EIP-712 - Typed structured data hashing
- Keccak256 - Message hashing
- Signature - Signature type and utilities
- Transaction - Transaction types and serialization
- SIWE - Sign-In with Ethereum
- Signers (Effect) - Effect.ts integration with Schema validation

