@@ -1023,20 +1023,20 @@ pub extern "C" fn InMemorySigner_as_Sign(this_arg: &InMemorySigner) -> crate::ch
1023
1023
write : InMemorySigner_write_void ,
1024
1024
}
1025
1025
}
1026
- use lightning :: chain :: keysinterface :: Sign as SignTraitImport ;
1026
+
1027
1027
#[ must_use]
1028
1028
extern "C" fn InMemorySigner_Sign_get_per_commitment_point ( this_arg : * const c_void , mut idx : u64 ) -> crate :: c_types:: PublicKey {
1029
- let mut ret = <nativeInMemorySigner as SignTraitImport < > >:: get_per_commitment_point ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , idx, secp256k1:: SECP256K1 ) ;
1029
+ let mut ret = <nativeInMemorySigner as lightning :: chain :: keysinterface :: Sign < > >:: get_per_commitment_point ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , idx, secp256k1:: SECP256K1 ) ;
1030
1030
crate :: c_types:: PublicKey :: from_rust ( & ret)
1031
1031
}
1032
1032
#[ must_use]
1033
1033
extern "C" fn InMemorySigner_Sign_release_commitment_secret ( this_arg : * const c_void , mut idx : u64 ) -> crate :: c_types:: ThirtyTwoBytes {
1034
- let mut ret = <nativeInMemorySigner as SignTraitImport < > >:: release_commitment_secret ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , idx) ;
1034
+ let mut ret = <nativeInMemorySigner as lightning :: chain :: keysinterface :: Sign < > >:: release_commitment_secret ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , idx) ;
1035
1035
crate :: c_types:: ThirtyTwoBytes { data : ret }
1036
1036
}
1037
1037
#[ must_use]
1038
1038
extern "C" fn InMemorySigner_Sign_pubkeys ( this_arg : * const c_void ) -> crate :: ln:: chan_utils:: ChannelPublicKeys {
1039
- let mut ret = <nativeInMemorySigner as SignTraitImport < > >:: pubkeys ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , ) ;
1039
+ let mut ret = <nativeInMemorySigner as lightning :: chain :: keysinterface :: Sign < > >:: pubkeys ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , ) ;
1040
1040
crate :: ln:: chan_utils:: ChannelPublicKeys { inner : unsafe { ( ( & ( * ret) as * const _ ) as * mut _ ) } , is_owned : false }
1041
1041
}
1042
1042
extern "C" fn InMemorySigner_Sign_set_pubkeys ( trait_self_arg : & Sign ) {
@@ -1048,48 +1048,48 @@ extern "C" fn InMemorySigner_Sign_set_pubkeys(trait_self_arg: &Sign) {
1048
1048
}
1049
1049
#[ must_use]
1050
1050
extern "C" fn InMemorySigner_Sign_channel_keys_id ( this_arg : * const c_void ) -> crate :: c_types:: ThirtyTwoBytes {
1051
- let mut ret = <nativeInMemorySigner as SignTraitImport < > >:: channel_keys_id ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , ) ;
1051
+ let mut ret = <nativeInMemorySigner as lightning :: chain :: keysinterface :: Sign < > >:: channel_keys_id ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , ) ;
1052
1052
crate :: c_types:: ThirtyTwoBytes { data : ret }
1053
1053
}
1054
1054
#[ must_use]
1055
1055
extern "C" fn InMemorySigner_Sign_sign_counterparty_commitment ( this_arg : * const c_void , commitment_tx : & crate :: ln:: chan_utils:: CommitmentTransaction ) -> crate :: c_types:: derived:: CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
1056
- let mut ret = <nativeInMemorySigner as SignTraitImport < > >:: sign_counterparty_commitment ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , unsafe { & * commitment_tx. inner } , secp256k1:: SECP256K1 ) ;
1056
+ let mut ret = <nativeInMemorySigner as lightning :: chain :: keysinterface :: Sign < > >:: sign_counterparty_commitment ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , unsafe { & * commitment_tx. inner } , secp256k1:: SECP256K1 ) ;
1057
1057
let mut local_ret = match ret { Ok ( mut o) => crate :: c_types:: CResultTempl :: ok ( { let ( mut orig_ret_0_0, mut orig_ret_0_1) = o; let mut local_orig_ret_0_1 = Vec :: new ( ) ; for mut item in orig_ret_0_1. drain ( ..) { local_orig_ret_0_1. push ( { crate :: c_types:: Signature :: from_rust ( & item) } ) ; } ; let mut local_ret_0 = ( crate :: c_types:: Signature :: from_rust ( & orig_ret_0_0) , local_orig_ret_0_1. into ( ) ) . into ( ) ; local_ret_0 } ) . into ( ) , Err ( mut e) => crate :: c_types:: CResultTempl :: err ( { 0u8 /*e*/ } ) . into ( ) } ;
1058
1058
local_ret
1059
1059
}
1060
1060
#[ must_use]
1061
1061
extern "C" fn InMemorySigner_Sign_sign_holder_commitment_and_htlcs ( this_arg : * const c_void , commitment_tx : & crate :: ln:: chan_utils:: HolderCommitmentTransaction ) -> crate :: c_types:: derived:: CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
1062
- let mut ret = <nativeInMemorySigner as SignTraitImport < > >:: sign_holder_commitment_and_htlcs ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , unsafe { & * commitment_tx. inner } , secp256k1:: SECP256K1 ) ;
1062
+ let mut ret = <nativeInMemorySigner as lightning :: chain :: keysinterface :: Sign < > >:: sign_holder_commitment_and_htlcs ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , unsafe { & * commitment_tx. inner } , secp256k1:: SECP256K1 ) ;
1063
1063
let mut local_ret = match ret { Ok ( mut o) => crate :: c_types:: CResultTempl :: ok ( { let ( mut orig_ret_0_0, mut orig_ret_0_1) = o; let mut local_orig_ret_0_1 = Vec :: new ( ) ; for mut item in orig_ret_0_1. drain ( ..) { local_orig_ret_0_1. push ( { crate :: c_types:: Signature :: from_rust ( & item) } ) ; } ; let mut local_ret_0 = ( crate :: c_types:: Signature :: from_rust ( & orig_ret_0_0) , local_orig_ret_0_1. into ( ) ) . into ( ) ; local_ret_0 } ) . into ( ) , Err ( mut e) => crate :: c_types:: CResultTempl :: err ( { 0u8 /*e*/ } ) . into ( ) } ;
1064
1064
local_ret
1065
1065
}
1066
1066
#[ must_use]
1067
1067
extern "C" fn InMemorySigner_Sign_sign_justice_transaction ( this_arg : * const c_void , mut justice_tx : crate :: c_types:: Transaction , mut input : usize , mut amount : u64 , per_commitment_key : * const [ u8 ; 32 ] , htlc : & crate :: ln:: chan_utils:: HTLCOutputInCommitment ) -> crate :: c_types:: derived:: CResult_SignatureNoneZ {
1068
1068
let mut local_htlc = if htlc. inner . is_null ( ) { None } else { Some ( ( * { unsafe { & * htlc. inner } } ) . clone ( ) ) } ;
1069
- let mut ret = <nativeInMemorySigner as SignTraitImport < > >:: sign_justice_transaction ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , & justice_tx. into_bitcoin ( ) , input, amount, & :: bitcoin:: secp256k1:: key:: SecretKey :: from_slice ( & unsafe { * per_commitment_key} [ ..] ) . unwrap ( ) , & local_htlc, secp256k1:: SECP256K1 ) ;
1069
+ let mut ret = <nativeInMemorySigner as lightning :: chain :: keysinterface :: Sign < > >:: sign_justice_transaction ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , & justice_tx. into_bitcoin ( ) , input, amount, & :: bitcoin:: secp256k1:: key:: SecretKey :: from_slice ( & unsafe { * per_commitment_key} [ ..] ) . unwrap ( ) , & local_htlc, secp256k1:: SECP256K1 ) ;
1070
1070
let mut local_ret = match ret { Ok ( mut o) => crate :: c_types:: CResultTempl :: ok ( { crate :: c_types:: Signature :: from_rust ( & o) } ) . into ( ) , Err ( mut e) => crate :: c_types:: CResultTempl :: err ( { 0u8 /*e*/ } ) . into ( ) } ;
1071
1071
local_ret
1072
1072
}
1073
1073
#[ must_use]
1074
1074
extern "C" fn InMemorySigner_Sign_sign_counterparty_htlc_transaction ( this_arg : * const c_void , mut htlc_tx : crate :: c_types:: Transaction , mut input : usize , mut amount : u64 , mut per_commitment_point : crate :: c_types:: PublicKey , htlc : & crate :: ln:: chan_utils:: HTLCOutputInCommitment ) -> crate :: c_types:: derived:: CResult_SignatureNoneZ {
1075
- let mut ret = <nativeInMemorySigner as SignTraitImport < > >:: sign_counterparty_htlc_transaction ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , & htlc_tx. into_bitcoin ( ) , input, amount, & per_commitment_point. into_rust ( ) , unsafe { & * htlc. inner } , secp256k1:: SECP256K1 ) ;
1075
+ let mut ret = <nativeInMemorySigner as lightning :: chain :: keysinterface :: Sign < > >:: sign_counterparty_htlc_transaction ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , & htlc_tx. into_bitcoin ( ) , input, amount, & per_commitment_point. into_rust ( ) , unsafe { & * htlc. inner } , secp256k1:: SECP256K1 ) ;
1076
1076
let mut local_ret = match ret { Ok ( mut o) => crate :: c_types:: CResultTempl :: ok ( { crate :: c_types:: Signature :: from_rust ( & o) } ) . into ( ) , Err ( mut e) => crate :: c_types:: CResultTempl :: err ( { 0u8 /*e*/ } ) . into ( ) } ;
1077
1077
local_ret
1078
1078
}
1079
1079
#[ must_use]
1080
1080
extern "C" fn InMemorySigner_Sign_sign_closing_transaction ( this_arg : * const c_void , mut closing_tx : crate :: c_types:: Transaction ) -> crate :: c_types:: derived:: CResult_SignatureNoneZ {
1081
- let mut ret = <nativeInMemorySigner as SignTraitImport < > >:: sign_closing_transaction ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , & closing_tx. into_bitcoin ( ) , secp256k1:: SECP256K1 ) ;
1081
+ let mut ret = <nativeInMemorySigner as lightning :: chain :: keysinterface :: Sign < > >:: sign_closing_transaction ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , & closing_tx. into_bitcoin ( ) , secp256k1:: SECP256K1 ) ;
1082
1082
let mut local_ret = match ret { Ok ( mut o) => crate :: c_types:: CResultTempl :: ok ( { crate :: c_types:: Signature :: from_rust ( & o) } ) . into ( ) , Err ( mut e) => crate :: c_types:: CResultTempl :: err ( { 0u8 /*e*/ } ) . into ( ) } ;
1083
1083
local_ret
1084
1084
}
1085
1085
#[ must_use]
1086
1086
extern "C" fn InMemorySigner_Sign_sign_channel_announcement ( this_arg : * const c_void , msg : & crate :: ln:: msgs:: UnsignedChannelAnnouncement ) -> crate :: c_types:: derived:: CResult_SignatureNoneZ {
1087
- let mut ret = <nativeInMemorySigner as SignTraitImport < > >:: sign_channel_announcement ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , unsafe { & * msg. inner } , secp256k1:: SECP256K1 ) ;
1087
+ let mut ret = <nativeInMemorySigner as lightning :: chain :: keysinterface :: Sign < > >:: sign_channel_announcement ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , unsafe { & * msg. inner } , secp256k1:: SECP256K1 ) ;
1088
1088
let mut local_ret = match ret { Ok ( mut o) => crate :: c_types:: CResultTempl :: ok ( { crate :: c_types:: Signature :: from_rust ( & o) } ) . into ( ) , Err ( mut e) => crate :: c_types:: CResultTempl :: err ( { 0u8 /*e*/ } ) . into ( ) } ;
1089
1089
local_ret
1090
1090
}
1091
1091
extern "C" fn InMemorySigner_Sign_ready_channel ( this_arg : * mut c_void , channel_parameters : & crate :: ln:: chan_utils:: ChannelTransactionParameters ) {
1092
- <nativeInMemorySigner as SignTraitImport < > >:: ready_channel ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , unsafe { & * channel_parameters. inner } )
1092
+ <nativeInMemorySigner as lightning :: chain :: keysinterface :: Sign < > >:: ready_channel ( unsafe { & mut * ( this_arg as * mut nativeInMemorySigner ) } , unsafe { & * channel_parameters. inner } )
1093
1093
}
1094
1094
1095
1095
#[ no_mangle]
@@ -1232,35 +1232,35 @@ pub extern "C" fn KeysManager_as_KeysInterface(this_arg: &KeysManager) -> crate:
1232
1232
read_chan_signer : KeysManager_KeysInterface_read_chan_signer ,
1233
1233
}
1234
1234
}
1235
- use lightning :: chain :: keysinterface :: KeysInterface as KeysInterfaceTraitImport ;
1235
+
1236
1236
#[ must_use]
1237
1237
extern "C" fn KeysManager_KeysInterface_get_node_secret ( this_arg : * const c_void ) -> crate :: c_types:: SecretKey {
1238
- let mut ret = <nativeKeysManager as KeysInterfaceTraitImport < > >:: get_node_secret ( unsafe { & mut * ( this_arg as * mut nativeKeysManager ) } , ) ;
1238
+ let mut ret = <nativeKeysManager as lightning :: chain :: keysinterface :: KeysInterface < > >:: get_node_secret ( unsafe { & mut * ( this_arg as * mut nativeKeysManager ) } , ) ;
1239
1239
crate :: c_types:: SecretKey :: from_rust ( ret)
1240
1240
}
1241
1241
#[ must_use]
1242
1242
extern "C" fn KeysManager_KeysInterface_get_destination_script ( this_arg : * const c_void ) -> crate :: c_types:: derived:: CVec_u8Z {
1243
- let mut ret = <nativeKeysManager as KeysInterfaceTraitImport < > >:: get_destination_script ( unsafe { & mut * ( this_arg as * mut nativeKeysManager ) } , ) ;
1243
+ let mut ret = <nativeKeysManager as lightning :: chain :: keysinterface :: KeysInterface < > >:: get_destination_script ( unsafe { & mut * ( this_arg as * mut nativeKeysManager ) } , ) ;
1244
1244
ret. into_bytes ( ) . into ( )
1245
1245
}
1246
1246
#[ must_use]
1247
1247
extern "C" fn KeysManager_KeysInterface_get_shutdown_pubkey ( this_arg : * const c_void ) -> crate :: c_types:: PublicKey {
1248
- let mut ret = <nativeKeysManager as KeysInterfaceTraitImport < > >:: get_shutdown_pubkey ( unsafe { & mut * ( this_arg as * mut nativeKeysManager ) } , ) ;
1248
+ let mut ret = <nativeKeysManager as lightning :: chain :: keysinterface :: KeysInterface < > >:: get_shutdown_pubkey ( unsafe { & mut * ( this_arg as * mut nativeKeysManager ) } , ) ;
1249
1249
crate :: c_types:: PublicKey :: from_rust ( & ret)
1250
1250
}
1251
1251
#[ must_use]
1252
1252
extern "C" fn KeysManager_KeysInterface_get_channel_signer ( this_arg : * const c_void , mut _inbound : bool , mut channel_value_satoshis : u64 ) -> crate :: chain:: keysinterface:: Sign {
1253
- let mut ret = <nativeKeysManager as KeysInterfaceTraitImport < > >:: get_channel_signer ( unsafe { & mut * ( this_arg as * mut nativeKeysManager ) } , _inbound, channel_value_satoshis) ;
1253
+ let mut ret = <nativeKeysManager as lightning :: chain :: keysinterface :: KeysInterface < > >:: get_channel_signer ( unsafe { & mut * ( this_arg as * mut nativeKeysManager ) } , _inbound, channel_value_satoshis) ;
1254
1254
ret. into ( )
1255
1255
}
1256
1256
#[ must_use]
1257
1257
extern "C" fn KeysManager_KeysInterface_get_secure_random_bytes ( this_arg : * const c_void ) -> crate :: c_types:: ThirtyTwoBytes {
1258
- let mut ret = <nativeKeysManager as KeysInterfaceTraitImport < > >:: get_secure_random_bytes ( unsafe { & mut * ( this_arg as * mut nativeKeysManager ) } , ) ;
1258
+ let mut ret = <nativeKeysManager as lightning :: chain :: keysinterface :: KeysInterface < > >:: get_secure_random_bytes ( unsafe { & mut * ( this_arg as * mut nativeKeysManager ) } , ) ;
1259
1259
crate :: c_types:: ThirtyTwoBytes { data : ret }
1260
1260
}
1261
1261
#[ must_use]
1262
1262
extern "C" fn KeysManager_KeysInterface_read_chan_signer ( this_arg : * const c_void , mut reader : crate :: c_types:: u8slice ) -> crate :: c_types:: derived:: CResult_SignDecodeErrorZ {
1263
- let mut ret = <nativeKeysManager as KeysInterfaceTraitImport < > >:: read_chan_signer ( unsafe { & mut * ( this_arg as * mut nativeKeysManager ) } , reader. to_slice ( ) ) ;
1263
+ let mut ret = <nativeKeysManager as lightning :: chain :: keysinterface :: KeysInterface < > >:: read_chan_signer ( unsafe { & mut * ( this_arg as * mut nativeKeysManager ) } , reader. to_slice ( ) ) ;
1264
1264
let mut local_ret = match ret { Ok ( mut o) => crate :: c_types:: CResultTempl :: ok ( { o. into ( ) } ) . into ( ) , Err ( mut e) => crate :: c_types:: CResultTempl :: err ( { crate :: ln:: msgs:: DecodeError { inner : Box :: into_raw ( Box :: new ( e) ) , is_owned : true } } ) . into ( ) } ;
1265
1265
local_ret
1266
1266
}
0 commit comments