Skip to content

NIP-42 AUTH, DM reliability, relay picker, and profile enhancements#14

Merged
barrydeen merged 1 commit intomainfrom
feature/dm-auth-relay-improvements
Feb 20, 2026
Merged

NIP-42 AUTH, DM reliability, relay picker, and profile enhancements#14
barrydeen merged 1 commit intomainfrom
feature/dm-auth-relay-improvements

Conversation

@barrydeen
Copy link
Copy Markdown
Owner

Summary

  • NIP-42 AUTH: Full relay authentication flow — parse AUTH challenges, sign kind-22242 events, and automatically re-send DM subscriptions after auth completes
  • NIP-44 fix: Correct HKDF key derivation to match spec (salt/ikm order in Extract, conversation key as PRK in Expand)
  • DM reliability: Thread-safe DmRepository with synchronized access, gift wrap dedup for sent messages, send spinner UX, DM subscriptions sent to DM relays
  • Relay picker: Replace flat list with scored relay board showing follow coverage counts, plus manual relay probe input with wss/ws fallback
  • Profile enhancements: DM button on other users' profiles, lightning address display, rich content in bio, bare npub1 detection in RichContent
  • UX cleanup: Remove new-DM FAB dialog in favor of profile-initiated conversations

Test plan

  • Verify AUTH handshake works with relays that require it (e.g. relay.nostr.band)
  • Send and receive DMs — confirm no duplicate messages on send
  • Open relay picker and verify scored relays appear with coverage counts
  • Probe a custom relay domain in the picker
  • Check DM button appears on other users' profiles and navigates correctly
  • Verify lightning address shows on profiles that have one
  • Confirm bare npub1 mentions render as profile links in notes and bios

- Implement NIP-42 relay authentication (AUTH message parsing, challenge
  handling, kind-22242 signing, and post-auth DM resubscription)
- Fix NIP-44 HKDF key derivation to match spec (correct salt/ikm order
  in Extract, use conversation key directly as PRK in Expand)
- Thread-safe DmRepository with synchronized access and gift wrap dedup
  for sent messages
- DM send UX: spinner during send, optimistic input clear, send to DM
  relays alongside regular relays
- Replace relay picker list with scored relay board showing follow
  coverage, plus manual relay probe input
- Profile improvements: DM button on other users' profiles, lightning
  address display, rich content rendering in bio, bare npub1 detection
  in RichContent
- Remove new-DM FAB dialog in favor of profile-initiated conversations
- Fix RelayPool.sendToRelay to check DM relays, and close subscriptions
  on DM relays
@barrydeen barrydeen merged commit f148495 into main Feb 20, 2026
@barrydeen barrydeen deleted the feature/dm-auth-relay-improvements branch March 4, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant