diff options
| author | fiatjaf <fiatjaf@gmail.com> | 2023-02-13 08:50:55 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-13 08:50:55 -0300 |
| commit | 0499d52ef279ed776f9322a2f8e2f20e80a8bb78 (patch) | |
| tree | 1317e55dac8d3353cf1a5cba0947c826890953bf /33.md | |
| parent | 17ffd3ee4efa33c3f6abb4304d1c4dd998efc523 (diff) | |
| parent | b4493aa56abdea4b05780651e7af06ea13bbfafa (diff) | |
Merge pull request #220 from nostr-protocol/longform
Diffstat (limited to '33.md')
| -rw-r--r-- | 33.md | 18 |
1 files changed, 16 insertions, 2 deletions
| @@ -12,10 +12,10 @@ Implementation | |||
| 12 | -------------- | 12 | -------------- |
| 13 | The value of a tag is defined as the first parameter of a tag after the tag name. | 13 | The value of a tag is defined as the first parameter of a tag after the tag name. |
| 14 | 14 | ||
| 15 | A *parameterized replaceable event* is defined as an event with a kind `30000 <= n < 40000`. | 15 | A *parameterized replaceable event* is defined as an event with a kind `30000 <= n < 40000`. |
| 16 | Upon a parameterized replaceable event with a newer timestamp than the currently known latest | 16 | Upon a parameterized replaceable event with a newer timestamp than the currently known latest |
| 17 | replaceable event with the same kind and first `d` tag value being received, the old event | 17 | replaceable event with the same kind and first `d` tag value being received, the old event |
| 18 | SHOULD be discarded and replaced with the newer event. | 18 | SHOULD be discarded and replaced with the newer event. |
| 19 | A missing or a `d` tag with no value should be interpreted equivalent to a `d` tag with the | 19 | A missing or a `d` tag with no value should be interpreted equivalent to a `d` tag with the |
| 20 | value as an empty string. Events from the same author with any of the following `tags` | 20 | value as an empty string. Events from the same author with any of the following `tags` |
| 21 | replace each other: | 21 | replace each other: |
| @@ -30,6 +30,20 @@ replace each other: | |||
| 30 | 30 | ||
| 31 | Clients SHOULD NOT use `d` tags with multiple values and SHOULD include the `d` tag even if it has no value to allow querying using the `#d` filter. | 31 | Clients SHOULD NOT use `d` tags with multiple values and SHOULD include the `d` tag even if it has no value to allow querying using the `#d` filter. |
| 32 | 32 | ||
| 33 | Referencing and tagging | ||
| 34 | ----------------------- | ||
| 35 | |||
| 36 | Normally (as per NIP-01, NIP-12) the `"p"` tag is used for referencing public keys and the | ||
| 37 | `"e"` tag for referencing event ids and the `note`, `npub`, `nprofile` or `nevent` are their | ||
| 38 | equivalents for event tags (i.e. an `nprofile` is generally translated into a tag | ||
| 39 | `["p", "<event hex id>", "<relay url>"]`). | ||
| 40 | |||
| 41 | To support linking to parameterized replaceable events, the `naddr` code is introduced on | ||
| 42 | NIP-19. It includes the public key of the event author and the `d` tag (and relays) such that | ||
| 43 | the referenced combination of public key and `d` tag can be found. | ||
| 44 | |||
| 45 | The equivalent in `tags` to the `naddr` code is the tag `"a"`, comprised of `["a", "<kind>:<pubkey>:<d-identifier>", "<relay url>"]`. | ||
| 46 | |||
| 33 | Client Behavior | 47 | Client Behavior |
| 34 | --------------- | 48 | --------------- |
| 35 | 49 | ||