+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.inbound_capacity_msat = val;
+}
+/// The number of required confirmations on the funding transaction before the funding will be
+/// considered \"locked\". This number is selected by the channel fundee (i.e. us if
+/// [`is_outbound`] is *not* set), and can be selected for inbound channels with
+/// [`ChannelHandshakeConfig::minimum_depth`] or limited for outbound channels with
+/// [`ChannelHandshakeLimits::max_minimum_depth`].
+///
+/// This value will be `None` for outbound channels until the counterparty accepts the channel.
+///
+/// [`is_outbound`]: ChannelDetails::is_outbound
+/// [`ChannelHandshakeConfig::minimum_depth`]: crate::util::config::ChannelHandshakeConfig::minimum_depth
+/// [`ChannelHandshakeLimits::max_minimum_depth`]: crate::util::config::ChannelHandshakeLimits::max_minimum_depth
+#[no_mangle]
+pub extern "C" fn ChannelDetails_get_confirmations_required(this_ptr: &ChannelDetails) -> crate::c_types::derived::COption_u32Z {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().confirmations_required;
+ let mut local_inner_val = if inner_val.is_none() { crate::c_types::derived::COption_u32Z::None } else { crate::c_types::derived::COption_u32Z::Some( { inner_val.unwrap() }) };
+ local_inner_val
+}
+/// The number of required confirmations on the funding transaction before the funding will be
+/// considered \"locked\". This number is selected by the channel fundee (i.e. us if
+/// [`is_outbound`] is *not* set), and can be selected for inbound channels with
+/// [`ChannelHandshakeConfig::minimum_depth`] or limited for outbound channels with
+/// [`ChannelHandshakeLimits::max_minimum_depth`].
+///
+/// This value will be `None` for outbound channels until the counterparty accepts the channel.
+///
+/// [`is_outbound`]: ChannelDetails::is_outbound
+/// [`ChannelHandshakeConfig::minimum_depth`]: crate::util::config::ChannelHandshakeConfig::minimum_depth
+/// [`ChannelHandshakeLimits::max_minimum_depth`]: crate::util::config::ChannelHandshakeLimits::max_minimum_depth
+#[no_mangle]
+pub extern "C" fn ChannelDetails_set_confirmations_required(this_ptr: &mut ChannelDetails, mut val: crate::c_types::derived::COption_u32Z) {
+ let mut local_val = if val.is_some() { Some( { val.take() }) } else { None };
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.confirmations_required = local_val;
+}
+/// The number of blocks (after our commitment transaction confirms) that we will need to wait
+/// until we can claim our funds after we force-close the channel. During this time our
+/// counterparty is allowed to punish us if we broadcasted a stale state. If our counterparty
+/// force-closes the channel and broadcasts a commitment transaction we do not have to wait any
+/// time to claim our non-HTLC-encumbered funds.
+///
+/// This value will be `None` for outbound channels until the counterparty accepts the channel.
+#[no_mangle]
+pub extern "C" fn ChannelDetails_get_force_close_spend_delay(this_ptr: &ChannelDetails) -> crate::c_types::derived::COption_u16Z {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().force_close_spend_delay;
+ let mut local_inner_val = if inner_val.is_none() { crate::c_types::derived::COption_u16Z::None } else { crate::c_types::derived::COption_u16Z::Some( { inner_val.unwrap() }) };
+ local_inner_val
+}
+/// The number of blocks (after our commitment transaction confirms) that we will need to wait
+/// until we can claim our funds after we force-close the channel. During this time our
+/// counterparty is allowed to punish us if we broadcasted a stale state. If our counterparty
+/// force-closes the channel and broadcasts a commitment transaction we do not have to wait any
+/// time to claim our non-HTLC-encumbered funds.
+///
+/// This value will be `None` for outbound channels until the counterparty accepts the channel.
+#[no_mangle]
+pub extern "C" fn ChannelDetails_set_force_close_spend_delay(this_ptr: &mut ChannelDetails, mut val: crate::c_types::derived::COption_u16Z) {
+ let mut local_val = if val.is_some() { Some( { val.take() }) } else { None };
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.force_close_spend_delay = local_val;
+}
+/// True if the channel was initiated (and thus funded) by us.
+#[no_mangle]
+pub extern "C" fn ChannelDetails_get_is_outbound(this_ptr: &ChannelDetails) -> bool {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().is_outbound;
+ *inner_val
+}
+/// True if the channel was initiated (and thus funded) by us.
+#[no_mangle]
+pub extern "C" fn ChannelDetails_set_is_outbound(this_ptr: &mut ChannelDetails, mut val: bool) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.is_outbound = val;
+}
+/// True if the channel is confirmed, channel_ready messages have been exchanged, and the
+/// channel is not currently being shut down. `channel_ready` message exchange implies the
+/// required confirmation count has been reached (and we were connected to the peer at some
+/// point after the funding transaction received enough confirmations). The required
+/// confirmation count is provided in [`confirmations_required`].
+///
+/// [`confirmations_required`]: ChannelDetails::confirmations_required
+#[no_mangle]
+pub extern "C" fn ChannelDetails_get_is_channel_ready(this_ptr: &ChannelDetails) -> bool {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().is_channel_ready;
+ *inner_val
+}
+/// True if the channel is confirmed, channel_ready messages have been exchanged, and the
+/// channel is not currently being shut down. `channel_ready` message exchange implies the
+/// required confirmation count has been reached (and we were connected to the peer at some
+/// point after the funding transaction received enough confirmations). The required
+/// confirmation count is provided in [`confirmations_required`].
+///
+/// [`confirmations_required`]: ChannelDetails::confirmations_required
+#[no_mangle]
+pub extern "C" fn ChannelDetails_set_is_channel_ready(this_ptr: &mut ChannelDetails, mut val: bool) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.is_channel_ready = val;
+}
+/// True if the channel is (a) confirmed and channel_ready messages have been exchanged, (b)
+/// the peer is connected, and (c) the channel is not currently negotiating a shutdown.
+///
+/// This is a strict superset of `is_channel_ready`.
+#[no_mangle]
+pub extern "C" fn ChannelDetails_get_is_usable(this_ptr: &ChannelDetails) -> bool {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().is_usable;
+ *inner_val
+}
+/// True if the channel is (a) confirmed and channel_ready messages have been exchanged, (b)
+/// the peer is connected, and (c) the channel is not currently negotiating a shutdown.
+///
+/// This is a strict superset of `is_channel_ready`.
+#[no_mangle]
+pub extern "C" fn ChannelDetails_set_is_usable(this_ptr: &mut ChannelDetails, mut val: bool) {
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.is_usable = val;