Skip to main content

NIPs (Nostr Implementation Possibilities)

NIPs are the specification documents that define how Nostr works. They range from the core protocol to optional features.

What are NIPs?

NIPs are standards documents hosted at github.com/nostr-protocol/nips. They define:

  • Core protocol behavior
  • Event kinds and their formats
  • Optional features and extensions
  • Best practices for implementations

NIP Categories

Core Protocol

NIPTitleDescription
NIP-01Basic ProtocolFundamental protocol definition
NIP-02Follow ListContact list and petnames
NIP-10Reply ThreadingConventions for replies

Identity & Keys

NIPTitleDescription
NIP-05DNS-Based VerificationMapping identifiers to pubkeys
NIP-19Bech32 EntitiesHuman-readable key encoding
NIP-46Nostr ConnectRemote signing protocol

Content Types

NIPTitleDescription
NIP-23Long-form ContentArticles and blog posts
NIP-30Custom EmojiCustom emoji in events
NIP-94File MetadataFile attachments

Encryption & Security

NIPTitleDescription
NIP-04Encrypted DMsDirect messages (deprecated)
NIP-42AuthenticationClient-relay auth
NIP-44Versioned EncryptionModern encryption standard

Social Features

NIPTitleDescription
NIP-25ReactionsLikes and emoji reactions
NIP-57ZapsLightning payments
NIP-51ListsMute lists, bookmarks, etc.

Relay Features

NIPTitleDescription
NIP-11Relay InformationRelay metadata document
NIP-42AuthenticationRelay authentication
NIP-65Relay List MetadataUser's relay preferences

Essential NIPs

NIP-01: Basic Protocol

Defines the core protocol:

  • Event structure and signing
  • WebSocket message formats
  • Filter syntax
  • Relay behavior

Every implementation must support NIP-01.

NIP-19: Bech32 Entities

Defines human-readable encodings:

npub1...  → Public key
nsec1... → Private key (never share!)
note1... → Event ID
nprofile1... → Profile + relay hints
nevent1... → Event + relay hints
naddr1... → Replaceable event address

Example:

import { nip19 } from 'nostr-tools';

// Encode
const npub = nip19.npubEncode(pubkeyHex);

// Decode
const { type, data } = nip19.decode(npub);

NIP-05: DNS Verification

Maps human-readable identifiers to pubkeys:

alice@example.com → looks up https://example.com/.well-known/nostr.json

{
"names": {
"alice": "pubkey-hex-here"
},
"relays": {
"pubkey-hex-here": ["wss://relay.example.com"]
}
}

NIP-57: Zaps (Lightning Payments)

Enables Lightning payments integrated with events:

  1. Client creates kind 9734 zap request
  2. Sends to recipient's LNURL endpoint
  3. User pays invoice
  4. Wallet service creates kind 9735 zap receipt

NIP Statuses

NIPs have different maturity levels:

StatusMeaning
DraftWork in progress
FinalStable, implemented
DeprecatedSuperseded by newer NIP

Implementing NIPs

Check Requirements

Some NIPs depend on others:

  • NIP-57 (Zaps) requires NIP-01, NIP-09
  • NIP-46 (Connect) requires NIP-01, NIP-44

Graceful Degradation

Not all relays/clients support all NIPs:

// Check if NIP-07 extension is available
if (window.nostr) {
const event = await window.nostr.signEvent(unsignedEvent);
} else {
// Fallback: use local key
const event = finalizeEvent(unsignedEvent, secretKey);
}

Feature Detection

Query relay capabilities:

const response = await fetch('https://relay.example.com/', {
headers: { Accept: 'application/nostr+json' }
});
const info = await response.json();
console.log(info.supported_nips); // [1, 11, 42, ...]

Common NIP Combinations

Social Client

Essential:

  • NIP-01 (Core)
  • NIP-02 (Follows)
  • NIP-10 (Threading)
  • NIP-19 (Encoding)

Recommended:

  • NIP-05 (Verification)
  • NIP-25 (Reactions)
  • NIP-57 (Zaps)

Chat Application

Essential:

  • NIP-01 (Core)
  • NIP-44 (Encryption)

Recommended:

  • NIP-19 (Encoding)
  • NIP-42 (Auth)

Long-form Platform

Essential:

  • NIP-01 (Core)
  • NIP-23 (Articles)

Recommended:

  • NIP-05 (Verification)
  • NIP-57 (Zaps)
  • NIP-94 (Media)

Keeping Up to Date

The NIPs repository is actively developed:

# Watch the repository
gh repo star nostr-protocol/nips

Follow these resources:

See Also