Function create_onion_message_resolving_destination
pub fn create_onion_message_resolving_destination<ES, NS, NL, T>(
entropy_source: &ES,
node_signer: &NS,
node_id_lookup: &NL,
network_graph: &ReadOnlyNetworkGraph<'_>,
secp_ctx: &Secp256k1<All>,
path: OnionMessagePath,
contents: T,
reply_path: Option<BlindedMessagePath>,
) -> Result<(PublicKey, OnionMessage, Option<Vec<SocketAddress>>), SendError>where
ES: Deref,
NS: Deref,
NL: Deref,
T: OnionMessageContents,
<ES as Deref>::Target: EntropySource,
<NS as Deref>::Target: NodeSigner,
<NL as Deref>::Target: NodeIdLookUp,
Expand description
Creates an OnionMessage
with the given contents
for sending to the destination of
path
, first calling Destination::resolve
on path.destination
with the given
ReadOnlyNetworkGraph
.
Returns the node id of the peer to send the message to, the message itself, and any addresses needed to connect to the first node.