Curated Widgets
Curated Widgets
This NIP illustrates the use of the Decentralized Lists Custom NIP to declare a list of Widgets, to organize them into Widget Types, and for users to declare items on the list of Widgets.
Declaration of the list of Widgets
{
"kind": 9998,
"tags": [
["names", "widget", "widgets"],
["description", "The p tag indicates the owner of the widget."],
["required", "widgetType"],
["required", "p"]
],
"id": <id_for_list_of_widgets>
}
Declaration of the list of Widget Types
{
"kind": 9998,
"tags": [
["names", "widget type", "widget types"],
["titles", "Widget Type", "Widget Types"],
["slugs", "widgetType", "widgetTypes"],
["description", "lorem ipsum"],
["required","name"],
["optional","title"],
["optional","description"]
],
"id": <id_for_list_of_widget_types>
}
Declaration of the Orange and Purple Widget Types
{
"kind": 9999,
"tags": [
["z", <id_for_list_of_widget_types>],
["name", "orange widget type"],
["title", "The Orange Widget Type"],
["description", "lorem ipsum"]
],
"id": <id_for_the_orange_widget_type>
}
{
"kind": 9999,
"tags": [
["z", <id_for_list_of_widget_types>],
["name", "purple widget type"],
["title", "The Purple Widget Type"],
["description", "lorem ipsum"]
],
"id": <id_for_the_purple_widget_type>
}
Declaration of a Specific Widget
{
"kind": 9999,
"tags": [
["z", <id_for_list_of_widgets>],
["name", "Alice's purple widget"],
["widgetType", <id_for_the_purple_widget_type>],
["p", <pubkey_Alice>]
],
"id": <id_for_list_of_purple_widgets>
}
Looking for comments…
Searching Nostr relays. This may take a moment the first time this article is opened.
Looking for comments…
Searching Nostr relays. This may take a moment the first time this article is opened.