diff options
Diffstat (limited to '51.md')
| -rw-r--r-- | 51.md | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -8,7 +8,7 @@ Lists | |||
| 8 | 8 | ||
| 9 | This NIP defines lists of things that users can create. Lists can contain references to anything, and these references can be **public** or **private**. | 9 | This NIP defines lists of things that users can create. Lists can contain references to anything, and these references can be **public** or **private**. |
| 10 | 10 | ||
| 11 | Public items in a list are specified in the event `tags` array, while private items are specified in a JSON array that mimics the structure of the event `tags` array, but stringified and encrypted using the same scheme from [NIP-04](04.md) (the shared key is computed using the author's public and private key) and stored in the `.content`. | 11 | Public items in a list are specified in the event `tags` array, while private items are specified in a JSON array that mimics the structure of the event `tags` array, but stringified and encrypted using the same scheme from [NIP-44](44.md) (the shared key is computed using the author's public and private key) and stored in the `.content`. An earlier version of this specification used [NIP-04](04.md) for encryptions. Those are now deprecated. For backward compatibility, Clients can automatically discover if the encryption is NIP-04 or NIP-44 by searching for "iv" in the ciphertext and decrypting accordingly. |
| 12 | 12 | ||
| 13 | When new items are added to an existing list, clients SHOULD append them to the end of the list, so they are stored in chronological order. | 13 | When new items are added to an existing list, clients SHOULD append them to the end of the list, so they are stored in chronological order. |
| 14 | 14 | ||
| @@ -165,6 +165,6 @@ val private_items = [ | |||
| 165 | ["p", "07caba282f76441955b695551c3c5c742e5b9202a3784780f8086fdcdc1da3a9"], | 165 | ["p", "07caba282f76441955b695551c3c5c742e5b9202a3784780f8086fdcdc1da3a9"], |
| 166 | ["a", "a55c15f5e41d5aebd236eca5e0142789c5385703f1a7485aa4b38d94fd18dcc4"], | 166 | ["a", "a55c15f5e41d5aebd236eca5e0142789c5385703f1a7485aa4b38d94fd18dcc4"], |
| 167 | ] | 167 | ] |
| 168 | val base64blob = nip04.encrypt(json.encode_to_string(private_items)) | 168 | val base64blob = nip44.encrypt(json.encode_to_string(private_items)) |
| 169 | event.content = base64blob | 169 | event.content = base64blob |
| 170 | ``` | 170 | ``` |