breez_sdk_liquid::lightning_125::onion_message::messenger

Function create_onion_message

pub fn create_onion_message<ES, NS, NL, T>(
    entropy_source: &ES,
    node_signer: &NS,
    node_id_lookup: &NL,
    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.

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.

Returns SendError::UnresolvedIntroductionNode if: