Switch to random UUID for better security.

This commit is contained in:
Vitor Pamplona 2024-02-07 18:33:15 -05:00
parent 225be8a2a1
commit 0f4edef69f

4
81.md
View File

@ -8,7 +8,7 @@ Private Relationship Status
A new `kind:30382` event documents a "Private Relationship Status" between two users of the network.
It is defined as a _parameterized replaceable event_ with a single `d` tag as hash of the target `.pubkey`. An optional `n` tag adds the target key to an unbound list.
It is defined as a _parameterized replaceable event_ with a single `d` tag as a random UUID per pubkey. An optional `n` tag adds the target key to an unbound list.
The other tags are stringified, NIP-44-encrypted and placed inside the `.content` of the event.
@ -18,7 +18,7 @@ For example:
{
"kind": 30382,
"tags": [
["d", bytesToHex(sha256(hexToBytes("<pubKey>")))],
["d", "<randomUUID>"],
["n", "Clients"]
],
"content": "<NIP-44 encrypted Stringified TAG-List(