Skip to main content
Sovran builds a unified contact system from multiple Nostr sources:
  • 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)
This creates a seamless experience where users can send payments to anyone they’ve messaged or any mint they trust.

Contact Sources

DM Contacts

The primary contact source is recent DM activity:
Features:
  • 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:
Use Cases:
  • 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):
Profile fields used:
  • name: Short handle
  • displayName: Full name
  • picture: Avatar image URL
  • about: Bio/description
  • nip05: Verified identifier
  • lud16: Lightning address

Message Decryption

Contacts show a preview of the last message, which requires decryption:
Decryption states:
  • NIP-17: Already decrypted during unwrapGiftWrap
  • NIP-04: Decrypt using NDKEvent.decrypt()
  • Failed: Show “[Encrypted message]” placeholder
The payments screen includes search for finding new contacts:
Search features:
  • 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 list structure:

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 in p tags can store custom nicknames:
These are displayed instead of display names when set.

Best Practices

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