+/// used to retrieve invoices and fulfill invoice requests from [offers]. Currently, only sending
+/// and receiving custom onion messages is supported.
+///
+/// # Example
+///
+/// ```
+/// # extern crate bitcoin;
+/// # use bitcoin::hashes::_export::_core::time::Duration;
+/// # use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
+/// # use lightning::blinded_path::BlindedPath;
+/// # use lightning::sign::KeysManager;
+/// # use lightning::ln::peer_handler::IgnoringMessageHandler;
+/// # use lightning::onion_message::{CustomOnionMessageContents, Destination, MessageRouter, OnionMessageContents, OnionMessagePath, OnionMessenger};
+/// # use lightning::util::logger::{Logger, Record};
+/// # use lightning::util::ser::{Writeable, Writer};
+/// # use lightning::io;
+/// # use std::sync::Arc;
+/// # struct FakeLogger;
+/// # impl Logger for FakeLogger {
+/// # fn log(&self, record: &Record) { unimplemented!() }
+/// # }
+/// # struct FakeMessageRouter {}
+/// # impl MessageRouter for FakeMessageRouter {
+/// # fn find_path(&self, sender: PublicKey, peers: Vec<PublicKey>, destination: Destination) -> Result<OnionMessagePath, ()> {
+/// # unimplemented!()
+/// # }
+/// # }
+/// # let seed = [42u8; 32];
+/// # let time = Duration::from_secs(123456);
+/// # let keys_manager = KeysManager::new(&seed, time.as_secs(), time.subsec_nanos());
+/// # let logger = Arc::new(FakeLogger {});
+/// # let node_secret = SecretKey::from_slice(&hex::decode("0101010101010101010101010101010101010101010101010101010101010101").unwrap()[..]).unwrap();
+/// # let secp_ctx = Secp256k1::new();
+/// # let hop_node_id1 = PublicKey::from_secret_key(&secp_ctx, &node_secret);
+/// # let (hop_node_id2, hop_node_id3, hop_node_id4) = (hop_node_id1, hop_node_id1, hop_node_id1);
+/// # let destination_node_id = hop_node_id1;
+/// # let message_router = Arc::new(FakeMessageRouter {});
+/// # let custom_message_handler = IgnoringMessageHandler {};
+/// # let offers_message_handler = IgnoringMessageHandler {};
+/// // Create the onion messenger. This must use the same `keys_manager` as is passed to your
+/// // ChannelManager.
+/// let onion_messenger = OnionMessenger::new(
+/// &keys_manager, &keys_manager, logger, message_router, &offers_message_handler,
+/// &custom_message_handler
+/// );
+///
+/// # struct YourCustomMessage {}
+/// impl Writeable for YourCustomMessage {
+/// fn write<W: Writer>(&self, w: &mut W) -> Result<(), io::Error> {
+/// # Ok(())
+/// // Write your custom onion message to `w`
+/// }
+/// }
+/// impl CustomOnionMessageContents for YourCustomMessage {
+/// fn tlv_type(&self) -> u64 {
+/// # let your_custom_message_type = 42;
+/// your_custom_message_type
+/// }
+/// }
+/// // Send a custom onion message to a node id.
+/// let path = OnionMessagePath {
+/// intermediate_nodes: vec![hop_node_id1, hop_node_id2],
+/// destination: Destination::Node(destination_node_id),
+/// };
+/// let reply_path = None;
+/// # let your_custom_message = YourCustomMessage {};
+/// let message = OnionMessageContents::Custom(your_custom_message);
+/// onion_messenger.send_onion_message(path, message, reply_path);
+///
+/// // Create a blinded path to yourself, for someone to send an onion message to.
+/// # let your_node_id = hop_node_id1;
+/// let hops = [hop_node_id3, hop_node_id4, your_node_id];
+/// let blinded_path = BlindedPath::new_for_message(&hops, &keys_manager, &secp_ctx).unwrap();
+///
+/// // Send a custom onion message to a blinded path.
+/// let path = OnionMessagePath {
+/// intermediate_nodes: vec![hop_node_id1, hop_node_id2],
+/// destination: Destination::BlindedPath(blinded_path),
+/// };
+/// let reply_path = None;
+/// # let your_custom_message = YourCustomMessage {};
+/// let message = OnionMessageContents::Custom(your_custom_message);
+/// onion_messenger.send_onion_message(path, message, reply_path);
+/// ```