Skip to main content

Module relay_info

Module relay_info 

Source
Expand description

What a relay says of itself (NIP-11): its name, a few words about it, which NIPs it supports, and whom it takes.

A relay answers at its own address, over https where it is reached over wss, to whoever asks for application/nostr+json instead of a page. What it says is its own word, and is shown as that.

Structs§

Limits
Whom a relay says it takes: what it asks of whoever connects, or writes. What it doesn’t say it asks, it is taken not to.
RelayInfo
What a relay says of itself.

Constants§

DESCRIPTION_MAX_CHARS 🔒
DOCUMENT_MAX_BYTES 🔒
The most a relay’s account of itself may weigh.
NAME_MAX_CHARS 🔒
How many characters of a relay’s name, and of what it says about itself, are kept.

Functions§

document_url
Where relay says what it is: its own address, as a page is asked for. Only for a relay reached with encryption: the other kind is on this machine or this network, and is not asked over the web.
fetch
What relay says of itself, if it says: asked over https.
parse
What the document json says of the relay that sent it. None if it is no such document.