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

View Source

Good Wiki Relays List (Kind 10102)

A list of NIP-54 relays deemed to only host useful wiki articles. Contains relay URLs via relay tags.

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

Summary

Functions

Creates a new good wiki relays list (kind 10102).

Parses a kind 10102 event into a GoodWikiRelays struct.

Types

t()

@type t() :: %Nostr.Event.GoodWikiRelays{event: Nostr.Event.t(), relays: [URI.t()]}

Functions

create(relay_urls, opts \\ [])

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

Creates a new good wiki relays list (kind 10102).

Arguments

  • relay_urls - List of relay URLs hosting quality wiki content
  • opts - Optional event arguments (pubkey, created_at)

Example

iex> GoodWikiRelays.create(["wss://wiki.nostr.com", "wss://wiki-relay.example"])

parse(event)

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

Parses a kind 10102 event into a GoodWikiRelays struct.