a more construtive proposal for NIP-90

This commit is contained in:
fiatjaf 2025-05-02 12:43:38 -03:00
parent 8b9f440233
commit 87ba38e73b

41
90.md
View File

@ -1,9 +1,44 @@
NIP-90
======
Data Vending Machine
--------------------
Data Vending Machines
---------------------
`draft` `optional`
This NIP is a placeholder for kind and interface definitions of multiple small machine-provided services.
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:1`s 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](01.md) 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 `EVENT`s 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?
#### Trending feeds
- TODO: primal HTTP trending feeds
- TODO: nostr.band HTTP trending feeds
- TODO: DVM-based trending feeds
#### Whatever
- TODO: