docs/docs-as-code.md defines the workflow; docs/adr holds 31 ADRs (retroactive, reconstructed from code and changelog) with a template and index. docs/check-docs.sh validates ADR structure, index, cited code paths, relative links and CLAUDE.md/AGENTS.md sync.
26 lines
1.0 KiB
Markdown
26 lines
1.0 KiB
Markdown
# 0015. Imported-key and watch-only accounts
|
|
|
|
- **Status:** Accepted
|
|
- **Area:** Wallet
|
|
- **Recorded:** 2026-11-03 (retroactive: reconstructed from code, comments and changelog)
|
|
|
|
## Context
|
|
|
|
Users need to import WIF keys, track an xpub, or watch plain addresses without exposing key material.
|
|
|
|
## Decision
|
|
|
|
`IWalletAccount` abstracts HD and imported accounts. `ImportedKeyAccount` holds a fixed address list (no HD derivation; change returns to the first imported address). Watch-only accounts (from xpub, or from addresses with no keys) report no private key, and `TransactionFactory` only signs when the account has one, so they can only ever produce an unsigned PSBT.
|
|
|
|
## Consequences
|
|
|
|
- Watch-only is structurally read-only, not just disabled in the UI.
|
|
- Imported-key wallets reuse addresses for change, a privacy trade-off.
|
|
- Pure address imports derive the script kind only informationally.
|
|
|
|
## References
|
|
|
|
- `src/Core/Crypto/IWalletAccount.cs`
|
|
- `src/Core/Crypto/ImportedKeyAccount.cs`
|
|
- `src/Core/Wallet/WalletLoader.cs`
|