[Java] Update auto-generated Java bindings
[ldk-java] / src / main / java / org / ldk / structs / ChannelDetails.java
index 8babf959a0081478f22420060df4cfa61f2813d8..342cc52847631a735cc1210ebc9720d1393e96a7 100644 (file)
@@ -51,7 +51,7 @@ public class ChannelDetails extends CommonBase {
                long ret = bindings.ChannelDetails_get_counterparty(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               ChannelCounterparty ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelCounterparty(null, ret); }
+               org.ldk.structs.ChannelCounterparty ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelCounterparty(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -60,9 +60,10 @@ public class ChannelDetails extends CommonBase {
         * Parameters which apply to our counterparty. See individual fields for more information.
         */
        public void set_counterparty(ChannelCounterparty val) {
-               bindings.ChannelDetails_set_counterparty(this.ptr, val == null ? 0 : val.ptr & ~1);
+               bindings.ChannelDetails_set_counterparty(this.ptr, val == null ? 0 : val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               this.ptrs_to.add(val);
        }
 
        /**
@@ -79,7 +80,7 @@ public class ChannelDetails extends CommonBase {
                long ret = bindings.ChannelDetails_get_funding_txo(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new OutPoint(null, ret); }
+               org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -94,20 +95,64 @@ public class ChannelDetails extends CommonBase {
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public void set_funding_txo(@Nullable OutPoint val) {
-               bindings.ChannelDetails_set_funding_txo(this.ptr, val == null ? 0 : val.ptr & ~1);
+               bindings.ChannelDetails_set_funding_txo(this.ptr, val == null ? 0 : val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               this.ptrs_to.add(val);
+       }
+
+       /**
+        * The features which this channel operates with. See individual features for more info.
+        * 
+        * `None` until negotiation completes and the channel type is finalized.
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
+       public ChannelTypeFeatures get_channel_type() {
+               long ret = bindings.ChannelDetails_get_channel_type(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); }
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * The features which this channel operates with. See individual features for more info.
+        * 
+        * `None` until negotiation completes and the channel type is finalized.
+        * 
+        * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       public void set_channel_type(@Nullable ChannelTypeFeatures val) {
+               bindings.ChannelDetails_set_channel_type(this.ptr, val == null ? 0 : val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               this.ptrs_to.add(val);
        }
 
        /**
         * The position of the funding transaction in the chain. None if the funding transaction has
         * not yet been confirmed and the channel fully opened.
+        * 
+        * Note that if [`inbound_scid_alias`] is set, it must be used for invoices and inbound
+        * payments instead of this. See [`get_inbound_payment_scid`].
+        * 
+        * For channels with [`confirmations_required`] set to `Some(0)`, [`outbound_scid_alias`] may
+        * be used in place of this in outbound routes. See [`get_outbound_payment_scid`].
+        * 
+        * [`inbound_scid_alias`]: Self::inbound_scid_alias
+        * [`outbound_scid_alias`]: Self::outbound_scid_alias
+        * [`get_inbound_payment_scid`]: Self::get_inbound_payment_scid
+        * [`get_outbound_payment_scid`]: Self::get_outbound_payment_scid
+        * [`confirmations_required`]: Self::confirmations_required
         */
        public Option_u64Z get_short_channel_id() {
                long ret = bindings.ChannelDetails_get_short_channel_id(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+               org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -115,6 +160,18 @@ public class ChannelDetails extends CommonBase {
        /**
         * The position of the funding transaction in the chain. None if the funding transaction has
         * not yet been confirmed and the channel fully opened.
+        * 
+        * Note that if [`inbound_scid_alias`] is set, it must be used for invoices and inbound
+        * payments instead of this. See [`get_inbound_payment_scid`].
+        * 
+        * For channels with [`confirmations_required`] set to `Some(0)`, [`outbound_scid_alias`] may
+        * be used in place of this in outbound routes. See [`get_outbound_payment_scid`].
+        * 
+        * [`inbound_scid_alias`]: Self::inbound_scid_alias
+        * [`outbound_scid_alias`]: Self::outbound_scid_alias
+        * [`get_inbound_payment_scid`]: Self::get_inbound_payment_scid
+        * [`get_outbound_payment_scid`]: Self::get_outbound_payment_scid
+        * [`confirmations_required`]: Self::confirmations_required
         */
        public void set_short_channel_id(Option_u64Z val) {
                bindings.ChannelDetails_set_short_channel_id(this.ptr, val.ptr);
@@ -122,6 +179,80 @@ public class ChannelDetails extends CommonBase {
                Reference.reachabilityFence(val);
        }
 
+       /**
+        * An optional [`short_channel_id`] alias for this channel, randomly generated by us and
+        * usable in place of [`short_channel_id`] to reference the channel in outbound routes when
+        * the channel has not yet been confirmed (as long as [`confirmations_required`] is
+        * `Some(0)`).
+        * 
+        * This will be `None` as long as the channel is not available for routing outbound payments.
+        * 
+        * [`short_channel_id`]: Self::short_channel_id
+        * [`confirmations_required`]: Self::confirmations_required
+        */
+       public Option_u64Z get_outbound_scid_alias() {
+               long ret = bindings.ChannelDetails_get_outbound_scid_alias(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * An optional [`short_channel_id`] alias for this channel, randomly generated by us and
+        * usable in place of [`short_channel_id`] to reference the channel in outbound routes when
+        * the channel has not yet been confirmed (as long as [`confirmations_required`] is
+        * `Some(0)`).
+        * 
+        * This will be `None` as long as the channel is not available for routing outbound payments.
+        * 
+        * [`short_channel_id`]: Self::short_channel_id
+        * [`confirmations_required`]: Self::confirmations_required
+        */
+       public void set_outbound_scid_alias(Option_u64Z val) {
+               bindings.ChannelDetails_set_outbound_scid_alias(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * An optional [`short_channel_id`] alias for this channel, randomly generated by our
+        * counterparty and usable in place of [`short_channel_id`] in invoice route hints. Our
+        * counterparty will recognize the alias provided here in place of the [`short_channel_id`]
+        * when they see a payment to be routed to us.
+        * 
+        * Our counterparty may choose to rotate this value at any time, though will always recognize
+        * previous values for inbound payment forwarding.
+        * 
+        * [`short_channel_id`]: Self::short_channel_id
+        */
+       public Option_u64Z get_inbound_scid_alias() {
+               long ret = bindings.ChannelDetails_get_inbound_scid_alias(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * An optional [`short_channel_id`] alias for this channel, randomly generated by our
+        * counterparty and usable in place of [`short_channel_id`] in invoice route hints. Our
+        * counterparty will recognize the alias provided here in place of the [`short_channel_id`]
+        * when they see a payment to be routed to us.
+        * 
+        * Our counterparty may choose to rotate this value at any time, though will always recognize
+        * previous values for inbound payment forwarding.
+        * 
+        * [`short_channel_id`]: Self::short_channel_id
+        */
+       public void set_inbound_scid_alias(Option_u64Z val) {
+               bindings.ChannelDetails_set_inbound_scid_alias(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
        /**
         * The value, in satoshis, of this channel as appears in the funding output
         */
@@ -155,7 +286,7 @@ public class ChannelDetails extends CommonBase {
                long ret = bindings.ChannelDetails_get_unspendable_punishment_reserve(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+               org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -267,6 +398,34 @@ public class ChannelDetails extends CommonBase {
                Reference.reachabilityFence(val);
        }
 
+       /**
+        * The available outbound capacity for sending a single HTLC to the remote peer. This is
+        * similar to [`ChannelDetails::outbound_capacity_msat`] but it may be further restricted by
+        * the current state and per-HTLC limit(s). This is intended for use when routing, allowing us
+        * to use a limit as close as possible to the HTLC limit we can currently send.
+        * 
+        * See also [`ChannelDetails::balance_msat`] and [`ChannelDetails::outbound_capacity_msat`].
+        */
+       public long get_next_outbound_htlc_limit_msat() {
+               long ret = bindings.ChannelDetails_get_next_outbound_htlc_limit_msat(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The available outbound capacity for sending a single HTLC to the remote peer. This is
+        * similar to [`ChannelDetails::outbound_capacity_msat`] but it may be further restricted by
+        * the current state and per-HTLC limit(s). This is intended for use when routing, allowing us
+        * to use a limit as close as possible to the HTLC limit we can currently send.
+        * 
+        * See also [`ChannelDetails::balance_msat`] and [`ChannelDetails::outbound_capacity_msat`].
+        */
+       public void set_next_outbound_htlc_limit_msat(long val) {
+               bindings.ChannelDetails_set_next_outbound_htlc_limit_msat(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(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, whose balance is not
@@ -318,7 +477,7 @@ public class ChannelDetails extends CommonBase {
                long ret = bindings.ChannelDetails_get_confirmations_required(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
+               org.ldk.structs.Option_u32Z ret_hu_conv = org.ldk.structs.Option_u32Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -355,7 +514,7 @@ public class ChannelDetails extends CommonBase {
                long ret = bindings.ChannelDetails_get_force_close_spend_delay(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               Option_u16Z ret_hu_conv = Option_u16Z.constr_from_ptr(ret);
+               org.ldk.structs.Option_u16Z ret_hu_conv = org.ldk.structs.Option_u16Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -394,40 +553,40 @@ public class ChannelDetails extends CommonBase {
        }
 
        /**
-        * 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
+        * 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
         */
-       public boolean get_is_funding_locked() {
-               boolean ret = bindings.ChannelDetails_get_is_funding_locked(this.ptr);
+       public boolean get_is_channel_ready() {
+               boolean ret = bindings.ChannelDetails_get_is_channel_ready(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
+        * 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
         */
-       public void set_is_funding_locked(boolean val) {
-               bindings.ChannelDetails_set_is_funding_locked(this.ptr, val);
+       public void set_is_channel_ready(boolean val) {
+               bindings.ChannelDetails_set_is_channel_ready(this.ptr, val);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
        }
 
        /**
-        * True if the channel is (a) confirmed and funding_locked messages have been exchanged, (b)
+        * 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_funding_locked`.
+        * This is a strict superset of `is_channel_ready`.
         */
        public boolean get_is_usable() {
                boolean ret = bindings.ChannelDetails_get_is_usable(this.ptr);
@@ -436,10 +595,10 @@ public class ChannelDetails extends CommonBase {
        }
 
        /**
-        * True if the channel is (a) confirmed and funding_locked messages have been exchanged, (b)
+        * 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_funding_locked`.
+        * This is a strict superset of `is_channel_ready`.
         */
        public void set_is_usable(boolean val) {
                bindings.ChannelDetails_set_is_usable(this.ptr, val);
@@ -465,30 +624,116 @@ public class ChannelDetails extends CommonBase {
                Reference.reachabilityFence(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
+        */
+       public Option_u64Z get_inbound_htlc_minimum_msat() {
+               long ret = bindings.ChannelDetails_get_inbound_htlc_minimum_msat(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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
+        */
+       public void set_inbound_htlc_minimum_msat(Option_u64Z val) {
+               bindings.ChannelDetails_set_inbound_htlc_minimum_msat(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The largest value HTLC (in msat) we currently will accept, for this channel.
+        */
+       public Option_u64Z get_inbound_htlc_maximum_msat() {
+               long ret = bindings.ChannelDetails_get_inbound_htlc_maximum_msat(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * The largest value HTLC (in msat) we currently will accept, for this channel.
+        */
+       public void set_inbound_htlc_maximum_msat(Option_u64Z val) {
+               bindings.ChannelDetails_set_inbound_htlc_maximum_msat(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(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
+        */
+       @Nullable
+       public ChannelConfig get_config() {
+               long ret = bindings.ChannelDetails_get_config(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelConfig(null, ret); }
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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
+        */
+       public void set_config(@Nullable ChannelConfig val) {
+               bindings.ChannelDetails_set_config(this.ptr, val == null ? 0 : val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               this.ptrs_to.add(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);
+       public static ChannelDetails of(byte[] channel_id_arg, ChannelCounterparty counterparty_arg, OutPoint funding_txo_arg, ChannelTypeFeatures channel_type_arg, Option_u64Z short_channel_id_arg, Option_u64Z outbound_scid_alias_arg, Option_u64Z inbound_scid_alias_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 next_outbound_htlc_limit_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_channel_ready_arg, boolean is_usable_arg, boolean is_public_arg, Option_u64Z inbound_htlc_minimum_msat_arg, Option_u64Z inbound_htlc_maximum_msat_arg, ChannelConfig config_arg) {
+               long ret = bindings.ChannelDetails_new(InternalUtils.check_arr_len(channel_id_arg, 32), counterparty_arg == null ? 0 : counterparty_arg.ptr, funding_txo_arg == null ? 0 : funding_txo_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr, short_channel_id_arg.ptr, outbound_scid_alias_arg.ptr, inbound_scid_alias_arg.ptr, channel_value_satoshis_arg, unspendable_punishment_reserve_arg.ptr, user_channel_id_arg, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg.ptr, force_close_spend_delay_arg.ptr, is_outbound_arg, is_channel_ready_arg, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg.ptr, inbound_htlc_maximum_msat_arg.ptr, config_arg == null ? 0 : config_arg.ptr);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(counterparty_arg);
                Reference.reachabilityFence(funding_txo_arg);
+               Reference.reachabilityFence(channel_type_arg);
                Reference.reachabilityFence(short_channel_id_arg);
+               Reference.reachabilityFence(outbound_scid_alias_arg);
+               Reference.reachabilityFence(inbound_scid_alias_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(next_outbound_htlc_limit_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_channel_ready_arg);
                Reference.reachabilityFence(is_usable_arg);
                Reference.reachabilityFence(is_public_arg);
+               Reference.reachabilityFence(inbound_htlc_minimum_msat_arg);
+               Reference.reachabilityFence(inbound_htlc_maximum_msat_arg);
+               Reference.reachabilityFence(config_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); }
+               org.ldk.structs.ChannelDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelDetails(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(counterparty_arg);
+               ret_hu_conv.ptrs_to.add(funding_txo_arg);
+               ret_hu_conv.ptrs_to.add(channel_type_arg);
+               ret_hu_conv.ptrs_to.add(config_arg);
                return ret_hu_conv;
        }
 
@@ -505,9 +750,63 @@ public class ChannelDetails extends CommonBase {
                long ret = bindings.ChannelDetails_clone(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               ChannelDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelDetails(null, ret); }
+               org.ldk.structs.ChannelDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelDetails(null, ret); }
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Gets the current SCID which should be used to identify this channel for inbound payments.
+        * This should be used for providing invoice hints or in any other context where our
+        * counterparty will forward a payment to us.
+        * 
+        * This is either the [`ChannelDetails::inbound_scid_alias`], if set, or the
+        * [`ChannelDetails::short_channel_id`]. See those for more information.
+        */
+       public Option_u64Z get_inbound_payment_scid() {
+               long ret = bindings.ChannelDetails_get_inbound_payment_scid(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
+       /**
+        * Gets the current SCID which should be used to identify this channel for outbound payments.
+        * This should be used in [`Route`]s to describe the first hop or in other contexts where
+        * we're sending or forwarding a payment outbound over this channel.
+        * 
+        * This is either the [`ChannelDetails::short_channel_id`], if set, or the
+        * [`ChannelDetails::outbound_scid_alias`]. See those for more information.
+        */
+       public Option_u64Z get_outbound_payment_scid() {
+               long ret = bindings.ChannelDetails_get_outbound_payment_scid(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Serialize the ChannelDetails object into a byte array which can be read by ChannelDetails_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.ChannelDetails_write(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Read a ChannelDetails from a byte array, created by ChannelDetails_write
+        */
+       public static Result_ChannelDetailsDecodeErrorZ read(byte[] ser) {
+               long ret = bindings.ChannelDetails_read(ser);
+               Reference.reachabilityFence(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_ChannelDetailsDecodeErrorZ ret_hu_conv = Result_ChannelDetailsDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }