|
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};
|
@@ -107,7 +110,7 @@ pub struct StaticPaymentOutputDescriptor {
|
107 | 110 | /// Arbitrary identification information returned by a call to [`BaseSign::channel_keys_id`].
|
108 | 111 | /// This may be useful in re-deriving keys used in the channel to spend the output.
|
109 | 112 | pub channel_keys_id: [u8; 32],
|
110 |
| - /// The value of the channel which this transaction spends. |
| 113 | + /// The value of the funding channel output which this transaction spends. |
111 | 114 | pub channel_value_satoshis: u64,
|
112 | 115 | }
|
113 | 116 | impl StaticPaymentOutputDescriptor {
|
@@ -158,7 +161,8 @@ pub enum SpendableOutputDescriptor {
|
158 | 161 | ///
|
159 | 162 | /// Note that the `nSequence` field in the spending input must be set to `to_self_delay` (which
|
160 | 163 | /// means the transaction is not broadcastable until at least `to_self_delay` blocks after the
|
161 |
| - /// outpoint confirms). |
| 164 | + /// outpoint confirms, see [BIP |
| 165 | + /// 68](https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki)). |
162 | 166 | ///
|
163 | 167 | /// These are generally the result of a "revocable" output to us, spendable only by us unless
|
164 | 168 | /// it is an output from an old state which we broadcast (which should never happen).
|
@@ -286,8 +290,9 @@ pub trait BaseSign {
|
286 | 290 | /// This will only ever be called with a non-revoked `commitment_tx`. This will be called with the
|
287 | 291 | /// latest `commitment_tx` when we initiate a force-close.
|
288 | 292 | /// This will be called with the previous latest `commitment_tx`, just to get claiming HTLC
|
289 |
| - /// signatures, if we are reacting to a [`ChannelMonitor`] replica that decided to broadcast before |
290 |
| - /// it had been updated to the latest `commitment_tx`. |
| 293 | + /// signatures, if we are reacting to a [`ChannelMonitor`] |
| 294 | + /// [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas) |
| 295 | + /// that decided to broadcast before it had been updated to the latest `commitment_tx`. |
291 | 296 | /// This may be called multiple times for the same transaction.
|
292 | 297 | ///
|
293 | 298 | /// An external signer implementation should check that the commitment has not been revoked.
|
@@ -364,7 +369,7 @@ pub trait BaseSign {
|
364 | 369 | /// signed for here. It may be called multiple times for same output(s) if a fee-bump is
|
365 | 370 | /// needed with regards to an upcoming timelock expiration.
|
366 | 371 | ///
|
367 |
| - /// `witness_script` is either a offered or received script as defined in BOLT3 for HTLC |
| 372 | + /// `witness_script` is either an offered or received script as defined in BOLT3 for HTLC |
368 | 373 | /// outputs.
|
369 | 374 | ///
|
370 | 375 | /// `amount` is value of the output spent by this input, committed to in the BIP 143 signature.
|
@@ -537,13 +542,13 @@ pub trait KeysInterface {
|
537 | 542 | /// This implementation performs no policy checks and is insufficient by itself as
|
538 | 543 | /// a secure external signer.
|
539 | 544 | pub struct InMemorySigner {
|
540 |
| - /// Private key of anchor tx. |
| 545 | + /// Private key of an anchor transaction. |
541 | 546 | pub funding_key: SecretKey,
|
542 | 547 | /// Holder secret key for blinded revocation pubkey.
|
543 | 548 | pub revocation_base_key: SecretKey,
|
544 | 549 | /// Holder secret key used for our balance in counterparty-broadcasted commitment transactions.
|
545 | 550 | pub payment_key: SecretKey,
|
546 |
| - /// Holder secret key used in HTLC tx. |
| 551 | + /// Holder secret key used in an HTLC transaction. |
547 | 552 | pub delayed_payment_base_key: SecretKey,
|
548 | 553 | /// Holder HTLC secret key used in commitment transaction HTLC outputs.
|
549 | 554 | pub htlc_base_key: SecretKey,
|
|
0 commit comments