upleb.uk

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

summaryrefslogtreecommitdiff
path: root/58.md
diff options
context:
space:
mode:
Diffstat (limited to '58.md')
-rw-r--r--58.md22
1 files changed, 7 insertions, 15 deletions
diff --git a/58.md b/58.md
index 2fa4406..4a9ed4c 100644
--- a/58.md
+++ b/58.md
@@ -4,20 +4,14 @@ NIP-58
4Badges 4Badges
5------ 5------
6 6
7`draft` `optional` `author:cameri` 7`draft` `optional`
8 8
9Three special events are used to define, award and display badges in 9Three special events are used to define, award and display badges in
10user profiles: 10user profiles:
11 11
121. A "Badge Definition" event is defined as a parameterized replaceable event 121. A "Badge Definition" event is defined as a parameterized replaceable event with kind `30009` having a `d` tag with a value that uniquely identifies the badge (e.g. `bravery`) published by the badge issuer. Badge definitions can be updated.
13with kind `30009` having a `d` tag with a value that uniquely identifies
14the badge (e.g. `bravery`) published by the badge issuer. Badge definitions can
15be updated.
16 13
172. A "Badge Award" event is a kind `8` event with a single `a` tag referencing 142. A "Badge Award" event is a kind `8` event with a single `a` tag referencing a "Badge Definition" event and one or more `p` tags, one for each pubkey the badge issuer wishes to award. Awarded badges are immutable and non-transferrable.
18a "Define Badge" event and one or more `p` tags, one for each pubkey the
19badge issuer wishes to award. The value for the `a` tag MUST follow the format
20defined in [NIP-33](33.md). Awarded badges are immutable and non-transferrable.
21 15
223. A "Profile Badges" event is defined as a parameterized replaceable event 163. A "Profile Badges" event is defined as a parameterized replaceable event
23with kind `30008` with a `d` tag with the value `profile_badges`. 17with kind `30008` with a `d` tag with the value `profile_badges`.
@@ -34,7 +28,7 @@ The following tags MAY be present:
34- A `name` tag with a short name for the badge. 28- A `name` tag with a short name for the badge.
35- `image` tag whose value is the URL of a high-resolution image representing the badge. The second value optionally specifies the dimensions of the image as `width`x`height` in pixels. Badge recommended dimensions is 1024x1024 pixels. 29- `image` tag whose value is the URL of a high-resolution image representing the badge. The second value optionally specifies the dimensions of the image as `width`x`height` in pixels. Badge recommended dimensions is 1024x1024 pixels.
36- A `description` tag whose value MAY contain a textual representation of the 30- A `description` tag whose value MAY contain a textual representation of the
37image, the meaning behind the badge, or the reason of it's issuance. 31image, the meaning behind the badge, or the reason of its issuance.
38- One or more `thumb` tags whose first value is an URL pointing to a thumbnail version of the image referenced in the `image` tag. The second value optionally specifies the dimensions of the thumbnail as `width`x`height` in pixels. 32- One or more `thumb` tags whose first value is an URL pointing to a thumbnail version of the image referenced in the `image` tag. The second value optionally specifies the dimensions of the thumbnail as `width`x`height` in pixels.
39 33
40### Badge Award event 34### Badge Award event
@@ -68,8 +62,6 @@ Users MAY choose to decorate their profiles with badges for fame, notoriety, rec
68 62
69### Recommendations 63### Recommendations
70 64
71Badge issuers MAY include some Proof of Work as per [NIP-13](13.md) when minting Badge Definitions or Badge Awards to embed them with a combined energy cost, arguably making them more special and valuable for users that wish to collect them.
72
73Clients MAY whitelist badge issuers (pubkeys) for the purpose of ensuring they retain a valuable/special factor for their users. 65Clients MAY whitelist badge issuers (pubkeys) for the purpose of ensuring they retain a valuable/special factor for their users.
74 66
75Badge image recommended aspect ratio is 1:1 with a high-res size of 1024x1024 pixels. 67Badge image recommended aspect ratio is 1:1 with a high-res size of 1024x1024 pixels.
@@ -91,7 +83,7 @@ Clients SHOULD attempt to render the most appropriate badge thumbnail according
91 ["name", "Medal of Bravery"], 83 ["name", "Medal of Bravery"],
92 ["description", "Awarded to users demonstrating bravery"], 84 ["description", "Awarded to users demonstrating bravery"],
93 ["image", "https://nostr.academy/awards/bravery.png", "1024x1024"], 85 ["image", "https://nostr.academy/awards/bravery.png", "1024x1024"],
94 ["thumb", "https://nostr.academy/awards/bravery_256x256.png", "256x256"], 86 ["thumb", "https://nostr.academy/awards/bravery_256x256.png", "256x256"]
95 ], 87 ],
96 ... 88 ...
97} 89}
@@ -107,7 +99,7 @@ Clients SHOULD attempt to render the most appropriate badge thumbnail according
107 "tags": [ 99 "tags": [
108 ["a", "30009:alice:bravery"], 100 ["a", "30009:alice:bravery"],
109 ["p", "bob", "wss://relay"], 101 ["p", "bob", "wss://relay"],
110 ["p", "charlie", "wss://relay"], 102 ["p", "charlie", "wss://relay"]
111 ], 103 ],
112 ... 104 ...
113} 105}
@@ -125,7 +117,7 @@ Honorable Bob The Brave:
125 ["a", "30009:alice:bravery"], 117 ["a", "30009:alice:bravery"],
126 ["e", "<bravery badge award event id>", "wss://nostr.academy"], 118 ["e", "<bravery badge award event id>", "wss://nostr.academy"],
127 ["a", "30009:alice:honor"], 119 ["a", "30009:alice:honor"],
128 ["e", "<honor badge award event id>", "wss://nostr.academy"], 120 ["e", "<honor badge award event id>", "wss://nostr.academy"]
129 ], 121 ],
130 ... 122 ...
131} 123}