From: Matt Corallo Date: Mon, 4 Jan 2021 19:13:59 +0000 (-0500) Subject: [bindings] Expose secp256k1::Message as ThirtyTwoBytes X-Git-Tag: v0.0.13~38^2~9 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=bec92d3eaa97dd9b06527716e128b0315b41eb72;p=rust-lightning [bindings] Expose secp256k1::Message as ThirtyTwoBytes --- diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index 0349b1125..ac3efb627 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -414,6 +414,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { "bitcoin::hash_types::Txid" if !is_ref => Some("crate::c_types::ThirtyTwoBytes"), "bitcoin::hash_types::BlockHash" if is_ref => Some("*const [u8; 32]"), "bitcoin::hash_types::BlockHash" if !is_ref => Some("crate::c_types::ThirtyTwoBytes"), + "bitcoin::secp256k1::Message" if !is_ref => Some("crate::c_types::ThirtyTwoBytes"), "ln::channelmanager::PaymentHash" if is_ref => Some("*const [u8; 32]"), "ln::channelmanager::PaymentHash" if !is_ref => Some("crate::c_types::ThirtyTwoBytes"), "ln::channelmanager::PaymentPreimage" if is_ref => Some("*const [u8; 32]"), @@ -624,6 +625,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { "bitcoin::hash_types::Txid" if is_ref => Some(""), "bitcoin::hash_types::BlockHash" if is_ref => Some(""), "bitcoin::hash_types::BlockHash" => Some("crate::c_types::ThirtyTwoBytes { data: "), + "bitcoin::secp256k1::Message" if !is_ref => Some("crate::c_types::ThirtyTwoBytes { data: "), "ln::channelmanager::PaymentHash" if is_ref => Some("&"), "ln::channelmanager::PaymentHash" if !is_ref => Some("crate::c_types::ThirtyTwoBytes { data: "), "ln::channelmanager::PaymentPreimage" if is_ref => Some("&"), @@ -687,6 +689,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { "bitcoin::hash_types::Txid" if is_ref => Some(".as_inner()"), "bitcoin::hash_types::BlockHash" if is_ref => Some(".as_inner()"), "bitcoin::hash_types::BlockHash" => Some(".into_inner() }"), + "bitcoin::secp256k1::Message" if !is_ref => Some(".as_ref().clone() }"), "ln::channelmanager::PaymentHash" if is_ref => Some(".0"), "ln::channelmanager::PaymentHash" => Some(".0 }"), "ln::channelmanager::PaymentPreimage" if is_ref => Some(".0"),