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

View Source

Release Artifact Sets (Kind 30063)

Groups of artifacts of a software release. Contains e tags for file metadata events (kind:1063) and a tags for the parent software application event.

The d tag typically follows the format com.example.app@version.

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

Summary

Functions

Creates a new release artifact set (kind 30063).

Parses a kind 30063 event into a ReleaseArtifactSets struct.

Types

t()

@type t() :: %Nostr.Event.ReleaseArtifactSets{
  application: binary() | nil,
  artifacts: [binary()],
  event: Nostr.Event.t(),
  identifier: binary(),
  release_notes: binary() | nil
}

Functions

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

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

Creates a new release artifact set (kind 30063).

Arguments

  • identifier - Release identifier, typically app.id@version
  • artifacts - List of file metadata event IDs (kind:1063)
  • opts - Optional event arguments

Options

  • :application - Reference to parent software application event (a tag)
  • :release_notes - Markdown release notes (stored in content)
  • :pubkey - Event author pubkey
  • :created_at - Event timestamp

Example

ReleaseArtifactSets.create("com.example.app@0.0.1", [
  "windows_exe_file_metadata_id",
  "macos_dmg_file_metadata_id",
  "linux_appimage_file_metadata_id"
],
  application: "32267:pubkey:com.example.app",
  release_notes: "## What's New\n- Bug fixes\n- Performance improvements"
)

parse(event)

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

Parses a kind 30063 event into a ReleaseArtifactSets struct.