nips/90.md

1.9 KiB

NIP-90

Data Vending Machines

draft optional

This NIP is a documentation effort and a hub for incentivizing the proliferation of DVMs on Nostr.

A DVM is anything that can be interacted with programmatically, either to benefit Nostr clients in general or making use of the Nostr ecosystem.

There are 3 types of DVM-related interaction:

  • A "bot", i.e. a Nostr profile, optionally with a kind:0 metadata, that may or may not publish kind:1s with human-readable notes, that can be controlled by a human or by a computer program.
  • A "service", i.e., a server exposing a HTTP/JSON API (although other formats aren't out of scope either).
  • A "relay", i.e. a server exposing a NIP-01 WebSocket endpoint.

To qualify as a DVM entity a thing must:

  • Accept inputs in some way, such as: by reading some specific event kind from one or more relays; by accept HTTP requests to its own HTTP API; or by receiving EVENT or REQ messages in its own WebSocket endpoint.
  • Produce outputs in some way, such as: by publishing some kind of event to one or more relays; by returning an HTTP response; or by returning EVENTs in its WebSocket connection.

It's important to notice that such definition of DVM encompasses basically everything in the world -- including Nostr relays, Nostr clients and Nostr users (yes, we are all DVMs), but this NIP limits itself to describing standards that emerge naturally for interaction flows that:

  • Will benefit from standardization such that more than one DVM can exist fulfilling the same role and more than one client or consumer can exist that interacts with such DVM directly;
  • Aren't defined anywhere else and that would be difficult to define in other NIPs.

DVMs

Translation

  • TODO: nostr.wine HTTP translation
  • TODO: event-based translation?
  • TODO: primal HTTP trending feeds
  • TODO: nostr.band HTTP trending feeds
  • TODO: DVM-based trending feeds

Whatever

  • TODO: