diff --git a/XX.md b/XX.md new file mode 100644 index 00000000..7a59303e --- /dev/null +++ b/XX.md @@ -0,0 +1,411 @@ +# NIP-XX: Smart Widgets - Interactive Components for Nostr + +`draft` `optional` + +Improved version from (PR [#1454](https://github.com/nostr-protocol/nips/pull/1454)) +## Abstract + +This NIP introduces Smart Widgets, interactive graphical components encapsulated as Nostr events (kind `30033`), designed for seamless integration into Nostr clients. Smart Widgets enable rich, dynamic content that enhances user interaction through embedded applications, interactive forms, and mini-apps within the Nostr ecosystem. + +## Motivation + +As Nostr continues to grow, there is an increasing need for more engaging and interactive content beyond traditional static notes. Smart Widgets provide a standardized way to embed interactive components directly into Nostr events, enabling developers to create rich user experiences while maintaining the decentralized nature of the protocol. + +## Specification + +### Event Structure + +Smart Widgets use addressable event kind `30033` with the following structure: + +```json +{ + "id": "<32-bytes lowercase hex-encoded SHA-256 of the serialized event data>", + "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>", + "created_at": "", + "kind": 30033, + "content": "", + "tags": [ + ["client", "", ""], + ["d", ""], + ["l", ""], + ["icon", ""], + ["image", ""], + ["input", ""], + ["button", "