pub fn build_htlc_transaction(
    commitment_txid: &Txid,
    feerate_per_kw: u32,
    contest_delay: u16,
    htlc: &HTLCOutputInCommitment,
    opt_anchors: bool,
    use_non_zero_fee_anchors: bool,
    broadcaster_delayed_payment_key: &PublicKey,
    revocation_key: &PublicKey
) -> Transaction
Expand description

Builds an unsigned HTLC-Success or HTLC-Timeout transaction from the given channel and HTLC parameters. This is used by TrustedCommitmentTransaction::get_htlc_sigs to fetch the transaction which needs signing, and can be used to construct an HTLC transaction which is broadcastable given a counterparty HTLC signature.

Panics if htlc.transaction_output_index.is_none() (as such HTLCs do not appear in the commitment transaction).