Nostr. Event. BlockedRelays
(Nostr Lib v0.2.1)
(event)
(nip51)
View Source
Blocked Relays List (Kind 10006)
A list of relays that clients should never connect to. 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 blocked relays list (kind 10006).
Parses a kind 10006 event into a BlockedRelays struct.
Types
@type t() :: %Nostr.Event.BlockedRelays{event: Nostr.Event.t(), relays: [URI.t()]}
Functions
Creates a new blocked relays list (kind 10006).
Arguments
relay_urls- List of relay URLs to blockopts- Optional event arguments (pubkey,created_at)
Example
iex> BlockedRelays.create(["wss://spam-relay.com", "wss://bad-relay.net"])
@spec parse(Nostr.Event.t()) :: t()
Parses a kind 10006 event into a BlockedRelays struct.