# urriki1502/wam-privacy-wallet-regtest architecture

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

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

## Overview

WAM Privacy Wallet is an experimental, disposable-REGTEST wallet with native Qt screens and platform-specific custody; it is explicitly not for real funds or production use. The owner launches the app, creates or restores a wallet, reviews and separately approves payment signing and broadcast, and can synchronize, inspect history, back up, lock, and recover. Its runtime centers on a wallet session coordinating Core, the pinned WSP scanner/signer, and encrypted checkpoint state. The README documents capabilities beyond the sampled excerpts; edges for those flows cite it, while unsampled implementation details are not inferred.

Main entry points: [`src/wam_regtest/wallet_session.py`](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/wallet_session.py) (Wallet Session), [`src/wam_regtest/vault.py`](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/vault.py) (Checkpoint Vault), [`src/wam_regtest/fusion_ui.py`](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/fusion_ui.py) (Fusion Screens), [`src/wam_regtest/desktop.py`](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/desktop.py) (Desktop Launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop App"]
  node_desktop["Desktop Launcher<br/>[desktop.py]"]
  node_gui["Fusion Screens<br/>[fusion_ui.py]"]
  node_operational["Wallet Actions<br/>[operational_gui.py]"]
end

subgraph group_wallet["Wallet Operations"]
  node_session["Wallet Session<br/>[wallet_session.py]"]
  node_read["Read Model<br/>[wallet_read.py]"]
  node_wsp["WSP Scanner and Signer<br/>[wsp_live.py]"]
end

subgraph group_state["Recovery and Custody"]
  node_vault[("Checkpoint Vault<br/>[vault.py]")]
  node_managed["Managed Sessions"]
  node_checkpoint["Checkpoint Logic"]
  node_custody["Native Custody<br/>[custody.py]"]
  node_winstorage["Windows Storage"]
  node_linuxanchor["Linux Root Witness"]
  node_recovery["Wallet Recovery<br/>[wallet_recovery.py]"]
end

subgraph group_runtime["Core and Scanning"]
  node_core["WAM Core<br/>[core.py]"]
  node_scope["Owned RPC Scope<br/>[rpc_scope.py]"]
  node_supervisor["Core Supervisor<br/>[core_supervisor.py]"]
  node_protocol["Supervisor Protocol"]
  node_store[("Supervisor Store")]
  node_linux["Linux Runtime Policy<br/>[linux_runtime.py]"]
end

node_owner(("Wallet Owner"))

node_owner -->|"launches"| node_desktop
node_desktop -->|"opens"| node_gui
node_owner -->|"uses"| node_gui
node_gui -->|"dispatches actions"| node_operational
node_operational -->|"coordinates"| node_session
node_operational -->|"requests views"| node_read
node_session -->|"controls"| node_core
node_session -->|"scans and signs"| node_wsp
node_read -->|"reads blocks"| node_core
node_read -->|"syncs scanner"| node_wsp
node_session -->|"backs up"| node_vault
node_session -->|"opens owned sessions"| node_managed
node_managed -->|"uses checkpoints"| node_checkpoint
node_checkpoint -->|"creates snapshots"| node_vault
node_vault -->|"requires custody"| node_custody
node_custody -->|"selects native storage"| node_winstorage
node_custody -->|"uses Linux anchor"| node_linuxanchor
node_vault -->|"checks Linux policy"| node_linux
node_managed -->|"checks recovery state"| node_recovery
node_desktop -.->|"manages Core lifecycle"| node_supervisor
node_supervisor -.->|"uses protocol"| node_protocol
node_supervisor -.->|"uses store"| node_store
node_session -->|"restores anchored backup"| node_recovery
node_session -->|"supports reviewed payments"| node_gui
node_session -->|"stores encrypted backups"| node_vault
node_vault -->|"enables same-Mac recovery"| node_owner

click node_desktop "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/desktop.py"
click node_gui "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/fusion_ui.py"
click node_operational "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/operational_gui.py"
click node_session "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/wallet_session.py"
click node_read "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/wallet_read.py"
click node_wsp "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/wsp_live.py"
click node_core "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/core.py"
click node_scope "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/rpc_scope.py"
click node_vault "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/vault.py"
click node_managed "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/managed_wallet_session.py"
click node_checkpoint "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/managed_wallet_checkpoint.py"
click node_custody "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/custody.py"
click node_winstorage "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/windows_private_storage.py"
click node_linuxanchor "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/linux_anchor_witness.py"
click node_supervisor "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/core_supervisor.py"
click node_protocol "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/supervisor_protocol.py"
click node_store "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/supervisor_store.py"
click node_recovery "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/wallet_recovery.py"
click node_linux "https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/linux_runtime.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_desktop,node_gui,node_operational toneBlue
class node_session,node_read,node_wsp toneAmber
class node_vault,node_managed,node_checkpoint,node_custody,node_winstorage,node_linuxanchor,node_recovery toneMint
class node_core,node_scope,node_supervisor,node_protocol,node_store,node_linux toneRose
class node_owner toneIndigo
```

## Components

### Desktop App

- [Desktop Launcher](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/desktop.py): `src/wam_regtest/desktop.py`
- [Fusion Screens](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/fusion_ui.py): `src/wam_regtest/fusion_ui.py`
- [Wallet Actions](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/operational_gui.py): `src/wam_regtest/operational_gui.py`

### Wallet Operations

- [Wallet Session](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/wallet_session.py): `src/wam_regtest/wallet_session.py`
- [Read Model](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/wallet_read.py): `src/wam_regtest/wallet_read.py`
- [WSP Scanner and Signer](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/wsp_live.py): `src/wam_regtest/wsp_live.py`

### Recovery and Custody

- [Checkpoint Vault](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/vault.py): `src/wam_regtest/vault.py`
- [Managed Sessions](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/managed_wallet_session.py): `src/wam_regtest/managed_wallet_session.py`
- [Checkpoint Logic](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/managed_wallet_checkpoint.py): `src/wam_regtest/managed_wallet_checkpoint.py`
- [Native Custody](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/custody.py): `src/wam_regtest/custody.py`
- [Windows Storage](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/windows_private_storage.py): `src/wam_regtest/windows_private_storage.py`
- [Linux Root Witness](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/linux_anchor_witness.py): `src/wam_regtest/linux_anchor_witness.py`
- [Wallet Recovery](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/wallet_recovery.py): `src/wam_regtest/wallet_recovery.py`

### Core and Scanning

- [WAM Core](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/core.py): `src/wam_regtest/core.py`
- [Owned RPC Scope](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/rpc_scope.py): `src/wam_regtest/rpc_scope.py`
- [Core Supervisor](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/core_supervisor.py): `src/wam_regtest/core_supervisor.py`
- [Supervisor Protocol](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/supervisor_protocol.py): `src/wam_regtest/supervisor_protocol.py`
- [Supervisor Store](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/supervisor_store.py): `src/wam_regtest/supervisor_store.py`
- [Linux Runtime Policy](https://github.com/urriki1502/wam-privacy-wallet-regtest/blob/main/src/wam_regtest/linux_runtime.py): `src/wam_regtest/linux_runtime.py`

### Other components

- **Wallet Owner**

## Connections

- Wallet Owner → Desktop Launcher: launches (evidence: `README.md`)
- Desktop Launcher → Fusion Screens: opens (evidence: `src/wam_regtest/desktop.py`)
- Wallet Owner → Fusion Screens: uses (evidence: `README.md`)
- Fusion Screens → Wallet Actions: dispatches actions (evidence: `src/wam_regtest/operational_gui.py`)
- Wallet Actions → Wallet Session: coordinates (evidence: `src/wam_regtest/operational_gui.py`)
- Wallet Actions → Read Model: requests views (evidence: `src/wam_regtest/operational_gui.py`)
- Wallet Session → WAM Core: controls (evidence: `src/wam_regtest/wallet_session.py`)
- Wallet Session → WSP Scanner and Signer: scans and signs (evidence: `src/wam_regtest/wallet_session.py`)
- Read Model → WAM Core: reads blocks (evidence: `src/wam_regtest/wallet_read.py`)
- Read Model → WSP Scanner and Signer: syncs scanner (evidence: `src/wam_regtest/wallet_read.py`)
- Wallet Session → Checkpoint Vault: backs up (evidence: `src/wam_regtest/wallet_session.py`)
- Wallet Session → Managed Sessions: opens owned sessions (evidence: `src/wam_regtest/wallet_session.py`)
- Managed Sessions → Checkpoint Logic: uses checkpoints (evidence: `src/wam_regtest/managed_wallet_session.py`)
- Checkpoint Logic → Checkpoint Vault: creates snapshots (evidence: `src/wam_regtest/managed_wallet_checkpoint.py`)
- Checkpoint Vault → Native Custody: requires custody (evidence: `src/wam_regtest/vault.py`)
- Native Custody → Windows Storage: selects native storage (evidence: `src/wam_regtest/custody.py`)
- Native Custody → Linux Root Witness: uses Linux anchor (evidence: `src/wam_regtest/custody.py`)
- Checkpoint Vault → Linux Runtime Policy: checks Linux policy (evidence: `src/wam_regtest/vault.py`)
- Managed Sessions → Wallet Recovery: checks recovery state (evidence: `src/wam_regtest/managed_wallet_session.py`)
- Desktop Launcher → Core Supervisor: manages Core lifecycle
- Core Supervisor → Supervisor Protocol: uses protocol (evidence: `src/wam_regtest/core_supervisor.py`)
- Core Supervisor → Supervisor Store: uses store (evidence: `src/wam_regtest/core_supervisor.py`)
- Wallet Session → Wallet Recovery: restores anchored backup (evidence: `README.md`)
- Wallet Session → Fusion Screens: supports reviewed payments (evidence: `README.md`)
- Wallet Session → Checkpoint Vault: stores encrypted backups (evidence: `README.md`)
- Checkpoint Vault → Wallet Owner: enables same-Mac recovery (evidence: `README.md`)
