feat: Add NIP-17/59 gift-wrapped DM support with caching

Implements encrypted private messaging using gift wraps:

- Add event cache service (Dexie) for offline access
- Add rumor storage for caching decrypted gift wrap content
- Wire persistEventsToCache and persistEncryptedContent to EventStore
- Create NIP-17 adapter for gift-wrapped DMs
- Add InboxViewer component for DM conversation list
- Add `inbox` command to open private message inbox
- Register NIP-17 adapter in ChatViewer

Features:
- Decrypt once, cache forever - no re-decryption needed
- Explicit decrypt button (user-initiated)
- Conversation list derived from decrypted gift wraps
- Private inbox relay discovery (kind 10050)
- Send not yet implemented (TODO: use SendWrappedMessage action)
This commit is contained in:
Claude
2026-01-14 11:39:08 +00:00
parent 998944fdf7
commit cd052d657f
10 changed files with 1443 additions and 2 deletions

View File

@@ -346,6 +346,18 @@ export const manPages: Record<string, ManPageEntry> = {
return parsed;
},
},
inbox: {
name: "inbox",
section: "1",
synopsis: "inbox",
description:
"View your encrypted private messages (NIP-17 gift-wrapped DMs). Messages are encrypted using NIP-44 and wrapped in NIP-59 gift wraps for privacy. Decrypted messages are cached locally so you only decrypt once. Click 'Decrypt' to unlock pending messages.",
examples: ["inbox Open your private message inbox"],
seeAlso: ["chat", "profile"],
appId: "inbox",
category: "Nostr",
defaultProps: {},
},
chat: {
name: "chat",
section: "1",