applesauce-extra
applesauce-extra collects modules that build on the core packages but don't belong in any of them: messaging clients, clients for third-party search and ranking services, monitor-backed relay health, an on-device spam classifier, and napplet hosting.
npm install applesauce-extraEntry points
Each module has its own entry point, so importing one doesn't load the others or their optional peer dependencies.
| Import | Exports | Docs |
|---|---|---|
applesauce-extra/messages | LegacyMessagesClient, WrappedMessagesClient | Messaging Clients |
applesauce-extra/gift-wrap | GiftWrapReceiver | Gift-wrap Receiver |
applesauce-extra/messages/ndr | NdrMessagesClient, createNdrTransport | Double-ratchet Messaging |
applesauce-extra/primal | PrimalCache | Primal Cache |
applesauce-extra/vertex | Vertex (deprecated) | Vertex |
applesauce-extra/open-ranking | OpenRanking | Open Ranking |
applesauce-extra/remote-monitor-relay-liveness | RemoteMonitorRelayLiveness | Remote Monitor Liveness |
applesauce-extra/nspam | NspamClassifier, filterSpam | Spam Filtering |
applesauce-extra/kehto, .../kehto/host | createKehtoHost, Kehto service adapters | Napplets |
The root applesauce-extra import re-exports Primal, Vertex, Open Ranking, remote monitor liveness, and nspam. Prefer the subpath imports in browser apps so bundlers only include what you use.
Optional peer dependencies
Only some modules need extra packages. Install them when you import that module:
nostr-double-ratchetforapplesauce-extra/messages/ndrandapplesauce-extra/kehto/services/dm/ndr@kehto/nip,@kehto/runtime,@kehto/services, and@kehto/shellforapplesauce-extra/kehto@contextvm/sdkand@contextvm/mcp-sdkforapplesauce-extra/kehto/services/dm/cordn
Integration
The modules plug into the objects your app already has instead of creating their own:
const health = new RemoteMonitorRelayLiveness(eventStore, { monitors });
const pool = new RelayPool({ liveness: health });
const messages = new LegacyMessagesClient({ pubkey, signer, eventStore, pool });The service clients (PrimalCache, Vertex, OpenRanking) return events or profile pointers. Add returned events to your EventStore and load pointers through your event loaders so the rest of the app sees them.