|
9 | 9 |
|
10 | 10 | //! Utitilies for bumping transactions originating from [`super::Event`]s.
|
11 | 11 |
|
| 12 | +use crate::chain::ClaimId; |
12 | 13 | use crate::ln::PaymentPreimage;
|
13 | 14 | use crate::ln::chan_utils;
|
14 | 15 | use crate::ln::chan_utils::{ChannelTransactionParameters, HTLCOutputInCommitment};
|
@@ -173,6 +174,15 @@ pub enum BumpTransactionEvent {
|
173 | 174 | /// [`EcdsaChannelSigner::sign_holder_anchor_input`]: crate::sign::EcdsaChannelSigner::sign_holder_anchor_input
|
174 | 175 | /// [`build_anchor_input_witness`]: crate::ln::chan_utils::build_anchor_input_witness
|
175 | 176 | ChannelClose {
|
| 177 | + /// The unique identifier for the claim of the anchor output in the commitment transaction. |
| 178 | + /// |
| 179 | + /// Any future instances of `ChannelClose` bump events that share the same `claim_id` must |
| 180 | + /// be considered the same claim. Therefore, the idenfier serves as a "UTXO lock" for users, |
| 181 | + /// as they can assign the additional inputs required for the claim to this identifier to |
| 182 | + /// ensure their claims don't double spend and conflict with each other. However, note that |
| 183 | + /// in some cases, it may be required to double spend the UTXOs assigned to previous claims |
| 184 | + /// in new claims if there aren't any unassigned UTXOs available to use. |
| 185 | + claim_id: ClaimId, |
176 | 186 | /// The target feerate that the transaction package, which consists of the commitment
|
177 | 187 | /// transaction and the to-be-crafted child anchor transaction, must meet.
|
178 | 188 | package_target_feerate_sat_per_1000_weight: u32,
|
@@ -222,6 +232,17 @@ pub enum BumpTransactionEvent {
|
222 | 232 | /// [`EcdsaChannelSigner::sign_holder_htlc_transaction`]: crate::sign::EcdsaChannelSigner::sign_holder_htlc_transaction
|
223 | 233 | /// [`HTLCDescriptor::tx_input_witness`]: HTLCDescriptor::tx_input_witness
|
224 | 234 | HTLCResolution {
|
| 235 | + /// The unique identifier for the claim of the HTLCs in the confirmed commitment |
| 236 | + /// transaction. |
| 237 | + /// |
| 238 | + /// Any future instances of `HTLCResolution` bump events that share the same `claim_id` must |
| 239 | + /// be considered the same claim, even if the set of HTLCs to claim has changed. Therefore, |
| 240 | + /// the idenfier serves as a "UTXO lock" for users, as they can assign the additional inputs |
| 241 | + /// required for the claim to this identifier to ensure their claims don't double spend and |
| 242 | + /// conflict with each other. However, note that in some cases, it may be required to double |
| 243 | + /// spend the UTXOs assigned to previous claims in new claims if there aren't any unassigned |
| 244 | + /// UTXOs available to use. |
| 245 | + claim_id: ClaimId, |
225 | 246 | /// The target feerate that the resulting HTLC transaction must meet.
|
226 | 247 | target_feerate_sat_per_1000_weight: u32,
|
227 | 248 | /// The set of pending HTLCs on the confirmed commitment that need to be claimed, preferably
|
|
0 commit comments