[−][src]Module lightning::ln::msgs
Wire messages, traits representing wire message handlers, and a few error types live here.
For a normal node you probably don't need to use anything here, however, if you wish to split a node into an internet-facing route/message socket handling daemon and a separate daemon (or server entirely) which handles only channel-related messages you may wish to implement ChannelMessageHandler yourself and use it to re-serialize messages and pass them across daemons/servers.
Note that if you go with such an architecture (instead of passing raw socket events to a non-internet-facing system) you trust the frontend internet-facing system to not lie about the source node_id of the message, however this does allow you to significantly reduce bandwidth between the systems as routing messages can represent a significant chunk of bandwidth usage (especially for non-channel-publicly-announcing nodes). As an alternate design which avoids this issue, if you have sufficient bidirectional bandwidth between your systems, you may send raw socket events into your non-internet-facing system and then send routing events back to track the network on the less-secure system.
Structs
AcceptChannel | An accept_channel message to be sent or received from a peer |
AnnouncementSignatures | An announcement_signatures message to be sent or received from a peer |
ChannelAnnouncement | A channel_announcement message to be sent or received from a peer |
ChannelReestablish | A channel_reestablish message to be sent or received from a peer |
ChannelUpdate | A channel_update message to be sent or received from a peer |
ClosingSigned | A closing_signed message to be sent or received from a peer |
CommitmentSigned | A commitment_signed message to be sent or received from a peer |
CommitmentUpdate | Struct used to return values from revoke_and_ack messages, containing a bunch of commitment transaction updates if they were pending. |
ErrorMessage | An error message to be sent or received from a peer |
FundingCreated | A funding_created message to be sent or received from a peer |
FundingLocked | A funding_locked message to be sent or received from a peer |
FundingSigned | A funding_signed message to be sent or received from a peer |
GlobalFeatures | Tracks globalfeatures which are in init messages and routing announcements |
Init | An init message to be sent or received from a peer |
LightningError | An Err type for failure to process messages. |
LocalFeatures | Tracks localfeatures which are only in init messages |
NodeAnnouncement | A node_announcement message to be sent or received from a peer |
OpenChannel | An open_channel message to be sent or received from a peer |
Ping | A ping message to be sent or received from a peer |
Pong | A pong message to be sent or received from a peer |
RevokeAndACK | A revoke_and_ack message to be sent or received from a peer |
Shutdown | A shutdown message to be sent or received from a peer |
UnsignedChannelAnnouncement | The unsigned part of a channel_announcement |
UnsignedNodeAnnouncement | The unsigned part of a node_announcement |
UpdateAddHTLC | An update_add_htlc message to be sent or received from a peer |
UpdateFailHTLC | An update_fail_htlc message to be sent or received from a peer |
UpdateFailMalformedHTLC | An update_fail_malformed_htlc message to be sent or received from a peer |
UpdateFee | An update_fee message to be sent or received from a peer |
UpdateFulfillHTLC | An update_fulfill_htlc message to be sent or received from a peer |
Enums
DecodeError | An error in decoding a message or struct. |
ErrorAction | Used to put an error message in a LightningError |
HTLCFailChannelUpdate | The information we received from a peer along the route of a payment we originated. This is returned by ChannelMessageHandler::handle_update_fail_htlc to be passed into RoutingMessageHandler::handle_htlc_fail_channel_update to update our network map. |
NetAddress | An address which can be used to connect to a remote peer |
OptionalField | Messages could have optional fields to use with extended features
As we wish to serialize these differently from Option |
Traits
ChannelMessageHandler | A trait to describe an object which can receive channel messages. |
RoutingMessageHandler | A trait to describe an object which can receive routing messages. |