Skill — Copyable reference implementation. Use as-is or customize. See Skills Philosophy.
WalletClient Implementation
This Skill documents how to implement a viem-compatible WalletClient using Voltaire primitives. The implementation provides a drop-in replacement for viem’s wallet functionality.Quick Start
Account Types
Local Account
Local accounts sign transactions and messages locally using a private key. The signed data is then sent to the network viaeth_sendRawTransaction.
JSON-RPC Account
JSON-RPC accounts delegate signing to an external wallet (like MetaMask). The wallet handles signing viaeth_sendTransaction, personal_sign, etc.
Wallet Actions
sendTransaction
Creates, signs, and sends a transaction to the network.signMessage
Signs a message using EIP-191 format.signTypedData
Signs EIP-712 typed data.signTransaction
Signs a transaction without broadcasting it.getAddresses / requestAddresses
Extend Pattern
Add custom actions to the client:Transports
HTTP Transport
Custom Transport (EIP-1193 Provider)
Fallback Transport
Chain Configuration
Error Handling
Integration with PublicClient
WalletClient is typically used alongside PublicClient for read operations:File Structure
Implementation Notes
- Account Hoisting: Account can be set on client creation, automatically used by all actions
- parseAccount: Converts string address to JSON-RPC account object
- Chain Validation: Validates connected chain matches expected chain before sending
- Fee Estimation: Automatically estimates EIP-1559 fees if not provided
- Transaction Preparation: Fills nonce, gas, fees automatically
- Extend Pattern: Allows adding custom actions while preserving base functionality

