mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-24 09:25:52 -05:00
Expands the explanation of kind ranges.
This commit is contained in:
parent
0b24ad8646
commit
61fd568ff2
14
01.md
14
01.md
|
@ -77,11 +77,17 @@ To verify the authenticity of an event:
|
|||
|
||||
## Kinds
|
||||
|
||||
The `.kind` attribute specifies the meaning of an event, its tags and it is further defined in the various NIPs in this repository
|
||||
The `.kind` attribute specifies the meaning of an event and its tags.
|
||||
|
||||
Specific ranges define storage behaviors:
|
||||
Kinds are grouped in 4 numeric ranges to provide explicit storage behaviors for clients and relays:
|
||||
- Regular: All events are stored in disk and will last for as long as possible.
|
||||
- Ephemeral events are to be discared as soon as processed. They are ideal to send commands that should be executed immediatedly or not executed at all.
|
||||
- Replaceable events can be quickly updated by newer versions. They are ideal for status events that are always changing and the history of such changes is not important.
|
||||
- Parameterized replaceable events extend replaceable kinds to offer an extra identifier as the replacement anchor
|
||||
|
||||
| Name | Range | SHOULD retain |
|
||||
Ranges and instructions are as follows:
|
||||
|
||||
| Range Name | Range | SHOULD retain |
|
||||
| ------------- | --------------------------------- | ------------------------------------------------------ |
|
||||
| Regular | ` 1000 <= kind < 10000` | All events |
|
||||
| Replaceable | `10000 <= kind < 20000` OR `0, 3` | The newest event for each `pubkey` and `kind` |
|
||||
|
@ -102,7 +108,7 @@ The first element of the tag array is referred to as the tag _name_ and the seco
|
|||
|
||||
All single-letter (only English alphabet letters: a-z, A-Z) tag names are indexed by relays for faster queries.
|
||||
|
||||
This NIP defines the format of 3 standard referencing 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 3 referencing 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.
|
||||
|
||||
| Name | Value | Other Params |
|
||||
| ---- | ---------------------------------------------------------- | ----------------------- |
|
||||
|
|
Loading…
Reference in New Issue
Block a user