NAME
Net::Nostr - Perl client and relay library for the Nostr protocol
SYNOPSIS
use Net::Nostr;
# Connect to a relay as a client
my $client = Net::Nostr->client;
$client->connect("ws://relay.example.com");
# Run a relay
my $relay = Net::Nostr->relay;
$relay->run('127.0.0.1', 8080);
DESCRIPTION
Net::Nostr is a Perl implementation of the Nostr protocol that provides both client and relay functionality. Most of the useful functionality lives in the individual modules listed below -- start with Net::Nostr::Key for identity management and Net::Nostr::Event for creating events.
CLASS METHODS
client
my $client = Net::Nostr->client;
Convenience factory that returns a new Net::Nostr::Client instance. Equivalent to Net::Nostr::Client->new.
relay
my $relay = Net::Nostr->relay;
Convenience factory that returns a new Net::Nostr::Relay instance. Equivalent to Net::Nostr::Relay->new.
MODULES
- Net::Nostr::AppData - NIP-78 arbitrary custom app data
- Net::Nostr::AppHandler - NIP-89 recommended application handlers
- Net::Nostr::Article - NIP-23 long-form content
- Net::Nostr::Badge - NIP-58 badges
- Net::Nostr::Bech32 - NIP-19 bech32-encoded entities
- Net::Nostr::Blossom - NIP-B7 Blossom media server lists
- Net::Nostr::Calendar - NIP-52 calendar events
- Net::Nostr::Channel - NIP-28 public chat channels
- Net::Nostr::ClassifiedListing - NIP-99 classified listings
- Net::Nostr::Client - WebSocket client for connecting to Nostr relays
- Net::Nostr::Comment - NIP-22 comment threading
- Net::Nostr::Community - NIP-72 moderated communities
- Net::Nostr::Deletion - NIP-09 event deletion requests
- Net::Nostr::DirectMessage - NIP-17 private direct messages
- Net::Nostr::DVM - NIP-90 data vending machine
- Net::Nostr::Encryption - NIP-44 versioned encrypted payloads
- Net::Nostr::Event - Nostr event serialization, ID computation, and verification
- Net::Nostr::ExternalId - NIP-73 external content IDs
- Net::Nostr::FileMetadata - NIP-94 file metadata events
- Net::Nostr::Filter - Filter objects for querying events
- Net::Nostr::FollowList - NIP-02 follow list management
- Net::Nostr::GiftWrap - NIP-59 gift wrap encryption
- Net::Nostr::Git - NIP-34 git collaboration
- Net::Nostr::Group - NIP-29 relay-based groups
- Net::Nostr::HttpAuth - NIP-98 HTTP auth
- Net::Nostr::Identifier - NIP-05 DNS-based internet identifiers
- Net::Nostr::Key - Secp256k1 keypair management and BIP-340 Schnorr signatures
- Net::Nostr::KeyEncrypt - NIP-49 private key encryption
- Net::Nostr::Label - NIP-32 labeling
- Net::Nostr::List - NIP-51 lists and sets
- Net::Nostr::LiveActivity - NIP-53 live activities
- Net::Nostr::Marketplace - NIP-15 Nostr Marketplace
- Net::Nostr::MediaAttachment - NIP-92 media attachments
- Net::Nostr::Message - Protocol message serialization and parsing
- Net::Nostr::Mention - NIP-27 text note references
- Net::Nostr::MintDiscovery - NIP-87 ecash mint discoverability
- Net::Nostr::Negentropy - NIP-77 negentropy set reconciliation
- Net::Nostr::Nutzap - NIP-61 nutzaps (Cashu ecash payments)
- Net::Nostr::Reaction - NIP-25 reactions
- Net::Nostr::Relay - WebSocket relay server
- Net::Nostr::RelayAccess - NIP-43 relay access metadata and requests
- Net::Nostr::RelayAdmin - NIP-86 relay management API
- Net::Nostr::RelayInfo - NIP-11 relay information document
- Net::Nostr::RelayList - NIP-65 relay list metadata
- Net::Nostr::RelayMonitor - NIP-66 relay discovery and liveness monitoring
- Net::Nostr::RelayStore - Indexed in-memory event storage for relays
- Net::Nostr::RemoteSigning - NIP-46 Nostr Remote Signing
- Net::Nostr::Report - NIP-56 reporting
- Net::Nostr::Repost - NIP-18 reposts
- Net::Nostr::Thread - NIP-10 text note threading
- Net::Nostr::Timestamp - NIP-03 OpenTimestamps attestations
- Net::Nostr::Torrent - NIP-35 torrents
- Net::Nostr::Wallet - NIP-60 Cashu wallet state management
- Net::Nostr::WalletConnect - NIP-47 Nostr Wallet Connect
- Net::Nostr::Wiki - NIP-54 wiki
- Net::Nostr::Zap - NIP-57 Lightning Zaps
SUPPORTED NIPS
Conformance target: nostr-protocol/nips commit 0a25dd52 (2026-04-10).
- NIP-01 - Basic protocol flow
- NIP-02 - Follow list
- NIP-03 - OpenTimestamps attestations for events
- NIP-05 - Mapping Nostr keys to DNS-based internet identifiers
- NIP-06 - Basic key derivation from mnemonic seed phrase
- NIP-09 - Event deletion request
- NIP-10 - Text notes and threads
- NIP-11 - Relay information document
- NIP-13 - Proof of Work
- NIP-15 - Nostr Marketplace
- NIP-17 - Private direct messages
- NIP-18 - Reposts
- NIP-19 - bech32-encoded entities
- NIP-21 -
nostr:URI scheme - NIP-22 - Comment
- NIP-23 - Long-form content
- NIP-25 - Reactions
- NIP-27 - Text note references
- NIP-28 - Public chat
- NIP-29 - Relay-based groups
- NIP-32 - Labeling
- NIP-34 - git stuff
- NIP-35 - Torrents
- NIP-36 - Sensitive Content / Content Warning
- NIP-40 - Expiration timestamp
- NIP-42 - Authentication of clients to relays
- NIP-43 - Relay Access Metadata and Requests
- NIP-44 - Encrypted payloads (versioned)
- NIP-45 - Event counts
- NIP-46 - Nostr Remote Signing
- NIP-47 - Nostr Wallet Connect
- NIP-49 - Private key encryption
- NIP-50 - Search capability
- NIP-51 - Lists
- NIP-52 - Calendar Events
- NIP-53 - Live Activities
- NIP-54 - Wiki
- NIP-56 - Reporting
- NIP-57 - Lightning Zaps
- NIP-58 - Badges
- NIP-59 - Gift wrap
- NIP-60 - Cashu wallets
- NIP-61 - Nutzaps
- NIP-65 - Relay list metadata
- NIP-66 - Relay Discovery and Liveness Monitoring
- NIP-70 - Protected Events
- NIP-72 - Moderated Communities
- NIP-73 - External Content IDs
- NIP-77 - Negentropy Syncing
- NIP-78 - Arbitrary Custom App Data
- NIP-86 - Relay Management API
- NIP-87 - Ecash Mint Discoverability
- NIP-89 - Recommended Application Handlers
- NIP-90 - Data Vending Machine
- NIP-92 - Media Attachments
- NIP-94 - File Metadata
- NIP-98 - HTTP auth
- NIP-99 - Classified Listings
- NIP-B7 - Blossom media
NIP-04 (encrypted direct messages) is deprecated and not supported. Use NIP-44 for encryption instead.