Nostr.Event.AppCurationSets (Nostr Lib v0.2.1) (event) (nip51)

View Source

App Curation Sets (Kind 30267)

References to multiple software applications. This is an addressable event with a d tag identifier. Contains a tags pointing to software application events.

Sets can have optional metadata: title, image, and description.

Defined in NIP 51 https://github.com/nostr-protocol/nips/blob/master/51.md

Summary

Functions

Creates a new app curation set (kind 30267).

Parses a kind 30267 event into an AppCurationSets struct.

Types

t()

@type t() :: %Nostr.Event.AppCurationSets{
  applications: [binary()],
  description: binary() | nil,
  event: Nostr.Event.t(),
  identifier: binary(),
  image: binary() | nil,
  title: binary() | nil
}

Functions

create(identifier, applications, opts \\ [])

@spec create(binary(), [binary()], Keyword.t()) :: t()

Creates a new app curation set (kind 30267).

Arguments

  • identifier - Unique identifier for this set (used in d tag)
  • applications - List of software application event addresses
  • opts - Optional event arguments and set metadata

Options

  • :title - Set title for display
  • :image - Set image URL
  • :description - Set description
  • :pubkey - Event author pubkey
  • :created_at - Event timestamp

Example

AppCurationSets.create("nostr-apps", [
  "32267:pubkey:com.example.app1",
  "32267:pubkey:net.example.app2"
],
  title: "My Nostr Apps",
  description: "Recommended Nostr applications"
)

parse(event)

@spec parse(Nostr.Event.t()) :: t()

Parses a kind 30267 event into an AppCurationSets struct.