Skip to content

Commit bec92d3

Browse files
committed
[bindings] Expose secp256k1::Message as ThirtyTwoBytes
1 parent c6d2697 commit bec92d3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

c-bindings-gen/src/types.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
414414
"bitcoin::hash_types::Txid" if !is_ref => Some("crate::c_types::ThirtyTwoBytes"),
415415
"bitcoin::hash_types::BlockHash" if is_ref => Some("*const [u8; 32]"),
416416
"bitcoin::hash_types::BlockHash" if !is_ref => Some("crate::c_types::ThirtyTwoBytes"),
417+
"bitcoin::secp256k1::Message" if !is_ref => Some("crate::c_types::ThirtyTwoBytes"),
417418
"ln::channelmanager::PaymentHash" if is_ref => Some("*const [u8; 32]"),
418419
"ln::channelmanager::PaymentHash" if !is_ref => Some("crate::c_types::ThirtyTwoBytes"),
419420
"ln::channelmanager::PaymentPreimage" if is_ref => Some("*const [u8; 32]"),
@@ -624,6 +625,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
624625
"bitcoin::hash_types::Txid" if is_ref => Some(""),
625626
"bitcoin::hash_types::BlockHash" if is_ref => Some(""),
626627
"bitcoin::hash_types::BlockHash" => Some("crate::c_types::ThirtyTwoBytes { data: "),
628+
"bitcoin::secp256k1::Message" if !is_ref => Some("crate::c_types::ThirtyTwoBytes { data: "),
627629
"ln::channelmanager::PaymentHash" if is_ref => Some("&"),
628630
"ln::channelmanager::PaymentHash" if !is_ref => Some("crate::c_types::ThirtyTwoBytes { data: "),
629631
"ln::channelmanager::PaymentPreimage" if is_ref => Some("&"),
@@ -687,6 +689,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
687689
"bitcoin::hash_types::Txid" if is_ref => Some(".as_inner()"),
688690
"bitcoin::hash_types::BlockHash" if is_ref => Some(".as_inner()"),
689691
"bitcoin::hash_types::BlockHash" => Some(".into_inner() }"),
692+
"bitcoin::secp256k1::Message" if !is_ref => Some(".as_ref().clone() }"),
690693
"ln::channelmanager::PaymentHash" if is_ref => Some(".0"),
691694
"ln::channelmanager::PaymentHash" => Some(".0 }"),
692695
"ln::channelmanager::PaymentPreimage" if is_ref => Some(".0"),

0 commit comments

Comments
 (0)