@@ -347,15 +347,15 @@ pub extern "C" fn ChannelPublicKeys_set_revocation_basepoint(this_ptr: &mut Chan
347
347
unsafe { & mut * this_ptr. inner } . revocation_basepoint = val. into_rust ( ) ;
348
348
}
349
349
/// The public key which receives our immediately spendable primary channel balance in
350
- /// remote -broadcasted commitment transactions. This key is static across every commitment
350
+ /// counterparty -broadcasted commitment transactions. This key is static across every commitment
351
351
/// transaction.
352
352
#[ no_mangle]
353
353
pub extern "C" fn ChannelPublicKeys_get_payment_point ( this_ptr : & ChannelPublicKeys ) -> crate :: c_types:: PublicKey {
354
354
let mut inner_val = & mut unsafe { & mut * this_ptr. inner } . payment_point ;
355
355
crate :: c_types:: PublicKey :: from_rust ( & ( * inner_val) )
356
356
}
357
357
/// The public key which receives our immediately spendable primary channel balance in
358
- /// remote -broadcasted commitment transactions. This key is static across every commitment
358
+ /// counterparty -broadcasted commitment transactions. This key is static across every commitment
359
359
/// transaction.
360
360
#[ no_mangle]
361
361
pub extern "C" fn ChannelPublicKeys_set_payment_point ( this_ptr : & mut ChannelPublicKeys , mut val : crate :: c_types:: PublicKey ) {
@@ -484,7 +484,7 @@ pub(crate) extern "C" fn HTLCOutputInCommitment_clone_void(this_ptr: *const c_vo
484
484
/// Whether the HTLC was \"offered\" (ie outbound in relation to this commitment transaction).
485
485
/// Note that this is not the same as whether it is ountbound *from us*. To determine that you
486
486
/// need to compare this value to whether the commitment transaction in question is that of
487
- /// the remote party or our own.
487
+ /// the counterparty or our own.
488
488
#[ no_mangle]
489
489
pub extern "C" fn HTLCOutputInCommitment_get_offered ( this_ptr : & HTLCOutputInCommitment ) -> bool {
490
490
let mut inner_val = & mut unsafe { & mut * this_ptr. inner } . offered ;
@@ -493,7 +493,7 @@ pub extern "C" fn HTLCOutputInCommitment_get_offered(this_ptr: &HTLCOutputInComm
493
493
/// Whether the HTLC was \"offered\" (ie outbound in relation to this commitment transaction).
494
494
/// Note that this is not the same as whether it is ountbound *from us*. To determine that you
495
495
/// need to compare this value to whether the commitment transaction in question is that of
496
- /// the remote party or our own.
496
+ /// the counterparty or our own.
497
497
#[ no_mangle]
498
498
pub extern "C" fn HTLCOutputInCommitment_set_offered ( this_ptr : & mut HTLCOutputInCommitment , mut val : bool ) {
499
499
unsafe { & mut * this_ptr. inner } . offered = val;
@@ -573,7 +573,7 @@ pub extern "C" fn build_htlc_transaction(prev_hash: *const [u8; 32], mut feerate
573
573
use lightning:: ln:: chan_utils:: HolderCommitmentTransaction as nativeHolderCommitmentTransactionImport;
574
574
type nativeHolderCommitmentTransaction = nativeHolderCommitmentTransactionImport ;
575
575
576
- /// We use this to track local commitment transactions and put off signing them until we are ready
576
+ /// We use this to track holder commitment transactions and put off signing them until we are ready
577
577
/// to broadcast. This class can be used inside a signer implementation to generate a signature
578
578
/// given the relevant secret key.
579
579
#[ must_use]
@@ -658,29 +658,29 @@ pub extern "C" fn HolderCommitmentTransaction_get_feerate_per_kw(this_ptr: &Hold
658
658
pub extern "C" fn HolderCommitmentTransaction_set_feerate_per_kw ( this_ptr : & mut HolderCommitmentTransaction , mut val : u32 ) {
659
659
unsafe { & mut * this_ptr. inner } . feerate_per_kw = val;
660
660
}
661
- /// The HTLCs and remote htlc signatures which were included in this commitment transaction.
661
+ /// The HTLCs and counterparty htlc signatures which were included in this commitment transaction.
662
662
///
663
663
/// Note that this includes all HTLCs, including ones which were considered dust and not
664
664
/// actually included in the transaction as it appears on-chain, but who's value is burned as
665
665
/// fees and not included in the to_local or to_remote outputs.
666
666
///
667
- /// The remote HTLC signatures in the second element will always be set for non-dust HTLCs, ie
667
+ /// The counterparty HTLC signatures in the second element will always be set for non-dust HTLCs, ie
668
668
/// those for which transaction_output_index.is_some().
669
669
#[ no_mangle]
670
670
pub extern "C" fn HolderCommitmentTransaction_set_per_htlc ( this_ptr : & mut HolderCommitmentTransaction , mut val : crate :: c_types:: derived:: CVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ ) {
671
671
let mut local_val = Vec :: new ( ) ; for mut item in val. into_rust ( ) . drain ( ..) { local_val. push ( { let ( mut orig_val_0_0, mut orig_val_0_1) = item. to_rust ( ) ; let mut local_orig_val_0_1 = if orig_val_0_1. is_null ( ) { None } else { Some ( { orig_val_0_1. into_rust ( ) } ) } ; let mut local_val_0 = ( * unsafe { Box :: from_raw ( orig_val_0_0. take_ptr ( ) ) } , local_orig_val_0_1) ; local_val_0 } ) ; } ;
672
672
unsafe { & mut * this_ptr. inner } . per_htlc = local_val;
673
673
}
674
674
/// Generate a new HolderCommitmentTransaction based on a raw commitment transaction,
675
- /// remote signature and both parties keys.
675
+ /// counterparty signature and both parties keys.
676
676
///
677
677
/// The unsigned transaction outputs must be consistent with htlc_data. This function
678
678
/// only checks that the shape and amounts are consistent, but does not check the scriptPubkey.
679
679
#[ must_use]
680
680
#[ no_mangle]
681
- pub extern "C" fn HolderCommitmentTransaction_new_missing_holder_sig ( mut unsigned_tx : crate :: c_types:: derived:: CVec_u8Z , mut counterparty_sig : crate :: c_types:: Signature , our_funding_key : crate :: c_types:: PublicKey , their_funding_key : crate :: c_types:: PublicKey , mut local_keys : crate :: ln:: chan_utils:: TxCreationKeys , mut feerate_per_kw : u32 , mut htlc_data : crate :: c_types:: derived:: CVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ ) -> crate :: ln:: chan_utils:: HolderCommitmentTransaction {
682
- let mut local_htlc_data = Vec :: new ( ) ; for mut item in htlc_data. into_rust ( ) . drain ( ..) { local_htlc_data . push ( { let ( mut orig_htlc_data_0_0, mut orig_htlc_data_0_1) = item. to_rust ( ) ; let mut local_orig_htlc_data_0_1 = if orig_htlc_data_0_1. is_null ( ) { None } else { Some ( { orig_htlc_data_0_1. into_rust ( ) } ) } ; let mut local_htlc_data_0 = ( * unsafe { Box :: from_raw ( orig_htlc_data_0_0. take_ptr ( ) ) } , local_orig_htlc_data_0_1 ) ; local_htlc_data_0 } ) ; } ;
683
- let mut ret = lightning:: ln:: chan_utils:: HolderCommitmentTransaction :: new_missing_holder_sig ( :: bitcoin:: consensus:: encode:: deserialize ( & unsigned_tx. into_rust ( ) [ ..] ) . unwrap ( ) , counterparty_sig. into_rust ( ) , & our_funding_key . into_rust ( ) , & their_funding_key . into_rust ( ) , * unsafe { Box :: from_raw ( local_keys . take_ptr ( ) ) } , feerate_per_kw, local_htlc_data ) ;
681
+ pub extern "C" fn HolderCommitmentTransaction_new_missing_holder_sig ( mut unsigned_tx : crate :: c_types:: derived:: CVec_u8Z , mut counterparty_sig : crate :: c_types:: Signature , holder_funding_key : crate :: c_types:: PublicKey , counterparty_funding_key : crate :: c_types:: PublicKey , mut keys : crate :: ln:: chan_utils:: TxCreationKeys , mut feerate_per_kw : u32 , mut htlc_data : crate :: c_types:: derived:: CVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ ) -> crate :: ln:: chan_utils:: HolderCommitmentTransaction {
682
+ let mut holder_htlc_data = Vec :: new ( ) ; for mut item in htlc_data. into_rust ( ) . drain ( ..) { holder_htlc_data . push ( { let ( mut orig_htlc_data_0_0, mut orig_htlc_data_0_1) = item. to_rust ( ) ; let mut holder_orig_htlc_data_0_1 = if orig_htlc_data_0_1. is_null ( ) { None } else { Some ( { orig_htlc_data_0_1. into_rust ( ) } ) } ; let mut holder_htlc_data_0 = ( * unsafe { Box :: from_raw ( orig_htlc_data_0_0. take_ptr ( ) ) } , holder_orig_htlc_data_0_1 ) ; holder_htlc_data_0 } ) ; } ;
683
+ let mut ret = lightning:: ln:: chan_utils:: HolderCommitmentTransaction :: new_missing_holder_sig ( :: bitcoin:: consensus:: encode:: deserialize ( & unsigned_tx. into_rust ( ) [ ..] ) . unwrap ( ) , counterparty_sig. into_rust ( ) , & holder_funding_key . into_rust ( ) , & counterparty_funding_key . into_rust ( ) , * unsafe { Box :: from_raw ( keys . take_ptr ( ) ) } , feerate_per_kw, holder_htlc_data ) ;
684
684
crate :: ln:: chan_utils:: HolderCommitmentTransaction { inner : Box :: into_raw ( Box :: new ( ret) ) , is_owned : true }
685
685
}
686
686
@@ -693,7 +693,7 @@ pub extern "C" fn HolderCommitmentTransaction_trust_key_derivation(this_arg: &Ho
693
693
crate :: ln:: chan_utils:: TxCreationKeys { inner : unsafe { ( ( & ( * ret) as * const _ ) as * mut _ ) } , is_owned : false }
694
694
}
695
695
696
- /// Get the txid of the local commitment transaction contained in this
696
+ /// Get the txid of the holder commitment transaction contained in this
697
697
/// HolderCommitmentTransaction
698
698
#[ must_use]
699
699
#[ no_mangle]
@@ -708,7 +708,7 @@ pub extern "C" fn HolderCommitmentTransaction_txid(this_arg: &HolderCommitmentTr
708
708
/// by your ChannelKeys.
709
709
/// Funding redeemscript is script locking funding_outpoint. This is the mutlsig script
710
710
/// between your own funding key and your counterparty's. Currently, this is provided in
711
- /// ChannelKeys::sign_local_commitment () calls directly.
711
+ /// ChannelKeys::sign_holder_commitment () calls directly.
712
712
/// Channel value is amount locked in funding_outpoint.
713
713
#[ must_use]
714
714
#[ no_mangle]
@@ -725,8 +725,8 @@ pub extern "C" fn HolderCommitmentTransaction_get_holder_sig(this_arg: &HolderCo
725
725
/// included.
726
726
#[ must_use]
727
727
#[ no_mangle]
728
- pub extern "C" fn HolderCommitmentTransaction_get_htlc_sigs ( this_arg : & HolderCommitmentTransaction , htlc_base_key : * const [ u8 ; 32 ] , mut local_csv : u16 ) -> crate :: c_types:: derived:: CResult_CVec_SignatureZNoneZ {
729
- let mut ret = unsafe { & * this_arg. inner } . get_htlc_sigs ( & :: bitcoin:: secp256k1:: key:: SecretKey :: from_slice ( & unsafe { * htlc_base_key} [ ..] ) . unwrap ( ) , local_csv , & bitcoin:: secp256k1:: Secp256k1 :: new ( ) ) ;
728
+ pub extern "C" fn HolderCommitmentTransaction_get_htlc_sigs ( this_arg : & HolderCommitmentTransaction , htlc_base_key : * const [ u8 ; 32 ] , mut counterparty_selected_contest_delay : u16 ) -> crate :: c_types:: derived:: CResult_CVec_SignatureZNoneZ {
729
+ let mut ret = unsafe { & * this_arg. inner } . get_htlc_sigs ( & :: bitcoin:: secp256k1:: key:: SecretKey :: from_slice ( & unsafe { * htlc_base_key} [ ..] ) . unwrap ( ) , counterparty_selected_contest_delay , & bitcoin:: secp256k1:: Secp256k1 :: new ( ) ) ;
730
730
let mut local_ret = match ret { Ok ( mut o) => crate :: c_types:: CResultTempl :: ok ( { let mut local_ret_0 = Vec :: new ( ) ; for item in o. drain ( ..) { local_ret_0. push ( { let mut local_ret_0_0 = if item. is_none ( ) { crate :: c_types:: Signature :: null ( ) } else { { crate :: c_types:: Signature :: from_rust ( & ( item. unwrap ( ) ) ) } } ; local_ret_0_0 } ) ; } ; local_ret_0. into ( ) } ) , Err ( mut e) => crate :: c_types:: CResultTempl :: err ( { 0u8 /*e*/ } ) } ;
731
731
local_ret
732
732
}
0 commit comments