PrimalHQ / primal-caching-service

Primal’s caching service for Nostr connects to the specified set of relays, collects all events in real time, stores them locally, and makes them available to nostr clients through a web socket-based API.
https://primal.net
MIT License
86 stars 13 forks source link

Support regular Nostr filters #13

Open alexgleason opened 11 months ago

alexgleason commented 11 months ago

If Primal's caching service could support regular Nostr filters, it would greatly increase its value. It would appeal to self-hosters who would install this as part of self-hosted Nostr infrastructure. The current filters work only with Primal apps.

pritk commented 11 months ago

you are right. most of currently supported filters in Primal caching service is specific to apps like existing Primal apps. but we can already imagine different nostr clients that can benefit from existing cache server API. otoh we decided to use one of the best software for relay functionality in our system. so we are looking at this as combination of the best options for each aspect of the system (relaying: strfry, caching: primal caching service).

alexgleason commented 10 months ago

How about search? I can see the cache service accepts this: {"cache":["user_search",{"query":"alex","limit":10}]}

It could easily support NIP-50 search, making it usable by clients as a dedicated Search relay.