+ /**
+ * The available outbound capacity for sending HTLCs to the remote peer. This does not include
+ * any pending HTLCs which are not yet fully resolved (and, thus, who's balance is not
+ * available for inclusion in new outbound HTLCs). This further does not include any pending
+ * outgoing HTLCs which are awaiting some other resolution to be sent.
+ *
+ * This value is not exact. Due to various in-flight changes, feerate changes, and our
+ * conflict-avoidance policy, exactly this amount is not likely to be spendable. However, we
+ * should be able to spend nearly this amount.
+ */
+ public void set_outbound_capacity_msat(long val) {
+ bindings.ChannelDetails_set_outbound_capacity_msat(this.ptr, val);
+ }
+
+ /**
+ * The available inbound capacity for the remote peer to send HTLCs to us. This does not
+ * include any pending HTLCs which are not yet fully resolved (and, thus, who's balance is not
+ * available for inclusion in new inbound HTLCs).
+ * Note that there are some corner cases not fully handled here, so the actual available
+ * inbound capacity may be slightly higher than this.
+ *
+ * This value is not exact. Due to various in-flight changes, feerate changes, and our
+ * counterparty's conflict-avoidance policy, exactly this amount is not likely to be spendable.
+ * However, our counterparty should be able to spend nearly this amount.
+ */
+ public long get_inbound_capacity_msat() {
+ long ret = bindings.ChannelDetails_get_inbound_capacity_msat(this.ptr);
+ return ret;
+ }
+
+ /**
+ * The available inbound capacity for the remote peer to send HTLCs to us. This does not
+ * include any pending HTLCs which are not yet fully resolved (and, thus, who's balance is not
+ * available for inclusion in new inbound HTLCs).
+ * Note that there are some corner cases not fully handled here, so the actual available
+ * inbound capacity may be slightly higher than this.
+ *
+ * This value is not exact. Due to various in-flight changes, feerate changes, and our
+ * counterparty's conflict-avoidance policy, exactly this amount is not likely to be spendable.
+ * However, our counterparty should be able to spend nearly this amount.
+ */
+ public void set_inbound_capacity_msat(long val) {
+ bindings.ChannelDetails_set_inbound_capacity_msat(this.ptr, 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
+ */
+ public Option_u32Z get_confirmations_required() {
+ long ret = bindings.ChannelDetails_get_confirmations_required(this.ptr);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * 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
+ */
+ public void set_confirmations_required(Option_u32Z val) {
+ bindings.ChannelDetails_set_confirmations_required(this.ptr, val.ptr);
+ }
+
+ /**
+ * 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.
+ */
+ public Option_u16Z get_force_close_spend_delay() {
+ long ret = bindings.ChannelDetails_get_force_close_spend_delay(this.ptr);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Option_u16Z ret_hu_conv = Option_u16Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * 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.
+ */
+ public void set_force_close_spend_delay(Option_u16Z val) {
+ bindings.ChannelDetails_set_force_close_spend_delay(this.ptr, val.ptr);
+ }
+
+ /**
+ * True if the channel was initiated (and thus funded) by us.
+ */
+ public boolean get_is_outbound() {
+ boolean ret = bindings.ChannelDetails_get_is_outbound(this.ptr);