Files
amethyst/commons
nrobi144andClaude Opus 4.8 129bad5a02 feat: discoverable key backup + nsec exposure (Desktop + Android)
Make the secret key (nsec) discoverable and backupable without obfuscating
it, while keeping the npub/nsec asymmetry every Nostr client relies on:
npub is shareable (plain, copy, QR); nsec is an unrecoverable password
(masked, gated reveal + gated copy, NIP-49 encrypted option, never a QR).

Desktop:
- New BackupKeysCard in the settings/profile screen: npub (copy + QR),
  nsec masked-by-default with reveal/copy gated behind the existing
  PrivacyLock (new LockScope.KeyBackup), plaintext + NIP-49 encrypted copy,
  strong "cannot be recovered" warning, external-signer note when no key.
- Upgrade NewKeyWarningCard: per-key copy, encrypted copy, stronger warning,
  soft "I have saved my keys" acknowledgement.
- Extract shared copyToClipboard + best-effort copyToClipboardThenClear util.

Android:
- Soft, dismissible post-signup "Back up your keys" nudge on the home feed
  (per-account hasBackedUpKeys flag; only freshly-generated accounts nudged;
  "Back up now" opens the existing AccountBackupScreen).
- FLAG_SECURE on the key-backup screen (screenshot / app-switcher redaction).
- Best-effort clipboard auto-clear 60s after copying the plaintext nsec.

Deferred: compose paste-guard (nsec self-doxx warning) — the send path is
reimplemented across ~17 *PostViewModels with no shared choke point.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-12 11:06:33 +03:00
..