Module lightning::onion_message::messenger
source · Expand description
LDK sends, receives, and forwards onion messages via this OnionMessenger
, which lives here,
as well as various types, traits, and utilities that it uses.
Structs§
- A
MessageRouter
that can only route to a directly connectedDestination
. - A path for sending an
OnionMessage
. - A sender, receiver and forwarder of
OnionMessage
s. - PendingOnionMessageNon-
c_bindings
AnOnionMessage
forOnionMessenger
to send.
Enums§
- The destination of an onion message.
- A processed incoming onion message, containing either a Forward (another onion message) or a Receive payload with decrypted contents.
- Errors that may occur when sending an onion message.
- Result of successfully sending an onion message.
Traits§
- Handler for custom onion messages. If you are using
SimpleArcOnionMessenger
,SimpleRefOnionMessenger
, or prefer to ignore inbound custom onion messages,IgnoringMessageHandler
must be provided toOnionMessenger::new
. Otherwise, a custom implementation of this trait must be provided, withCustomMessage
specifying the supported message types. - A trait defining behavior for routing an
OnionMessage
.
Functions§
- Creates an
OnionMessage
with the givencontents
for sending to the destination ofpath
, first callingDestination::resolve
onpath.destination
with the givenReadOnlyNetworkGraph
. - Decode one layer of an incoming
OnionMessage
.
Type Aliases§
- SimpleArcOnionMessengerNon-
c_bindings
Useful for simplifying the parameters ofSimpleArcChannelManager
andSimpleArcPeerManager
. See their docs for more details. - SimpleRefOnionMessengerNon-
c_bindings
Useful for simplifying the parameters ofSimpleRefChannelManager
andSimpleRefPeerManager
. See their docs for more details.