Module lightning::ln::channel_keys

source ·
Expand description

Keys used to generate commitment transactions. See: https://github.com/lightning/bolts/blob/master/03-transactions.md#keys

Structs

  • Master key used in conjunction with per_commitment_point to generate local_delayedpubkey for the latest state of a channel. A watcher can be given a DelayedPaymentBasepoint to generate per commitment DelayedPaymentKey to create justice transactions.
  • delayedpubkey To allow a counterparty to contest a channel state published by a node, Lightning protocol sets delays for some of the outputs, before can be spend. For example a commitment transaction has to_local output encumbered by a delay, negotiated at the channel establishment flow. To spend from such output a node has to generate a script using, among others, a local delayed payment key.
  • Master key used in conjunction with per_commitment_point to generate htlcpubkey for the latest state of a channel.
  • htlcpubkey is a child key of an htlc basepoint, that enables secure routing of payments in onion scheme without a risk of them getting stuck or diverted. It is used to claim the funds in successful or timed out htlc outputs.
  • Master key used in conjunction with per_commitment_point to generate a localpubkey for the latest state of a channel. Also used to generate a commitment number in a commitment transaction or as a Payment Key for a remote node (not us) in an anchor output if option_static_remotekey is enabled. Shared by both nodes in a channel establishment message flow.
  • localpubkey is a child key of a payment basepoint, that enables a secure hash-lock for off-chain payments without risk of funds getting stuck or stolen. A payment key is normally shared with a counterparty so that it can generate a commitment transaction’s to_remote ouput, which our node can claim in case the counterparty force closes the channel.
  • Master key used in conjunction with per_commitment_point to generate htlcpubkey for the latest state of a channel. A watcher can be given a RevocationBasepoint to generate per commitment RevocationKey to create justice transactions.
  • htlcpubkey is a child key of a revocation basepoint, that enables a node to create a justice transaction punishing a counterparty for an attempt to steal funds. Used to in generation of commitment and htlc outputs.