|
8 | 8 | // licenses.
|
9 | 9 |
|
10 | 10 | //! Provides keys to LDK and defines some useful objects describing spendable on-chain outputs.
|
| 11 | +//! |
| 12 | +//! The provided output descriptors follow a custom LDK data format and are currently not fully |
| 13 | +//! compatible with Bitcoin Core output descriptors. |
11 | 14 |
|
12 | 15 | use bitcoin::blockdata::transaction::{Transaction, TxOut, TxIn, EcdsaSighashType};
|
13 | 16 | use bitcoin::blockdata::script::{Script, Builder};
|
@@ -105,7 +108,7 @@ pub struct StaticPaymentOutputDescriptor {
|
105 | 108 | /// Arbitrary identification information returned by a call to [`BaseSign::channel_keys_id`].
|
106 | 109 | /// This may be useful in re-deriving keys used in the channel to spend the output.
|
107 | 110 | pub channel_keys_id: [u8; 32],
|
108 |
| - /// The value of the channel which this transaction spends. |
| 111 | + /// The value of the funding channel output which this transaction spends. |
109 | 112 | pub channel_value_satoshis: u64,
|
110 | 113 | }
|
111 | 114 | impl StaticPaymentOutputDescriptor {
|
@@ -156,7 +159,8 @@ pub enum SpendableOutputDescriptor {
|
156 | 159 | ///
|
157 | 160 | /// Note that the `nSequence` field in the spending input must be set to `to_self_delay` (which
|
158 | 161 | /// means the transaction is not broadcastable until at least `to_self_delay` blocks after the
|
159 |
| - /// outpoint confirms). |
| 162 | + /// outpoint confirms, see [BIP |
| 163 | + /// 68](https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki)). |
160 | 164 | ///
|
161 | 165 | /// These are generally the result of a "revocable" output to us, spendable only by us unless
|
162 | 166 | /// it is an output from an old state which we broadcast (which should never happen).
|
@@ -281,8 +285,9 @@ pub trait BaseSign {
|
281 | 285 | /// This will only ever be called with a non-revoked `commitment_tx`. This will be called with the
|
282 | 286 | /// latest `commitment_tx` when we initiate a force-close.
|
283 | 287 | /// This will be called with the previous latest `commitment_tx`, just to get claiming HTLC
|
284 |
| - /// signatures, if we are reacting to a [`ChannelMonitor`] replica that decided to broadcast before |
285 |
| - /// it had been updated to the latest `commitment_tx`. |
| 288 | + /// signatures, if we are reacting to a [`ChannelMonitor`] |
| 289 | + /// [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas) |
| 290 | + /// that decided to broadcast before it had been updated to the latest `commitment_tx`. |
286 | 291 | /// This may be called multiple times for the same transaction.
|
287 | 292 | ///
|
288 | 293 | /// An external signer implementation should check that the commitment has not been revoked.
|
@@ -342,7 +347,7 @@ pub trait BaseSign {
|
342 | 347 | /// signed for here. It may be called multiple times for same output(s) if a fee-bump is
|
343 | 348 | /// needed with regards to an upcoming timelock expiration.
|
344 | 349 | ///
|
345 |
| - /// `witness_script` is either a offered or received script as defined in BOLT3 for HTLC |
| 350 | + /// `witness_script` is either an offered or received script as defined in BOLT3 for HTLC |
346 | 351 | /// outputs.
|
347 | 352 | ///
|
348 | 353 | /// `amount` is value of the output spent by this input, committed to in the BIP 143 signature.
|
@@ -511,13 +516,13 @@ pub trait KeysInterface {
|
511 | 516 | /// This implementation performs no policy checks and is insufficient by itself as
|
512 | 517 | /// a secure external signer.
|
513 | 518 | pub struct InMemorySigner {
|
514 |
| - /// Private key of anchor tx. |
| 519 | + /// Private key of an anchor transaction. |
515 | 520 | pub funding_key: SecretKey,
|
516 | 521 | /// Holder secret key for blinded revocation pubkey.
|
517 | 522 | pub revocation_base_key: SecretKey,
|
518 | 523 | /// Holder secret key used for our balance in counterparty-broadcasted commitment transactions.
|
519 | 524 | pub payment_key: SecretKey,
|
520 |
| - /// Holder secret key used in HTLC tx. |
| 525 | + /// Holder secret key used in an HTLC transaction. |
521 | 526 | pub delayed_payment_base_key: SecretKey,
|
522 | 527 | /// Holder HTLC secret key used in commitment transaction HTLC outputs.
|
523 | 528 | pub htlc_base_key: SecretKey,
|
|
0 commit comments