Nostr. Event. RelaySets
(Nostr Lib v0.2.1)
(event)
(nip51)
View Source
Relay Sets (Kind 30002)
User-defined relay groups the user can easily pick and choose from during
various operations. This is an addressable event with a d tag identifier.
Sets can have optional metadata: title, image, and description.
Defined in NIP 51 https://github.com/nostr-protocol/nips/blob/master/51.md
Summary
Types
Functions
Creates a new relay set (kind 30002).
Arguments
identifier- Unique identifier for this set (used indtag)relay_urls- List of relay URLs to include in the setopts- Optional event arguments and set metadata
Options
:title- Set title for display:image- Set image URL:description- Set description:pubkey- Event author pubkey:created_at- Event timestamp
Example
RelaySets.create("high-quality", ["wss://relay1.com", "wss://relay2.com"],
title: "High Quality Relays",
description: "Relays with good uptime and moderation"
)
@spec parse(Nostr.Event.t()) :: t()
Parses a kind 30002 event into a RelaySets struct.