# urriki1502/wam-silent-wallet architecture

> Architecture diagram of the GitHub repository urriki1502/wam-silent-wallet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/urriki1502/wam-silent-wallet
- Repository: https://github.com/urriki1502/wam-silent-wallet

## Overview

WAM Silent Wallet is an experimental, regtest-only PySide6 desktop wallet. The user-facing flow runs from the Qt application and its pages through wallet/session and payment orchestration; the wallet delegates Silent Payments protocol work to the separate WSP engine, while node access goes through the WAM SDK to local WAM Core. The graph also preserves receive, recovery, sync, configuration, fees, and privacy inspection. Some domain links are documented in the README; source excerpts are partial, so unsampled implementation details and uncertain call paths are omitted.

Main entry points: [`src/wam_silent_wallet/main_window.py`](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/main_window.py) (Main window), [`src/wam_silent_wallet/services/wallet_service.py`](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/wallet_service.py) (Wallet service), [`src/wam_silent_wallet/services/node_service.py`](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/node_service.py) (Node service), [`src/wam_silent_wallet/services/payment_service.py`](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/payment_service.py) (Payment orchestration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_app["Qt application entry<br/>[app.py]"]
  node_window["Main window<br/>[main_window.py]"]
  node_lock["Lock and unlock<br/>[lock_page.py]"]
  node_receive["Receive page<br/>[receive_page.py]"]
  node_send["Send page<br/>[send_page.py]"]
  node_payments["Payments page<br/>[payments_page.py]"]
  node_backup["Backup page<br/>[backup_page.py]"]
  node_nodepage["Node page<br/>[node_page.py]"]
  node_privpage["Privacy page<br/>[privacy_page.py]"]
  node_settings["Settings page<br/>[settings_page.py]"]
  node_components["Shared UI components<br/>[ui_components.py]"]
end

subgraph group_coord["Wallet orchestration"]
  node_session["Unlock session<br/>[session_service.py]"]
  node_wallet["Wallet service<br/>[wallet_service.py]"]
  node_payment["Payment orchestration<br/>[payment_service.py]"]
  node_fees["Fee policy<br/>[fee_service.py]"]
  node_sync["Background sync<br/>[sync_service.py]"]
  node_worker["Sync worker<br/>[sync_worker.py]"]
  node_config["Runtime configuration<br/>[config_service.py]"]
  node_db[("Wallet state store")]
end

subgraph group_protocol["Payment protocol"]
  node_wsp["WSP-1 protocol engine"]
end

subgraph group_node["Node and privacy"]
  node_node_service["Node service<br/>[node_service.py]"]
  node_privacy["Network privacy checks<br/>[privacy_service.py]"]
  node_sdk["WAM SDK"]
  node_core["Local WAM Core"]
  node_chain["WAM regtest chain"]
end

node_user(("Wallet user"))

node_user -->|"launches"| node_app
node_app -->|"creates"| node_window
node_window -->|"hosts"| node_lock
node_window -->|"hosts"| node_receive
node_window -->|"hosts"| node_send
node_window -->|"hosts"| node_payments
node_window -->|"hosts"| node_backup
node_window -->|"hosts"| node_nodepage
node_window -->|"hosts"| node_privpage
node_window -->|"hosts"| node_settings
node_window -->|"uses"| node_session
node_window -->|"uses"| node_wallet
node_window -->|"uses"| node_node_service
node_window -->|"uses"| node_config
node_window -->|"coordinates"| node_sync
node_window -->|"starts"| node_worker
node_session -->|"verifies passphrase"| node_wallet
node_send -->|"requests review"| node_payment
node_payment -->|"constructs payment"| node_wallet
node_payment -->|"scans and broadcasts"| node_node_service
node_payment -->|"quotes fees"| node_fees
node_fees -->|"queries node"| node_node_service
node_wallet -->|"uses protocol"| node_wsp
node_wallet -->|"persists wallet state"| node_db
node_backup -.->|"supports recovery"| node_wallet
node_sync -->|"scans wallet"| node_wallet
node_sync -->|"checks readiness"| node_node_service
node_worker -.->|"runs cycles"| node_sync
node_privpage -->|"refreshes status"| node_privacy
node_privacy -->|"inspects network"| node_node_service
node_node_service -->|"uses RPC client"| node_sdk
node_sdk -->|"sends RPC"| node_core
node_core -->|"validates chain"| node_chain
node_window -.->|"renders"| node_components

click node_app "https://github.com/urriki1502/wam-silent-wallet/blob/main/app.py"
click node_window "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/main_window.py"
click node_lock "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/lock_page.py"
click node_receive "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/receive_page.py"
click node_send "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/send_page.py"
click node_payments "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/payments_page.py"
click node_backup "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/backup_page.py"
click node_nodepage "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/node_page.py"
click node_privpage "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/privacy_page.py"
click node_settings "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/settings_page.py"
click node_components "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/ui_components.py"
click node_session "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/session_service.py"
click node_wallet "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/wallet_service.py"
click node_payment "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/payment_service.py"
click node_fees "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/fee_service.py"
click node_sync "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/sync_service.py"
click node_worker "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/sync_worker.py"
click node_config "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/config_service.py"
click node_node_service "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/node_service.py"
click node_privacy "https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/privacy_service.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_window,node_lock,node_receive,node_send,node_payments,node_backup,node_nodepage,node_privpage,node_settings,node_components,node_user toneBlue
class node_session,node_wallet,node_payment,node_fees,node_sync,node_worker,node_config,node_db toneAmber
class node_wsp toneMint
class node_node_service,node_privacy,node_sdk,node_core,node_chain toneRose
```

## Components

### Desktop interface

- [Qt application entry](https://github.com/urriki1502/wam-silent-wallet/blob/main/app.py): `app.py`
- [Main window](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/main_window.py): `src/wam_silent_wallet/main_window.py`
- [Lock and unlock](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/lock_page.py): `src/wam_silent_wallet/pages/lock_page.py`
- [Receive page](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/receive_page.py): `src/wam_silent_wallet/pages/receive_page.py`
- [Send page](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/send_page.py): `src/wam_silent_wallet/pages/send_page.py`
- [Payments page](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/payments_page.py): `src/wam_silent_wallet/pages/payments_page.py`
- [Backup page](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/backup_page.py): `src/wam_silent_wallet/pages/backup_page.py`
- [Node page](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/node_page.py): `src/wam_silent_wallet/pages/node_page.py`
- [Privacy page](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/privacy_page.py): `src/wam_silent_wallet/pages/privacy_page.py`
- [Settings page](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/pages/settings_page.py): `src/wam_silent_wallet/pages/settings_page.py`
- [Shared UI components](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/ui_components.py): `src/wam_silent_wallet/ui_components.py`

### Wallet orchestration

- [Unlock session](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/session_service.py): `src/wam_silent_wallet/services/session_service.py`
- [Wallet service](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/wallet_service.py): `src/wam_silent_wallet/services/wallet_service.py`
- [Payment orchestration](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/payment_service.py): `src/wam_silent_wallet/services/payment_service.py`
- [Fee policy](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/fee_service.py): `src/wam_silent_wallet/services/fee_service.py`
- [Background sync](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/sync_service.py): `src/wam_silent_wallet/services/sync_service.py`
- [Sync worker](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/sync_worker.py): `src/wam_silent_wallet/services/sync_worker.py`
- [Runtime configuration](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/config_service.py): `src/wam_silent_wallet/services/config_service.py`
- **Wallet state store**

### Payment protocol

- **WSP-1 protocol engine**

### Node and privacy

- [Node service](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/node_service.py): `src/wam_silent_wallet/services/node_service.py`
- [Network privacy checks](https://github.com/urriki1502/wam-silent-wallet/blob/main/src/wam_silent_wallet/services/privacy_service.py): `src/wam_silent_wallet/services/privacy_service.py`
- **WAM SDK**
- **Local WAM Core**
- **WAM regtest chain**

### Other components

- **Wallet user**

## Connections

- Wallet user → Qt application entry: launches (evidence: `README.md`)
- Qt application entry → Main window: creates (evidence: `app.py`)
- Main window → Lock and unlock: hosts (evidence: `src/wam_silent_wallet/main_window.py`)
- Main window → Receive page: hosts (evidence: `src/wam_silent_wallet/main_window.py`)
- Main window → Send page: hosts (evidence: `src/wam_silent_wallet/main_window.py`)
- Main window → Payments page: hosts (evidence: `src/wam_silent_wallet/main_window.py`)
- Main window → Backup page: hosts (evidence: `src/wam_silent_wallet/main_window.py`)
- Main window → Node page: hosts (evidence: `src/wam_silent_wallet/main_window.py`)
- Main window → Privacy page: hosts (evidence: `src/wam_silent_wallet/main_window.py`)
- Main window → Settings page: hosts (evidence: `src/wam_silent_wallet/main_window.py`)
- Main window → Unlock session: uses (evidence: `src/wam_silent_wallet/main_window.py`)
- Main window → Wallet service: uses (evidence: `src/wam_silent_wallet/main_window.py`)
- Main window → Node service: uses (evidence: `src/wam_silent_wallet/main_window.py`)
- Main window → Runtime configuration: uses (evidence: `src/wam_silent_wallet/main_window.py`)
- Main window → Background sync: coordinates (evidence: `src/wam_silent_wallet/main_window.py`)
- Main window → Sync worker: starts (evidence: `src/wam_silent_wallet/main_window.py`)
- Unlock session → Wallet service: verifies passphrase (evidence: `src/wam_silent_wallet/services/session_service.py`)
- Send page → Payment orchestration: requests review (evidence: `src/wam_silent_wallet/pages/send_page.py`)
- Payment orchestration → Wallet service: constructs payment (evidence: `src/wam_silent_wallet/services/payment_service.py`)
- Payment orchestration → Node service: scans and broadcasts (evidence: `src/wam_silent_wallet/services/payment_service.py`)
- Payment orchestration → Fee policy: quotes fees (evidence: `src/wam_silent_wallet/services/payment_service.py`)
- Fee policy → Node service: queries node (evidence: `src/wam_silent_wallet/services/fee_service.py`)
- Wallet service → WSP-1 protocol engine: uses protocol (evidence: `README.md`)
- Wallet service → Wallet state store: persists wallet state (evidence: `README.md`)
- Backup page → Wallet service: supports recovery
- Background sync → Wallet service: scans wallet (evidence: `src/wam_silent_wallet/services/sync_service.py`)
- Background sync → Node service: checks readiness (evidence: `src/wam_silent_wallet/services/sync_service.py`)
- Sync worker → Background sync: runs cycles
- Privacy page → Network privacy checks: refreshes status (evidence: `src/wam_silent_wallet/pages/privacy_page.py`)
- Network privacy checks → Node service: inspects network (evidence: `src/wam_silent_wallet/services/privacy_service.py`)
- Node service → WAM SDK: uses RPC client (evidence: `README.md`)
- WAM SDK → Local WAM Core: sends RPC (evidence: `README.md`)
- Local WAM Core → WAM regtest chain: validates chain (evidence: `README.md`)
- Main window → Shared UI components: renders (evidence: `src/wam_silent_wallet/main_window.py`)
