From: Matt Corallo Date: Thu, 3 Mar 2022 03:20:07 +0000 (+0000) Subject: Implement `Clone` for `SecretKey` X-Git-Tag: v0.0.105.1^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=5f6a53d54a93ba52f9f06f1a43f615facad6f471;p=ldk-c-bindings Implement `Clone` for `SecretKey` --- diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index aebeb48..346f588 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -723,6 +723,7 @@ fn initial_clonable_types() -> HashSet { let mut res = HashSet::new(); res.insert("crate::c_types::u5".to_owned()); res.insert("crate::c_types::ThirtyTwoBytes".to_owned()); + res.insert("crate::c_types::SecretKey".to_owned()); res.insert("crate::c_types::PublicKey".to_owned()); res.insert("crate::c_types::Transaction".to_owned()); res.insert("crate::c_types::TxOut".to_owned()); diff --git a/lightning-c-bindings/src/c_types/mod.rs b/lightning-c-bindings/src/c_types/mod.rs index 0bd976b..f31d55b 100644 --- a/lightning-c-bindings/src/c_types/mod.rs +++ b/lightning-c-bindings/src/c_types/mod.rs @@ -67,6 +67,7 @@ impl PublicKey { } #[repr(C)] +#[derive(Clone)] /// Represents a valid secp256k1 secret key serialized as a 32 byte array. pub struct SecretKey { /// The bytes of the secret key