@@ -863,6 +863,7 @@ fn initial_clonable_types() -> HashSet<String> {
863
863
res. insert ( "crate::c_types::Transaction" . to_owned ( ) ) ;
864
864
res. insert ( "crate::c_types::Witness" . to_owned ( ) ) ;
865
865
res. insert ( "crate::c_types::WitnessVersion" . to_owned ( ) ) ;
866
+ res. insert ( "crate::c_types::WitnessProgram" . to_owned ( ) ) ;
866
867
res. insert ( "crate::c_types::TxIn" . to_owned ( ) ) ;
867
868
res. insert ( "crate::c_types::TxOut" . to_owned ( ) ) ;
868
869
res. insert ( "crate::c_types::ECDSASignature" . to_owned ( ) ) ;
@@ -1070,19 +1071,20 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1070
1071
"bitcoin::secp256k1::Scalar" if !is_ref => Some ( "crate::c_types::BigEndianScalar" ) ,
1071
1072
"bitcoin::secp256k1::ecdh::SharedSecret" if !is_ref => Some ( "crate::c_types::ThirtyTwoBytes" ) ,
1072
1073
1073
- "bitcoin::blockdata::script::Script" |"bitcoin::Script" if is_ref => Some ( "crate::c_types::u8slice" ) ,
1074
- "bitcoin::blockdata::script::Script " |"bitcoin::Script" if !is_ref => Some ( "crate::c_types::derived::CVec_u8Z" ) ,
1074
+ "bitcoin::blockdata::script::Script" |"bitcoin::Script" => Some ( "crate::c_types::u8slice" ) ,
1075
+ "bitcoin::blockdata::script::ScriptBuf " |"bitcoin::ScriptBuf" => Some ( "crate::c_types::derived::CVec_u8Z" ) ,
1075
1076
"bitcoin::OutPoint" |"bitcoin::blockdata::transaction::OutPoint" => Some ( "crate::lightning::chain::transaction::OutPoint" ) ,
1076
1077
"bitcoin::blockdata::transaction::Transaction" |"bitcoin::Transaction" => Some ( "crate::c_types::Transaction" ) ,
1077
1078
"bitcoin::Witness" => Some ( "crate::c_types::Witness" ) ,
1078
1079
"bitcoin::TxIn" |"bitcoin::blockdata::transaction::TxIn" if !is_ref => Some ( "crate::c_types::TxIn" ) ,
1079
1080
"bitcoin::TxOut" |"bitcoin::blockdata::transaction::TxOut" => Some ( "crate::c_types::TxOut" ) ,
1080
1081
"bitcoin::network::constants::Network" => Some ( "crate::bitcoin::network::Network" ) ,
1081
- "bitcoin::util::address::WitnessVersion" => Some ( "crate::c_types::WitnessVersion" ) ,
1082
- "bitcoin::blockdata::block::BlockHeader" if is_ref => Some ( "*const [u8; 80]" ) ,
1082
+ "bitcoin::address::WitnessVersion" => Some ( "crate::c_types::WitnessVersion" ) ,
1083
+ "bitcoin::address::WitnessProgram" => Some ( "crate::c_types::WitnessProgram" ) ,
1084
+ "bitcoin::blockdata::block::Header" if is_ref => Some ( "*const [u8; 80]" ) ,
1083
1085
"bitcoin::blockdata::block::Block" if is_ref => Some ( "crate::c_types::u8slice" ) ,
1084
1086
1085
- "bitcoin::PackedLockTime" | "bitcoin:: blockdata::locktime::PackedLockTime " => Some ( "u32" ) ,
1087
+ "bitcoin::blockdata::locktime::absolute::LockTime " => Some ( "u32" ) ,
1086
1088
1087
1089
"bitcoin::psbt::PartiallySignedTransaction" if !is_ref => Some ( "crate::c_types::derived::CVec_u8Z" ) ,
1088
1090
@@ -1098,11 +1100,12 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1098
1100
if is_ref => Some ( "*const [u8; 32]" ) ,
1099
1101
1100
1102
// Newtypes that we just expose in their original form.
1101
- "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" |"bitcoin::hash_types::BlockHash" |"bitcoin_hashes ::sha256::Hash" |"bitcoin::blockdata::constants::ChainHash"
1103
+ "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" |"bitcoin::hash_types::BlockHash" |"bitcoin::hashes ::sha256::Hash" |"bitcoin::blockdata::constants::ChainHash"
1102
1104
if is_ref => Some ( "*const [u8; 32]" ) ,
1103
- "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" |"bitcoin::hash_types::BlockHash" |"bitcoin_hashes ::sha256::Hash" |"bitcoin::blockdata::constants::ChainHash"
1105
+ "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" |"bitcoin::hash_types::BlockHash" |"bitcoin::hashes ::sha256::Hash" |"bitcoin::blockdata::constants::ChainHash"
1104
1106
if !is_ref => Some ( "crate::c_types::ThirtyTwoBytes" ) ,
1105
1107
"bitcoin::secp256k1::Message" if !is_ref => Some ( "crate::c_types::ThirtyTwoBytes" ) ,
1108
+ "bitcoin::secp256k1::Message" if is_ref => Some ( "*const [u8; 32]" ) ,
1106
1109
"lightning::ln::PaymentHash" |"lightning::ln::PaymentPreimage" |"lightning::ln::PaymentSecret"
1107
1110
|"lightning::ln::channelmanager::PaymentId" |"lightning::ln::channelmanager::InterceptId"
1108
1111
|"lightning::sign::KeyMaterial" |"lightning::chain::ClaimId"
@@ -1178,8 +1181,8 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1178
1181
"bitcoin::secp256k1::Scalar" if !is_ref => Some ( "" ) ,
1179
1182
"bitcoin::secp256k1::ecdh::SharedSecret" if !is_ref => Some ( "::bitcoin::secp256k1::ecdh::SharedSecret::from_bytes(" ) ,
1180
1183
1181
- "bitcoin::blockdata::script::Script" |"bitcoin::Script" if is_ref => Some ( "& ::bitcoin::blockdata::script::Script::from(Vec::from (" ) ,
1182
- "bitcoin::blockdata::script::Script " |"bitcoin::Script" if !is_ref => Some ( "::bitcoin::blockdata::script::Script ::from(" ) ,
1184
+ "bitcoin::blockdata::script::Script" |"bitcoin::Script" => Some ( "::bitcoin::blockdata::script::Script::from_bytes (" ) ,
1185
+ "bitcoin::blockdata::script::ScriptBuf " |"bitcoin::ScriptBuf" => Some ( "::bitcoin::blockdata::script::ScriptBuf ::from(" ) ,
1183
1186
"bitcoin::blockdata::transaction::Transaction" |"bitcoin::Transaction" if is_ref => Some ( "&" ) ,
1184
1187
"bitcoin::blockdata::transaction::Transaction" |"bitcoin::Transaction" => Some ( "" ) ,
1185
1188
"bitcoin::Witness" if is_ref => Some ( "&" ) ,
@@ -1188,26 +1191,28 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1188
1191
"bitcoin::TxIn" |"bitcoin::blockdata::transaction::TxIn" if !is_ref => Some ( "" ) ,
1189
1192
"bitcoin::TxOut" |"bitcoin::blockdata::transaction::TxOut" if !is_ref => Some ( "" ) ,
1190
1193
"bitcoin::network::constants::Network" => Some ( "" ) ,
1191
- "bitcoin::util::address::WitnessVersion" => Some ( "" ) ,
1192
- "bitcoin::blockdata::block::BlockHeader" => Some ( "&::bitcoin::consensus::encode::deserialize(unsafe { &*" ) ,
1194
+ "bitcoin::address::WitnessVersion" => Some ( "" ) ,
1195
+ "bitcoin::address::WitnessProgram" if is_ref => Some ( "&" ) ,
1196
+ "bitcoin::address::WitnessProgram" if !is_ref => Some ( "" ) ,
1197
+ "bitcoin::blockdata::block::Header" => Some ( "&::bitcoin::consensus::encode::deserialize(unsafe { &*" ) ,
1193
1198
"bitcoin::blockdata::block::Block" if is_ref => Some ( "&::bitcoin::consensus::encode::deserialize(" ) ,
1194
1199
1195
- "bitcoin::PackedLockTime" | "bitcoin:: blockdata::locktime::PackedLockTime " => Some ( "::bitcoin::PackedLockTime (" ) ,
1200
+ "bitcoin::blockdata::locktime::absolute::LockTime " => Some ( "::bitcoin::blockdata::locktime::absolute::LockTime::from_consensus (" ) ,
1196
1201
1197
- "bitcoin::psbt::PartiallySignedTransaction" if !is_ref => Some ( "::bitcoin::consensus::encode ::deserialize(" ) ,
1202
+ "bitcoin::psbt::PartiallySignedTransaction" if !is_ref => Some ( "::bitcoin::psbt::PartiallySignedTransaction ::deserialize(" ) ,
1198
1203
1199
1204
"bitcoin::PubkeyHash" |"bitcoin::hash_types::PubkeyHash" if !is_ref =>
1200
- Some ( "bitcoin::hash_types::PubkeyHash::from_hash (bitcoin::hashes::Hash::from_inner (" ) ,
1205
+ Some ( "bitcoin::hash_types::PubkeyHash::from_raw_hash (bitcoin::hashes::Hash::from_byte_array (" ) ,
1201
1206
"bitcoin::PubkeyHash" |"bitcoin::hash_types::PubkeyHash" if is_ref =>
1202
- Some ( "&bitcoin::hash_types::PubkeyHash::from_hash (bitcoin::hashes::Hash::from_inner (unsafe { *" ) ,
1207
+ Some ( "&bitcoin::hash_types::PubkeyHash::from_raw_hash (bitcoin::hashes::Hash::from_byte_array (unsafe { *" ) ,
1203
1208
"bitcoin::hash_types::WPubkeyHash" if is_ref =>
1204
- Some ( "&bitcoin::hash_types::WPubkeyHash::from_hash (bitcoin::hashes::Hash::from_inner (unsafe { *" ) ,
1209
+ Some ( "&bitcoin::hash_types::WPubkeyHash::from_raw_hash (bitcoin::hashes::Hash::from_byte_array (unsafe { *" ) ,
1205
1210
"bitcoin::ScriptHash" |"bitcoin::hash_types::ScriptHash" if !is_ref =>
1206
- Some ( "bitcoin::hash_types::ScriptHash::from_hash (bitcoin::hashes::Hash::from_inner (" ) ,
1211
+ Some ( "bitcoin::hash_types::ScriptHash::from_raw_hash (bitcoin::hashes::Hash::from_byte_array (" ) ,
1207
1212
"bitcoin::ScriptHash" |"bitcoin::hash_types::ScriptHash" if is_ref =>
1208
- Some ( "&bitcoin::hash_types::ScriptHash::from_hash (bitcoin::hashes::Hash::from_inner (unsafe { *" ) ,
1213
+ Some ( "&bitcoin::hash_types::ScriptHash::from_raw_hash (bitcoin::hashes::Hash::from_byte_array (unsafe { *" ) ,
1209
1214
"bitcoin::hash_types::WScriptHash" if is_ref =>
1210
- Some ( "&bitcoin::hash_types::WScriptHash::from_hash (bitcoin::hashes::Hash::from_inner (unsafe { *" ) ,
1215
+ Some ( "&bitcoin::hash_types::WScriptHash::from_raw_hash (bitcoin::hashes::Hash::from_byte_array (unsafe { *" ) ,
1211
1216
1212
1217
// Newtypes that we just expose in their original form.
1213
1218
"bitcoin::hash_types::Txid" if is_ref => Some ( "&::bitcoin::hash_types::Txid::from_slice(&unsafe { &*" ) ,
@@ -1287,19 +1292,20 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1287
1292
"bitcoin::secp256k1::Scalar" => Some ( ".into_rust()" ) ,
1288
1293
"bitcoin::secp256k1::ecdh::SharedSecret" if !is_ref => Some ( ".data)" ) ,
1289
1294
1290
- "bitcoin::blockdata::script::Script" |"bitcoin::Script" if is_ref => Some ( ".to_slice() ))" ) ,
1291
- "bitcoin::blockdata::script::Script " |"bitcoin::Script" if !is_ref => Some ( ".into_rust())" ) ,
1295
+ "bitcoin::blockdata::script::Script" |"bitcoin::Script" => Some ( ".to_slice())" ) ,
1296
+ "bitcoin::blockdata::script::ScriptBuf " |"bitcoin::ScriptBuf" => Some ( ".into_rust())" ) ,
1292
1297
"bitcoin::blockdata::transaction::Transaction" |"bitcoin::Transaction" => Some ( ".into_bitcoin()" ) ,
1293
1298
"bitcoin::Witness" => Some ( ".into_bitcoin()" ) ,
1294
1299
"bitcoin::OutPoint" |"bitcoin::blockdata::transaction::OutPoint" => Some ( ")" ) ,
1295
1300
"bitcoin::TxIn" |"bitcoin::blockdata::transaction::TxIn" if !is_ref => Some ( ".into_rust()" ) ,
1296
1301
"bitcoin::TxOut" |"bitcoin::blockdata::transaction::TxOut" if !is_ref => Some ( ".into_rust()" ) ,
1297
1302
"bitcoin::network::constants::Network" => Some ( ".into_bitcoin()" ) ,
1298
- "bitcoin::util::address::WitnessVersion" => Some ( ".into()" ) ,
1299
- "bitcoin::blockdata::block::BlockHeader" => Some ( " }).unwrap()" ) ,
1303
+ "bitcoin::address::WitnessVersion" => Some ( ".into()" ) ,
1304
+ "bitcoin::address::WitnessProgram" => Some ( ".into_bitcoin()" ) ,
1305
+ "bitcoin::blockdata::block::Header" => Some ( " }).unwrap()" ) ,
1300
1306
"bitcoin::blockdata::block::Block" => Some ( ".to_slice()).unwrap()" ) ,
1301
1307
1302
- "bitcoin::PackedLockTime" | "bitcoin:: blockdata::locktime::PackedLockTime " => Some ( ")" ) ,
1308
+ "bitcoin::blockdata::locktime::absolute::LockTime " => Some ( ")" ) ,
1303
1309
1304
1310
"bitcoin::psbt::PartiallySignedTransaction" if !is_ref => Some ( ".as_slice()).expect(\" Invalid PSBT format\" )" ) ,
1305
1311
@@ -1316,7 +1322,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1316
1322
"bitcoin::hash_types::Txid" if is_ref => Some ( " }[..]).unwrap()" ) ,
1317
1323
"bitcoin::hash_types::Txid" => Some ( ".data[..]).unwrap()" ) ,
1318
1324
"bitcoin::hash_types::BlockHash" |"bitcoin::BlockHash" if !is_ref => Some ( ".data[..]).unwrap()" ) ,
1319
- "bitcoin::blockdata::constants::ChainHash" if !is_ref => Some ( ".data[..] )" ) ,
1325
+ "bitcoin::blockdata::constants::ChainHash" if !is_ref => Some ( ".data)" ) ,
1320
1326
"lightning::ln::PaymentHash" |"lightning::ln::PaymentPreimage" |"lightning::ln::PaymentSecret"
1321
1327
|"lightning::ln::channelmanager::PaymentId" |"lightning::ln::channelmanager::InterceptId"
1322
1328
|"lightning::sign::KeyMaterial" |"lightning::chain::ClaimId"
@@ -1343,9 +1349,8 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1343
1349
"[u8]" if is_ref => Some ( ( "crate::c_types::u8slice::from_slice(" , ")" ) ) ,
1344
1350
"[usize]" if is_ref => Some ( ( "crate::c_types::usizeslice::from_slice(" , ")" ) ) ,
1345
1351
1346
- "bitcoin::blockdata::block::BlockHeader " if is_ref => Some ( ( "{ let mut s = [0u8; 80]; s[..].copy_from_slice(&::bitcoin::consensus::encode::serialize(" , ")); s }" ) ) ,
1352
+ "bitcoin::blockdata::block::Header " if is_ref => Some ( ( "{ let mut s = [0u8; 80]; s[..].copy_from_slice(&::bitcoin::consensus::encode::serialize(" , ")); s }" ) ) ,
1347
1353
"bitcoin::blockdata::block::Block" if is_ref => Some ( ( "::bitcoin::consensus::encode::serialize(" , ")" ) ) ,
1348
- "bitcoin::hash_types::Txid" => None ,
1349
1354
1350
1355
_ => None ,
1351
1356
} . map ( |s| s. to_owned ( ) )
@@ -1405,8 +1410,8 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1405
1410
"bitcoin::secp256k1::Scalar" if !is_ref => Some ( "crate::c_types::BigEndianScalar::from_rust(&" ) ,
1406
1411
"bitcoin::secp256k1::ecdh::SharedSecret" if !is_ref => Some ( "crate::c_types::ThirtyTwoBytes { data: " ) ,
1407
1412
1408
- "bitcoin::blockdata::script::Script" |"bitcoin::Script" if is_ref => Some ( "crate::c_types::u8slice::from_slice(& " ) ,
1409
- "bitcoin::blockdata::script::Script " |"bitcoin::Script" if !is_ref => Some ( "" ) ,
1413
+ "bitcoin::blockdata::script::Script" |"bitcoin::Script" => Some ( "crate::c_types::u8slice::from_slice(" ) ,
1414
+ "bitcoin::blockdata::script::ScriptBuf " |"bitcoin::ScriptBuf" => Some ( "" ) ,
1410
1415
"bitcoin::blockdata::transaction::Transaction" |"bitcoin::Transaction" if is_ref => Some ( "crate::c_types::Transaction::from_bitcoin(" ) ,
1411
1416
"bitcoin::blockdata::transaction::Transaction" |"bitcoin::Transaction" => Some ( "crate::c_types::Transaction::from_bitcoin(&" ) ,
1412
1417
"bitcoin::Witness" if is_ref => Some ( "crate::c_types::Witness::from_bitcoin(" ) ,
@@ -1417,27 +1422,27 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1417
1422
"bitcoin::TxOut" |"bitcoin::blockdata::transaction::TxOut" if !is_ref => Some ( "crate::c_types::TxOut::from_rust(&" ) ,
1418
1423
"bitcoin::TxOut" |"bitcoin::blockdata::transaction::TxOut" if is_ref => Some ( "crate::c_types::TxOut::from_rust(" ) ,
1419
1424
"bitcoin::network::constants::Network" => Some ( "crate::bitcoin::network::Network::from_bitcoin(" ) ,
1420
- "bitcoin::util::address::WitnessVersion" => Some ( "" ) ,
1421
- "bitcoin::blockdata::block::BlockHeader" if is_ref => Some ( "&local_" ) ,
1425
+ "bitcoin::address::WitnessVersion" => Some ( "" ) ,
1426
+ "bitcoin::address::WitnessProgram" => Some ( "crate::c_types::WitnessProgram::from_bitcoin(" ) ,
1427
+ "bitcoin::blockdata::block::Header" if is_ref => Some ( "&local_" ) ,
1422
1428
"bitcoin::blockdata::block::Block" if is_ref => Some ( "crate::c_types::u8slice::from_slice(&local_" ) ,
1423
1429
1424
- "bitcoin::PackedLockTime" | "bitcoin:: blockdata::locktime::PackedLockTime " => Some ( "" ) ,
1430
+ "bitcoin::blockdata::locktime::absolute::LockTime " => Some ( "" ) ,
1425
1431
1426
- "bitcoin::psbt::PartiallySignedTransaction" if !is_ref => Some ( "::bitcoin::consensus::encode::serialize(&" ) ,
1427
-
1428
- "bitcoin::hash_types::Txid" if !is_ref => Some ( "crate::c_types::ThirtyTwoBytes { data: " ) ,
1432
+ "bitcoin::psbt::PartiallySignedTransaction" if !is_ref => Some ( "" ) ,
1429
1433
1430
1434
"bitcoin::PubkeyHash" |"bitcoin::hash_types::PubkeyHash" |
1431
1435
"bitcoin::hash_types::WPubkeyHash" |"bitcoin::hash_types::WScriptHash" |
1432
1436
"bitcoin::ScriptHash" |"bitcoin::hash_types::ScriptHash"
1433
- if !is_ref => Some ( "crate::c_types::TwentyBytes { data: " ) ,
1437
+ if !is_ref => Some ( "crate::c_types::TwentyBytes { data: * " ) ,
1434
1438
1435
1439
// Newtypes that we just expose in their original form.
1436
- "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" |"bitcoin::hash_types::BlockHash" |"bitcoin_hashes ::sha256::Hash" |"bitcoin::blockdata::constants::ChainHash"
1440
+ "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" |"bitcoin::hash_types::BlockHash" |"bitcoin::hashes ::sha256::Hash" |"bitcoin::blockdata::constants::ChainHash"
1437
1441
if is_ref => Some ( "" ) ,
1438
- "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" |"bitcoin::hash_types::BlockHash" |"bitcoin_hashes ::sha256::Hash" |"bitcoin::blockdata::constants::ChainHash"
1439
- if !is_ref => Some ( "crate::c_types::ThirtyTwoBytes { data: " ) ,
1442
+ "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" |"bitcoin::hash_types::BlockHash" |"bitcoin::hashes ::sha256::Hash" |"bitcoin::blockdata::constants::ChainHash"
1443
+ if !is_ref => Some ( "crate::c_types::ThirtyTwoBytes { data: * " ) ,
1440
1444
"bitcoin::secp256k1::Message" if !is_ref => Some ( "crate::c_types::ThirtyTwoBytes { data: " ) ,
1445
+ "bitcoin::secp256k1::Message" if is_ref => Some ( "" ) ,
1441
1446
"lightning::ln::PaymentHash" |"lightning::ln::PaymentPreimage" |"lightning::ln::PaymentSecret"
1442
1447
|"lightning::ln::channelmanager::PaymentId" |"lightning::ln::channelmanager::InterceptId"
1443
1448
|"lightning::sign::KeyMaterial" |"lightning::chain::ClaimId"
@@ -1508,37 +1513,36 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1508
1513
"bitcoin::secp256k1::Scalar" if !is_ref => Some ( ")" ) ,
1509
1514
"bitcoin::secp256k1::ecdh::SharedSecret" if !is_ref => Some ( ".secret_bytes() }" ) ,
1510
1515
1511
- "bitcoin::blockdata::script::Script" |"bitcoin::Script" if is_ref => Some ( "[..])" ) ,
1512
- "bitcoin::blockdata::script::Script" |"bitcoin::Script" if !is_ref => Some ( ".into_bytes().into()" ) ,
1516
+ "bitcoin::blockdata::script::Script" |"bitcoin::Script" => Some ( ".as_ref())" ) ,
1517
+ "bitcoin::blockdata::script::ScriptBuf" |"bitcoin::ScriptBuf" if is_ref => Some ( ".as_bytes().to_vec().into()" ) ,
1518
+ "bitcoin::blockdata::script::ScriptBuf" |"bitcoin::ScriptBuf" if !is_ref => Some ( ".to_bytes().into()" ) ,
1513
1519
"bitcoin::blockdata::transaction::Transaction" |"bitcoin::Transaction" => Some ( ")" ) ,
1514
1520
"bitcoin::Witness" => Some ( ")" ) ,
1515
1521
"bitcoin::OutPoint" |"bitcoin::blockdata::transaction::OutPoint" => Some ( ")" ) ,
1516
1522
"bitcoin::TxIn" |"bitcoin::blockdata::transaction::TxIn" if !is_ref => Some ( ")" ) ,
1517
1523
"bitcoin::TxOut" |"bitcoin::blockdata::transaction::TxOut" => Some ( ")" ) ,
1518
1524
"bitcoin::network::constants::Network" => Some ( ")" ) ,
1519
- "bitcoin::util::address::WitnessVersion" => Some ( ".into()" ) ,
1520
- "bitcoin::blockdata::block::BlockHeader" if is_ref => Some ( "" ) ,
1525
+ "bitcoin::address::WitnessVersion" => Some ( ".into()" ) ,
1526
+ "bitcoin::address::WitnessProgram" => Some ( ")" ) ,
1527
+ "bitcoin::blockdata::block::Header" if is_ref => Some ( "" ) ,
1521
1528
"bitcoin::blockdata::block::Block" if is_ref => Some ( ")" ) ,
1522
1529
1523
- "bitcoin::PackedLockTime" |"bitcoin::blockdata::locktime::PackedLockTime" => Some ( ".0" ) ,
1524
-
1525
- "bitcoin::psbt::PartiallySignedTransaction" if !is_ref => Some ( ").into()" ) ,
1530
+ "bitcoin::blockdata::locktime::absolute::LockTime" => Some ( ".to_consensus_u32()" ) ,
1526
1531
1527
- "bitcoin::hash_types::Txid " if !is_ref => Some ( ".into_inner() } " ) ,
1532
+ "bitcoin::psbt::PartiallySignedTransaction " if !is_ref => Some ( ".serialize().into() " ) ,
1528
1533
1529
1534
"bitcoin::PubkeyHash" |"bitcoin::hash_types::PubkeyHash" |
1530
1535
"bitcoin::hash_types::WPubkeyHash" |"bitcoin::hash_types::WScriptHash" |
1531
1536
"bitcoin::ScriptHash" |"bitcoin::hash_types::ScriptHash"
1532
- if !is_ref => Some ( ".as_hash().into_inner () }" ) ,
1537
+ if !is_ref => Some ( ".as_ref () }" ) ,
1533
1538
1534
1539
// Newtypes that we just expose in their original form.
1535
- "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" |"bitcoin::hash_types::BlockHash" |"bitcoin_hashes::sha256::Hash"
1536
- if is_ref => Some ( ".as_inner()" ) ,
1537
- "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" |"bitcoin::hash_types::BlockHash" |"bitcoin_hashes::sha256::Hash"
1538
- if !is_ref => Some ( ".into_inner() }" ) ,
1539
- "bitcoin::blockdata::constants::ChainHash" if is_ref => Some ( ".as_bytes()" ) ,
1540
- "bitcoin::blockdata::constants::ChainHash" if !is_ref => Some ( ".to_bytes() }" ) ,
1540
+ "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" |"bitcoin::hash_types::BlockHash" |"bitcoin::hashes::sha256::Hash" |"bitcoin::blockdata::constants::ChainHash"
1541
+ if is_ref => Some ( ".as_ref()" ) ,
1542
+ "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" |"bitcoin::hash_types::BlockHash" |"bitcoin::hashes::sha256::Hash" |"bitcoin::blockdata::constants::ChainHash"
1543
+ if !is_ref => Some ( ".as_ref() }" ) ,
1541
1544
"bitcoin::secp256k1::Message" if !is_ref => Some ( ".as_ref().clone() }" ) ,
1545
+ "bitcoin::secp256k1::Message" if is_ref => Some ( ".as_ref()" ) ,
1542
1546
"lightning::ln::PaymentHash" |"lightning::ln::PaymentPreimage" |"lightning::ln::PaymentSecret"
1543
1547
|"lightning::ln::channelmanager::PaymentId" |"lightning::ln::channelmanager::InterceptId"
1544
1548
|"lightning::sign::KeyMaterial" |"lightning::chain::ClaimId"
0 commit comments