mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-13 23:39:08 -05:00
Markdown fixes and client recommendation note
Fixed markdown. Added important note for clients.
This commit is contained in:
parent
71d5040cd2
commit
787bae7a59
10
22.md
10
22.md
|
@ -1,6 +1,8 @@
|
|||
# NIP-22
|
||||
|
||||
## 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.
|
||||
|
||||
## 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.
|
||||
|
||||
## 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:
|
||||
|
||||
`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.
|
||||
|
||||
|
@ -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:
|
||||
```
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user