Package org.ldk.structs
Class BumpTransactionEvent.HTLCResolution
- java.lang.Object
-
- org.ldk.structs.BumpTransactionEvent
-
- org.ldk.structs.BumpTransactionEvent.HTLCResolution
-
- Enclosing class:
- BumpTransactionEvent
public static final class BumpTransactionEvent.HTLCResolution extends BumpTransactionEvent
Indicates that a channel featuring anchor outputs has unilaterally closed on-chain by a holder commitment transaction and its HTLC(s) need to be resolved on-chain. With the zero-HTLC-transaction-fee variant of anchor outputs, the pre-signed HTLC transactions have a zero fee, thus requiring additional inputs and/or outputs to be attached for a timely confirmation within the chain. These additional inputs and/or outputs must be appended to the resulting HTLC transaction to meet the target feerate. Failure to meet the target feerate decreases the confirmation odds of the transaction, possibly resulting in a loss of funds. Once the transaction meets the target feerate, it must be signed for and broadcast by the consumer of the event. The consumer should be able to sign for any of the non-HTLC inputs added to the resulting HTLC transaction. To sign HTLC inputs, an [`EcdsaChannelSigner`] should be re-derived through [`HTLCDescriptor::derive_channel_signer`]. Each HTLC input's signature can be computed with [`EcdsaChannelSigner::sign_holder_htlc_transaction`], which can then be provided to [`HTLCDescriptor::tx_input_witness`] to obtain the fully signed witness required to spend. It is possible to receive more than one instance of this event if a valid HTLC transaction is never broadcast or is but not with a sufficient fee to be mined. Care should be taken by the consumer of the event to ensure any future iterations of the HTLC transaction adhere to the [Replace-By-Fee rules](https://github.com/bitcoin/bitcoin/blob/master/doc/policy/mempool-replacements.md) for fee bumps to be accepted into the mempool, and eventually the chain. As the frequency of these events is not user-controlled, users may ignore/drop the event if either they are no longer able to commit external confirmed funds to the HTLC transaction or the fee committed to the HTLC transaction is greater in value than the HTLCs being claimed. [`EcdsaChannelSigner`]: crate::sign::EcdsaChannelSigner [`EcdsaChannelSigner::sign_holder_htlc_transaction`]: crate::sign::EcdsaChannelSigner::sign_holder_htlc_transaction [`HTLCDescriptor::tx_input_witness`]: HTLCDescriptor::tx_input_witness
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ldk.structs.BumpTransactionEvent
BumpTransactionEvent.ChannelClose, BumpTransactionEvent.HTLCResolution
-
-
Field Summary
Fields Modifier and Type Field Description byte[]claim_idThe unique identifier for the claim of the HTLCs in the confirmed commitment transaction.HTLCDescriptor[]htlc_descriptorsThe set of pending HTLCs on the confirmed commitment that need to be claimed, preferably by the same transaction.inttarget_feerate_sat_per_1000_weightThe target feerate that the resulting HTLC transaction must meet.inttx_lock_timeThe locktime required for the resulting HTLC transaction.
-
-
-
Field Detail
-
claim_id
public final byte[] claim_id
The unique identifier for the claim of the HTLCs in the confirmed commitment transaction. The identifier must map to the set of external UTXOs assigned to the claim, such that they can be reused when a new claim with the same identifier needs to be made, resulting in a fee-bumping attempt.
-
target_feerate_sat_per_1000_weight
public final int target_feerate_sat_per_1000_weight
The target feerate that the resulting HTLC transaction must meet.
-
htlc_descriptors
public final HTLCDescriptor[] htlc_descriptors
The set of pending HTLCs on the confirmed commitment that need to be claimed, preferably by the same transaction.
-
tx_lock_time
public final int tx_lock_time
The locktime required for the resulting HTLC transaction.
-
-