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 /19.md | |
| parent | 17ffd3ee4efa33c3f6abb4304d1c4dd998efc523 (diff) | |
| parent | b4493aa56abdea4b05780651e7af06ea13bbfafa (diff) | |
Merge pull request #220 from nostr-protocol/longform
Diffstat (limited to '19.md')
| -rw-r--r-- | 19.md | 15 |
1 files changed, 11 insertions, 4 deletions
| @@ -35,6 +35,7 @@ These are the possible bech32 prefixes with `TLV`: | |||
| 35 | - `nprofile`: a nostr profile | 35 | - `nprofile`: a nostr profile |
| 36 | - `nevent`: a nostr event | 36 | - `nevent`: a nostr event |
| 37 | - `nrelay`: a nostr relay | 37 | - `nrelay`: a nostr relay |
| 38 | - `naddr`: a nostr parameterized replaceable event coordinate (NIP-33) | ||
| 38 | 39 | ||
| 39 | These possible standardized `TLV` types are indicated here: | 40 | These possible standardized `TLV` types are indicated here: |
| 40 | 41 | ||
| @@ -42,11 +43,17 @@ These possible standardized `TLV` types are indicated here: | |||
| 42 | - depends on the bech32 prefix: | 43 | - depends on the bech32 prefix: |
| 43 | - for `nprofile` it will be the 32 bytes of the profile public key | 44 | - for `nprofile` it will be the 32 bytes of the profile public key |
| 44 | - for `nevent` it will be the 32 bytes of the event id | 45 | - for `nevent` it will be the 32 bytes of the event id |
| 45 | - for `nrelay`, this is the relay URL. | 46 | - for `nrelay`, this is the relay URL |
| 46 | - for `nprofile`, `nevent` and `nrelay` this may be included only once. | 47 | - for `naddr`, it is the identifier (the `"d"` tag) of the event being referenced |
| 47 | - `1`: `relay` | 48 | - `1`: `relay` |
| 48 | - A relay in which the entity (profile or event) is more likely to be found, encoded as UTF-8. This may be included multiple times. | 49 | - for `nprofile`, `nevent` and `naddr`, a relay in which the entity (profile or event) is more likely to be found, encoded as ascii |
| 49 | - not applicable to `nrelay`. | 50 | - this may be included multiple times |
| 51 | - `2`: `author` | ||
| 52 | - for `naddr`, the 32 bytes of the pubkey of the event | ||
| 53 | - `3`: `kind` | ||
| 54 | - for `naddr`, the 32-bit unsigned integer of the kind, big-endian | ||
| 55 | |||
| 56 | |||
| 50 | ## Examples | 57 | ## Examples |
| 51 | 58 | ||
| 52 | - `npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6` should decode into the public key hex `3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d` and vice-versa | 59 | - `npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6` should decode into the public key hex `3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d` and vice-versa |