nostr_tools.fetch_nip11

async nostr_tools.fetch_nip11(client)[source]

Fetch NIP-11 metadata from the relay.

This function attempts to retrieve the NIP-11 relay information document by making HTTP requests to the relay’s information endpoint. It tries both HTTPS and HTTP protocols.

Parameters:

client (Client) – An instance of Client (connection not required)

Returns:

NIP-11 metadata or None if not available

Return type:

Optional[RelayMetadata.Nip11]