Skip to content

Examples

Real-world usage patterns extracted from the Snort app (packages/app/src/). Each page shows how the Snort libraries are actually used in production, with code and file references.

@snort/system-react

  • React HooksuseUserProfile, useRequestBuilder, useRequestBuilderAdvanced, useEventFeed, useReactions, useEventReactions, useCached, SnortContext, useUserSearch

@snort/system

  • Event Builder & PublisherEventBuilder hooks, EventPublisher for different login types, NIP-98 auth, NIP-59 gift wraps, EventExt utilities
  • NostrLink — Factory methods, fromTag(), tryParseNostrLink(), encode(), UnknownTag for custom lists
  • Query System — Zap feeds, timeline filtering, NIP-17 chat, RangeSync, OutboxModel
  • NIP Implementations — NIP-10 thread parsing, NIP-11 relay info, NIP-18 quotes, NIP-94 file metadata, parseZap, DVM jobs
  • User State — Login session creation, rehydration, mute lists, app data, custom ToNostrEventTag
  • Signers — NIP-46 connect flow, custom EventSigner implementation, KeyStorage persistence
  • Text Parsing — Cached transforms, NIP-94 imeta extraction and construction

@snort/shared

  • Shared UtilitiesExternalStore patterns, TLV encoding, bech32 helpers, LNURL, work queues, FeedCache

@snort/wallet

  • Wallet IntegrationWalletStore lifecycle, LNDHub connection, Zapper for zaps, capability checks

@snort/worker-relay

  • Worker Relay — Initialization, forYouFeed(), setEventMetadata(), count(), admin operations