Skip to main content

ipt_to_circtarget

Function ipt_to_circtarget 

Source
pub(crate) fn ipt_to_circtarget(
    desc: &IntroPointDesc,
    netdir: &NetDir,
) -> Result<impl CircTarget + use<>, InvalidTarget>
Expand description

Construct a CircTarget from a provided IntroPointDesc.

Onion service clients use this function to convert an IntroPointDesc in the onion service descriptor into a form that they can use when building a circuit to an introduction point.

The netdir argument is used to fill in missing information about the target relay, and to make sure that the target relay’s identities are not inconsistent with the rest of the network.