Conversation
|
It looks better. |
|
Yep, it was duplicated. I kept only in the json descriptor. |
01.md
Outdated
| * `["EVENT", <subscription_id>, <JSON-serialized string of the event>]`, used to send events requested by clients. | ||
| * `["EOSE", <subscription_id>]`, used to indicate the _end of stored events_ and the beginning of events newly received in real-time. | ||
| * `["CLOSED", <subscription_id>, <message>]`, used to indicate that a subscription was ended on the server side. | ||
| * `["CLOSED", <subscription_id>, <prefix>:<message>]`, used to indicate that a subscription was ended on the server side. |
There was a problem hiding this comment.
why isn't the OK message listed here?
There was a problem hiding this comment.
I split them into a subscription protocol and a publishing protocol.
|
I like this, let's do it. |
|
@fiatjaf maybe later we can move the NOTICE part to a non-mandatory NIP. They are cool, but I think we must make NIP-01's feature set as small as possible while still covering the entire protocol. |
01.md
Outdated
| This NIP defines the mandatory part of the Nostr protocol. New NIPs may add new optional (or mandatory) fields, messages, and features to the structures and flows described here. | ||
|
|
||
| ## Events and signatures | ||
| # Events |
There was a problem hiding this comment.
I always call these Notes instead of Events in my codebases, but maybe the ship has sailed on that one because of ["EVENT",...]
There was a problem hiding this comment.
"event" was probably a poor name choice, but "relay" too.
There was a problem hiding this comment.
I thought kind 1 events are "notes". All notes are events but not all events are notes.
| - [NIP-08: Handling Mentions](08.md) --- **unrecommended**: deprecated in favor of [NIP-27](27.md) | ||
| - [NIP-09: Event Deletion](09.md) | ||
| - [NIP-10: Conventions for clients' use of `e` and `p` tags in text events](10.md) | ||
| - [NIP-10: Text Notes](10.md) |
There was a problem hiding this comment.
NIP-10 is more about threads than Text Notes, you can have threaded events of different kinds.
There was a problem hiding this comment.
NIP-10 is more about threads than Text Notes
Yes, but I think we need a place to coalesce all behaviors that are specific to kind:1. Getting it out of NIP01 opens space to add much more information about what should and should not be on kind 1s. NIP-10 can easily become that home since it was already kind1 specific.
threaded events of different kinds
The e and a definitions has been moved to NIP-01 since the previous restructuring. Now NIP-10 only defines what those mean for the kind:1 context.
|
FYI, I just noticed NIP01 never defines the type of each attribute in the Relay protocol messages. I think this new hack of using the |
|
What if we moved the basic protocol stuff to NIP-00 and used NIP-01 for the "basic microblogging client flow" including kind 0 and kind 1 -- then we can even include implementation recommendations like to which relays connect and how to better load threads, for example? Even conflicting alternative recommendations if that's the case. |
|
I think if we're going to restructure things that heavily, we might as well get rid of the NIP system |
|
I do think it makes sense to separate the basic microblogging stuff out of the core protocol discussion but I am not sure the "basic microblogging stuff" is a well-defined set right now. For instance, I don't consider |
# Conflicts: # 01.md
|
ACK on moving nip-01 to nip-00 and extracting the microblogging flow to it's own NIP. I agree with @vitorpamplona in that |
It will make NIP-11's |
In theory, both are required to be supported these days. |
Only as far as The only caveat is that NIP-01 must remain backward-compatible so relays don't lie when they say they support NIP-01. |
|
This is also ready to merge if people agree it's better than the current NIP-01 description. |
01.md
Outdated
| All single-letter (only English alphabet letters: a-z, A-Z) tag names are indexed by relays for faster queries. | ||
|
|
||
| These are just conventions and relay implementations may differ. | ||
| This NIP defines the format of 3 standard tags: `e`, `p`, and `a`. Tags `e`, `p` can be used to reference events and pubkeys respectively, and tag `a` references the latest version of a replaceable event. Clients MAY `a`- and `e`-tag parameterized replaceables simultaneously. |
There was a problem hiding this comment.
| This NIP defines the format of 3 standard tags: `e`, `p`, and `a`. Tags `e`, `p` can be used to reference events and pubkeys respectively, and tag `a` references the latest version of a replaceable event. Clients MAY `a`- and `e`-tag parameterized replaceables simultaneously. | |
| This NIP defines the format of 4 standard tags: `e`, `p`, `a` and `d`. Tags `e`, `p` can be used to reference events and pubkeys respectively, and tag `a` references the latest version of a replaceable event. Clients MAY set `a`- and `e`-tag parameterized replaceables simultaneously. |
There was a problem hiding this comment.
Do we really need to duplicate the definition here? Tag d was already defined in the previous section.
| | Name | Value | Other Params | | ||
| | ---- | ---------------------------------------------------------- | ----------------------- | | ||
| | `e` | `<32-byte lowercase hex of an event id>` | `<relay URL, optional>` | | ||
| | `p` | `<32-byte lowercase hex of a pubkey>` | `<relay URL, optional>` | | ||
| | `a` | `<kind>:<32-byte lowercase hex of a pubkey>:` | `<relay URL, optional>` | | ||
| | `a` | `<kind>:<32-byte lowercase hex of a pubkey>:<d-tag value>` | `<relay URL, optional>` | |
There was a problem hiding this comment.
hum.. I was hoping d wouldn't be part of this table since it's different than the other referencing tags.
There was a problem hiding this comment.
Let me explain why I have difficulties with the "d" tag.
I looked at the README and saw: "Aha, there's an official #d. Let me have a look at what this means."
I then go to NIP-01 where it's supposed to be defined. I ctrl-f through the page on GitHub and don't find it.
After your PR here, when I ctrl-f, I'll still be confused because I'm lazy and I'll find two things:
-
A statement saying
This NIP defines the format of 3 standard tags:
e,p, anda.Where the heck is now #d?
-
A table with
e,panda
Why the heck is it missing #d?
# Conflicts: # 01.md
01.md
Outdated
| # Signed Events | ||
|
|
||
| Event is the only object type available. It is a hashed and signed payload in the following format: | ||
| Events are the only data type transferred across the network. They consist in 4 main attributes: |
There was a problem hiding this comment.
5 things are hashed: pubkey, created_at, kind, tags, and content. The other 2 are generated: id, sig
# Conflicts: # 01.md
|
Closing this due to partial adoption via other PRs. Though I still think the Relay section is better described here (separated by action) than in the current nip01. |
I have added some missing info and reduced some of the verbosity of the text. Moved kind:1 definition to NIP-10 (since it's not mandatory) and added descriptions about the replaceable tags.
Is this better?
Read here