Bech32 encoded relay entities (#196)

This commit is contained in:
Semisol 2023-01-27 20:49:43 +03:00 committed by GitHub
parent f89187a258
commit 524ff9b805
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

5
19.md
View File

@ -34,6 +34,7 @@ These are the possible bech32 prefixes with `TLV`:
- `nprofile`: a nostr profile
- `nevent`: a nostr event
- `nrelay`: a nostr relay
These possible standardized `TLV` types are indicated here:
@ -41,9 +42,11 @@ These possible standardized `TLV` types are indicated here:
- depends on the bech32 prefix:
- for `nprofile` it will be the 32 bytes of the profile public key
- for `nevent` it will be the 32 bytes of the event id
- for `nrelay`, this is the relay URL.
- for `nprofile`, `nevent` and `nrelay` this may be included only once.
- `1`: `relay`
- 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.
- not applicable to `nrelay`.
## Examples
- `npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6` should decode into the public key hex `3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d` and vice-versa