- tx: Transaction,
- pub(crate) local_keys: TxCreationKeys,
- pub(crate) feerate_per_kw: u64,
- pub(crate) per_htlc: Vec<(HTLCOutputInCommitment, Option<Signature>)>,
+ // TODO: We should migrate away from providing the transaction, instead providing enough to
+ // allow the ChannelKeys to construct it from scratch. Luckily we already have HTLC data here,
+ // so we're probably most of the way there.
+ /// The commitment transaction itself, in unsigned form.
+ pub unsigned_tx: Transaction,
+ /// Our counterparty's signature for the transaction, above.
+ pub their_sig: Signature,
+ // Which order the signatures should go in when constructing the final commitment tx witness.
+ // The user should be able to reconstruc this themselves, so we don't bother to expose it.
+ our_sig_first: bool,
+ /// The key derivation parameters for this commitment transaction
+ pub local_keys: TxCreationKeys,
+ /// The feerate paid per 1000-weight-unit in this commitment transaction. This value is
+ /// controlled by the channel initiator.
+ pub feerate_per_kw: u64,
+ /// The HTLCs and remote htlc signatures which were included in this commitment transaction.
+ ///
+ /// Note that this includes all HTLCs, including ones which were considered dust and not
+ /// actually included in the transaction as it appears on-chain, but who's value is burned as
+ /// fees and not included in the to_local or to_remote outputs.
+ ///
+ /// The remote HTLC signatures in the second element will always be set for non-dust HTLCs, ie
+ /// those for which transaction_output_index.is_some().
+ pub per_htlc: Vec<(HTLCOutputInCommitment, Option<Signature>)>,