Napstr

How Napstr Uses Nostr

Nostr is Napstr’s public discovery layer and encrypted negotiation channel. Audio bytes are never uploaded to Nostr relays.

What Type Is a Track?

A shared track is a custom parameterized-replaceable event of kind 30421. The event is signed by the seeder’s Napstr identity.

Kind: 30421
Identity: the d and x tags contain the full-file SHA-256
Tags: t=napstr, filename, byte size, MIME type and alt text
JSON: the indexed filename, audio format, MIME type and byte size
Not included: audio bytes, local file path, Tor address or transfer capability

Republishing the same 30421 + d pair replaces that seeder’s previous record. Removing a share publishes a replacement marked deleted.

Napstr Event Map

KindPurposeVisibility
0Napstr profile name, description and picturePublic
10050NIP-17 inbox relay listPublic
30421Signed track catalogue recordPublic
30422Expiring batches of file IDs currently being seededPublic
NIP-17Download request, refusal, onion address and capabilityEncrypted gift wrap
1984NIP-56 catalogue reportsPublic and signed

Seeder heartbeats expire after ten minutes and are refreshed every four minutes. Search groups identical SHA-256 IDs and ranks tracks by active seeders.

From Search to Download

  1. Napstr fetches public 30421 catalogue events and live 30422 heartbeats.
  2. The downloader sends selected seeders an encrypted NIP-17 request containing only a request ID and file ID.
  3. A seeder replies with its private app-session Tor onion and a random, short-lived per-file capability inside NIP-17.
  4. The audio transfer then leaves Nostr entirely and continues over Tor.

What Is Public?

Public: profile metadata, filenames, descriptive metadata, SHA-256 file IDs, reports, and which profiles advertise each file ID.
Encrypted: download requests, onion addresses and capabilities.
Local: the Nostr secret key, filesystem paths and audio contents.

A Nostr relay can normally see the IP address connecting to that relay, along with public catalogue activity and encrypted-message timing. NIP-17 hides the message plaintext; it does not make the relay connection itself anonymous. Napstr stores its dedicated Nostr key in the operating-system keyring.