A collection of stuff that doesn't fit into any applesauce package.
Each module has its own entry point (applesauce-extra/nspam, applesauce-extra/vertex, applesauce-extra/primal, applesauce-extra/open-ranking, applesauce-extra/remote-monitor-relay-liveness), so importing one doesn't load the others or their optional dependencies.
Extended relay interface for Primal's caching server. Provides access to Primal's enhanced API endpoints for content discovery, user recommendations, trending hashtags, notifications, and more. Includes methods for:
Code: src/primal.ts
Upstream: PrimalHQ/primal-server
Extended relay interface for the Vertex relay (relay.vertexlab.io). Provides reputation-based user discovery and verification services. Includes methods for:
Code: src/vertex.ts
Upstream: vertexlab.io
RemoteMonitorRelayLiveness supplies monitor-backed health through the same relay filtering interface as local RelayLiveness, without probing target relays.
const health = new RemoteMonitorRelayLiveness(eventStore, {
monitors: [{ pubkey: monitor, relays: monitorRelays }],
});
const pool = new RelayPool({ liveness: health });
Pass health to RelayPool to skip its unhealthy relays in every request, or to ignoreUnhealthyRelays, ignoreUnhealthyRelaysOnPointers, or ignoreUnhealthyMailboxes to filter specific relay lists. The shared EventStore validates and caches monitor events; the source manages publisher trust, report expiry, and negative consensus. See Relay Liveness for configuration and lifecycle management.
interpretReport only for a provider with documented explicit-negative semantics, or enable staleAsOffline to treat reports that active monitors stopped refreshing as offline.NspamClassifier runs the nspam reply-spam model on-device and scores authors from their newest kind 1 replies. filterSpam removes spam replies from a timeline.
const nspam = await NspamClassifier.load();
const replies$ = eventStore.timeline({ kinds: [1], "#e": [root.id] }).pipe(filterSpam(nspam));
Code: src/nspam/
Upstream: barrydeen/nspam