Module onion_message

Expand description

Onion Messages: sending, receiving, forwarding, and ancillary utilities live here

Onion messages are multi-purpose messages sent between peers over the lightning network. In the near future, they will be used to communicate invoices for offers, unlocking use cases such as static invoices, refunds and proof of payer. Further, you will be able to accept payments without revealing your node id through the use of blinded paths.

LDK sends and receives onion messages via the OnionMessenger. See its documentation for more information on its usage.

Structs§

DefaultMessageRouter
A MessageRouter that can only route to a directly connected Destination.
OnionMessagePath
A path for sending an OnionMessage.
OnionMessenger
A sender, receiver and forwarder of OnionMessages.
Packet
Packet of hop data for next peer
PendingOnionMessage
An OnionMessage for OnionMessenger to send.

Enums§

Destination
The destination of an onion message.
OffersMessage
Possible BOLT 12 Offers messages sent and received via an OnionMessage.
ParsedOnionMessageContents
The contents of an OnionMessage as read from the wire.
PeeledOnion
A processed incoming onion message, containing either a Forward (another onion message) or a Receive payload with decrypted contents.
SendError
Errors that may occur when sending an onion message.

Traits§

CustomOnionMessageHandler
Handler for custom onion messages. If you are using SimpleArcOnionMessenger, SimpleRefOnionMessenger, or prefer to ignore inbound custom onion messages, IgnoringMessageHandler must be provided to OnionMessenger::new. Otherwise, a custom implementation of this trait must be provided, with CustomMessage specifying the supported message types.
MessageRouter
A trait defining behavior for routing an OnionMessage.
OffersMessageHandler
A handler for an OnionMessage containing a BOLT 12 Offers message as its payload.
OnionMessageContents
The contents of an onion message.

Type Aliases§

SimpleArcOnionMessenger
Useful for simplifying the parameters of SimpleArcChannelManager and SimpleArcPeerManager. See their docs for more details.
SimpleRefOnionMessenger
Useful for simplifying the parameters of SimpleRefChannelManager and SimpleRefPeerManager. See their docs for more details.