Expand description
One-shot client Endpoint construction: relay + discovery resolution for
the cdn/client/v1 and cdn/probe/v1 dial paths (#935/#936).
Shared relay resolution for the one-shot client commands (fetch, probe).
Relays are environment configuration, not a per-invocation decision (#935):
they come from the config file (network.relay_urls), exactly the field the
node already consumes. --relay-url stays as an optional override that replaces the
config list. An absent config file yields no relays, so a client that dials
a direct --addr needs no config at all.
Functionsยง
- client_
discovery - Resolve
[network.discovery]for a client command, tolerating a missing config exactly likeresolve_relays: an explicit--configpath that does not exist yields no discovery overrides (โpresets::N0), so a client that dials a direct--addrneeds no config at all. - client_
endpoint - Build a one-shot client
Endpointthat can resolve a target node by its irohNodeId. With no[network.discovery]config we usepresets::N0(the n0-hosted pkarr/DNS lookup the node defaults to); with operator discovery configured we compose only the resolution legs ontopresets::Minimal. - resolve_
relays - Resolve the relay URLs for a client command. The
--relay-urloverride (flag) wins; otherwisenetwork.relay_urlsfrom the config is used. An absent config file โ including an explicit--configpath that does not exist โ resolves to an empty list rather than an error, so a client dialing a direct--addrneeds no config at all.