feat: add kind 10051 (KeyPackage Relays) to relay list settings

Uncomment kind 10051 in kinds registry with NIP-EE attribution and add
it to the relay list editor so users can manage MLS KeyPackage relays.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alejandro Gómez
2026-03-19 12:11:54 +01:00
parent 329265645b
commit 5161c3a799
2 changed files with 22 additions and 8 deletions

View File

@@ -90,6 +90,15 @@ const RELAY_LIST_KINDS: RelayListKindUIConfig[] = [
tagName: "relay",
hasMarkers: false,
},
{
kind: 10051,
name: "KeyPackage Relays",
description:
"Relays where you publish MLS KeyPackage events. Anyone who wants to start an encrypted group chat with you looks up this list.",
nip: "EE",
tagName: "relay",
hasMarkers: false,
},
];
// --- Components ---
@@ -379,6 +388,10 @@ export function RelayListsSettings() {
() => (pubkey ? eventStore.replaceable(10050, pubkey, "") : undefined),
[pubkey],
);
const event10051 = use$(
() => (pubkey ? eventStore.replaceable(10051, pubkey, "") : undefined),
[pubkey],
);
const eventsMap: Record<number, NostrEvent | undefined> = useMemo(
() => ({
@@ -387,8 +400,9 @@ export function RelayListsSettings() {
10007: event10007,
10012: event10012,
10050: event10050,
10051: event10051,
}),
[event10002, event10006, event10007, event10012, event10050],
[event10002, event10006, event10007, event10012, event10050, event10051],
);
// Local draft state: kind -> entries

View File

@@ -837,13 +837,13 @@ export const EVENT_KINDS: Record<number | string, EventKind> = {
nip: "51",
icon: Mail,
},
// 10051: {
// kind: 10051,
// name: "KeyPackage Relays",
// description: "KeyPackage Relays List",
// nip: "Marmot",
// icon: Key,
// },
10051: {
kind: 10051,
name: "KeyPackage Relays",
description: "KeyPackage Relays List",
nip: "EE",
icon: Key,
},
10040: {
kind: 10040,
name: "Trusted Providers",