#asknostr #devstr

Which kind do I use to implement RPC between two applications over Nostr?

Context: I wonder if it'd be possible to make some basic APIs available through Nostr rather than exposing services directly. For instance, QBittorrent has an API... what if it spoke Nostr? Or Home Assistant? Or Jellyfin? Though I don't know what exactly I would do with a nostr-rpc to Jellyfin, but... who knows. o.o

Reply to this note

Please Login to reply.

Discussion

There is https://github.com/nostr-protocol/nips/blob/master/90.md defining interaction with data vending machines but that is not exactly what you are looking for, I guess. (and when I think about it for just a moment, it seems to me to be too special on the whole)

There is also a seemingly abondonend proposal for RPC service offerings https://github.com/nostr-protocol/nips/issues/601

And - depending on what you like to build - you should consider https://github.com/nostr-protocol/nips/blob/master/98.md HTTP Auth with Nostr

> make some basic APIs available through Nostr rather than exposing services directly

So you are thinking about publishing notes from one application that another applications reads and executes?

Basically, I would like to be able to do API calls over Nostr rather than having to work through the hassle of setting up reverse proxies and all that stuff, just to be able to see what the respective program is doing.

In the case of QBittorrent, It would be neat to request the current state of it's downloads and perhaps manipulate the queue. Those are technically two calls. And it would be neat to just use Nostr.

In this case, both the application and "client" connect to a relay, rather than to each other directly. So, all I need to do is set up one relay, and then point my client and services all to that relay - and now they can talk. And if I add more services, I can just point them at that relay too.

HTTP Auth has intrigued me since quite a while and I have an idea as to how I could implement that, but in a different project. But the NIPXX you linked seems interesting - maybe I can build off of that.

Basically think NWC but more generic. :)

Good question, also interested