From: Matt Corallo <649246+TheBlueMatt@users.noreply.github.com> Date: Thu, 3 Mar 2022 06:52:50 +0000 (+0000) Subject: Merge pull request #61 from TheBlueMatt/main X-Git-Tag: v0.0.105.1^0 X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=commitdiff_plain;h=11cd55b6baf2c94a44f0cd24774f0d822ff90d66;hp=18ac1ea0225fcf9d2073c1f7a03b13945572695d Merge pull request #61 from TheBlueMatt/main 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