From 420f0b181434c348e487c6ffaa8fea6111c10210 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 1 Apr 2026 14:17:44 -0500 Subject: NIP-58: change Profile Badges to kind 10008, add kind 30008 Badge sets (#2276) --- 58.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to '58.md') diff --git a/58.md b/58.md index 0011997..69bb110 100644 --- a/58.md +++ b/58.md @@ -6,15 +6,18 @@ Badges `draft` `optional` -Three special events are used to define, award and display badges in +Four special events are used to define, award, display and categorize badges in user profiles: 1. A "Badge Definition" event is defined as an addressable 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. 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-transferable. -3. A "Profile Badges" event is defined as an _addressable event_ with kind `30008` with a `d` tag with the value `profile_badges`. -Profile badges contain an ordered list of pairs of `a` and `e` tags referencing a `Badge Definition` and a `Badge Award` for each badge to be displayed. +3. A "Profile Badges" event is defined as a _replaceable event_ with kind `10008` as a [NIP-51](51.md) standard list. +Profile badges contain an ordered list of pairs of `a` and `e` tags referencing a `Badge Definition` and a `Badge Award` for each badge to be displayed. It may also contain `a` tags referencing "Badge Set" events. + +4. A "Badge Set" event is defined as an _addressable event_ with kind `30008` as a [NIP-51](51.md) set. +Badge sets allow users to categorize accepted badges into labeled groups. They contain ordered pairs of `a` and `e` tags referencing a `Badge Definition` and a `Badge Award` for each badge in the set. ### Badge Definition event @@ -43,10 +46,6 @@ The number of badges a pubkey can be awarded is unbounded. The Profile Badge event allows individual users to accept or reject awarded badges, as well as choose the display order of badges on their profiles. -The following tags MUST be present: - -- A `d` tag with the unique identifier `profile_badges` - The following tags MAY be present: - Zero or more ordered consecutive pairs of `a` and `e` tags referencing a kind `30009` Badge Definition and kind `8` Badge Award, respectively. Clients SHOULD @@ -109,10 +108,9 @@ Clients SHOULD attempt to render the most appropriate badge thumbnail according Honorable Bob The Brave: ```jsonc { - "kind": 30008, + "kind": 10008, "pubkey": "bob", "tags": [ - ["d", "profile_badges"], ["a", "30009:alice:bravery"], ["e", "", "wss://nostr.academy"], ["a", "30009:alice:honor"], @@ -121,3 +119,7 @@ Honorable Bob The Brave: // other fields... } ``` + +### Deprecated Profile Badges event + +An earlier version of this NIP used a kind `30008` addressable event with a `d` tag value of `profile_badges` for the Profile Badges event. Clients should treat these events as equivalent to kind `10008` and migrate to the new format. -- cgit v1.2.3