Skip to content

Commit ecd28c5

Browse files
committed
Add a convinience constructor for the new BigEndianScalar
1 parent c96981b commit ecd28c5

File tree

1 file changed

+6
-0
lines changed
  • lightning-c-bindings/src/c_types

1 file changed

+6
-0
lines changed

lightning-c-bindings/src/c_types/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@ impl BigEndianScalar {
166166
}
167167
}
168168

169+
#[no_mangle]
170+
/// Convenience function for constructing a new BigEndianScalar
171+
pub extern "C" fn BigEndianScalar_new(big_endian_bytes: ThirtyTwoBytes) -> BigEndianScalar {
172+
BigEndianScalar { big_endian_bytes: big_endian_bytes.data }
173+
}
174+
169175
#[repr(C)]
170176
#[derive(Copy, Clone)]
171177
/// Represents an error returned from libsecp256k1 during validation of some secp256k1 data

0 commit comments

Comments
 (0)