feat(chat): enable HushChat by default + legacy (non-mnemonic) wallet support
Flip DRAGONX_ENABLE_CHAT to default ON (a fresh configure now builds chat in), and make full-node chat work for every wallet + any daemon. Legacy compat: chat identity is derived from the wallet's mnemonic (z_exportmnemonic) for a portable, SDXLite-compatible identity — but a legacy random-seed wallet has no mnemonic, and released daemons don't have that RPC at all. Provisioning now falls back to a stable z-address's spending key (z_exportkey) in those cases: a functional, wallet-local identity that works on any daemon. Since a chat identity is local (peers learn your public key from your message headers, not your derivation), interop is unaffected; only cross-client portability needs the mnemonic. The spending key is an in-memory KDF input over a key the wallet already holds, wiped after use — no new exposure. Stability: the chosen chat z-address (the reply-to in headers AND the legacy identity source) is now persisted in settings (chat_reply_zaddr), so the identity + reply address don't shift when new addresses are generated. chatReplyZaddr() picks the smallest spendable z-addr once and reuses it. CLAUDE.md updated to reflect the default flip. Verified: Linux + Windows build with chat ON, fresh-configure default confirmed ON, ctest 100%, hygiene clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -55,7 +55,7 @@ There is no per-test filtering — it is one binary that runs every assertion. T
|
||||
|
||||
> ⚠️ **Do not regrow the `_plan`/`_batch` churn.** This directory previously held ~160 dead `lite_wallet_*_plan` / `*_batch*_receipt_custody_acceptance_confirmation_archive_handoff_*` files (filenames up to 250 chars) — auto-generated scaffolding that never reached the shipping binary. They were deleted. When extending lite-wallet behavior, **edit the named service/bridge/runtime files in place**; never add another "promotion/receipt/custody/handoff/stewardship" wrapper layer. `scripts/check-source-hygiene.sh` (wired as a `.git/hooks/pre-commit` hook) blocks >80-char filenames and chained churn-token names — run it in CI too.
|
||||
|
||||
**Chat** (`src/chat/chat_protocol.cpp`): experimental HushChat protocol, compiled in only when `DRAGONX_ENABLE_CHAT=ON`.
|
||||
**Chat** (`src/chat/*`): the HushChat protocol port (Contacts/Chat tabs, seed-derived identity, secretstream crypto, seed-encrypted sqlite store, two-variant send/receive transport). Runtime behavior is gated by `DRAGONX_ENABLE_CHAT`, now **default ON** (the sources always compile; the flag folds the feature away at runtime via `hushChatFeatureEnabledAtBuild()`). Full-node chat derives its identity from the wallet's mnemonic (`z_exportmnemonic`, portable/SDXLite-compatible) or, for legacy/non-mnemonic wallets, a stable z-address spending key (`z_exportkey`).
|
||||
|
||||
## Build variants & feature gating
|
||||
|
||||
|
||||
Reference in New Issue
Block a user