From c8f03b6de44e3102741f085847b2b429364bdbd5 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 23 Feb 2024 09:54:12 -0500 Subject: [PATCH 1/3] Embedding events into other event's texts. --- 19.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/19.md b/19.md index ef80887019..29a5556464 100644 --- a/19.md +++ b/19.md @@ -33,9 +33,10 @@ For these events, the contents are a binary-encoded list of `TLV` (type-length-v These are the possible bech32 prefixes with `TLV`: - `nprofile`: a nostr profile - - `nevent`: a nostr event + - `nevent`: a nostr event id - `nrelay`: a nostr relay - `naddr`: a nostr _replaceable event_ coordinate + - `nembed`: a stringified nostr event These possible standardized `TLV` types are indicated here: @@ -45,6 +46,7 @@ These possible standardized `TLV` types are indicated here: - for `nevent` it will be the 32 bytes of the event id - for `nrelay`, this is the relay URL - for `naddr`, it is the identifier (the `"d"` tag) of the event being referenced. For non-parameterized replaceable events, use an empty string. + - for `nembed`, it is a JSON-stringified event - `1`: `relay` - for `nprofile`, `nevent` and `naddr`, _optionally_, a relay in which the entity (profile or event) is more likely to be found, encoded as ascii - this may be included multiple times From 713bea60c2f609610dae074345388848bb3fecbb Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 23 Feb 2024 19:10:58 -0500 Subject: [PATCH 2/3] Trying to go with compression on --- 19.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/19.md b/19.md index 29a5556464..4d48ec3f33 100644 --- a/19.md +++ b/19.md @@ -36,7 +36,7 @@ These are the possible bech32 prefixes with `TLV`: - `nevent`: a nostr event id - `nrelay`: a nostr relay - `naddr`: a nostr _replaceable event_ coordinate - - `nembed`: a stringified nostr event + - `nembed`: a compressed nostr event These possible standardized `TLV` types are indicated here: @@ -46,7 +46,7 @@ These possible standardized `TLV` types are indicated here: - for `nevent` it will be the 32 bytes of the event id - for `nrelay`, this is the relay URL - for `naddr`, it is the identifier (the `"d"` tag) of the event being referenced. For non-parameterized replaceable events, use an empty string. - - for `nembed`, it is a JSON-stringified event + - for `nembed`, it is a JSON-stringified, GZIP-compressed event - `1`: `relay` - for `nprofile`, `nevent` and `naddr`, _optionally_, a relay in which the entity (profile or event) is more likely to be found, encoded as ascii - this may be included multiple times From d33727da8188519d20fca27c06ad72cd4c4fb36b Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 27 Feb 2024 11:05:04 -0500 Subject: [PATCH 3/3] Moves embeds outside the TLV --- 19.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/19.md b/19.md index 4d48ec3f33..a72653f677 100644 --- a/19.md +++ b/19.md @@ -19,6 +19,7 @@ These are the possible bech32 prefixes: - `npub`: public keys - `nsec`: private keys - `note`: note ids + - `nembed`: JSON-stringified, GZIP-compressed event Example: the hex public key `3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d` translates to `npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6`. @@ -36,7 +37,6 @@ These are the possible bech32 prefixes with `TLV`: - `nevent`: a nostr event id - `nrelay`: a nostr relay - `naddr`: a nostr _replaceable event_ coordinate - - `nembed`: a compressed nostr event These possible standardized `TLV` types are indicated here: @@ -46,7 +46,6 @@ These possible standardized `TLV` types are indicated here: - for `nevent` it will be the 32 bytes of the event id - for `nrelay`, this is the relay URL - for `naddr`, it is the identifier (the `"d"` tag) of the event being referenced. For non-parameterized replaceable events, use an empty string. - - for `nembed`, it is a JSON-stringified, GZIP-compressed event - `1`: `relay` - for `nprofile`, `nevent` and `naddr`, _optionally_, a relay in which the entity (profile or event) is more likely to be found, encoded as ascii - this may be included multiple times