pub fn install_iroh_client_endpoint(
endpoint: OwnedIrohClientEndpoint,
) -> Result<(), OwnedIrohClientEndpoint>Expand description
Install the process-global client iroh endpoint used to
originate outbound RPC dials. First-write-wins (mirrors
install_verify_config); returns Err(endpoint) if one is already set.
In production the authenticated OS-owned process bootstrap calls this
FIRST, with a distinct outbound-only carrier endpoint (retained in
PROCESS_BOOTSTRAP_CARRIER, transport purpose key
hyprstream-bootstrap-client-transport-v1). A service that later binds
its own inbound substrate therefore receives Err(returned_capability);
that is valid and expected — it keeps its substrate as the independent
inbound owner and leaves the global endpoint untouched. The global
endpoint is the outbound dialer only: it is not a DID, subject, tenant,
response-signing key, or authorization authority. The capability can only
be obtained from
crate::transport::iroh_substrate::IrohSubstrate::owned_client_endpoint,
which proves the endpoint was bound with the provider configured for N0
interoperability. Owned Hyprstream ALPNs still require the hybrid group at
the completed-carrier admission hook, while public relay/pkarr HTTPS needs
the provider’s X25519 fallback.
Arbitrary already-bound endpoints are rejected by the type system:
hyprstream_rpc::transport::lazy_iroh::install_iroh_client_endpoint(endpoint);The opaque capability itself also cannot be forged from a raw endpoint:
let _owned =
hyprstream_rpc::transport::iroh_substrate::OwnedIrohClientEndpoint(endpoint);