utils
utils
¶
Validator service utility functions.
Classes¶
Functions¶
validate_candidate
async
¶
validate_candidate(
relay: Relay,
proxy_url: str | None,
probe_timeout: float,
*,
allow_insecure: bool = False,
) -> bool
Validate a relay candidate via WebSocket Nostr protocol probe.
Delegates to is_nostr_relay. The caller is responsible for acquiring the per-network semaphore.
Parameters:
-
relay(Relay) –The Relay to probe.
-
proxy_url(str | None) –Optional SOCKS5 proxy for overlay networks.
-
probe_timeout(float) –WebSocket probe timeout in seconds.
-
allow_insecure(bool, default:False) –Fall back to insecure transport on SSL failure.
Returns:
-
bool–Trueif the relay speaks Nostr protocol,Falseotherwise.