nips icon indicating copy to clipboard operation
nips copied to clipboard

NIP-11 distinction between read only vs write access auth/payment

Open mleku opened this issue 1 year ago • 1 comments
trafficstars

currently there is two fields in the Limitations section relating to limits on access, auth_required and payment_required

neither of these have a secondary distinction of "for publishing events"

i propose to add two fields auth_required_write and payment_required_write

or perhaps it would be better to replace write with read and allow the former to imply read access is allowed without auth/payment

it's a bit of a nasty combinatorial situation, but the best solution is always adding but not removing old, and the new field implying some extra information the old doesn't have an opinion about (like read access)

i'm inclined to say auth_to_read is an easy one that gives us all that in one fell swoop, since without that the client could assume it can pull events and with it, that it must auth to pull events, and enforcing payment necessarily requires auth, or the rule that you can't publish events other than with a key in the paid users list, the absence of the auth_to_read would imply false state which means public readable, which requires no changes to anyone's current setup to use, and only savvy clients will recognise it

mleku avatar Mar 07 '24 14:03 mleku

What I really want is to know whether I can use a relay for a certain service or not. I would prefer something more direct like this:

"services": {
    "paid": [],
    "private": [
      "outbox",
      "inbox"
    ],
    "public": [
      "ephemeral",
      "directory"
    ],
    "unavailable": [
      "search"
    ]
  },

Services:

outbox - This relay can function as your outbox inbox - This relay can function as your inbox ephemeral - This relay can function as a transmitter of ephemeral events directory - This relay will accept and serve relay lists search - This relay offers a search service

Categories:

paid - you need to pay to use this service private - you need to make arrangements to use this service (other than just payment) public - anybody can just start using these services without prior arrangement or payment unavailable - this relay does not offer this service

Private would require 'auth' and public would not require 'auth'.

mikedilger avatar Apr 02 '24 18:04 mikedilger