Nostr. Event. SearchRelays
(Nostr Lib v0.2.1)
(event)
(nip51)
View Source
Search Relays List (Kind 10007)
A list of relays that clients should use when performing search queries.
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 search relays list (kind 10007).
Parses a kind 10007 event into a SearchRelays struct.
Types
@type t() :: %Nostr.Event.SearchRelays{event: Nostr.Event.t(), relays: [URI.t()]}
Functions
Creates a new search relays list (kind 10007).
Arguments
relay_urls- List of relay URLs to use for searchopts- Optional event arguments (pubkey,created_at)
Example
iex> SearchRelays.create(["wss://search.nostr.band", "wss://relay.nostr.band"])
@spec parse(Nostr.Event.t()) :: t()
Parses a kind 10007 event into a SearchRelays struct.