Module lightning::ln

source ·
Expand description

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

Modules

  • Various utilities for building scripts and deriving keys related to channels. These are largely of interest for those implementing the traits on chain::keysinterface by hand.
  • The top-level channel management and payment tracking stuff lives here.
  • Feature flag definitions for the Lightning protocol according to BOLT #9.
  • Utilities to generate inbound payment information in service of invoice creation.
  • Wire messages, traits representing wire message handlers, and a few error types live here.
  • Top level peer message handling and socket handling logic lives here.
  • Abstractions for scripts used in the Lightning Network.
  • Wire encoding/decoding for Lightning messages according to BOLT #1, and for custom message through the CustomMessageReader trait.

Structs

  • payment_hash type, use to cross-lock hop
  • payment_preimage type, use to route payment between hop
  • payment_secret type, use to authenticate sender to the receiver and tie MPP HTLCs together

Constants