From 5161c3a799da0868cbdb521218de043810bede50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= Date: Thu, 19 Mar 2026 12:11:54 +0100 Subject: [PATCH] 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) --- src/components/settings/RelayListsSettings.tsx | 16 +++++++++++++++- src/constants/kinds.ts | 14 +++++++------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/components/settings/RelayListsSettings.tsx b/src/components/settings/RelayListsSettings.tsx index a3fabaa..fa1577b 100644 --- a/src/components/settings/RelayListsSettings.tsx +++ b/src/components/settings/RelayListsSettings.tsx @@ -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 = 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 diff --git a/src/constants/kinds.ts b/src/constants/kinds.ts index dabdff2..5d0dd6f 100644 --- a/src/constants/kinds.ts +++ b/src/constants/kinds.ts @@ -837,13 +837,13 @@ export const EVENT_KINDS: Record = { 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",