# Applesauce Nostr SDK — AI Agent Reference _Generated 2026-04-24T20:18:50.383Z_ Website: [applesauce.build](https://applesauce.build) Applesauce is a modular, reactive Nostr SDK built on RxJS. It covers event storage, relay communication, event creation/signing, content rendering, accounts, and React integration. All reactive APIs use RxJS Observables (suffix `$`). --- ## Quick Architecture ``` EventStore (in-memory, reactive) ← central hub for all events ↕ deduplicates, handles replaceable/addressable RelayPool / Relay (network) ← WebSocket relay connections ↕ Loaders (batching + dedup) ← auto-load events by id/address/timeline ↕ Factories + Operations ← create/modify unsigned events ↕ Signers ← sign events (extension, NIP-46, password, etc.) ↕ ActionRunner ← orchestrate: build → sign → publish → store ↕ React hooks (use$, useRenderedContent, useEventModel) ``` --- ## Packages ### applesauce-core Central package. Provides `EventStore`, `EventFactory`, helpers, models, casts, RxJS operators. **Key exports by subpath:** - `applesauce-core` — `EventStore`, `EventFactory`, logger - `applesauce-core/event-store` — `EventStore`, `AsyncEventStore`, `EventMemory` - `applesauce-core/helpers` — event/tag/filter/profile/relay utility functions - `applesauce-core/models` — `ProfileModel`, `ContactsModel`, `MailboxesModel` - `applesauce-core/factories` — `EventFactory`, `ProfileFactory`, `DeleteFactory` - `applesauce-core/operations` — `EventOperation`, `TagOperation`, `eventPipe`, `tagPipe` - `applesauce-core/casts` — `Cast` base class, core cast types - `applesauce-core/observable` — `mapEventsToStore`, `mapEventsToTimeline`, `watchEventUpdates` ### applesauce-common NIP-specific helpers, factories, casts, and operations for most event kinds. **Key exports by subpath:** - `applesauce-common/helpers` — NIP-specific helpers (badges, zaps, groups, bookmarks, calendar, gift-wrap, etc.) - `applesauce-common/factories` — `NoteFactory`, `CommentFactory`, `ReactionFactory`, `ZapRequestFactory`, `BadgeFactory`, `ProfileBadgesFactory`, list/relay factories - `applesauce-common/operations` — per-NIP operations (`Note`, `Zap`, `Badge`, `BadgeAward`, `ProfileBadges`, `GiftWrap`) - `applesauce-common/casts` — `Note`, `Article`, `Profile`, `User`, `Reaction`, `Zap`, `Badge`, `BadgeAward`, relay/list casts - `applesauce-common/models` — domain-specific models ### applesauce-relay Relay connections and pooling. - `applesauce-relay` — `RelayPool`, `Relay`, `RelayGroup`, `RelayLiveness` - `applesauce-relay/pool` — `RelayPool` - `applesauce-relay/relay` — `Relay` - `applesauce-relay/operators` — `onlyEvents`, `markFromRelay`, `completeOnEose`, `storeEvents` - `applesauce-relay/negentropy` — NIP-77 sync ### applesauce-loaders Batched, deduplicated event loading. - `applesauce-loaders` — `UpstreamPool`, `CacheRequest`, `NostrRequest` - `applesauce-loaders/loaders` — `UnifiedEventLoader` (`createEventLoaderForStore`), `EventLoader`, `AddressLoader`, `TimelineLoader`, `ReactionsLoader`, `ZapsLoader`, `TagValueLoader` - `applesauce-loaders/operators` — `distinctRelays`, `distinctTimeout` ### applesauce-signers Event signing implementations. - `applesauce-signers/signers` — `ExtensionSigner` (NIP-07), `PrivateKeySigner`, `PasswordSigner` (NIP-49), `NostrConnectSigner` (NIP-46 client), `NostrConnectProvider` (NIP-46 server), `SerialPortSigner`, `SimpleSigner`, `ReadonlySigner` ### applesauce-actions High-level actions that orchestrate factory → sign → publish. - `applesauce-actions` — `ActionRunner` - `applesauce-actions/actions` — `CreateProfile`, `UpdateProfile`, `FollowUser`, `UnfollowUser`, `MuteUser`, `UnmuteUser`, `BookmarkEvent`, `UnbookmarkEvent`, `CreateComment`, plus calendar, blossom, list, relay, and app-data actions ### applesauce-accounts Multi-account management. - `applesauce-accounts` — `AccountManager`, `ProxySigner` - `applesauce-accounts/accounts` — `ExtensionAccount`, `PasswordAccount`, `PrivateKeyAccount`, `NostrConnectAccount`, `ReadonlyAccount`, `SerialPortAccount`, `SimpleAccount` ### applesauce-react React bindings. - `applesauce-react/hooks` — `use$`, `useEventModel`, `useObservable`, `useObservableMemo`, `useRenderedContent`, `useRenderNast`, `useAccountManager`, `useActiveAccount`, `useAccounts`, `useActionRunner`, `useAction`, `useEventStore` - `applesauce-react/providers` — `EventStoreProvider`, `AccountsProvider`, `ActionsProvider` ### applesauce-content Parse and render note/article content. - `applesauce-content/text` — `getParsedContent`, transformers: `links`, `nostrMentions`, `galleries`, `emojis`, `hashtags`, `lightningInvoices`, `cashuTokens` - `applesauce-content/nast` — NAST tree types, `truncate`, `findAndReplace` - `applesauce-content/markdown` — `remarkNostrMentions` ### applesauce-sqlite SQLite-backed event databases for persistent storage. - `applesauce-sqlite/better-sqlite3` — `BetterSqlite3EventDatabase` (sync, Node.js) - `applesauce-sqlite/libsql` — `LibsqlEventDatabase` (async) - `applesauce-sqlite/turso` — `TursoEventDatabase` - `applesauce-sqlite/turso-wasm` — `TursoWasmEventDatabase` (browser) - `applesauce-sqlite/native` — `NativeSqliteEventDatabase` - `applesauce-sqlite/bun` — `BunSqliteEventDatabase` ### applesauce-wallet NIP-60 Cashu wallet (WIP). - `applesauce-wallet/casts` — `Wallet`, `WalletToken`, `WalletHistory`, `Nutzap` - `applesauce-wallet/models` — `WalletBalanceModel`, `WalletTokensModel` - `applesauce-wallet/actions` — `CreateWallet`, `UnlockWallet`, `ReceiveToken`, `ReceiveNutzaps` ### applesauce-wallet-connect NIP-47 Nostr Wallet Connect. - `applesauce-wallet-connect/wallet-connect` — `WalletConnect` (client) - `applesauce-wallet-connect/wallet-service` — `WalletService` (server) --- ## Core Concepts ### EventStore Single source of truth for events. Handles dedup, replaceable events (NIP-33), addressable events, and deletions. All reads return Observables that update when data changes. **Key methods:** - `add(event)` — add event, returns the event or undefined if rejected - `event(id)` — Observable of event by id - `replaceable(kind, pubkey)` — Observable of latest replaceable event - `addressable(pointer)` — Observable of addressable event (takes `AddressPointer` with `kind`, `pubkey`, `identifier`) - `timeline(filters)` — Observable of sorted event arrays - `filters(filters)` — Observable of events matching filters - `model(ModelClass, ...args)` — get/create a reactive model instance - `profile(pubkey)` — shortcut model for profile data - `contacts(pubkey)` — shortcut model for contact list - `getEvent(id)` — sync get (returns event or undefined) ### Reactive Pattern (RxJS) All store queries, casts, and loaders return RxJS Observables. In React, use `use$` to subscribe: ```tsx const profile = use$(store.profile(pubkey)); const notes = use$(() => castTimelineStream(store.timeline(filters), Note), [filters]); ``` ### Casts Type-safe wrappers around raw nostr events. Created via `castEvent(store, event, CastClass)` or `castEventStream` / `castTimelineStream` for collections. Each cast exposes typed properties and `$` observables for related data. Common casts: `Note`, `Article`, `Profile`, `User`, `Reaction`, `Zap`, `Badge`, `BadgeAward`. ### Models Reactive computed views from the store. Created via `store.model(ModelClass, ...args)`. Cached by arguments. Return Observables. Built-in: `ProfileModel`, `ContactsModel`, `MailboxesModel`, `ReactionsModel`, `CommentsModel`. ### EventFactory + Operations Typed factories (e.g. `NoteFactory`) extend `EventFactory` and provide static `.create()` / `.modify()` entry points. Chain `.as(signer)` then `.sign()` to produce a signed event: ```ts const signed = await NoteFactory.create("Hello world").as(signer).sign(); ``` `EventOperation` and `TagOperation` are composable functions for modifying event drafts. Use `modifyPublicTags(tagPipe(...ops))` to chain tag mutations. ### Loaders Factory functions that batch requests and deduplicate via the store. `createEventLoaderForStore` wires a unified loader into the store so that `store.event()`, `store.replaceable()`, and `store.addressable()` automatically trigger network requests. ```ts createEventLoaderForStore(store, pool, { lookupRelays: ["wss://purplepag.es"] }); // Now store queries auto-load from relays: store.event({ id }).subscribe((event) => console.log(event)); ``` ### Actions Async functions receiving `ActionContext` with `events` (EventStore), `self` (user pubkey), `signer`, `publish`, and `run` (nest actions). `ActionRunner` orchestrates execution. ```ts const runner = new ActionRunner(store, signer, pool); await runner.run(FollowUser, targetPubkey); ``` ### RelayPool Manages relay connections. Supports subscriptions, publishing, outbox model (NIP-65), NIP-42 auth, and negentropy sync. ```ts const pool = new RelayPool(); pool .subscription(filters, ["wss://relay.example.com"]) .pipe(onlyEvents()) .subscribe((e) => store.add(e)); ``` ### Signers All implement the NIP-07 signer interface (`signEvent`, `nip04`, `nip44`). Use `ExtensionSigner` for browser extensions, `NostrConnectSigner` for NIP-46 remote signing, `PasswordSigner` for NIP-49 encrypted keys. ### AccountManager Manages multiple accounts with serialization. Integrates with `EventFactory` via `ProxySigner` so switching accounts automatically changes the signer. ### Caching / Storage Two patterns: 1. **Client cache**: `EventStore` + `persistEventsToCache` (from `applesauce-core/helpers`) + `cacheRequest` on loaders. Uses `NostrIDB` (IndexedDB) or `window.nostrdb`. 2. **Full database**: `AsyncEventStore` + SQL backend (`LibsqlEventDatabase`, `TursoWasmEventDatabase`, etc.) for server-side or heavy clients. --- ## Common Patterns ### Minimal app setup ```ts import { EventStore } from "applesauce-core"; import { RelayPool } from "applesauce-relay"; import { createEventLoaderForStore } from "applesauce-loaders/loaders"; const store = new EventStore(); const pool = new RelayPool(); createEventLoaderForStore(store, pool); ``` ### React integration ```tsx import { EventStoreProvider } from "applesauce-react/providers"; import { use$ } from "applesauce-react/hooks"; // Wrap app in const profile = use$(store.profile(pubkey)); ``` ### Creating and publishing events ```ts import { NoteFactory } from "applesauce-common/factories"; const signed = await NoteFactory.create("Hello world").as(signer).sign(); await pool.publish(signed, relays); store.add(signed); ``` ### Using actions ```ts import { ActionRunner } from "applesauce-actions"; import { FollowUser } from "applesauce-actions/actions"; const runner = new ActionRunner(store, signer, pool); await runner.run(FollowUser, targetPubkey); ``` --- ## Exported API Reference Each package has a full exports reference listing every exported function, class, type, and const with JSDoc descriptions. Read the relevant package file when you need to find a specific API. - [applesauce-accounts](exports/accounts.md) (22 exports) — `applesauce-accounts`, `applesauce-accounts/accounts` - [applesauce-actions](exports/actions.md) (67 exports) — `applesauce-actions`, `applesauce-actions/actions` - [applesauce-common](exports/common.md) (893 exports) — `applesauce-common/casts`, `applesauce-common/factories`, `applesauce-common/helpers`, `applesauce-common/models`, `applesauce-common/observable`, `applesauce-common/operations` - [applesauce-content](exports/content.md) (37 exports) — `applesauce-content/helpers`, `applesauce-content/markdown`, `applesauce-content/nast`, `applesauce-content/text` - [applesauce-core](exports/core.md) (378 exports) — `applesauce-core`, `applesauce-core/casts`, `applesauce-core/event-store`, `applesauce-core/factories`, `applesauce-core/helpers`, `applesauce-core/models`, `applesauce-core/observable`, `applesauce-core/operations`, `applesauce-core/promise` - [applesauce-loaders](exports/loaders.md) (104 exports) — `applesauce-loaders`, `applesauce-loaders/helpers`, `applesauce-loaders/loaders`, `applesauce-loaders/operators` - [applesauce-react](exports/react.md) (25 exports) — `applesauce-react/helpers`, `applesauce-react/hooks`, `applesauce-react/providers` - [applesauce-relay](exports/relay.md) (80 exports) — `applesauce-relay`, `applesauce-relay/negentropy`, `applesauce-relay/operators` - [applesauce-signers](exports/signers.md) (35 exports) — `applesauce-signers`, `applesauce-signers/helpers`, `applesauce-signers/signers` - [applesauce-wallet](exports/wallet.md) (188 exports) — `applesauce-wallet/actions`, `applesauce-wallet/casts`, `applesauce-wallet/factories`, `applesauce-wallet/helpers`, `applesauce-wallet/models`, `applesauce-wallet/operations` - [applesauce-wallet-connect](exports/wallet-connect.md) (121 exports) — `applesauce-wallet-connect`, `applesauce-wallet-connect/factories`, `applesauce-wallet-connect/helpers`, `applesauce-wallet-connect/wallet-connect`, `applesauce-wallet-connect/wallet-service` --- ## How To Use Examples Examples are complete, single-file React applications demonstrating real Applesauce usage. Each file is self-contained with all imports, state management, and UI. ### Reading examples Each example is listed below with a link to its rendered markdown file. The markdown contains the full source code. To understand how to implement a feature: 1. Find the example closest to your task from the list below 2. Read the full example file — it contains working, production-quality code 3. Note the imports — they show exactly which packages and subpaths to use 4. Note the patterns — how `EventStore`, `RelayPool`, loaders, casts, and `use$` are wired together ### Example structure Every example follows this pattern: - **JSDoc header**: description, tags, and related examples - **Imports**: all applesauce packages plus React, RxJS, and UI dependencies - **Shared services**: `EventStore`, `RelayPool`, loaders instantiated at module level - **React component**: default export using `use$` for reactive data, actions for mutations - **UI**: DaisyUI + Tailwind CSS components ### Key examples by topic **Getting started**: `feed/relay-timeline` (basic feed), `simple/profile-editor` (profile editing), `casting/contacts` (follow/unfollow) **Casts & reactive data**: `casting/thread` (Note cast + threading), `casting/custom` (custom EventCast subclass), `casting/mutes` (mute lists) **Loaders**: `loader/paginated-timeline` (TimelineLoader), `loader/parallel-async-loading` (batch loading), `loader/using-ndk` / `loader/using-nostrify` / `loader/using-nostr-tools` (third-party pool adapters) **Actions**: `simple/profile-editor` (UpdateProfile), `bookmarks/manager` (BookmarkEvent), `blossom/server-manager` (Blossom actions) **Signers & accounts**: `signers/accounts` (AccountManager), `signers/password` (PasswordSigner), `signers/bunker` (NostrConnectSigner) **Content rendering**: `content/simple-text` (useRenderedContent + ComponentMap), `content/articles` (markdown + comments) **Caching**: `cache/nostr-idb` (IndexedDB), `cache/window.nostrdb` (nostrdb polyfill), `cache/worker-relay` (worker SQLite) **Badges (NIP-58)**: `badges/profile` (view badges), `badges/editor` (edit profile badge pins) **Wallet & payments**: `zap/zap-modal` (zap flow), `nwc/simple-wallet` (NWC pay), `wallet/wallet` (full Cashu wallet) **Negentropy sync**: `negentrapy/relay-difference` (cross-relay diff), `negentrapy/note-reactions` (sync reactions) **Outbox model**: `outbox/social-feed` (mailbox-aware feed), `outbox/relay-selection` (relay picking) --- ## Docs - `docs` - `apps` - `accounts` - [Accounts](docs/apps/accounts/accounts.md) - [Accounts](docs/apps/accounts/index.md) - [Account Manager](docs/apps/accounts/manager.md) - `actions` - [Action Runner](docs/apps/actions/action-runner.md) - [Actions](docs/apps/actions/actions.md) - [Actions](docs/apps/actions/index.md) - `casting` - [Casting Events](docs/apps/casting/events.md) - [Casting Users](docs/apps/casting/users.md) - `content` - [Content](docs/apps/content/index.md) - [Markdown](docs/apps/content/markdown.md) - [React Content Rendering](docs/apps/content/react.md) - [Text Content](docs/apps/content/text.md) - `encryption` - [Caching Encrypted Content](docs/apps/encryption/caching.md) - `react` - [React](docs/apps/react/index.md) - [use$ Hook](docs/apps/react/use-observable.md) - `core` - [Casting System](docs/core/casting.md) - [Event Memory](docs/core/event-memory.md) - [Event Store](docs/core/event-store.md) - [Helpers](docs/core/helpers.md) - [Models](docs/core/models.md) - `creating` - `factory` - [Common Factories](docs/creating/factory/common-factories.md) - [EventFactory](docs/creating/factory/event-factory.md) - [Event Operations](docs/creating/factory/event-operations.md) - [Extending Factories](docs/creating/factory/extending-factories.md) - [Factory](docs/creating/factory/index.md) - [Tag Operations](docs/creating/factory/tag-operations.md) - `signers` - [Nostr Connect Provider](docs/creating/signers/bunker-provider.md) - [Signers](docs/creating/signers/index.md) - [Nostr Connect](docs/creating/signers/nostr-connect.md) - [Password Signer](docs/creating/signers/signers.md) - `introduction` - [Getting Started](docs/introduction/getting-started.md) - [Glossary](docs/introduction/glossary.md) - [MCP Server](docs/introduction/mcp-server.md) - [Applesauce packages](docs/introduction/packages.md) - `loading` - `loaders` - [Address Loader](docs/loading/loaders/address-loader.md) - [Event Loader](docs/loading/loaders/event-loader.md) - [Loaders](docs/loading/loaders/package.md) - [Reactions Loader](docs/loading/loaders/reactions-loader.md) - [Tag Value Loader](docs/loading/loaders/tag-value-loader.md) - [Timeline Loader](docs/loading/loaders/timeline-loader.md) - [Unified Event Loader](docs/loading/loaders/unified-loader.md) - [Upstream Pool](docs/loading/loaders/upstream-pool.md) - [Zaps Loader](docs/loading/loaders/zaps-loader.md) - `relays` - [Relay Liveness Tracking](docs/loading/relays/liveness.md) - [Negentropy Sync](docs/loading/relays/negentropy.md) - [RxJS Operators](docs/loading/relays/operators.md) - [Relays](docs/loading/relays/package.md) - [Relay Pool](docs/loading/relays/pool.md) - [Relay Class](docs/loading/relays/relays.md) - `migration` - [Migrations](docs/migration/index.md) - [Migration Guide: v1 to v2](docs/migration/v1-v2.md) - [Migration Guide: v2 to v3](docs/migration/v2-v3.md) - [Migrating from applesauce v4 to v5](docs/migration/v4-v5.md) - [Migrating from Applesauce v5 to v6](docs/migration/v5-v6.md) - `money` - `wallet` - [Wallet Actions](docs/money/wallet/actions.md) - [Wallet casts](docs/money/wallet/casts.md) - [Wallet models](docs/money/wallet/models.md) - [Wallet](docs/money/wallet/package.md) - `wallet-connect` - [Wallet Connect](docs/money/wallet-connect/package.md) - [WalletConnect Class](docs/money/wallet-connect/wallet-connect.md) - [WalletService Class](docs/money/wallet-connect/wallet-service.md) - `storage` - `caching` - [Event Caching](docs/storage/caching/index.md) - [nostr-idb Package](docs/storage/caching/nostr-idb.md) - [window.nostrdb Package](docs/storage/caching/window.nostrdb.md) - `databases` - [Better SQLite3 Implementation](docs/storage/databases/better-sqlite3.md) - [Bun SQLite Implementation](docs/storage/databases/bun.md) - [Event Databases](docs/storage/databases/index.md) - [LibSQL Implementation](docs/storage/databases/libsql.md) - [Native SQLite Implementation](docs/storage/databases/native.md) - [Turso WASM Implementation](docs/storage/databases/turso-wasm.md) - [Turso Implementation](docs/storage/databases/turso.md) - [Storing Events](docs/storage/index.md) - [Core Packages](docs/index.md) ## Examples Examples are single-file React apps. Read the ones relevant to your current task for complete, working implementations. - [App data / Manager](examples/app-data/manager.md) — Store and retrieve application-specific data using NIP-78 app-specific events - [Articles / Blog](examples/articles/blog.md) — Browse a user's blog: pick a pubkey, see all their articles, and read them - [Articles / Rendering](examples/articles/rendering.md) — Create and display long-form articles with comments using NIP-23 - [Badges / Editor](examples/badges/editor.md) — Edit profile badge pins: reorder, add from awards, and remove - [Badges / Profile](examples/badges/profile.md) — Render profile badges via casts and inspect who issued each award - [Blossom / Server manager](examples/blossom/server-manager.md) — Blossom Server Manager for managing Blossom servers for decentralized content hosting - [Bookmarks / Manager](examples/bookmarks/manager.md) — Bookmarks Manager to create, manage, and organize bookmarks for notes and events - [Cache / Nostr idb](examples/cache/nostr-idb.md) — Nostr IDB Cache for caching events using IndexedDB with nostr-idb for offline support and faster loading - [Cache / Window.nostrdb](examples/cache/window.nostrdb.md) — Window NostrDB Cache for caching events using window.nostrdb.js for fast local storage and retrieval - [Cache / Worker relay](examples/cache/worker-relay.md) — Worker Relay Cache using Web Workers with worker-relay for background event caching and processing - [Calendar / Create event](examples/calendar/create-event.md) — Create date-based and time-based calendar events (NIP-52) with location and details - [Calendar / Map](examples/calendar/map.md) — Display calendar events on an interactive map with geolocation - [Calendar / Timeline](examples/calendar/timeline.md) — Display a timeline of calendar events with filtering and details - [Casting / Custom](examples/casting/custom.md) — Example of using a custom cast class for NIP-34 Git Repository announcements - [Comment / Feed](examples/comment/feed.md) — Display a feed of comments with threading and reply functionality - [Contacts / Manager](examples/contacts/manager.md) — Manage your contact list (follows) with the ability to add and remove contacts - [Database / Turso wasm](examples/database/turso-wasm.md) — Store and query events using Turso WASM database with SQLite in the browser - [Database / Worker relay](examples/database/worker-relay.md) — An example of using Web Workers and SQLite WASM with the @snort/worker-relay package for persisting events to a SQLite database - [Emojis / Packs](examples/emojis/packs.md) — Browse emoji packs published on a relay and inspect every emoji in a selected pack - [Feed / App handlers](examples/feed/app-handlers.md) — Browse and interact with Nostr app handlers (NIP-89) to discover applications and their supported event kinds - [Feed / Loading reactions](examples/feed/loading-reactions.md) — Display reactions (likes, reposts) with loading states and user information - [Feed / Pow notes](examples/feed/pow-notes.md) — Display notes with proof of work (mining difficulty) requirements - [Feed / Reactions timeline](examples/feed/reactions-timeline.md) — Display a timeline of reactions (likes, reposts) with user profiles and caching - [Feed / Relay timeline](examples/feed/relay-timeline.md) — Display a real-time timeline of notes from a selected relay with caching support - [File / Explorer](examples/file/explorer.md) — Browse kind 1063 file metadata events with reactive filters and cast-driven UI - [File / Publisher](examples/file/publisher.md) — Upload a file to the user's blossom servers, build a kind 1063 event, and publish it to outbox relays. - [Gift wrap / Dashboard](examples/gift-wrap/dashboard.md) — Dashboard for managing gift-wrapped events (NIP-59) with encryption - [Gift wrap / Generator](examples/gift-wrap/generator.md) — Generate gift-wrapped events (NIP-59) with encryption for private sharing - [Gift wrap / Timeline](examples/gift-wrap/timeline.md) — Display a timeline of gift-wrapped events with decryption support - [Group / Communikeys](examples/group/communikeys.md) — Display and manage communikey groups with member lists - [Group / Groups](examples/group/groups.md) — Browse and manage Nostr groups with metadata and member information - [Group / Relay chat](examples/group/relay-chat.md) — Group chat functionality using relay-based messaging - [Group / Threads](examples/group/threads.md) — Display threaded conversations within groups with replies - [Hashtags / Explore](examples/hashtags/explore.md) — Explore and browse content by hashtags with filtering - [Highlight / Article](examples/highlight/article.md) — Create and publish highlights on articles by selecting text, with markdown rendering and mention support - [Highlight / Timeline](examples/highlight/timeline.md) — Display a timeline of highlighted articles and content - [Loader / Paginated timeline](examples/loader/paginated-timeline.md) — Load timeline events with pagination support for efficient data loading - [Loader / Parallel async loading](examples/loader/parallel-async-loading.md) — Load multiple user profiles in parallel with async operations - [Loader / Timeline scrolling](examples/loader/timeline-scrolling.md) — Visualize timeline events on a canvas with time-based scrolling and relay visualization - [Loader / Using ndk](examples/loader/using-ndk.md) — Integrate NDK (Nostr Development Kit) with Applesauce loaders for event loading - [Loader / Using nostr tools](examples/loader/using-nostr-tools.md) — Integrate nostr-tools library with Applesauce loaders for event loading - [Loader / Using nostrify](examples/loader/using-nostrify.md) — Integrate Nostrify library with Applesauce loaders for event loading - [Messages / Gift wrap](examples/messages/gift-wrap.md) — Send and receive encrypted gift-wrapped direct messages - [Messages / Legacy](examples/messages/legacy.md) — Send and receive legacy encrypted direct messages (NIP-04) - [Messages / Personal notes](examples/messages/personal-notes.md) — A personal notes app built on NIP-17 direct messages - [Misc / Nip 19 links](examples/misc/nip-19-links.md) — Parse and display NIP-19 encoded links (npub, nprofile, note, nevent, etc.) - [Mutes / Manager](examples/mutes/manager.md) — Manage your mute list to hide content from specific users - [Negentrapy / Mentions](examples/negentrapy/mentions.md) — Display notes with user mentions and highlight mentioned users - [Negentrapy / Note reactions](examples/negentrapy/note-reactions.md) — Display reactions (likes, reposts) on notes with user information - [Negentrapy / Relay difference](examples/negentrapy/relay-difference.md) — Compare events across different relays to see differences in data availability - [Notes / Composing](examples/notes/composing.md) — Compose a kind 1 note with nostr-editor, build it with NoteFactory, then confirm and publish to outbox relays. Supports uploading images, videos, and files to the user's configured blossom servers. - [Notes / Rendering](examples/notes/rendering.md) — Render simple text notes with basic formatting, media detection, and image galleries. Uses blossom-client-sdk `handleBrokenMedia` so img/video/audio under each note (including galleries) get blossom server fallbacks when URLs fail or `blossom:` cannot load directly. - [Notes / Simple composer](examples/notes/simple-composer.md) — Simple note composer using a plain textarea with a live content preview toggle. Supports uploading files to the user's configured blossom servers. - [Nutzap / Contacts](examples/nutzap/contacts.md) — Send nutzaps (Lightning payments via Cashu) to contacts with mint quotes - [Nutzap / Zap feed](examples/nutzap/zap-feed.md) — Display a feed of nutzaps (Lightning payments) with user information - [Nutzap / Zap profile](examples/nutzap/zap-profile.md) — Display nutzap information on user profiles with mint details - [Nwc / Auth uri](examples/nwc/auth-uri.md) — Create and parse wallet authentication URIs for Nostr Wallet Connect (NIP-47) - [Nwc / Connection string](examples/nwc/connection-string.md) — Parse and display wallet connection strings with support detection - [Nwc / Simple wallet](examples/nwc/simple-wallet.md) — Simple wallet interface for paying invoices and sending Lightning payments via Nostr Wallet Connect - [Nwc / Transactions](examples/nwc/transactions.md) — View and manage wallet transaction history with filtering and details - [Nwc / Wallet info](examples/nwc/wallet-info.md) — Display wallet information including balance, capabilities, and connection status - [Nwc / Wallet service](examples/nwc/wallet-service.md) — Implement a wallet service that handles Nostr Wallet Connect requests and payments - [Outbox / Relay selection](examples/outbox/relay-selection.md) — Select optimal relays for publishing events based on mailbox discovery - [Outbox / Social feed](examples/outbox/social-feed.md) — Display a social feed using outbox relays for optimal event distribution - [Poll / Timeline](examples/poll/timeline.md) — Display polls with voting functionality and results - [Relay discovery / Attributes](examples/relay-discovery/attributes.md) — Discover and display relay attributes and metadata - [Relay discovery / Contacts relays](examples/relay-discovery/contacts-relays.md) — Discover relays from user contact lists and recommendations - [Relay discovery / Mailbox map](examples/relay-discovery/mailbox-map.md) — Visualize mailbox relays on a map with geolocation data - [Relay discovery / Monitor feed](examples/relay-discovery/monitor-feed.md) — Display relay monitor announcements and status information - [Relay discovery / Monitors map](examples/relay-discovery/monitors-map.md) — Visualize relay monitors on a map with status and location data - [Relay / Completion conditions](examples/relay/completion-conditions.md) — Visualize how different pool.request completion conditions work in real-time - [Rx views / Contacts latest posts](examples/rx-views/contacts-latest-posts.md) — Latest kind 1 post from each contact, fetched from the 3 fastest outbox relays (by RTT from a single monitor) - [Rx views / Friends of friends](examples/rx-views/friends-of-friends.md) — Browse a user's contact network — click any contact to navigate their connections - [Rx views / Mailbox statuses](examples/rx-views/mailbox-statuses.md) — Check the health of a user's inbox and outbox relays using a relay monitor - [Rx views / Metadata distribution](examples/rx-views/metadata-distribution.md) — Check which metadata events are present on a user's outbox relays - [Search / Primal](examples/search/primal.md) — Search for users and content using Primal search API - [Search / Relay](examples/search/relay.md) — Search for users on a NIP-50 capable relay (default relay.ditto.pub) - [Search / Vertex](examples/search/vertex.md) — Search for users and content using Vertex search API - [Signers / Accounts](examples/signers/accounts.md) — Manage multiple Nostr accounts with different signers and switch between them - [Signers / Bunker](examples/signers/bunker.md) — Authenticate and sign events using Nostr Connect (NIP-46) bunker protocol - [Signers / Bunker provider](examples/signers/bunker-provider.md) — Create a Nostr Connect provider that allows remote signers to authenticate and sign events - [Signers / Password](examples/signers/password.md) — Create and manage signers with password-based encryption for private keys - [Simple / Event deletion](examples/simple/event-deletion.md) — Delete notes and events from the Nostr network using deletion events - [Simple / Profile editor](examples/simple/profile-editor.md) — Edit and update your Nostr profile with a live preview of changes - [Social graph / Nostr social graph](examples/social-graph/nostr-social-graph.md) — Load and display social graph connections (follows, followers) between users - [Stream / Viewer](examples/stream/viewer.md) — View live streams with chat functionality and stream metadata - [Threading / Note thread](examples/threading/note-thread.md) — Display threaded conversations with replies and zaps - [Torrent / Feed](examples/torrent/feed.md) — Display torrent files shared on Nostr with metadata and download information - [Wallet / Mint discovery](examples/wallet/mint-discovery.md) — Discover and browse Cashu mint information and recommendations from the Nostr network - [Wallet / Wallet](examples/wallet/wallet.md) — Full-featured Cashu wallet with token management, nutzaps, and Lightning integration - [Zap / Graph](examples/zap/graph.md) — Visualize zap (Lightning payment) relationships as a graph - [Zap / Timeline](examples/zap/timeline.md) — Display a timeline of zaps (Lightning payments) with amounts and recipients - [Zap / Zap modal](examples/zap/zap-modal.md) — Zap modal example showing how to fetch a lightning invoice and display it as a QR code