- Direct Message Contacts: Recent DM conversations (NIP-04 and NIP-17)
- Mint Contacts: Mints with Nostr pubkeys in their info
- Follow Lists: NIP-02 contact lists (following/followers)
Contact Sources
DM Contacts
The primary contact source is recent DM activity:- Unified NIP-04 and NIP-17: Combines both DM protocols
- Most recent message: Shows latest message from each contact
- Automatic decryption: Messages decrypted for preview
- Sorted by recency: Most recent conversations first
Mint Contacts
Mints that have a Nostr pubkey in their/v1/info endpoint:
- Support requests: Message mint operators about issues
- Payment confirmations: Get receipts from mint DMs
- Mint discovery: Find mints via Nostr contacts
Default Contacts
Sovran includes default contacts for new users:DraggableContactsList Component
The main contact list UI:ContactItem
Each contact displays:- Avatar: Profile picture or gradient based on pubkey
- Name: Display name, NIP-05, or truncated npub
- Last Message: Decrypted preview of most recent DM
- Timestamp: Relative time (“5m ago”, “Yesterday”, etc.)
Profile Metadata Subscription
Contacts are enriched with profile metadata (kind 0 events):name: Short handledisplayName: Full namepicture: Avatar image URLabout: Bio/descriptionnip05: Verified identifierlud16: Lightning address
Message Decryption
Contacts show a preview of the last message, which requires decryption:- NIP-17: Already decrypted during
unwrapGiftWrap - NIP-04: Decrypt using
NDKEvent.decrypt() - Failed: Show “[Encrypted message]” placeholder
Contact Search
The payments screen includes search for finding new contacts:- Debounced input: 500ms delay to avoid excessive API calls
- Skeleton states: Show placeholders while searching
- Search history: Track recent searches
- API-based: Uses Sovran API for user search
SearchResult Component
Tabs: Recent Activity vs Mints
The payments screen has two tabs:NIP-02 Contact Lists
Contact lists (kind 3 events) track who you follow:Contact Management
Follow/Unfollow
See User Profiles for implementation.Blocking
Blocking is not yet implemented in Sovran but can use NIP-51 mute lists.
Pet Names
The third parameter inp tags can store custom nicknames:
Best Practices
Combine multiple contact sources
Combine multiple contact sources
Prefetch profile images
Prefetch profile images
Handle missing profiles gracefully
Handle missing profiles gracefully
Decrypt messages in batches
Decrypt messages in batches
Related Documentation
Direct Messages
NIP-17 encrypted messaging for contact DMs
User Profiles
Profile metadata and follow lists
Identity & Keys
Key management for contact encryption
Mint Discovery
Finding mints with Nostr contacts