From ecd28c5438784a2f6e0a561386d037af99a00f92 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 3 Oct 2022 21:15:58 +0000 Subject: [PATCH] Add a convinience constructor for the new BigEndianScalar --- lightning-c-bindings/src/c_types/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lightning-c-bindings/src/c_types/mod.rs b/lightning-c-bindings/src/c_types/mod.rs index 0c46581..3f8c900 100644 --- a/lightning-c-bindings/src/c_types/mod.rs +++ b/lightning-c-bindings/src/c_types/mod.rs @@ -166,6 +166,12 @@ impl BigEndianScalar { } } +#[no_mangle] +/// Convenience function for constructing a new BigEndianScalar +pub extern "C" fn BigEndianScalar_new(big_endian_bytes: ThirtyTwoBytes) -> BigEndianScalar { + BigEndianScalar { big_endian_bytes: big_endian_bytes.data } +} + #[repr(C)] #[derive(Copy, Clone)] /// Represents an error returned from libsecp256k1 during validation of some secp256k1 data -- 2.39.5