Patrick Ulrich
|
b46d0395a6
|
feat(nostr): NIP-17 private DMs and NIP-46 bunker authentication
Two major enhancements to the Nostr extension:
## NIP-17 Private Direct Messages
Adds NIP-17 with NIP-59 gift wrapping for privacy-preserving DMs.
Protocol comparison:
- NIP-04 (legacy): Kind 4, sender/timing visible, AES-CBC
- NIP-17 (new): Kind 1059→13→14, sender hidden, timestamps randomized ±48h, XChaCha20-Poly1305
New dmProtocol config option:
- "dual" (default): Accept both, send NIP-17
- "nip17": NIP-17 only (max privacy)
- "nip04": Legacy only
Changes:
- Subscribe to kind:4 (NIP-04) and kind:1059 (GiftWrap) events
- 48-hour lookback for NIP-17 randomized timestamps
- Unwrap gift wraps via nostr-tools/nip59
## NIP-46 Bunker Authentication
Users can connect their Nostr identity via remote signers (Amber, nsec.app).
Agent tools:
- nostr_connect: Link via bunker URL
- nostr_post: Kind 1 notes with NIP-10 threading
- nostr_react: Reactions (+/-/emoji) per NIP-25
- nostr_repost: Kind 6/16 reposts per NIP-18
- nostr_fetch: Query by author/hashtag/mentions/NIP-50 search
- nostr_article: Kind 30023 long-form content per NIP-23
- nostr_disconnect/nostr_status: Session management
Bunker features:
- Session persistence (client key saved to disk)
- NIP-65 relay discovery
- Auth URL flow for browser approval
- Multi-account via bunkerIndex
HTTP endpoints for web UI:
- GET/POST/DELETE /api/channels/nostr/:id/bunker/:idx
## Safety
- NIP-09 deletion excluded (no agent deletion capability)
- Private keys remain in signer app
- Explicit user connection required
NIPs: 01, 10, 17, 18, 23, 25, 44, 46, 50, 59, 65
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-28 12:27:15 -05:00 |
|