Update auto-generated bindings
[ldk-c-bindings] / lightning-c-bindings / src / lightning / util / message_signing.rs
index 387f9984566fe22224e0d9b60f1d4c11f26791db..8e4dfc604e7aa8f202077e05ed5bc63adfaf8b31 100644 (file)
@@ -23,6 +23,7 @@
 //! <https://api.lightning.community/#signmessage>
 
 use alloc::str::FromStr;
+use alloc::string::String;
 use core::ffi::c_void;
 use core::convert::Infallible;
 use bitcoin::hashes::Hash;
@@ -34,7 +35,7 @@ use alloc::{vec::Vec, boxed::Box};
 /// A receiver knowing the PublicKey (e.g. the node's id) and the message can be sure that the signature was generated by the caller.
 /// Signatures are EC recoverable, meaning that given the message and the signature the PublicKey of the signer can be extracted.
 #[no_mangle]
-pub extern "C" fn sign(mut msg: crate::c_types::u8slice, sk: *const [u8; 32]) -> crate::c_types::derived::CResult_StringErrorZ {
+pub extern "C" fn sign(mut msg: crate::c_types::u8slice, sk: *const [u8; 32]) -> crate::c_types::derived::CResult_StrSecp256k1ErrorZ {
        let mut ret = lightning::util::message_signing::sign(msg.to_slice(), &::bitcoin::secp256k1::SecretKey::from_slice(&unsafe { *sk}[..]).unwrap());
        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::c_types::Secp256k1Error::from_rust(e) }).into() };
        local_ret
@@ -42,7 +43,7 @@ pub extern "C" fn sign(mut msg: crate::c_types::u8slice, sk: *const [u8; 32]) ->
 
 /// Recovers the PublicKey of the signer of the message given the message and the signature.
 #[no_mangle]
-pub extern "C" fn recover_pk(mut msg: crate::c_types::u8slice, mut sig: crate::c_types::Str) -> crate::c_types::derived::CResult_PublicKeyErrorZ {
+pub extern "C" fn recover_pk(mut msg: crate::c_types::u8slice, mut sig: crate::c_types::Str) -> crate::c_types::derived::CResult_PublicKeySecp256k1ErrorZ {
        let mut ret = lightning::util::message_signing::recover_pk(msg.to_slice(), sig.into_str());
        let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::c_types::PublicKey::from_rust(&o) }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::c_types::Secp256k1Error::from_rust(e) }).into() };
        local_ret