upleb.uk

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

summaryrefslogtreecommitdiff
path: root/32.md
diff options
context:
space:
mode:
authorJonathan Staab <shtaab@gmail.com>2023-05-15 06:47:31 -0700
committerJonathan Staab <shtaab@gmail.com>2023-06-13 09:31:15 -0700
commit621340e26783511b311826c4555d40b5db902b58 (patch)
tree5877f48e903472e150ac9239cce9e89522a34a09 /32.md
parenta9f2c6a2f128e9dda70716ace7ba72c7a3c88c3f (diff)
Add example to NIP-32 to support tagging multiple entities with multiple labels
Diffstat (limited to '32.md')
-rw-r--r--32.md30
1 files changed, 24 insertions, 6 deletions
diff --git a/32.md b/32.md
index 7bb5106..253a504 100644
--- a/32.md
+++ b/32.md
@@ -55,8 +55,26 @@ A report that an event contains nudity.
55{ 55{
56 "kind": 1985, 56 "kind": 1985,
57 "tags": [ 57 "tags": [
58 ["e", <id>] 58 ["e", <id>],
59 ["l", "nudity"], 59 ["l", "nudity"]
60 ],
61 "content": "",
62 ...
63}
64```
65
66A single event can apply multiple labels to multiple targets to support mass-tagging.
67
68```json
69{
70 "kind": 1985,
71 "tags": [
72 ["e", <id>],
73 ["p", <id>],
74 ["t", "chickens"],
75 ["l", "permaculture"],
76 ["l", "permies"],
77 ["l", "farming"]
60 ], 78 ],
61 "content": "", 79 "content": "",
62 ... 80 ...
@@ -71,7 +89,7 @@ A suggestion that multiple pubkeys be associated with the `permies` topic.
71 "tags": [ 89 "tags": [
72 ["l", "#t/permies"], 90 ["l", "#t/permies"],
73 ["p", <pubkey1>], 91 ["p", <pubkey1>],
74 ["p", <pubkey2>], 92 ["p", <pubkey2>]
75 ], 93 ],
76 "content": "", 94 "content": "",
77 ... 95 ...
@@ -89,7 +107,7 @@ that's the case.
89 ["l", "#t/bitcoin"], 107 ["l", "#t/bitcoin"],
90 ["r", <relay_url>], 108 ["r", <relay_url>],
91 ["quality", 0.7], 109 ["quality", 0.7],
92 ["confidence", 0.2], 110 ["confidence", 0.2]
93 ], 111 ],
94 "content": "I think this relay is mostly just bitcoiners.", 112 "content": "I think this relay is mostly just bitcoiners.",
95 ... 113 ...
@@ -104,7 +122,7 @@ A plain review of a relay.
104 "tags": [ 122 "tags": [
105 ["l", "review"], 123 ["l", "review"],
106 ["r", <relay_url>], 124 ["r", <relay_url>],
107 ["quality", 0.1], 125 ["quality", 0.1]
108 ], 126 ],
109 "content": "This relay is full of mean people.", 127 "content": "This relay is full of mean people.",
110 ... 128 ...
@@ -121,7 +139,7 @@ this spec provides for overlaying structured metadata on top of nostr.
121 "tags": [ 139 "tags": [
122 ["l", "lightning/channel"], 140 ["l", "lightning/channel"],
123 ["p", <pubkey1>], 141 ["p", <pubkey1>],
124 ["p", <pubkey2>], 142 ["p", <pubkey2>]
125 ], 143 ],
126 "content": "<channel_id>", 144 "content": "<channel_id>",
127 ... 145 ...