An Aztec wallet application that allows dApps to interact with user accounts through a secure interface.
The wallet uses Native Messaging for secure communication between the browser extension and the Electron app:
┌─────────────────┐ stdio ┌──────────────────┐ Unix socket ┌──────────────────┐
│ Browser │ ←──(length-prefix)──→ │ Native Host │ ←──(newline JSON)──→ │ Electron App │
│ Extension │ JSON │ (compiled binary)│ │ (wallet-worker) │
└─────────────────┘ └──────────────────┘ └──────────────────┘
- Browser Extension: Communicates with dApps via secure encrypted channels (ECDH + AES-GCM)
- Native Host: A small binary (
native-host) that bridges extension ↔ Electron via stdio/socket - Electron App: Runs the wallet-worker process that handles account management and signing
- Node.js v22
- yarn
- A running Aztec local node (or access to a remote node)
Follow these steps to run the wallet in development mode:
-
Install dependencies
cd app yarn install -
Build the native host
The native host must be compiled before running the app:
yarn build:native-host
-
Start the wallet application
yarn start
Note: In dev mode, the app checks if the system-wide native messaging manifest is installed for Chrome. See WXT dev mode can't connect (Chrome) for setup instructions.
-
Install and run the browser extension
The browser extension must be running for the app to work properly.
The extension is located at
extension. To set it up:cd extension yarn install yarn devThis will launch a browser with the extension preloaded.
For Chromium-based browsers (Chrome, Brave, Edge):
- Open your browser and navigate to the extensions page:
- Chrome:
chrome://extensions - Brave:
brave://extensions - Edge:
edge://extensions
- Chrome:
- Enable "Developer mode" (toggle in the top-right corner)
- Click "Load unpacked"
- Select the
extension/.output/chrome-mv3-*directory
For Firefox:
yarn zip:firefox- Navigate to
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Select the created .zip file under
extension/.output/*
The native messaging system requires three components:
- Native Host Binary - The executable that bridges extension ↔ Electron
- Native Messaging Manifest - JSON file that tells the browser where to find the native host
- IPC Socket - Communication channel between native host and Electron app
In Production: The Electron app automatically installs manifests to user-level locations on startup via installNativeMessagingManifests() in native-messaging.ts.
In Development (WXT): Chrome runs with a custom --user-data-dir and only checks system-wide locations. You must manually install the manifest to the system-wide path (requires sudo).
macOS
| Environment | Path |
|---|---|
| Development | app/dist/native-host/darwin-arm64/native-host (arm64) or darwin-x64 (Intel) |
| Production | Inside app bundle: AztecKeychain.app/Contents/Resources/native-host |
| Environment | Path |
|---|---|
| All | ~/keychain/wallet.sock |
| Environment | Path | Installed By |
|---|---|---|
| Development (WXT) | /Library/Google/Chrome/NativeMessagingHosts/com.aztec.keychain.json |
Manual (sudo) |
| Production | ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.aztec.keychain.json |
App (auto) |
| Production (Chromium) | ~/Library/Application Support/Chromium/NativeMessagingHosts/com.aztec.keychain.json |
App (auto) |
| Environment | Path | Installed By |
|---|---|---|
| All | ~/Library/Application Support/Mozilla/NativeMessagingHosts/com.aztec.keychain.json |
App (auto) |
| Component | Path |
|---|---|
| Electron App | ~/keychain/aztec-keychain-debug.log |
| Native Host | ~/keychain/native-host.log |
Since WXT uses a custom Chrome profile, you must install the manifest system-wide:
sudo mkdir -p /Library/Google/Chrome/NativeMessagingHosts
sudo tee /Library/Google/Chrome/NativeMessagingHosts/com.aztec.keychain.json << 'EOF'
{
"name": "com.aztec.keychain",
"description": "Aztec Keychain Native Messaging Host",
"path": "/absolute/path/to/demo-wallet/app/dist/native-host/darwin-arm64/native-host",
"type": "stdio",
"allowed_origins": ["chrome-extension://<EXTENSION_ID>/"]
}
EOFReplace:
/absolute/path/to/demo-walletwith your actual repo path<EXTENSION_ID>with your extension's ID (shown inchrome://extensions)
Linux
| Environment | Path |
|---|---|
| Development | app/dist/native-host/linux-x64/native-host |
| Production | Packaged location (e.g., /opt/AztecKeychain/resources/native-host) |
| Environment | Path |
|---|---|
| All | ~/keychain/wallet.sock |
| Environment | Path | Installed By |
|---|---|---|
| Development (WXT) | /etc/opt/chrome/native-messaging-hosts/com.aztec.keychain.json |
Manual (sudo) |
| Production (Chrome) | ~/.config/google-chrome/NativeMessagingHosts/com.aztec.keychain.json |
App (auto) |
| Production (Chromium) | ~/.config/chromium/NativeMessagingHosts/com.aztec.keychain.json |
App (auto) |
| Environment | Path | Installed By |
|---|---|---|
| All | ~/.mozilla/native-messaging-hosts/com.aztec.keychain.json |
App (auto) |
| Component | Path |
|---|---|
| Electron App | ~/keychain/aztec-keychain-debug.log |
| Native Host | ~/keychain/native-host.log |
sudo mkdir -p /etc/opt/chrome/native-messaging-hosts
sudo tee /etc/opt/chrome/native-messaging-hosts/com.aztec.keychain.json << 'EOF'
{
"name": "com.aztec.keychain",
"description": "Aztec Keychain Native Messaging Host",
"path": "/absolute/path/to/demo-wallet/app/dist/native-host/linux-x64/native-host",
"type": "stdio",
"allowed_origins": ["chrome-extension://<EXTENSION_ID>/"]
}
EOFWindows
| Environment | Path |
|---|---|
| Development | app\dist\native-host\win32-x64\native-host.exe |
| Production | Inside app installation directory |
| Environment | Path |
|---|---|
| All | \\.\pipe\aztec-keychain-wallet |
| Environment | Path | Installed By |
|---|---|---|
| All | %LOCALAPPDATA%\AztecKeychain\com.aztec.keychain.json |
App (auto) |
| Environment | Path | Installed By |
|---|---|---|
| All | %LOCALAPPDATA%\AztecKeychain\com.aztec.keychain.json |
App (auto) |
The app automatically creates these registry keys pointing to the manifest file:
| Browser | Registry Key |
|---|---|
| Chrome | HKCU\Software\Google\Chrome\NativeMessagingHosts\com.aztec.keychain |
| Firefox | HKCU\Software\Mozilla\NativeMessagingHosts\com.aztec.keychain |
| Component | Path |
|---|---|
| Electron App | %USERPROFILE%\keychain\aztec-keychain-debug.log |
| Native Host | %USERPROFILE%\keychain\native-host.log |
{
"name": "com.aztec.keychain",
"description": "Aztec Keychain Native Messaging Host",
"path": "/absolute/path/to/native-host",
"type": "stdio",
"allowed_origins": ["chrome-extension://EXTENSION_ID/"]
}{
"name": "com.aztec.keychain",
"description": "Aztec Keychain Native Messaging Host",
"path": "/absolute/path/to/native-host",
"type": "stdio",
"allowed_extensions": ["[email protected]"]
}After downloading a release, run:
xattr -d com.apple.quarantine ./AztecKeychain.appTo avoid the "this app is damaged" message.
- Ensure the Electron app is running
- Check
~/keychain/native-host.logfor connection errors - Verify the manifest is installed correctly for your browser
- Confirm the extension ID in the manifest matches your installed extension
- Ensure the native host binary exists and is executable (
chmod +x native-host) - Check that the manifest
pathpoints to the correct binary location - On macOS, you may need to allow the binary in System Preferences > Security & Privacy
In dev mode, Chrome uses a custom --user-data-dir and only checks system-wide manifest locations:
- macOS:
/Library/Google/Chrome/NativeMessagingHosts/ - Linux:
/etc/opt/chrome/native-messaging-hosts/
You must manually install the manifest there with sudo.
- Verify the manifest file exists at the expected path
- Check that the JSON is valid (no syntax errors)
- Ensure the
pathin the manifest is an absolute path to the native host binary - On Windows, verify the registry key exists and points to the manifest file