@@ -883,6 +883,14 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
883
883
884
884
"core::convert::Infallible" => Some ( "crate::c_types::NotConstructable" ) ,
885
885
886
+ "bitcoin::bech32::Error" |"bech32::Error"
887
+ if !is_ref => Some ( "crate::c_types::Bech32Error" ) ,
888
+ "bitcoin::secp256k1::Error" |"secp256k1::Error"
889
+ if !is_ref => Some ( "crate::c_types::Secp256k1Error" ) ,
890
+
891
+ "core::num::ParseIntError" => Some ( "crate::c_types::Error" ) ,
892
+ "core::str::Utf8Error" => Some ( "crate::c_types::Error" ) ,
893
+
886
894
"bitcoin::bech32::u5" |"bech32::u5" => Some ( "crate::c_types::u5" ) ,
887
895
"core::num::NonZeroU8" => Some ( "u8" ) ,
888
896
@@ -894,8 +902,6 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
894
902
if is_ref => Some ( "*const [u8; 32]" ) ,
895
903
"bitcoin::secp256k1::key::SecretKey" |"bitcoin::secp256k1::SecretKey"
896
904
if !is_ref => Some ( "crate::c_types::SecretKey" ) ,
897
- "bitcoin::secp256k1::Error" |"secp256k1::Error"
898
- if !is_ref => Some ( "crate::c_types::Secp256k1Error" ) ,
899
905
"bitcoin::blockdata::script::Script" if is_ref => Some ( "crate::c_types::u8slice" ) ,
900
906
"bitcoin::blockdata::script::Script" if !is_ref => Some ( "crate::c_types::derived::CVec_u8Z" ) ,
901
907
"bitcoin::blockdata::transaction::OutPoint" => Some ( "crate::lightning::chain::transaction::OutPoint" ) ,
@@ -961,6 +967,12 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
961
967
962
968
"core::convert::Infallible" => Some ( "panic!(\" You must never construct a NotConstructable! : " ) ,
963
969
970
+ "bitcoin::bech32::Error" |"bech32::Error" if !is_ref => Some ( "" ) ,
971
+ "bitcoin::secp256k1::Error" |"secp256k1::Error" if !is_ref => Some ( "" ) ,
972
+
973
+ "core::num::ParseIntError" => Some ( "u8::from_str_radix(\" a\" , 10).unwrap_err() /*" ) ,
974
+ "core::str::Utf8Error" => Some ( "core::str::from_utf8(&[0xff]).unwrap_err() /*" ) ,
975
+
964
976
"std::time::Duration" |"core::time::Duration" => Some ( "core::time::Duration::from_secs(" ) ,
965
977
"std::time::SystemTime" => Some ( "(::std::time::SystemTime::UNIX_EPOCH + std::time::Duration::from_secs(" ) ,
966
978
@@ -1043,6 +1055,12 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1043
1055
1044
1056
"core::convert::Infallible" => Some ( "\" )" ) ,
1045
1057
1058
+ "bitcoin::bech32::Error" |"bech32::Error" if !is_ref => Some ( ".into_rust()" ) ,
1059
+ "bitcoin::secp256k1::Error" |"secp256k1::Error" if !is_ref => Some ( ".into_rust()" ) ,
1060
+
1061
+ "core::num::ParseIntError" => Some ( "*/" ) ,
1062
+ "core::str::Utf8Error" => Some ( "*/" ) ,
1063
+
1046
1064
"std::time::Duration" |"core::time::Duration" => Some ( ")" ) ,
1047
1065
"std::time::SystemTime" => Some ( "))" ) ,
1048
1066
@@ -1133,6 +1151,14 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1133
1151
1134
1152
"core::convert::Infallible" => Some ( "panic!(\" Cannot construct an Infallible: " ) ,
1135
1153
1154
+ "bitcoin::bech32::Error" |"bech32::Error"
1155
+ if !is_ref => Some ( "crate::c_types::Bech32Error::from_rust(" ) ,
1156
+ "bitcoin::secp256k1::Error" |"secp256k1::Error"
1157
+ if !is_ref => Some ( "crate::c_types::Secp256k1Error::from_rust(" ) ,
1158
+
1159
+ "core::num::ParseIntError" => Some ( "crate::c_types::Error { _dummy: 0 } /*" ) ,
1160
+ "core::str::Utf8Error" => Some ( "crate::c_types::Error { _dummy: 0 } /*" ) ,
1161
+
1136
1162
"bitcoin::bech32::u5" |"bech32::u5" => Some ( "" ) ,
1137
1163
1138
1164
"bitcoin::secp256k1::key::PublicKey" |"bitcoin::secp256k1::PublicKey" |"secp256k1::key::PublicKey"
@@ -1143,8 +1169,6 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1143
1169
if is_ref => Some ( "" ) ,
1144
1170
"bitcoin::secp256k1::key::SecretKey" |"bitcoin::secp256k1::SecretKey"
1145
1171
if !is_ref => Some ( "crate::c_types::SecretKey::from_rust(" ) ,
1146
- "bitcoin::secp256k1::Error" |"secp256k1::Error"
1147
- if !is_ref => Some ( "crate::c_types::Secp256k1Error::from_rust(" ) ,
1148
1172
"bitcoin::blockdata::script::Script" if is_ref => Some ( "crate::c_types::u8slice::from_slice(&" ) ,
1149
1173
"bitcoin::blockdata::script::Script" if !is_ref => Some ( "" ) ,
1150
1174
"bitcoin::blockdata::transaction::Transaction" |"bitcoin::Transaction" if is_ref => Some ( "crate::c_types::Transaction::from_bitcoin(" ) ,
@@ -1206,6 +1230,14 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1206
1230
1207
1231
"core::convert::Infallible" => Some ( "\" )" ) ,
1208
1232
1233
+ "bitcoin::secp256k1::Error" |"bech32::Error"
1234
+ if !is_ref => Some ( ")" ) ,
1235
+ "bitcoin::secp256k1::Error" |"secp256k1::Error"
1236
+ if !is_ref => Some ( ")" ) ,
1237
+
1238
+ "core::num::ParseIntError" => Some ( "*/" ) ,
1239
+ "core::str::Utf8Error" => Some ( "*/" ) ,
1240
+
1209
1241
"bitcoin::bech32::u5" |"bech32::u5" => Some ( ".into()" ) ,
1210
1242
1211
1243
"bitcoin::secp256k1::key::PublicKey" |"bitcoin::secp256k1::PublicKey" |"secp256k1::key::PublicKey"
@@ -1216,8 +1248,6 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1216
1248
if !is_ref => Some ( ")" ) ,
1217
1249
"bitcoin::secp256k1::key::SecretKey" |"bitcoin::secp256k1::SecretKey"
1218
1250
if is_ref => Some ( ".as_ref()" ) ,
1219
- "bitcoin::secp256k1::Error" |"secp256k1::Error"
1220
- if !is_ref => Some ( ")" ) ,
1221
1251
"bitcoin::blockdata::script::Script" if is_ref => Some ( "[..])" ) ,
1222
1252
"bitcoin::blockdata::script::Script" if !is_ref => Some ( ".into_bytes().into()" ) ,
1223
1253
"bitcoin::blockdata::transaction::Transaction" |"bitcoin::Transaction" => Some ( ")" ) ,
0 commit comments