+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.is_public = val;
+}
+/// The smallest value HTLC (in msat) we will accept, for this channel. This field
+/// is only `None` for `ChannelDetails` objects serialized prior to LDK 0.0.107
+#[no_mangle]
+pub extern "C" fn ChannelDetails_get_inbound_htlc_minimum_msat(this_ptr: &ChannelDetails) -> crate::c_types::derived::COption_u64Z {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().inbound_htlc_minimum_msat;
+ let mut local_inner_val = if inner_val.is_none() { crate::c_types::derived::COption_u64Z::None } else { crate::c_types::derived::COption_u64Z::Some( { inner_val.unwrap() }) };
+ local_inner_val
+}
+/// The smallest value HTLC (in msat) we will accept, for this channel. This field
+/// is only `None` for `ChannelDetails` objects serialized prior to LDK 0.0.107
+#[no_mangle]
+pub extern "C" fn ChannelDetails_set_inbound_htlc_minimum_msat(this_ptr: &mut ChannelDetails, mut val: crate::c_types::derived::COption_u64Z) {
+ let mut local_val = if val.is_some() { Some( { val.take() }) } else { None };
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.inbound_htlc_minimum_msat = local_val;
+}
+/// The largest value HTLC (in msat) we currently will accept, for this channel.
+#[no_mangle]
+pub extern "C" fn ChannelDetails_get_inbound_htlc_maximum_msat(this_ptr: &ChannelDetails) -> crate::c_types::derived::COption_u64Z {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().inbound_htlc_maximum_msat;
+ let mut local_inner_val = if inner_val.is_none() { crate::c_types::derived::COption_u64Z::None } else { crate::c_types::derived::COption_u64Z::Some( { inner_val.unwrap() }) };
+ local_inner_val
+}
+/// The largest value HTLC (in msat) we currently will accept, for this channel.
+#[no_mangle]
+pub extern "C" fn ChannelDetails_set_inbound_htlc_maximum_msat(this_ptr: &mut ChannelDetails, mut val: crate::c_types::derived::COption_u64Z) {
+ let mut local_val = if val.is_some() { Some( { val.take() }) } else { None };
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.inbound_htlc_maximum_msat = local_val;
+}
+/// Set of configurable parameters that affect channel operation.
+///
+/// This field is only `None` for `ChannelDetails` objects serialized prior to LDK 0.0.109.
+///
+/// Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+#[no_mangle]
+pub extern "C" fn ChannelDetails_get_config(this_ptr: &ChannelDetails) -> crate::lightning::util::config::ChannelConfig {
+ let mut inner_val = &mut this_ptr.get_native_mut_ref().config;
+ let mut local_inner_val = crate::lightning::util::config::ChannelConfig { inner: unsafe { (if inner_val.is_none() { core::ptr::null() } else { ObjOps::nonnull_ptr_to_inner( { (inner_val.as_ref().unwrap()) }) } as *const lightning::util::config::ChannelConfig<>) as *mut _ }, is_owned: false };
+ local_inner_val
+}
+/// Set of configurable parameters that affect channel operation.
+///
+/// This field is only `None` for `ChannelDetails` objects serialized prior to LDK 0.0.109.
+///
+/// Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+#[no_mangle]
+pub extern "C" fn ChannelDetails_set_config(this_ptr: &mut ChannelDetails, mut val: crate::lightning::util::config::ChannelConfig) {
+ let mut local_val = if val.inner.is_null() { None } else { Some( { *unsafe { Box::from_raw(val.take_inner()) } }) };
+ unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.config = local_val;
+}
+/// Constructs a new ChannelDetails given each field
+#[must_use]
+#[no_mangle]
+pub extern "C" fn ChannelDetails_new(mut channel_id_arg: crate::c_types::ThirtyTwoBytes, mut counterparty_arg: crate::lightning::ln::channelmanager::ChannelCounterparty, mut funding_txo_arg: crate::lightning::chain::transaction::OutPoint, mut channel_type_arg: crate::lightning::ln::features::ChannelTypeFeatures, mut short_channel_id_arg: crate::c_types::derived::COption_u64Z, mut outbound_scid_alias_arg: crate::c_types::derived::COption_u64Z, mut inbound_scid_alias_arg: crate::c_types::derived::COption_u64Z, mut channel_value_satoshis_arg: u64, mut unspendable_punishment_reserve_arg: crate::c_types::derived::COption_u64Z, mut user_channel_id_arg: u64, mut balance_msat_arg: u64, mut outbound_capacity_msat_arg: u64, mut next_outbound_htlc_limit_msat_arg: u64, mut inbound_capacity_msat_arg: u64, mut confirmations_required_arg: crate::c_types::derived::COption_u32Z, mut force_close_spend_delay_arg: crate::c_types::derived::COption_u16Z, mut is_outbound_arg: bool, mut is_channel_ready_arg: bool, mut is_usable_arg: bool, mut is_public_arg: bool, mut inbound_htlc_minimum_msat_arg: crate::c_types::derived::COption_u64Z, mut inbound_htlc_maximum_msat_arg: crate::c_types::derived::COption_u64Z, mut config_arg: crate::lightning::util::config::ChannelConfig) -> ChannelDetails {
+ let mut local_funding_txo_arg = if funding_txo_arg.inner.is_null() { None } else { Some( { *unsafe { Box::from_raw(funding_txo_arg.take_inner()) } }) };
+ let mut local_channel_type_arg = if channel_type_arg.inner.is_null() { None } else { Some( { *unsafe { Box::from_raw(channel_type_arg.take_inner()) } }) };
+ let mut local_short_channel_id_arg = if short_channel_id_arg.is_some() { Some( { short_channel_id_arg.take() }) } else { None };
+ let mut local_outbound_scid_alias_arg = if outbound_scid_alias_arg.is_some() { Some( { outbound_scid_alias_arg.take() }) } else { None };
+ let mut local_inbound_scid_alias_arg = if inbound_scid_alias_arg.is_some() { Some( { inbound_scid_alias_arg.take() }) } else { None };
+ let mut local_unspendable_punishment_reserve_arg = if unspendable_punishment_reserve_arg.is_some() { Some( { unspendable_punishment_reserve_arg.take() }) } else { None };
+ let mut local_confirmations_required_arg = if confirmations_required_arg.is_some() { Some( { confirmations_required_arg.take() }) } else { None };
+ let mut local_force_close_spend_delay_arg = if force_close_spend_delay_arg.is_some() { Some( { force_close_spend_delay_arg.take() }) } else { None };
+ let mut local_inbound_htlc_minimum_msat_arg = if inbound_htlc_minimum_msat_arg.is_some() { Some( { inbound_htlc_minimum_msat_arg.take() }) } else { None };
+ let mut local_inbound_htlc_maximum_msat_arg = if inbound_htlc_maximum_msat_arg.is_some() { Some( { inbound_htlc_maximum_msat_arg.take() }) } else { None };
+ let mut local_config_arg = if config_arg.inner.is_null() { None } else { Some( { *unsafe { Box::from_raw(config_arg.take_inner()) } }) };
+ ChannelDetails { inner: ObjOps::heap_alloc(nativeChannelDetails {
+ channel_id: channel_id_arg.data,
+ counterparty: *unsafe { Box::from_raw(counterparty_arg.take_inner()) },
+ funding_txo: local_funding_txo_arg,
+ channel_type: local_channel_type_arg,
+ short_channel_id: local_short_channel_id_arg,
+ outbound_scid_alias: local_outbound_scid_alias_arg,
+ inbound_scid_alias: local_inbound_scid_alias_arg,
+ channel_value_satoshis: channel_value_satoshis_arg,
+ unspendable_punishment_reserve: local_unspendable_punishment_reserve_arg,
+ user_channel_id: user_channel_id_arg,
+ balance_msat: balance_msat_arg,
+ outbound_capacity_msat: outbound_capacity_msat_arg,
+ next_outbound_htlc_limit_msat: next_outbound_htlc_limit_msat_arg,
+ inbound_capacity_msat: inbound_capacity_msat_arg,
+ confirmations_required: local_confirmations_required_arg,
+ force_close_spend_delay: local_force_close_spend_delay_arg,
+ is_outbound: is_outbound_arg,
+ is_channel_ready: is_channel_ready_arg,
+ is_usable: is_usable_arg,
+ is_public: is_public_arg,
+ inbound_htlc_minimum_msat: local_inbound_htlc_minimum_msat_arg,
+ inbound_htlc_maximum_msat: local_inbound_htlc_maximum_msat_arg,
+ config: local_config_arg,
+ }), is_owned: true }