From 6e1f351ccd6af23634bfe9272a5876940fec289b Mon Sep 17 00:00:00 2001 From: Terry Yiu <963907+tyiu@users.noreply.github.com> Date: Sun, 9 Feb 2025 19:58:48 -0500 Subject: [PATCH] Deprecate stringified JSON in favor of tags on user metadata kind 0 events --- 01.md | 6 +++++- 24.md | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/01.md b/01.md index e2b4ad44..a4fcac5f 100644 --- a/01.md +++ b/01.md @@ -89,7 +89,11 @@ Kinds specify how clients should interpret the meaning of each event and the oth This NIP defines one basic kind: -- `0`: **user metadata**: the `content` is set to a stringified JSON object `{name: , about: , picture: }` describing the user who created the event. [Extra metadata fields](24.md#kind-0) may be set. A relay may delete older events once it gets a new one for the same pubkey. +- `0`: **user metadata**: a basic set of metadata `tags` describing the user who created the event. [Extra metadata fields](24.md#kind-0) may be set. A relay may delete older events once it gets a new one for the same pubkey. These tags include: + - `name`: `` + - `about`: `` + - `picture`: `` + - **DEPRECATED**: the `content` field has been used to store the stringified JSON of metadata fields in the format of `{name: , about: , picture: }`. Clients SHOULD write metadata as both tags and legacy stringified JSON until a reasonable number of SDKs and popular clients on each operating system platform have adopted using tags on the user metadata event to avoid introducing breaking changes. And also a convention for kind ranges that allow for easier experimentation and flexibility of relay implementation: diff --git a/24.md b/24.md index df3a9323..84856cce 100644 --- a/24.md +++ b/24.md @@ -11,7 +11,7 @@ This NIP keeps track of extra optional fields that can added to events which are kind 0 ====== -These are extra fields not specified in NIP-01 that may be present in the stringified JSON of metadata events: +These are extra fields not specified in NIP-01 that may be present in the tags of metadata events: - `display_name`: an alternative, bigger name with richer characters than `name`. `name` should always be set regardless of the presence of `display_name` in the metadata. - `website`: a web URL related in any way to the event author. @@ -25,6 +25,8 @@ These are fields that should be ignored or removed when found in the wild: - `displayName`: use `display_name` instead. - `username`: use `name` instead. +The `content` field has been used to store the stringified JSON of metadata fields. It has been deprecated in favor of using tags. Clients SHOULD write metadata as both tags and legacy stringified JSON until a reasonable number of SDKs and popular clients on each platform have adopted using tags on the user metadata event to avoid introducing breaking changes. + kind 3 ======