diff options
| author | fiatjaf <fiatjaf@gmail.com> | 2022-06-09 15:29:46 -0300 |
|---|---|---|
| committer | fiatjaf <fiatjaf@gmail.com> | 2022-06-09 15:40:13 -0300 |
| commit | 4d19ef128e9e1bacc7ea102dd314afd41e20fc69 (patch) | |
| tree | d543e4dd72cdc28998421965dad812092b3d2390 /02.md | |
| parent | f367d820d48b79f42770496087f79b0d60691ebd (diff) | |
update nip-02 to disallow `null`, only allow strings in tags.
fixes https://github.com/nostr-protocol/nips/pull/15
fixes https://github.com/fiatjaf/nostr-army-knife/issues/2
fixes https://github.com/fiatjaf/relayer/issues/3
Diffstat (limited to '02.md')
| -rw-r--r-- | 02.md | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -8,7 +8,7 @@ Contact List and Petnames | |||
| 8 | 8 | ||
| 9 | A special event with kind `3`, meaning "contact list" is defined as having a list of `p` tags, one for each of the followed/known profiles one is following. | 9 | A special event with kind `3`, meaning "contact list" is defined as having a list of `p` tags, one for each of the followed/known profiles one is following. |
| 10 | 10 | ||
| 11 | Each tag entry should contain the key for the profile, a relay URL where events from that key can be found (can be set to `null` or a invalid string if not needed), and a local name (or "petname") for that profile (can also be set to `null`), i.e., `["p", <32-bytes hex key>, <main relay URL>, <petname>]`. The `content` can be anything and should be ignored. | 11 | Each tag entry should contain the key for the profile, a relay URL where events from that key can be found (can be set to an empty string if not needed), and a local name (or "petname") for that profile (can also be set to an empty string or not provided), i.e., `["p", <32-bytes hex key>, <main relay URL>, <petname>]`. The `content` can be anything and should be ignored. |
| 12 | 12 | ||
| 13 | For example: | 13 | For example: |
| 14 | 14 | ||
| @@ -48,7 +48,7 @@ A user has an internal contact list that says | |||
| 48 | 48 | ||
| 49 | ```json | 49 | ```json |
| 50 | [ | 50 | [ |
| 51 | ["p", "21df6d143fb96c2ec9d63726bf9edc71", null, "erin"] | 51 | ["p", "21df6d143fb96c2ec9d63726bf9edc71", "", "erin"] |
| 52 | ] | 52 | ] |
| 53 | ``` | 53 | ``` |
| 54 | 54 | ||
| @@ -56,7 +56,7 @@ And receives two contact lists, one from `21df6d143fb96c2ec9d63726bf9edc71` that | |||
| 56 | 56 | ||
| 57 | ```json | 57 | ```json |
| 58 | [ | 58 | [ |
| 59 | ["p", "a8bb3d884d5d90b413d9891fe4c4e46d", null, "david"] | 59 | ["p", "a8bb3d884d5d90b413d9891fe4c4e46d", "", "david"] |
| 60 | ] | 60 | ] |
| 61 | ``` | 61 | ``` |
| 62 | 62 | ||
| @@ -64,7 +64,7 @@ and another from `a8bb3d884d5d90b413d9891fe4c4e46d` that says | |||
| 64 | 64 | ||
| 65 | ```json | 65 | ```json |
| 66 | [ | 66 | [ |
| 67 | ["p", "f57f54057d2a7af0efecc8b0b66f5708", null, "frank"] | 67 | ["p", "f57f54057d2a7af0efecc8b0b66f5708", "", "frank"] |
| 68 | ] | 68 | ] |
| 69 | ``` | 69 | ``` |
| 70 | 70 | ||