diff options
Diffstat (limited to '58.md')
| -rw-r--r-- | 58.md | 22 |
1 files changed, 7 insertions, 15 deletions
| @@ -4,20 +4,14 @@ NIP-58 | |||
| 4 | Badges | 4 | Badges |
| 5 | ------ | 5 | ------ |
| 6 | 6 | ||
| 7 | `draft` `optional` `author:cameri` | 7 | `draft` `optional` |
| 8 | 8 | ||
| 9 | Three special events are used to define, award and display badges in | 9 | Three special events are used to define, award and display badges in |
| 10 | user profiles: | 10 | user profiles: |
| 11 | 11 | ||
| 12 | 1. A "Badge Definition" event is defined as a parameterized replaceable event | 12 | 1. 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. |
| 13 | with kind `30009` having a `d` tag with a value that uniquely identifies | ||
| 14 | the badge (e.g. `bravery`) published by the badge issuer. Badge definitions can | ||
| 15 | be updated. | ||
| 16 | 13 | ||
| 17 | 2. A "Badge Award" event is a kind `8` event with a single `a` tag referencing | 14 | 2. 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. |
| 18 | a "Define Badge" event and one or more `p` tags, one for each pubkey the | ||
| 19 | badge issuer wishes to award. The value for the `a` tag MUST follow the format | ||
| 20 | defined in [NIP-33](33.md). Awarded badges are immutable and non-transferrable. | ||
| 21 | 15 | ||
| 22 | 3. A "Profile Badges" event is defined as a parameterized replaceable event | 16 | 3. A "Profile Badges" event is defined as a parameterized replaceable event |
| 23 | with kind `30008` with a `d` tag with the value `profile_badges`. | 17 | with 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 |
| 37 | image, the meaning behind the badge, or the reason of it's issuance. | 31 | image, 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 | ||
| 71 | Badge 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 | |||
| 73 | Clients MAY whitelist badge issuers (pubkeys) for the purpose of ensuring they retain a valuable/special factor for their users. | 65 | Clients MAY whitelist badge issuers (pubkeys) for the purpose of ensuring they retain a valuable/special factor for their users. |
| 74 | 66 | ||
| 75 | Badge image recommended aspect ratio is 1:1 with a high-res size of 1024x1024 pixels. | 67 | Badge 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 | } |