A secure Ethereum wallet using Chrome Native Messaging
Daemon Wallet implements a secure wallet architecture where private keys are managed by a CLI application that communicates with a Chrome extension via Native Messaging. This follows the security model pioneered by KeePassXC.
Browser DApp -> Chrome Extension -> Native Messaging -> Daemon Service -> Keystore
- Browser DApp: Any Web3-enabled website
- Chrome Extension: Injects Web3 provider, forwards requests
- Daemon Service: Terminal application handling approvals
- Keystore: Encrypted wallet storage on local filesystem
# Install all dependencies
$ make install
# Create a new wallet (enforces one wallet maximum)
$ make create-wallet
# Start the daemon (with auto-reload keystore)
$ make start-daemon
# Create additional accounts (HD derivation)
$ make create-account
# Export all wallet data (dangerous!)
$ make export-wallet
-
Create a wallet
$ cd packages/cli $ ./bin/wallet-cli create
-
Start the daemon
$ cd packages/daemon $ ./bin/daemon-wallet-service
-
Install Chrome extension (see extension package)
-
Connect to a DApp and approve transactions in your terminal
daemonWallet/
├── packages/
│ ├── core/ # Shared libraries (keystore, crypto, config)
│ ├── cli/ # Wallet management CLI tool
│ ├── daemon/ # Native messaging daemon service
│ └── extension/ # Chrome extension (not included)
├── scripts/ # Build and installation scripts
└── docs/ # Documentation
# Run all tests
$ make test
# Start daemon in development mode
$ make dev
# Check daemon status
$ make daemon-status
# See all commands
$ make help
- Private keys never leave the CLI - The browser extension cannot access keys
- Terminal-based approval - All transactions require explicit approval
- Encrypted storage - Keys are encrypted with scrypt + AES-256-GCM
- Manual lock only - No auto-lock timeout (unlock persists until manual lock or restart)
- State machine validation - All requests validated through security pipeline
- Circuit breakers - Automatic error recovery and protection
- Account visibility control - Hide/show accounts without deleting them
Configuration is stored in ~/.daemon-wallet/config.json
:
{
"networks": {
"mainnet": { "rpc": "...", "chainId": 1 },
"sepolia": { "rpc": "...", "chainId": 11155111 }
},
"security": {
"unlockTimeout": 900,
"allowBrowserUnlock": false,
"requireApproval": true
}
}
The daemon must be registered as a native messaging host:
-
Create host manifest at:
- Linux:
~/.config/google-chrome/NativeMessagingHosts/
- macOS:
~/Library/Application Support/Google/Chrome/NativeMessagingHosts/
- Linux:
-
Host manifest format:
{ "name": "com.daemonwallet.host", "description": "Daemon Wallet Native Host", "path": "/absolute/path/to/daemon-wallet-service", "type": "stdio", "allowed_origins": ["chrome-extension://YOUR_EXTENSION_ID/"] }
See individual package READMEs:
- Core API - Keystore and utilities
- CLI Commands - Wallet management
- Daemon API - Native messaging protocol
This is a proof of concept. Contributions are welcome:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT