upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/19.md
diff options
context:
space:
mode:
authorJon Staab <jstaab@protonmail.com>2023-05-12 05:10:45 -0700
committerGitHub <noreply@github.com>2023-05-12 05:10:45 -0700
commite5302f84c74cf42d878a3ed18257a16bc0d3b748 (patch)
treeb1a3ad9c0317bf7c38f34c500559b66ff7c0a22d /19.md
parent1c728516dfdc7508ce27eda222bde78466e3457d (diff)
parent4208652dc7a39c63c39559b13c656ec30400fcba (diff)
Merge branch 'master' into patch-1
Diffstat (limited to '19.md')
-rw-r--r--19.md18
1 files changed, 15 insertions, 3 deletions
diff --git a/19.md b/19.md
index 577399c..6fc4523 100644
--- a/19.md
+++ b/19.md
@@ -34,6 +34,8 @@ These are the possible bech32 prefixes with `TLV`:
34 34
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
38 - `naddr`: a nostr parameterized replaceable event coordinate (NIP-33)
37 39
38These possible standardized `TLV` types are indicated here: 40These possible standardized `TLV` types are indicated here:
39 41
@@ -41,13 +43,22 @@ These possible standardized `TLV` types are indicated here:
41 - depends on the bech32 prefix: 43 - depends on the bech32 prefix:
42 - 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
43 - 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
46 - for `nrelay`, this is the relay URL
47 - for `naddr`, it is the identifier (the `"d"` tag) of the event being referenced
44- `1`: `relay` 48- `1`: `relay`
45 - 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`, _optionally_, a relay in which the entity (profile or event) is more likely to be found, encoded as ascii
50 - this may be included multiple times
51- `2`: `author`
52 - for `naddr`, the 32 bytes of the pubkey of the event
53 - for `nevent`, _optionally_, the 32 bytes of the pubkey of the event
54- `3`: `kind`
55 - for `naddr`, the 32-bit unsigned integer of the kind, big-endian
56 - for `nevent`, _optionally_, the 32-bit unsigned integer of the kind, big-endian
46 57
47## Examples 58## Examples
48 59
49- `npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6` should decode into the public key hex `3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d` and vice-versa 60- `npub10elfcs4fr0l0r8af98jlmgdh9c8tcxjvz9qkw038js35mp4dma8qzvjptg` should decode into the public key hex `7e7e9c42a91bfef19fa929e5fda1b72e0ebc1a4c1141673e2794234d86addf4e` and vice-versa
50- `nsec180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsgyumg0` should decode into the private key hex `3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d` and vice-versa 61- `nsec1vl029mgpspedva04g90vltkh6fvh240zqtv9k0t9af8935ke9laqsnlfe5` should decode into the private key hex `67dea2ed018072d675f5415ecfaed7d2597555e202d85b3d65ea4e58d2d92ffa` and vice-versa
51- `nprofile1qqsrhuxx8l9ex335q7he0f09aej04zpazpl0ne2cgukyawd24mayt8gpp4mhxue69uhhytnc9e3k7mgpz4mhxue69uhkg6nzv9ejuumpv34kytnrdaksjlyr9p` should decode into a profile with the following TLV items: 62- `nprofile1qqsrhuxx8l9ex335q7he0f09aej04zpazpl0ne2cgukyawd24mayt8gpp4mhxue69uhhytnc9e3k7mgpz4mhxue69uhkg6nzv9ejuumpv34kytnrdaksjlyr9p` should decode into a profile with the following TLV items:
52 - pubkey: `3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d` 63 - pubkey: `3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d`
53 - relay: `wss://r.x.com` 64 - relay: `wss://r.x.com`
@@ -56,3 +67,4 @@ These possible standardized `TLV` types are indicated here:
56## Notes 67## Notes
57 68
58- `npub` keys MUST NOT be used in NIP-01 events or in NIP-05 JSON responses, only the hex format is supported there. 69- `npub` keys MUST NOT be used in NIP-01 events or in NIP-05 JSON responses, only the hex format is supported there.
70- When decoding a bech32-formatted string, TLVs that are not recognized or supported should be ignored, rather than causing an error.