Nostr. Event. RelayFeeds
(Nostr Lib v0.2.1)
(event)
(nip51)
View Source
Relay Feeds List (Kind 10012)
A list of user favorite browsable relays (and relay sets). Contains
relay tags for individual relays and a tags for relay sets (kind:30002).
Defined in NIP 51 https://github.com/nostr-protocol/nips/blob/master/51.md
Summary
Functions
Creates a new relay feeds list (kind 10012).
Parses a kind 10012 event into a RelayFeeds struct.
Types
@type t() :: %Nostr.Event.RelayFeeds{ event: Nostr.Event.t(), relay_sets: [binary()], relays: [URI.t()] }
Functions
Creates a new relay feeds list (kind 10012).
Arguments
items- Map or keyword list with feed itemsopts- Optional event arguments (pubkey,created_at)
Item Keys
:relays- List of relay URLs:relay_sets- List of relay set addresses (kind:30002)
Example
RelayFeeds.create(%{
relays: ["wss://relay.com"],
relay_sets: ["30002:pubkey:identifier"]
})
@spec parse(Nostr.Event.t()) :: t()
Parses a kind 10012 event into a RelayFeeds struct.