-
Notifications
You must be signed in to change notification settings - Fork 612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIP-91: Extension Negotiation #1671
base: master
Are you sure you want to change the base?
Conversation
Might I suggest doing this with HTTP headers on websocket connect? According to websocket standards we are supposed to be using the By using an HTTP header you won't need another round trip. Also, if the relay doesn't support it you won't get a response header but the relay will continue talking to you, whereas with a new command the relay might drop the connection because you are speaking gibberish. |
This does not allow negotiating specific protocol parameters, or gating access behind AUTH. This also is problematic as you can only pick 1 protocol, and does not allow you to know what protocols the server could have offered but didn't pick.
The relay sends the first command, |
The NIP has been renamed to represent the goals of the NIP more accurately. The x/ extension namespace has been removed, and any features meant to be standardized as a NIP should create a preliminary PR and use the `nip/` namespace. Any extensions that are meant to be standardized externally should use their own namespace.
Updated the NIP to be more accurate about its goals. The |
@Semisol could relays use this to negotiate accepted kind numbers? One might have a relay, for instance, that does not store parameterized replaceable events. Could this NIP be used by the relay to indicate this limitation to the client? Then the client would know not to try to published parameterized replaceable events to the relay. This is distinct from merely indicating a supported NIP, as relays may support kind ranges that are not yet part of any widely-accepted NIP. |
I expect that most NIP-11 data for indicating capabilities and features can be moved here, even giving different users different privileges. |
I'm not saying to use You are right it is not gated behind AUTH. I can't think why it should be.
NIP-01 does not define what a relay should do if it receives a command it does not understand. |
Again, in this case, the communication is initiated by the relay. A majority of clients and relays I use currently ignore and send errors on unknown commands, not close the connection. |
@mikedilger Also, the problem here is you now break compatibility for all web clients.
A goal of this NIP is to replace NIP-11 for relay information, which includes things like event constraints. |
This seems too structured/interactive for nostr. NIP 11 is annoying in some ways, but it does the job for most things. For other things, #1434 seems preferable since it's more concrete. |
This NIP adds an extension negotiation scheme for clients and relays to negotiate new protocols. The intended goal is to replace NIP-11 for the discovery of relay supported features.
An extension feature negotiation scheme is also included.