1 // This file is Copyright its original authors, visible in version control
2 // history and in the source files from which this was generated.
4 // This file is licensed under the license available in the LICENSE or LICENSE.md
5 // file in the root of this repository or, if no such file exists, the same
6 // license as that which applies to the original source files from which this
7 // source was automatically generated.
9 //! Onion Messages: sending, receiving, forwarding, and ancillary utilities live here
11 //! Onion messages are multi-purpose messages sent between peers over the lightning network. In the
12 //! near future, they will be used to communicate invoices for [offers], unlocking use cases such as
13 //! static invoices, refunds and proof of payer. Further, you will be able to accept payments
14 //! without revealing your node id through the use of [blinded routes].
16 //! LDK sends and receives onion messages via the [`OnionMessenger`]. See its documentation for more
17 //! information on its usage.
19 //! [offers]: <https://github.com/lightning/bolts/pull/798>
20 //! [blinded routes]: crate::onion_message::blinded_route::BlindedRoute
21 //! [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger
23 use alloc::str::FromStr;
24 use core::ffi::c_void;
25 use core::convert::Infallible;
26 use bitcoin::hashes::Hash;
27 use crate::c_types::*;
28 #[cfg(feature="no-std")]
29 use alloc::{vec::Vec, boxed::Box};
31 pub mod blinded_route;
36 use alloc::str::FromStr;
37 use core::ffi::c_void;
38 use core::convert::Infallible;
39 use bitcoin::hashes::Hash;
40 use crate::c_types::*;
41 #[cfg(feature="no-std")]
42 use alloc::{vec::Vec, boxed::Box};