+use lightning::ln::msgs::Stfu as nativeStfuImport;
+pub(crate) type nativeStfu = nativeStfuImport;
+
+/// An stfu (quiescence) message to be sent by or received from the stfu initiator.
+#[must_use]
+#[repr(C)]
+pub struct Stfu {
+ /// A pointer to the opaque Rust object.
+
+ /// Nearly everywhere, inner must be non-null, however in places where
+ /// the Rust equivalent takes an Option, it may be set to null to indicate None.
+ pub inner: *mut nativeStfu,
+ /// Indicates that this is the only struct which contains the same pointer.
+
+ /// Rust functions which take ownership of an object provided via an argument require
+ /// this to be true and invalidate the object pointed to by inner.
+ pub is_owned: bool,
+}
+
+impl Drop for Stfu {
+ fn drop(&mut self) {
+ if self.is_owned && !<*mut nativeStfu>::is_null(self.inner) {
+ let _ = unsafe { Box::from_raw(ObjOps::untweak_ptr(self.inner)) };
+ }
+ }
+}
+/// Frees any resources used by the Stfu, if is_owned is set and inner is non-NULL.
+#[no_mangle]
+pub extern "C" fn Stfu_free(this_obj: Stfu) { }
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn Stfu_free_void(this_ptr: *mut c_void) {
+ let _ = unsafe { Box::from_raw(this_ptr as *mut nativeStfu) };
+}
+#[allow(unused)]
+impl Stfu {
+ pub(crate) fn get_native_ref(&self) -> &'static nativeStfu {
+ unsafe { &*ObjOps::untweak_ptr(self.inner) }
+ }
+ pub(crate) fn get_native_mut_ref(&self) -> &'static mut nativeStfu {
+ unsafe { &mut *ObjOps::untweak_ptr(self.inner) }
+ }
+ /// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
+ pub(crate) fn take_inner(mut self) -> *mut nativeStfu {
+ assert!(self.is_owned);
+ let ret = ObjOps::untweak_ptr(self.inner);
+ self.inner = core::ptr::null_mut();
+ ret
+ }
+}
+/// The channel ID where quiescence is intended
+#[no_mangle]
+pub extern "C" fn Stfu_get_channel_id(this_ptr: &Stfu) -> *const [u8; 32] {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().channel_id;
+ &inner_val.0
+}
+/// The channel ID where quiescence is intended
+#[no_mangle]
+pub extern "C" fn Stfu_set_channel_id(this_ptr: &mut Stfu, mut val: crate::c_types::ThirtyTwoBytes) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.channel_id = ::lightning::ln::ChannelId(val.data);
+}
+/// Initiator flag, 1 if initiating, 0 if replying to an stfu.
+#[no_mangle]
+pub extern "C" fn Stfu_get_initiator(this_ptr: &Stfu) -> u8 {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().initiator;
+ *inner_val
+}
+/// Initiator flag, 1 if initiating, 0 if replying to an stfu.
+#[no_mangle]
+pub extern "C" fn Stfu_set_initiator(this_ptr: &mut Stfu, mut val: u8) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.initiator = val;
+}
+/// Constructs a new Stfu given each field
+#[must_use]
+#[no_mangle]
+pub extern "C" fn Stfu_new(mut channel_id_arg: crate::c_types::ThirtyTwoBytes, mut initiator_arg: u8) -> Stfu {
+ Stfu { inner: ObjOps::heap_alloc(nativeStfu {
+ channel_id: ::lightning::ln::ChannelId(channel_id_arg.data),
+ initiator: initiator_arg,
+ }), is_owned: true }
+}
+impl Clone for Stfu {
+ fn clone(&self) -> Self {
+ Self {
+ inner: if <*mut nativeStfu>::is_null(self.inner) { core::ptr::null_mut() } else {
+ ObjOps::heap_alloc(unsafe { &*ObjOps::untweak_ptr(self.inner) }.clone()) },
+ is_owned: true,
+ }
+ }
+}
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn Stfu_clone_void(this_ptr: *const c_void) -> *mut c_void {
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeStfu)).clone() })) as *mut c_void
+}
+#[no_mangle]
+/// Creates a copy of the Stfu
+pub extern "C" fn Stfu_clone(orig: &Stfu) -> Stfu {
+ orig.clone()
+}
+/// Get a string which allows debug introspection of a Stfu object
+pub extern "C" fn Stfu_debug_str_void(o: *const c_void) -> Str {
+ alloc::format!("{:?}", unsafe { o as *const crate::lightning::ln::msgs::Stfu }).into()}
+/// Checks if two Stfus contain equal inner contents.
+/// This ignores pointers and is_owned flags and looks at the values in fields.
+/// Two objects with NULL inner values will be considered "equal" here.
+#[no_mangle]
+pub extern "C" fn Stfu_eq(a: &Stfu, b: &Stfu) -> bool {
+ if a.inner == b.inner { return true; }
+ if a.inner.is_null() || b.inner.is_null() { return false; }
+ if a.get_native_ref() == b.get_native_ref() { true } else { false }
+}
+
+use lightning::ln::msgs::Splice as nativeSpliceImport;
+pub(crate) type nativeSplice = nativeSpliceImport;
+
+/// A splice message to be sent by or received from the stfu initiator (splice initiator).
+#[must_use]
+#[repr(C)]
+pub struct Splice {
+ /// A pointer to the opaque Rust object.
+
+ /// Nearly everywhere, inner must be non-null, however in places where
+ /// the Rust equivalent takes an Option, it may be set to null to indicate None.
+ pub inner: *mut nativeSplice,
+ /// Indicates that this is the only struct which contains the same pointer.
+
+ /// Rust functions which take ownership of an object provided via an argument require
+ /// this to be true and invalidate the object pointed to by inner.
+ pub is_owned: bool,
+}
+
+impl Drop for Splice {
+ fn drop(&mut self) {
+ if self.is_owned && !<*mut nativeSplice>::is_null(self.inner) {
+ let _ = unsafe { Box::from_raw(ObjOps::untweak_ptr(self.inner)) };
+ }
+ }
+}
+/// Frees any resources used by the Splice, if is_owned is set and inner is non-NULL.
+#[no_mangle]
+pub extern "C" fn Splice_free(this_obj: Splice) { }
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn Splice_free_void(this_ptr: *mut c_void) {
+ let _ = unsafe { Box::from_raw(this_ptr as *mut nativeSplice) };
+}
+#[allow(unused)]
+impl Splice {
+ pub(crate) fn get_native_ref(&self) -> &'static nativeSplice {
+ unsafe { &*ObjOps::untweak_ptr(self.inner) }
+ }
+ pub(crate) fn get_native_mut_ref(&self) -> &'static mut nativeSplice {
+ unsafe { &mut *ObjOps::untweak_ptr(self.inner) }
+ }
+ /// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
+ pub(crate) fn take_inner(mut self) -> *mut nativeSplice {
+ assert!(self.is_owned);
+ let ret = ObjOps::untweak_ptr(self.inner);
+ self.inner = core::ptr::null_mut();
+ ret
+ }
+}
+/// The channel ID where splicing is intended
+#[no_mangle]
+pub extern "C" fn Splice_get_channel_id(this_ptr: &Splice) -> *const [u8; 32] {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().channel_id;
+ &inner_val.0
+}
+/// The channel ID where splicing is intended
+#[no_mangle]
+pub extern "C" fn Splice_set_channel_id(this_ptr: &mut Splice, mut val: crate::c_types::ThirtyTwoBytes) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.channel_id = ::lightning::ln::ChannelId(val.data);
+}
+/// The genesis hash of the blockchain where the channel is intended to be spliced
+#[no_mangle]
+pub extern "C" fn Splice_get_chain_hash(this_ptr: &Splice) -> *const [u8; 32] {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().chain_hash;
+ inner_val.as_ref()
+}
+/// The genesis hash of the blockchain where the channel is intended to be spliced
+#[no_mangle]
+pub extern "C" fn Splice_set_chain_hash(this_ptr: &mut Splice, mut val: crate::c_types::ThirtyTwoBytes) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.chain_hash = ::bitcoin::blockdata::constants::ChainHash::from(&val.data);
+}
+/// The intended change in channel capacity: the amount to be added (positive value)
+/// or removed (negative value) by the sender (splice initiator) by splicing into/from the channel.
+#[no_mangle]
+pub extern "C" fn Splice_get_relative_satoshis(this_ptr: &Splice) -> i64 {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().relative_satoshis;
+ *inner_val
+}
+/// The intended change in channel capacity: the amount to be added (positive value)
+/// or removed (negative value) by the sender (splice initiator) by splicing into/from the channel.
+#[no_mangle]
+pub extern "C" fn Splice_set_relative_satoshis(this_ptr: &mut Splice, mut val: i64) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.relative_satoshis = val;
+}
+/// The feerate for the new funding transaction, set by the splice initiator
+#[no_mangle]
+pub extern "C" fn Splice_get_funding_feerate_perkw(this_ptr: &Splice) -> u32 {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().funding_feerate_perkw;
+ *inner_val
+}
+/// The feerate for the new funding transaction, set by the splice initiator
+#[no_mangle]
+pub extern "C" fn Splice_set_funding_feerate_perkw(this_ptr: &mut Splice, mut val: u32) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.funding_feerate_perkw = val;
+}
+/// The locktime for the new funding transaction
+#[no_mangle]
+pub extern "C" fn Splice_get_locktime(this_ptr: &Splice) -> u32 {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().locktime;
+ *inner_val
+}
+/// The locktime for the new funding transaction
+#[no_mangle]
+pub extern "C" fn Splice_set_locktime(this_ptr: &mut Splice, mut val: u32) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.locktime = val;
+}
+/// The key of the sender (splice initiator) controlling the new funding transaction
+#[no_mangle]
+pub extern "C" fn Splice_get_funding_pubkey(this_ptr: &Splice) -> crate::c_types::PublicKey {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().funding_pubkey;
+ crate::c_types::PublicKey::from_rust(&inner_val)
+}
+/// The key of the sender (splice initiator) controlling the new funding transaction
+#[no_mangle]
+pub extern "C" fn Splice_set_funding_pubkey(this_ptr: &mut Splice, mut val: crate::c_types::PublicKey) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.funding_pubkey = val.into_rust();
+}
+/// Constructs a new Splice given each field
+#[must_use]
+#[no_mangle]
+pub extern "C" fn Splice_new(mut channel_id_arg: crate::c_types::ThirtyTwoBytes, mut chain_hash_arg: crate::c_types::ThirtyTwoBytes, mut relative_satoshis_arg: i64, mut funding_feerate_perkw_arg: u32, mut locktime_arg: u32, mut funding_pubkey_arg: crate::c_types::PublicKey) -> Splice {
+ Splice { inner: ObjOps::heap_alloc(nativeSplice {
+ channel_id: ::lightning::ln::ChannelId(channel_id_arg.data),
+ chain_hash: ::bitcoin::blockdata::constants::ChainHash::from(&chain_hash_arg.data),
+ relative_satoshis: relative_satoshis_arg,
+ funding_feerate_perkw: funding_feerate_perkw_arg,
+ locktime: locktime_arg,
+ funding_pubkey: funding_pubkey_arg.into_rust(),
+ }), is_owned: true }
+}
+impl Clone for Splice {
+ fn clone(&self) -> Self {
+ Self {
+ inner: if <*mut nativeSplice>::is_null(self.inner) { core::ptr::null_mut() } else {
+ ObjOps::heap_alloc(unsafe { &*ObjOps::untweak_ptr(self.inner) }.clone()) },
+ is_owned: true,
+ }
+ }
+}
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn Splice_clone_void(this_ptr: *const c_void) -> *mut c_void {
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeSplice)).clone() })) as *mut c_void
+}
+#[no_mangle]
+/// Creates a copy of the Splice
+pub extern "C" fn Splice_clone(orig: &Splice) -> Splice {
+ orig.clone()
+}
+/// Get a string which allows debug introspection of a Splice object
+pub extern "C" fn Splice_debug_str_void(o: *const c_void) -> Str {
+ alloc::format!("{:?}", unsafe { o as *const crate::lightning::ln::msgs::Splice }).into()}
+/// Checks if two Splices contain equal inner contents.
+/// This ignores pointers and is_owned flags and looks at the values in fields.
+/// Two objects with NULL inner values will be considered "equal" here.
+#[no_mangle]
+pub extern "C" fn Splice_eq(a: &Splice, b: &Splice) -> bool {
+ if a.inner == b.inner { return true; }
+ if a.inner.is_null() || b.inner.is_null() { return false; }
+ if a.get_native_ref() == b.get_native_ref() { true } else { false }
+}
+
+use lightning::ln::msgs::SpliceAck as nativeSpliceAckImport;
+pub(crate) type nativeSpliceAck = nativeSpliceAckImport;
+
+/// A splice_ack message to be received by or sent to the splice initiator.
+///
+#[must_use]
+#[repr(C)]
+pub struct SpliceAck {
+ /// A pointer to the opaque Rust object.
+
+ /// Nearly everywhere, inner must be non-null, however in places where
+ /// the Rust equivalent takes an Option, it may be set to null to indicate None.
+ pub inner: *mut nativeSpliceAck,
+ /// Indicates that this is the only struct which contains the same pointer.
+
+ /// Rust functions which take ownership of an object provided via an argument require
+ /// this to be true and invalidate the object pointed to by inner.
+ pub is_owned: bool,
+}
+
+impl Drop for SpliceAck {
+ fn drop(&mut self) {
+ if self.is_owned && !<*mut nativeSpliceAck>::is_null(self.inner) {
+ let _ = unsafe { Box::from_raw(ObjOps::untweak_ptr(self.inner)) };
+ }
+ }
+}
+/// Frees any resources used by the SpliceAck, if is_owned is set and inner is non-NULL.
+#[no_mangle]
+pub extern "C" fn SpliceAck_free(this_obj: SpliceAck) { }
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn SpliceAck_free_void(this_ptr: *mut c_void) {
+ let _ = unsafe { Box::from_raw(this_ptr as *mut nativeSpliceAck) };
+}
+#[allow(unused)]
+impl SpliceAck {
+ pub(crate) fn get_native_ref(&self) -> &'static nativeSpliceAck {
+ unsafe { &*ObjOps::untweak_ptr(self.inner) }
+ }
+ pub(crate) fn get_native_mut_ref(&self) -> &'static mut nativeSpliceAck {
+ unsafe { &mut *ObjOps::untweak_ptr(self.inner) }
+ }
+ /// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
+ pub(crate) fn take_inner(mut self) -> *mut nativeSpliceAck {
+ assert!(self.is_owned);
+ let ret = ObjOps::untweak_ptr(self.inner);
+ self.inner = core::ptr::null_mut();
+ ret
+ }
+}
+/// The channel ID where splicing is intended
+#[no_mangle]
+pub extern "C" fn SpliceAck_get_channel_id(this_ptr: &SpliceAck) -> *const [u8; 32] {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().channel_id;
+ &inner_val.0
+}
+/// The channel ID where splicing is intended
+#[no_mangle]
+pub extern "C" fn SpliceAck_set_channel_id(this_ptr: &mut SpliceAck, mut val: crate::c_types::ThirtyTwoBytes) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.channel_id = ::lightning::ln::ChannelId(val.data);
+}
+/// The genesis hash of the blockchain where the channel is intended to be spliced
+#[no_mangle]
+pub extern "C" fn SpliceAck_get_chain_hash(this_ptr: &SpliceAck) -> *const [u8; 32] {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().chain_hash;
+ inner_val.as_ref()
+}
+/// The genesis hash of the blockchain where the channel is intended to be spliced
+#[no_mangle]
+pub extern "C" fn SpliceAck_set_chain_hash(this_ptr: &mut SpliceAck, mut val: crate::c_types::ThirtyTwoBytes) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.chain_hash = ::bitcoin::blockdata::constants::ChainHash::from(&val.data);
+}
+/// The intended change in channel capacity: the amount to be added (positive value)
+/// or removed (negative value) by the sender (splice acceptor) by splicing into/from the channel.
+#[no_mangle]
+pub extern "C" fn SpliceAck_get_relative_satoshis(this_ptr: &SpliceAck) -> i64 {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().relative_satoshis;
+ *inner_val
+}
+/// The intended change in channel capacity: the amount to be added (positive value)
+/// or removed (negative value) by the sender (splice acceptor) by splicing into/from the channel.
+#[no_mangle]
+pub extern "C" fn SpliceAck_set_relative_satoshis(this_ptr: &mut SpliceAck, mut val: i64) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.relative_satoshis = val;
+}
+/// The key of the sender (splice acceptor) controlling the new funding transaction
+#[no_mangle]
+pub extern "C" fn SpliceAck_get_funding_pubkey(this_ptr: &SpliceAck) -> crate::c_types::PublicKey {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().funding_pubkey;
+ crate::c_types::PublicKey::from_rust(&inner_val)
+}
+/// The key of the sender (splice acceptor) controlling the new funding transaction
+#[no_mangle]
+pub extern "C" fn SpliceAck_set_funding_pubkey(this_ptr: &mut SpliceAck, mut val: crate::c_types::PublicKey) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.funding_pubkey = val.into_rust();
+}
+/// Constructs a new SpliceAck given each field
+#[must_use]
+#[no_mangle]
+pub extern "C" fn SpliceAck_new(mut channel_id_arg: crate::c_types::ThirtyTwoBytes, mut chain_hash_arg: crate::c_types::ThirtyTwoBytes, mut relative_satoshis_arg: i64, mut funding_pubkey_arg: crate::c_types::PublicKey) -> SpliceAck {
+ SpliceAck { inner: ObjOps::heap_alloc(nativeSpliceAck {
+ channel_id: ::lightning::ln::ChannelId(channel_id_arg.data),
+ chain_hash: ::bitcoin::blockdata::constants::ChainHash::from(&chain_hash_arg.data),
+ relative_satoshis: relative_satoshis_arg,
+ funding_pubkey: funding_pubkey_arg.into_rust(),
+ }), is_owned: true }
+}
+impl Clone for SpliceAck {
+ fn clone(&self) -> Self {
+ Self {
+ inner: if <*mut nativeSpliceAck>::is_null(self.inner) { core::ptr::null_mut() } else {
+ ObjOps::heap_alloc(unsafe { &*ObjOps::untweak_ptr(self.inner) }.clone()) },
+ is_owned: true,
+ }
+ }
+}
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn SpliceAck_clone_void(this_ptr: *const c_void) -> *mut c_void {
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeSpliceAck)).clone() })) as *mut c_void
+}
+#[no_mangle]
+/// Creates a copy of the SpliceAck
+pub extern "C" fn SpliceAck_clone(orig: &SpliceAck) -> SpliceAck {
+ orig.clone()
+}
+/// Get a string which allows debug introspection of a SpliceAck object
+pub extern "C" fn SpliceAck_debug_str_void(o: *const c_void) -> Str {
+ alloc::format!("{:?}", unsafe { o as *const crate::lightning::ln::msgs::SpliceAck }).into()}
+/// Checks if two SpliceAcks contain equal inner contents.
+/// This ignores pointers and is_owned flags and looks at the values in fields.
+/// Two objects with NULL inner values will be considered "equal" here.
+#[no_mangle]
+pub extern "C" fn SpliceAck_eq(a: &SpliceAck, b: &SpliceAck) -> bool {
+ if a.inner == b.inner { return true; }
+ if a.inner.is_null() || b.inner.is_null() { return false; }
+ if a.get_native_ref() == b.get_native_ref() { true } else { false }
+}
+
+use lightning::ln::msgs::SpliceLocked as nativeSpliceLockedImport;
+pub(crate) type nativeSpliceLocked = nativeSpliceLockedImport;
+
+/// A splice_locked message to be sent to or received from a peer.
+///
+#[must_use]
+#[repr(C)]
+pub struct SpliceLocked {
+ /// A pointer to the opaque Rust object.
+
+ /// Nearly everywhere, inner must be non-null, however in places where
+ /// the Rust equivalent takes an Option, it may be set to null to indicate None.
+ pub inner: *mut nativeSpliceLocked,
+ /// Indicates that this is the only struct which contains the same pointer.
+
+ /// Rust functions which take ownership of an object provided via an argument require
+ /// this to be true and invalidate the object pointed to by inner.
+ pub is_owned: bool,
+}
+
+impl Drop for SpliceLocked {
+ fn drop(&mut self) {
+ if self.is_owned && !<*mut nativeSpliceLocked>::is_null(self.inner) {
+ let _ = unsafe { Box::from_raw(ObjOps::untweak_ptr(self.inner)) };
+ }
+ }
+}
+/// Frees any resources used by the SpliceLocked, if is_owned is set and inner is non-NULL.
+#[no_mangle]
+pub extern "C" fn SpliceLocked_free(this_obj: SpliceLocked) { }
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn SpliceLocked_free_void(this_ptr: *mut c_void) {
+ let _ = unsafe { Box::from_raw(this_ptr as *mut nativeSpliceLocked) };
+}
+#[allow(unused)]
+impl SpliceLocked {
+ pub(crate) fn get_native_ref(&self) -> &'static nativeSpliceLocked {
+ unsafe { &*ObjOps::untweak_ptr(self.inner) }
+ }
+ pub(crate) fn get_native_mut_ref(&self) -> &'static mut nativeSpliceLocked {
+ unsafe { &mut *ObjOps::untweak_ptr(self.inner) }
+ }
+ /// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
+ pub(crate) fn take_inner(mut self) -> *mut nativeSpliceLocked {
+ assert!(self.is_owned);
+ let ret = ObjOps::untweak_ptr(self.inner);
+ self.inner = core::ptr::null_mut();
+ ret
+ }
+}
+/// The channel ID
+#[no_mangle]
+pub extern "C" fn SpliceLocked_get_channel_id(this_ptr: &SpliceLocked) -> *const [u8; 32] {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().channel_id;
+ &inner_val.0
+}
+/// The channel ID
+#[no_mangle]
+pub extern "C" fn SpliceLocked_set_channel_id(this_ptr: &mut SpliceLocked, mut val: crate::c_types::ThirtyTwoBytes) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.channel_id = ::lightning::ln::ChannelId(val.data);
+}
+/// Constructs a new SpliceLocked given each field
+#[must_use]
+#[no_mangle]
+pub extern "C" fn SpliceLocked_new(mut channel_id_arg: crate::c_types::ThirtyTwoBytes) -> SpliceLocked {
+ SpliceLocked { inner: ObjOps::heap_alloc(nativeSpliceLocked {
+ channel_id: ::lightning::ln::ChannelId(channel_id_arg.data),
+ }), is_owned: true }
+}
+impl Clone for SpliceLocked {
+ fn clone(&self) -> Self {
+ Self {
+ inner: if <*mut nativeSpliceLocked>::is_null(self.inner) { core::ptr::null_mut() } else {
+ ObjOps::heap_alloc(unsafe { &*ObjOps::untweak_ptr(self.inner) }.clone()) },
+ is_owned: true,
+ }
+ }
+}
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn SpliceLocked_clone_void(this_ptr: *const c_void) -> *mut c_void {
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeSpliceLocked)).clone() })) as *mut c_void
+}
+#[no_mangle]
+/// Creates a copy of the SpliceLocked
+pub extern "C" fn SpliceLocked_clone(orig: &SpliceLocked) -> SpliceLocked {
+ orig.clone()
+}
+/// Get a string which allows debug introspection of a SpliceLocked object
+pub extern "C" fn SpliceLocked_debug_str_void(o: *const c_void) -> Str {
+ alloc::format!("{:?}", unsafe { o as *const crate::lightning::ln::msgs::SpliceLocked }).into()}
+/// Checks if two SpliceLockeds contain equal inner contents.
+/// This ignores pointers and is_owned flags and looks at the values in fields.
+/// Two objects with NULL inner values will be considered "equal" here.
+#[no_mangle]
+pub extern "C" fn SpliceLocked_eq(a: &SpliceLocked, b: &SpliceLocked) -> bool {
+ if a.inner == b.inner { return true; }
+ if a.inner.is_null() || b.inner.is_null() { return false; }
+ if a.get_native_ref() == b.get_native_ref() { true } else { false }
+}
+