+ /**
+ * True if the channel was initiated (and thus funded) by us.
+ */
+ public void set_is_outbound(boolean val) {
+ bindings.ChannelDetails_set_is_outbound(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * True if the channel is confirmed, funding_locked messages have been exchanged, and the
+ * channel is not currently being shut down. `funding_locked` 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
+ */
+ public boolean get_is_funding_locked() {
+ boolean ret = bindings.ChannelDetails_get_is_funding_locked(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * True if the channel is confirmed, funding_locked messages have been exchanged, and the
+ * channel is not currently being shut down. `funding_locked` 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
+ */
+ public void set_is_funding_locked(boolean val) {
+ bindings.ChannelDetails_set_is_funding_locked(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * True if the channel is (a) confirmed and funding_locked 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_funding_locked`.
+ */
+ public boolean get_is_usable() {
+ boolean ret = bindings.ChannelDetails_get_is_usable(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * True if the channel is (a) confirmed and funding_locked 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_funding_locked`.
+ */
+ public void set_is_usable(boolean val) {
+ bindings.ChannelDetails_set_is_usable(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * True if this channel is (or will be) publicly-announced.
+ */
+ public boolean get_is_public() {
+ boolean ret = bindings.ChannelDetails_get_is_public(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * True if this channel is (or will be) publicly-announced.
+ */
+ public void set_is_public(boolean val) {
+ bindings.ChannelDetails_set_is_public(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Constructs a new ChannelDetails given each field
+ */
+ public static ChannelDetails of(byte[] channel_id_arg, ChannelCounterparty counterparty_arg, OutPoint funding_txo_arg, Option_u64Z short_channel_id_arg, long channel_value_satoshis_arg, Option_u64Z unspendable_punishment_reserve_arg, long user_channel_id_arg, long balance_msat_arg, long outbound_capacity_msat_arg, long inbound_capacity_msat_arg, Option_u32Z confirmations_required_arg, Option_u16Z force_close_spend_delay_arg, boolean is_outbound_arg, boolean is_funding_locked_arg, boolean is_usable_arg, boolean is_public_arg) {
+ long ret = bindings.ChannelDetails_new(InternalUtils.check_arr_len(channel_id_arg, 32), counterparty_arg == null ? 0 : counterparty_arg.ptr & ~1, funding_txo_arg == null ? 0 : funding_txo_arg.ptr & ~1, short_channel_id_arg.ptr, channel_value_satoshis_arg, unspendable_punishment_reserve_arg.ptr, user_channel_id_arg, balance_msat_arg, outbound_capacity_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg.ptr, force_close_spend_delay_arg.ptr, is_outbound_arg, is_funding_locked_arg, is_usable_arg, is_public_arg);
+ Reference.reachabilityFence(channel_id_arg);
+ Reference.reachabilityFence(counterparty_arg);
+ Reference.reachabilityFence(funding_txo_arg);
+ Reference.reachabilityFence(short_channel_id_arg);
+ Reference.reachabilityFence(channel_value_satoshis_arg);
+ Reference.reachabilityFence(unspendable_punishment_reserve_arg);
+ Reference.reachabilityFence(user_channel_id_arg);
+ Reference.reachabilityFence(balance_msat_arg);
+ Reference.reachabilityFence(outbound_capacity_msat_arg);
+ Reference.reachabilityFence(inbound_capacity_msat_arg);
+ Reference.reachabilityFence(confirmations_required_arg);
+ Reference.reachabilityFence(force_close_spend_delay_arg);
+ Reference.reachabilityFence(is_outbound_arg);
+ Reference.reachabilityFence(is_funding_locked_arg);
+ Reference.reachabilityFence(is_usable_arg);
+ Reference.reachabilityFence(is_public_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ ChannelDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelDetails(null, ret); }
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;