diff options
| author | hodlbod <jstaab@protonmail.com> | 2024-06-17 08:36:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-17 08:36:42 -0700 |
| commit | 747f634004a918d712c32307ac58184fc11bca80 (patch) | |
| tree | 6df30b091d3588048f5ad507aac8fbedbed8e335 | |
| parent | c576737ba42772a561c6ebfd9faf0baae6d19b17 (diff) | |
| parent | 4f787adcd1cf23ec4d395b26c3a54cd1188fef49 (diff) | |
Merge pull request #1309 from ArmanTheParman/patch-2
metadata clarity.md
| -rw-r--r-- | 01.md | 2 | ||||
| -rw-r--r-- | 05.md | 4 | ||||
| -rw-r--r-- | README.md | 2 |
3 files changed, 4 insertions, 4 deletions
| @@ -87,7 +87,7 @@ As a convention, all single-letter (only english alphabet letters: a-z, A-Z) key | |||
| 87 | 87 | ||
| 88 | Kinds specify how clients should interpret the meaning of each event and the other fields of each event (e.g. an `"r"` tag may have a meaning in an event of kind 1 and an entirely different meaning in an event of kind 10002). Each NIP may define the meaning of a set of kinds that weren't defined elsewhere. This NIP defines two basic kinds: | 88 | Kinds specify how clients should interpret the meaning of each event and the other fields of each event (e.g. an `"r"` tag may have a meaning in an event of kind 1 and an entirely different meaning in an event of kind 10002). Each NIP may define the meaning of a set of kinds that weren't defined elsewhere. This NIP defines two basic kinds: |
| 89 | 89 | ||
| 90 | - `0`: **metadata**: the `content` is set to a stringified JSON object `{name: <username>, about: <string>, picture: <url, string>}` describing the user who created the event. [Extra metadata fields](24.md#kind-0) may be set. A relay may delete older events once it gets a new one for the same pubkey. | 90 | - `0`: **user's metadata**: the `content` is set to a stringified JSON object `{name: <username>, about: <string>, picture: <url, string>}` describing the user who created the event. [Extra metadata fields](24.md#kind-0) may be set. A relay may delete older events once it gets a new one for the same pubkey. |
| 91 | - `1`: **text note**: the `content` is set to the **plaintext** content of a note (anything the user wants to say). Content that must be parsed, such as Markdown and HTML, should not be used. Clients should also not parse content as those. | 91 | - `1`: **text note**: the `content` is set to the **plaintext** content of a note (anything the user wants to say). Content that must be parsed, such as Markdown and HTML, should not be used. Clients should also not parse content as those. |
| 92 | 92 | ||
| 93 | And also a convention for kind ranges that allow for easier experimentation and flexibility of relay implementation: | 93 | And also a convention for kind ranges that allow for easier experimentation and flexibility of relay implementation: |
| @@ -6,11 +6,11 @@ Mapping Nostr keys to DNS-based internet identifiers | |||
| 6 | 6 | ||
| 7 | `final` `optional` | 7 | `final` `optional` |
| 8 | 8 | ||
| 9 | On events of kind `0` (`metadata`) one can specify the key `"nip05"` with an [internet identifier](https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1) (an email-like address) as the value. Although there is a link to a very liberal "internet identifier" specification above, NIP-05 assumes the `<local-part>` part will be restricted to the characters `a-z0-9-_.`, case-insensitive. | 9 | On events of kind `0` (`user's metadata`) one can specify the key `"nip05"` with an [internet identifier](https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1) (an email-like address) as the value. Although there is a link to a very liberal "internet identifier" specification above, NIP-05 assumes the `<local-part>` part will be restricted to the characters `a-z0-9-_.`, case-insensitive. |
| 10 | 10 | ||
| 11 | Upon seeing that, the client splits the identifier into `<local-part>` and `<domain>` and use these values to make a GET request to `https://<domain>/.well-known/nostr.json?name=<local-part>`. | 11 | Upon seeing that, the client splits the identifier into `<local-part>` and `<domain>` and use these values to make a GET request to `https://<domain>/.well-known/nostr.json?name=<local-part>`. |
| 12 | 12 | ||
| 13 | The result should be a JSON document object with a key `"names"` that should then be a mapping of names to hex formatted public keys. If the public key for the given `<name>` matches the `pubkey` from the `metadata` event, the client then concludes that the given pubkey can indeed be referenced by its identifier. | 13 | The result should be a JSON document object with a key `"names"` that should then be a mapping of names to hex formatted public keys. If the public key for the given `<name>` matches the `pubkey` from the `user's metadata` event, the client then concludes that the given pubkey can indeed be referenced by its identifier. |
| 14 | 14 | ||
| 15 | ### Example | 15 | ### Example |
| 16 | 16 | ||
| @@ -90,7 +90,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | |||
| 90 | ## Event Kinds | 90 | ## Event Kinds |
| 91 | | kind | description | NIP | | 91 | | kind | description | NIP | |
| 92 | | ------------- | -------------------------- | ------------------------ | | 92 | | ------------- | -------------------------- | ------------------------ | |
| 93 | | `0` | Metadata | [01](01.md) | | 93 | | `0` | User's Metadata | [01](01.md) | |
| 94 | | `1` | Short Text Note | [01](01.md) | | 94 | | `1` | Short Text Note | [01](01.md) | |
| 95 | | `2` | Recommend Relay | 01 (deprecated) | | 95 | | `2` | Recommend Relay | 01 (deprecated) | |
| 96 | | `3` | Follows | [02](02.md) | | 96 | | `3` | Follows | [02](02.md) | |