{"id":43832340,"url":"https://github.com/AztecProtocol/demo-wallet","last_synced_at":"2026-02-17T17:00:46.301Z","repository":{"id":325228475,"uuid":"1086448570","full_name":"AztecProtocol/demo-wallet","owner":"AztecProtocol","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-11T19:23:47.000Z","size":1960,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-12T02:59:05.575Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AztecProtocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-30T12:40:10.000Z","updated_at":"2026-02-11T19:12:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/AztecProtocol/demo-wallet","commit_stats":null,"previous_names":["aztecprotocol/demo-wallet"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/AztecProtocol/demo-wallet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AztecProtocol%2Fdemo-wallet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AztecProtocol%2Fdemo-wallet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AztecProtocol%2Fdemo-wallet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AztecProtocol%2Fdemo-wallet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AztecProtocol","download_url":"https://codeload.github.com/AztecProtocol/demo-wallet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AztecProtocol%2Fdemo-wallet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29550799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T14:33:00.708Z","status":"ssl_error","status_checked_at":"2026-02-17T14:32:58.657Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-06T03:32:31.034Z","updated_at":"2026-02-17T17:00:46.295Z","avatar_url":"https://github.com/AztecProtocol.png","language":"TypeScript","readme":"# demo-wallet\n\nAn Aztec wallet application that allows dApps to interact with user accounts through a secure interface.\n\n## Architecture\n\nThe wallet uses **Native Messaging** for secure communication between the browser extension and the Electron app:\n\n```\n┌─────────────────┐      stdio            ┌──────────────────┐     Unix socket      ┌──────────────────┐\n│ Browser         │ ←──(length-prefix)──→ │ Native Host      │ ←──(newline JSON)──→ │ Electron App     │\n│ Extension       │      JSON             │ (compiled binary)│                      │ (wallet-worker)  │\n└─────────────────┘                       └──────────────────┘                      └──────────────────┘\n```\n\n- **Browser Extension**: Communicates with dApps via secure encrypted channels (ECDH + AES-GCM)\n- **Native Host**: A small binary (`native-host`) that bridges extension ↔ Electron via stdio/socket\n- **Electron App**: Runs the wallet-worker process that handles account management and signing\n\n## Updating to Latest Nightly\n\n```bash\nnode scripts/update-to-nightly.js                                             # auto-detect latest\nnode scripts/update-to-nightly.js --version 4.0.0-nightly.20260206            # specific version\nnode scripts/update-to-nightly.js --network devnet                             # update for devnet instead of nextnet\nnode scripts/update-to-nightly.js --rollup-version 3863723750                  # set rollup version manually\n```\n\nUpdates `@aztec/*` deps in `app/` and `extension/`, runs `yarn install`, and fetches the rollup version from the network's node URL (configured in `networks.ts`) to update the version. Use `--network` to target a different network (default: `nextnet`).\n\n## Development Setup\n\n### Prerequisites\n\n- Node.js v22\n- yarn\n- A running Aztec local node (or access to a remote node)\n\n### Running in Development Mode\n\nFollow these steps to run the wallet in development mode:\n\n1. **Install dependencies**\n\n   ```bash\n   cd app\n   yarn install\n   ```\n\n2. **Build the native host**\n\n   The native host must be compiled before running the app:\n\n   ```bash\n   yarn build:native-host\n   ```\n\n3. **Start the wallet application**\n\n   ```bash\n   yarn start\n   ```\n\n   Note: In dev mode, the app checks if the system-wide native messaging manifest is installed for Chrome, and prompts the user to do so with a command if not found. See [WXT dev mode can't connect (Chrome)](#wxt-dev-mode-cant-connect-chrome) for more details\n\n4. **Install and run the browser extension**\n\n   The browser extension must be running for the app to work properly.\n\n   The extension is located at `extension`. To set it up:\n\n   ```bash\n   cd extension\n   yarn install\n   yarn dev\n   ```\n\n   This will launch a browser with the extension preloaded.\n\n### Loading the Extension Manually (not required if running wxt on the terminal)\n\n**For Chromium-based browsers (Chrome, Brave, Edge):**\n\n1. Open your browser and navigate to the extensions page:\n   - Chrome: `chrome://extensions`\n   - Brave: `brave://extensions`\n   - Edge: `edge://extensions`\n2. Enable \"Developer mode\" (toggle in the top-right corner)\n3. Click \"Load unpacked\"\n4. Select the `extension/.output/chrome-mv3-*` directory\n\n**For Firefox:**\n\n```bash\nyarn zip:firefox\n```\n\n1. Navigate to `about:debugging#/runtime/this-firefox`\n2. Click \"Load Temporary Add-on\"\n3. Select the created .zip file under `extension/.output/*`\n\n---\n\n## Native Messaging Reference\n\nThe native messaging system requires three components:\n\n1. **Native Host Binary** - The executable that bridges extension ↔ Electron\n2. **Native Messaging Manifest** - JSON file that tells the browser where to find the native host\n3. **IPC Socket** - Communication channel between native host and Electron app\n\n### How Manifest Installation Works\n\n**In Production**: The Electron app automatically installs manifests to user-level locations on startup via `installNativeMessagingManifests()` in [native-messaging.ts](app/src/native-messaging.ts).\n\n**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`).\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003emacOS\u003c/strong\u003e\u003c/summary\u003e\n\n### Native Host Binary\n\n| Environment | Path                                                                            |\n| ----------- | ------------------------------------------------------------------------------- |\n| Development | `app/dist/native-host/darwin-arm64/native-host` (arm64) or `darwin-x64` (Intel) |\n| Production  | Inside app bundle: `AztecKeychain.app/Contents/Resources/native-host`           |\n\n### IPC Socket\n\n| Environment | Path                     |\n| ----------- | ------------------------ |\n| All         | `~/keychain/wallet.sock` |\n\n### Chrome / Chromium Manifest\n\n| Environment           | Path                                                                                       | Installed By    |\n| --------------------- | ------------------------------------------------------------------------------------------ | --------------- |\n| Development (WXT)     | `/Library/Google/Chrome/NativeMessagingHosts/com.aztec.keychain.json`                      | Manual (`sudo`) |\n| Production            | `~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.aztec.keychain.json` | App (auto)      |\n| Production (Chromium) | `~/Library/Application Support/Chromium/NativeMessagingHosts/com.aztec.keychain.json`      | App (auto)      |\n\n### Firefox Manifest\n\n| Environment | Path                                                                                 | Installed By |\n| ----------- | ------------------------------------------------------------------------------------ | ------------ |\n| All         | `~/Library/Application Support/Mozilla/NativeMessagingHosts/com.aztec.keychain.json` | App (auto)   |\n\n### Debug Logs\n\n| Component    | Path                                  |\n| ------------ | ------------------------------------- |\n| Electron App | `~/keychain/aztec-keychain-debug.log` |\n| Native Host  | `~/keychain/native-host.log`          |\n\n### Dev Mode Setup (macOS + Chrome)\n\nSince WXT uses a custom Chrome profile, you must install the manifest system-wide:\n\n```bash\nsudo mkdir -p /Library/Google/Chrome/NativeMessagingHosts\nsudo tee /Library/Google/Chrome/NativeMessagingHosts/com.aztec.keychain.json \u003c\u003c 'EOF'\n{\n  \"name\": \"com.aztec.keychain\",\n  \"description\": \"Aztec Keychain Native Messaging Host\",\n  \"path\": \"/absolute/path/to/demo-wallet/app/dist/native-host/darwin-arm64/native-host\",\n  \"type\": \"stdio\",\n  \"allowed_origins\": [\"chrome-extension://\u003cEXTENSION_ID\u003e/\"]\n}\nEOF\n```\n\nReplace:\n\n- `/absolute/path/to/demo-wallet` with your actual repo path\n- `\u003cEXTENSION_ID\u003e` with your extension's ID (shown in `chrome://extensions`)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eLinux\u003c/strong\u003e\u003c/summary\u003e\n\n### Native Host Binary\n\n| Environment | Path                                                                 |\n| ----------- | -------------------------------------------------------------------- |\n| Development | `app/dist/native-host/linux-x64/native-host`                         |\n| Production  | Packaged location (e.g., `/opt/AztecKeychain/resources/native-host`) |\n\n### IPC Socket\n\n| Environment | Path                     |\n| ----------- | ------------------------ |\n| All         | `~/keychain/wallet.sock` |\n\n### Chrome / Chromium Manifest\n\n| Environment           | Path                                                                   | Installed By    |\n| --------------------- | ---------------------------------------------------------------------- | --------------- |\n| Development (WXT)     | `/etc/opt/chrome/native-messaging-hosts/com.aztec.keychain.json`       | Manual (`sudo`) |\n| Production (Chrome)   | `~/.config/google-chrome/NativeMessagingHosts/com.aztec.keychain.json` | App (auto)      |\n| Production (Chromium) | `~/.config/chromium/NativeMessagingHosts/com.aztec.keychain.json`      | App (auto)      |\n\n### Firefox Manifest\n\n| Environment | Path                                                        | Installed By |\n| ----------- | ----------------------------------------------------------- | ------------ |\n| All         | `~/.mozilla/native-messaging-hosts/com.aztec.keychain.json` | App (auto)   |\n\n### Debug Logs\n\n| Component    | Path                                  |\n| ------------ | ------------------------------------- |\n| Electron App | `~/keychain/aztec-keychain-debug.log` |\n| Native Host  | `~/keychain/native-host.log`          |\n\n### Dev Mode Setup (Linux + Chrome)\n\n```bash\nsudo mkdir -p /etc/opt/chrome/native-messaging-hosts\nsudo tee /etc/opt/chrome/native-messaging-hosts/com.aztec.keychain.json \u003c\u003c 'EOF'\n{\n  \"name\": \"com.aztec.keychain\",\n  \"description\": \"Aztec Keychain Native Messaging Host\",\n  \"path\": \"/absolute/path/to/demo-wallet/app/dist/native-host/linux-x64/native-host\",\n  \"type\": \"stdio\",\n  \"allowed_origins\": [\"chrome-extension://\u003cEXTENSION_ID\u003e/\"]\n}\nEOF\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eWindows\u003c/strong\u003e\u003c/summary\u003e\n\n### Native Host Binary\n\n| Environment | Path                                             |\n| ----------- | ------------------------------------------------ |\n| Development | `app\\dist\\native-host\\win32-x64\\native-host.exe` |\n| Production  | Inside app installation directory                |\n\n### IPC Socket (Named Pipe)\n\n| Environment | Path                             |\n| ----------- | -------------------------------- |\n| All         | `\\\\.\\pipe\\aztec-keychain-wallet` |\n\n### Chrome Manifest\n\n| Environment | Path                                                   | Installed By |\n| ----------- | ------------------------------------------------------ | ------------ |\n| All         | `%LOCALAPPDATA%\\AztecKeychain\\com.aztec.keychain.json` | App (auto)   |\n\n### Firefox Manifest\n\n| Environment | Path                                                   | Installed By |\n| ----------- | ------------------------------------------------------ | ------------ |\n| All         | `%LOCALAPPDATA%\\AztecKeychain\\com.aztec.keychain.json` | App (auto)   |\n\n### Registry Keys\n\nThe app automatically creates these registry keys pointing to the manifest file:\n\n| Browser | Registry Key                                                          |\n| ------- | --------------------------------------------------------------------- |\n| Chrome  | `HKCU\\Software\\Google\\Chrome\\NativeMessagingHosts\\com.aztec.keychain` |\n| Firefox | `HKCU\\Software\\Mozilla\\NativeMessagingHosts\\com.aztec.keychain`       |\n\n### Debug Logs\n\n| Component    | Path                                              |\n| ------------ | ------------------------------------------------- |\n| Electron App | `%USERPROFILE%\\keychain\\aztec-keychain-debug.log` |\n| Native Host  | `%USERPROFILE%\\keychain\\native-host.log`          |\n\n\u003c/details\u003e\n\n---\n\n## Manifest Format Reference\n\n### Chrome Manifest (uses `allowed_origins`)\n\n```json\n{\n  \"name\": \"com.aztec.keychain\",\n  \"description\": \"Aztec Keychain Native Messaging Host\",\n  \"path\": \"/absolute/path/to/native-host\",\n  \"type\": \"stdio\",\n  \"allowed_origins\": [\"chrome-extension://EXTENSION_ID/\"]\n}\n```\n\n### Firefox Manifest (uses `allowed_extensions`)\n\n```json\n{\n  \"name\": \"com.aztec.keychain\",\n  \"description\": \"Aztec Keychain Native Messaging Host\",\n  \"path\": \"/absolute/path/to/native-host\",\n  \"type\": \"stdio\",\n  \"allowed_extensions\": [\"aztec-keychain@aztec.network\"]\n}\n```\n\n---\n\n## Production Usage\n\n### Note for Mac users\n\nAfter downloading a release, run:\n\n```bash\nxattr -d com.apple.quarantine ./AztecKeychain.app\n```\n\nTo avoid the \"this app is damaged\" message.\n\n---\n\n## Troubleshooting\n\n### Extension shows \"Wallet backend not connected\"\n\n1. Ensure the Electron app is running\n2. Check `~/keychain/native-host.log` for connection errors\n3. Verify the manifest is installed correctly for your browser\n4. Confirm the extension ID in the manifest matches your installed extension\n\n### Native host fails to start\n\n1. Ensure the native host binary exists and is executable (`chmod +x native-host`)\n2. Check that the manifest `path` points to the correct binary location\n3. On macOS, you may need to allow the binary in System Preferences \u003e Security \u0026 Privacy\n\n### WXT dev mode can't connect (Chrome)\n\nIn dev mode, Chrome uses a custom `--user-data-dir` and only checks **system-wide** manifest locations:\n\n- macOS: `/Library/Google/Chrome/NativeMessagingHosts/`\n- Linux: `/etc/opt/chrome/native-messaging-hosts/`\n\nYou must manually install the manifest there with `sudo`.\n\n### Manifest not being found\n\n1. Verify the manifest file exists at the expected path\n2. Check that the JSON is valid (no syntax errors)\n3. Ensure the `path` in the manifest is an absolute path to the native host binary\n4. On Windows, verify the registry key exists and points to the manifest file\n","funding_links":[],"categories":["Coding"],"sub_categories":["Dev Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAztecProtocol%2Fdemo-wallet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAztecProtocol%2Fdemo-wallet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAztecProtocol%2Fdemo-wallet/lists"}