A Generalized Open API? That's Nostr!
Like a lot of earlier adopters, I have used Nostr since 2022, and I don’t quite remember what first got me into it. I’d see twitter posts about some web interface Fiatjaf had put together and didn’t quite understand it. When the social media “twitter” clients started getting some traction, I sort of understood it a bit more.
Things only really clicked for me after reading the protocol spec. My mind raced with all these amazing quasi-applications that could be used with “dumb relays, smart clients”. At the time, the clients were still terribly slow and incomplete. Still, I was excited about an alternative social media, where things wouldn’t be censored and the user would have control over their experience.
Funny enough, it was a Bitcoin Audible podcast with John Carvalho, that got me thinking about the “other stuff”. John, who was promoting his protocol pubky, said Nostr was just a website without the interface. This was just his usual honest take and criticism about the protocol. I couldn’t agree with him and rather than a limitation, this is a super power.
Nostr is one of the few protocols that I know of, that allows anyone to publish data for any purpose whatsoever. Try using pastebin to relay chat messages for any length of time and see what happens. I believe Nostr is a general purpose web API that, on its own, doesn’t do much besides enforce a small set of rules for the data. The Nostr event hash must match its id and the signature must line up with its public key. If successful, it’s published and anyone in the world can pull that event from that relay. That’s really about it. You could argue that you can do this with a web server and some backend code, however the protocol and relay infrastructure makes this uniform across all relays, by definition. A generalized open API.
If we think about it in terms of a web API, this is like a basic POST that publishes the data on the webserver. In this case, the web server is your set of relays and your API data is an arbitrary piece of text verified by some cryptography to ensure data integrity. The possibilities that can be built on top of this haven’t even begun to be explored.
This in no way disparages the social media element of “kind 1” events. I honestly believe, that if Nostr were originally promoted as “an open web API”, no one would have really paid any attention. No one would have run a relay at any significant scale, and application builders may have been confused on what to do with it. The fact that social media and chat was the first place builders went, helped bootstrap the protocol into significance. I continue to use the social media elements frequently (although I may lurk more than I actually post lately) and do enjoy the content and shitposts from npubs I follow.
I am far from the first person to view Nostr like this and this is just my take after being a user for a few years. I think application builders need to explore some of the “other stuff” that can be built around a protocol that allows anyone, anywhere, with a keypair to publish arbitrary text. I’ve only observed limitations of development being that the relays are too dumb. This thinking fails to take into account additional areas where we can add in intelligence. A basic use of this today are bots that may DM or publish responses based on user messages. We can expand on this!
Some ideas I think about here are agents and servers hosted somewhere that can be referenced by their pubkey or some other unique identifier. A client publishing data on relays that will be ingested by that hosted agent can then generate responses. This gives a layer on top of the “dumb relay”\generalized API and can allow builders to use Nostr relays as a data transport for messages that are already verified from a public key holder. No IP address, port forwarding, or additional networking layers necessary.
Overall, I have renewed excitement for the protocol while I am starting to develop some software that will take advantage of the “other stuff” in Nostr. I will continue to use the social apps, zap.stream, and the blogging apps. Reframing the view of Nostr as not just a decentralized twitter clone will help clear some building hurdles as we all work together to reclaim the Internet.
Write a comment