Module ln

Module ln 

Source
Expand description

Implementations of various parts of the Lightning protocol are in this module.

Modules§

chan_utils
Various utilities for building scripts related to channels. These are largely of interest for those implementing the traits on crate::sign by hand.
channel_keys
Keys used to generate commitment transactions. See: https://github.com/lightning/bolts/blob/master/03-transactions.md#keys
channel_state
Information about the state of a channel.
channelmanager
The top-level channel management and payment tracking stuff lives here.
funding
Types pertaining to funding channels.
inbound_payment
Utilities to generate inbound payment information in service of invoice creation.
invoice_utils
Convenient utilities to create an invoice.
msgs
Wire messages, traits representing wire message handlers, and a few error types live here.
onion_payment
Utilities to decode payment onions and do contextless validation of incoming payments.
our_peer_storage
DecryptedOurPeerStorage enables storage of encrypted serialized channel data. It provides encryption of data to maintain data integrity and security during transmission.
peer_handler
Top level peer message handling and socket handling logic lives here.
script
Abstractions for scripts used in the Lightning Network.
types
Various wrapper types (most around 32-byte arrays) for use in lightning.
wire
Wire encoding/decoding for Lightning messages according to BOLT #1, and for custom message through the CustomMessageReader trait.

Enums§

LocalHTLCFailureReason
The reason that a HTLC was failed by the local node. These errors either represent direct, human-readable mappings of BOLT04 error codes or provide additional information that would otherwise be erased by the BOLT04 error code.

Constants§

LN_MAX_MSG_LEN
Maximum Lightning message data length according to BOLT-8 and BOLT-1:

Functions§

create_payment_onion
Build a payment onion, returning the first hop msat and cltv values as well. cur_block_height should be set to the best known block height + 1.