upleb.uk

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

summaryrefslogtreecommitdiff
path: root/51.md
diff options
context:
space:
mode:
authorfiatjaf <fiatjaf@gmail.com>2023-11-15 00:47:15 -0300
committerfiatjaf <fiatjaf@gmail.com>2023-11-15 00:47:15 -0300
commitda05b5d9150200cec5a498ac180b6391abeddd69 (patch)
tree59df9c2cc6d6271d39587360e214b80e661545b5 /51.md
parent5dc6071978bc7c2dcee807d16ef085192971ac27 (diff)
add "communities" list and examples.
Diffstat (limited to '51.md')
-rw-r--r--51.md44
1 files changed, 38 insertions, 6 deletions
diff --git a/51.md b/51.md
index c74487f..3ac8995 100644
--- a/51.md
+++ b/51.md
@@ -16,9 +16,41 @@ The kinds `30000` and `30001` have been reserved for generic lists. These must b
16 16
17## Standard lists 17## Standard lists
18 18
19| name | kind | "d" tag | description | expected tag items | 19| name | kind | "d" tag | description | expected tag items |
20| --- | --- | --- | --- | --- | 20| --- | --- | --- | --- | --- |
21| Muted list | 30000 | `"mute"` | things the user doesn't want to see in their feeds | `"p"` (pubkeys), `"t"` (hashtags) | 21| Mute list | 30000 | `"mute"` | things the user doesn't want to see in their feeds | `"p"` (pubkeys), `"t"` (hashtags) |
22| Bookmarks list | 30001 | `"bookmark"` | things the user intends to save for the future | `"e"` (kind:1 notes), `"a"` (kind:30023 articles) | 22| Bookmarks list | 30001 | `"bookmark"` | things the user intends to save for the future | `"e"` (kind:1 notes), `"a"` (kind:30023 articles) |
23| Pin list | 30001 | `"pin"` | events the user intends to showcase in their profile page | `"e"` (kind:1 notes) | 23| Pin list | 30001 | `"pin"` | events the user intends to showcase in their profile page | `"e"` (kind:1 notes) |
24| Relay sets | 30002 | (user-defined) | user-defined relay groups the user can easily pick and choose from during variadic operations | `"relay"` (relay URLs) | 24| Communities list | 30001 | `"communities"` | [NIP-72](72.md) communities the user belongs to | `"a"` (kind:34550 community definitions) |
25| Relay sets | 30002 | (user-defined) | user-defined relay groups the user can easily pick and choose from during variadic operations | `"relay"` (relay URLs) |
26
27## Examples
28
29### A _Mute list_ with some public items and some encrypted items
30
31```json
32{
33 "id": "a92a316b75e44cfdc19986c634049158d4206fcc0b7b9c7ccbcdabe28beebcd0",
34 "pubkey": "854043ae8f1f97430ca8c1f1a090bdde6488bd5115c7a45307a2a212750ae4cb",
35 "created_at": 1699597889,
36 "kind": 30000,
37 "tags": [
38 ["d", "mute"],
39 ["p", "07caba282f76441955b695551c3c5c742e5b9202a3784780f8086fdcdc1da3a9"],
40 ["p", "a55c15f5e41d5aebd236eca5e0142789c5385703f1a7485aa4b38d94fd18dcc4"]
41 ],
42 "content": "TJob1dQrf2ndsmdbeGU+05HT5GMnBSx3fx8QdDY/g3NvCa7klfzgaQCmRZuo1d3WQjHDOjzSY1+MgTK5WjewFFumCcOZniWtOMSga9tJk1ky00tLoUUzyLnb1v9x95h/iT/KpkICJyAwUZ+LoJBUzLrK52wNTMt8M5jSLvCkRx8C0BmEwA/00pjOp4eRndy19H4WUUehhjfV2/VV/k4hMAjJ7Bb5Hp9xdmzmCLX9+64+MyeIQQjQAHPj8dkSsRahP7KS3MgMpjaF8nL48Bg5suZMxJayXGVp3BLtgRZx5z5nOk9xyrYk+71e2tnP9IDvSMkiSe76BcMct+m7kGVrRcavDI4n62goNNh25IpghT+a1OjjkpXt9me5wmaL7fxffV1pchdm+A7KJKIUU3kLC7QbUifF22EucRA9xiEyxETusNludBXN24O3llTbOy4vYFsq35BeZl4v1Cse7n2htZicVkItMz3wjzj1q1I1VqbnorNXFgllkRZn4/YXfTG/RMnoK/bDogRapOV+XToZ+IvsN0BqwKSUDx+ydKpci6htDRF2WDRkU+VQMqwM0CoLzy2H6A2cqyMMMD9SLRRzBg==?iv=S3rFeFr1gsYqmQA7bNnNTQ==",
43 "sig": "1173822c53261f8cffe7efbf43ba4a97a9198b3e402c2a1df130f42a8985a2d0d3430f4de350db184141e45ca844ab4e5364ea80f11d720e36357e1853dba6ca"
44}
45```
46
47## Encryption process pseudocode
48
49```scala
50val private_items = [
51 ["p", "07caba282f76441955b695551c3c5c742e5b9202a3784780f8086fdcdc1da3a9"],
52 ["a", "a55c15f5e41d5aebd236eca5e0142789c5385703f1a7485aa4b38d94fd18dcc4"],
53]
54val base64blob = nip04.encrypt(json.encode_to_string(private_items))
55event.content = base64blob
56```