How urriki1502/wam-silent-payments works
WAM Silent Payments is a regtest-qualified wallet implementation for BIP-352 payment derivation, durable scanning, wallet accounting, recovery, and PSBTv2 offline signing. The principal flow is an application invoking the wallet API, which coordinates scanning and wallet operations against a validating node, persists state, and supports payment construction and signing. Separate recovery and ecosystem-adapter branches preserve documented product capabilities. Edges are limited to README statements and relationships visible in the supplied excerpts or SOURCE INDEX; some adapter wiring is documented but not shown in source excerpts.
Main entry points: api.py Wallet API · scanner.py Durable scanner · wallet.py Wallet accounting · backup.py Recovery bundles
Components 21
Wallet workflow
- Wallet API
src/wam_sp/api.py - Wallet accounting
src/wam_sp/wallet.py - Durable scanner
src/wam_sp/scanner.py - Node RPC
src/wam_sp/rpc.py
Payment protocol
- BIP-352 derivation
src/wam_sp/core.py - Address codec
src/wam_sp/codec.py - Transaction utilities
src/wam_sp/transaction.py
State and recovery
- SQLite state
src/wam_sp/store.py - Scan journal
src/wam_sp/watcher.py - Recovery bundles
src/wam_sp/backup.py - Key custody
src/wam_sp/keystore.py - Wallet descriptors
src/wam_sp/descriptors.py
Signing and integrations
- PSBTv2 signing
src/wam_sp/psbt.py - Silent-payment PSBT
src/wam_sp/adapters/sp_psbt.py - PSBT document adapter
src/wam_sp/adapters/psbt_document.py - Pay adapter
src/wam_sp/adapters/pay.py - WAM SDK adapter
src/wam_sp/adapters/sdk.py - Watchtower adapter
src/wam_sp/adapters/watchtower.py - WAM SDK
integration-deps/wam-sdk/src/wam_sdk/client.py
Other components
- Application
- Validating node
Connections 26
- Application → Wallet API: calls
- Wallet API → Durable scanner: starts scans
src/wam_sp/api.py - Wallet API → Wallet accounting: exposes wallet
src/wam_sp/api.py - Wallet API → Recovery bundles: backs up
src/wam_sp/api.py - Wallet API → Wallet descriptors: manages descriptors
src/wam_sp/api.py - Wallet API → Key custody: uses keys
src/wam_sp/api.py - Durable scanner → Validating node: reads blocks
src/wam_sp/scanner.py - Durable scanner → Node RPC: calls
- Durable scanner → BIP-352 derivation: derives matches
src/wam_sp/scanner.py - Durable scanner → SQLite state: persists scan state
src/wam_sp/scanner.py - Durable scanner → Scan journal: uses journal
src/wam_sp/scanner.py - BIP-352 derivation → Address codec: encodes addresses
src/wam_sp/core.py - Wallet accounting → BIP-352 derivation: derives payments
src/wam_sp/wallet.py - Wallet accounting → Durable scanner: uses scan results
src/wam_sp/wallet.py - Wallet accounting → PSBTv2 signing: constructs spends
src/wam_sp/wallet.py - Wallet accounting → Key custody: uses keys
src/wam_sp/wallet.py - Recovery bundles → SQLite state: exports state
src/wam_sp/backup.py - Recovery bundles → Key custody: seals recovery
src/wam_sp/backup.py - Recovery bundles → Durable scanner: restores scan state
src/wam_sp/backup.py - PSBTv2 signing → Silent-payment PSBT: verifies sender
src/wam_sp/psbt.py - PSBT document adapter → Silent-payment PSBT: adapts maps
src/wam_sp/adapters/psbt_document.py - PSBT document adapter → Transaction utilities: uses transactions
src/wam_sp/adapters/psbt_document.py - Wallet API → Pay adapter: supports integration
- Wallet API → WAM SDK adapter: supports integration
- Wallet API → Watchtower adapter: supports integration
- WAM SDK adapter → WAM SDK: adapts SDK