Parse a NIP-65 kind-10002 relay-list event into structured RelayEntry
objects.
Keeps tags where tag[0] === 'r' and tag[1] is a string URL. The optional
third element is the marker ('read', 'write', or absent for both). Any
marker other than the two canonical strings is treated as "unmarked" (read +
write), matching how lenient NIP-65 consumers behave in practice.
No URL normalization or hostname de-duplication is performed — the relay URL
is preserved verbatim. Normalize with a NIP-66 dataset (@kehto/nip/66) or a
dedicated relay-URL normalizer if you need canonical hostnames.
Parameters
event: NostrEvent
A kind-10002 relay-list event (kind is not re-validated; pass the right event)
Parse a NIP-65 kind-10002 relay-list event into structured RelayEntry objects.
Keeps tags where
tag[0] === 'r'andtag[1]is a string URL. The optional third element is the marker ('read','write', or absent for both). Any marker other than the two canonical strings is treated as "unmarked" (read + write), matching how lenient NIP-65 consumers behave in practice.No URL normalization or hostname de-duplication is performed — the relay URL is preserved verbatim. Normalize with a NIP-66 dataset (
@kehto/nip/66) or a dedicated relay-URL normalizer if you need canonical hostnames.