Module messenger
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. - The
Responder
struct creates an appropriateResponseInstruction
for responding to a message. - Instructions for how and where to send the response to an onion message.
Enums§
- The destination of an onion message.
- Instructions for how and where to send a 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§
- A trivial trait which describes any
OnionMessenger
. - 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§
- Useful for simplifying the parameters of
SimpleArcChannelManager
andSimpleArcPeerManager
. See their docs for more details. - Useful for simplifying the parameters of
SimpleRefChannelManager
andSimpleRefPeerManager
. See their docs for more details.