Markdown fixes and client recommendation note

Fixed markdown. Added important note for clients.
This commit is contained in:
Po 2024-09-01 22:16:32 +03:00 committed by GitHub
parent 71d5040cd2
commit 787bae7a59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

10
22.md
View File

@ -1,6 +1,8 @@
# NIP-22 # NIP-22
## Smart Widgets ## Smart Widgets
`draft` `optional`
Smart Widgets are customizable, interactive components that can be embedded within Nostr events and allow to create rich, dynamic content. This proposal outlines the structure, implementation, and potential use cases of Smart Widgets. Smart Widgets are customizable, interactive components that can be embedded within Nostr events and allow to create rich, dynamic content. This proposal outlines the structure, implementation, and potential use cases of Smart Widgets.
## Motivation ## Motivation
@ -10,13 +12,13 @@ Traditional static content limits user interaction and engagement. Smart Widgets
A new addressable event kind is proposed for Smart Widgets kind 30031. This event kind will encapsulate the data necessary to render and interact with the Smart Widgets. A new addressable event kind is proposed for Smart Widgets kind 30031. This event kind will encapsulate the data necessary to render and interact with the Smart Widgets.
## Event Structure ## Event Structure
The content of these events `MUST` be of a specified `MIME types` in a corresponding `m` tag. It is required and can't be empty. For more info about `MIME types` [see](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) The content of these events `MUST` be of a specified **MIME types** in a corresponding `m` tag. It is required and can't be empty. For more info about **MIME types** [see](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types)
The list of tags are as follows: The list of tags are as follows:
`d` (required) universally unique identifier (UUID). Generated by the client creating the smart widget event. `d` (required) universally unique identifier (UUID). Generated by the client creating the smart widget event.
`m` (required) allows clients to easily know `MIME types` before proceeding it. `m` (required) allows clients to easily know **MIME types** before proceeding it.
`title` (optional) title of the smart widget. `title` (optional) title of the smart widget.
@ -43,6 +45,10 @@ The list of tags are as follows:
] ]
} }
``` ```
> [!IMPORTANT]
> Client `MUST` validate its support for **MIME type** and, in case it is unsupported, turn that into a `nostr:naddr1...` link to some client capable of displaying such events according to [NIP-19](../master/19.md).
A stringified JSON of the kind 30031 smart widget would look like this: A stringified JSON of the kind 30031 smart widget would look like this:
``` ```
{ {