[Java] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / src / main / java / org / ldk / structs / ClosingSigned.java
index bcedc0db1c4661bc495ba0a895697fb87423af29..f2bb6b5a2984c5b904d2b72cdf267e08c008e192 100644 (file)
@@ -25,19 +25,23 @@ public class ClosingSigned extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.ClosingSigned_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.ClosingSigned_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.ClosingSigned_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.ClosingSigned_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -110,8 +114,8 @@ public class ClosingSigned extends CommonBase {
         * 
         * Note that fee_range_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static ClosingSigned of(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, @Nullable org.ldk.structs.ClosingSignedFeeRange fee_range_arg) {
-               long ret = bindings.ClosingSigned_new(InternalUtils.check_arr_len(channel_id_arg, 32), fee_satoshis_arg, InternalUtils.check_arr_len(signature_arg, 64), fee_range_arg == null ? 0 : fee_range_arg.ptr);
+       public static ClosingSigned of(org.ldk.structs.ChannelId channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, @Nullable org.ldk.structs.ClosingSignedFeeRange fee_range_arg) {
+               long ret = bindings.ClosingSigned_new(channel_id_arg.ptr, fee_satoshis_arg, InternalUtils.check_arr_len(signature_arg, 64), fee_range_arg == null ? 0 : fee_range_arg.ptr);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(fee_satoshis_arg);
                Reference.reachabilityFence(signature_arg);
@@ -119,6 +123,7 @@ public class ClosingSigned extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ClosingSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ClosingSigned(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(fee_range_arg); };
                return ret_hu_conv;
        }
@@ -159,7 +164,7 @@ public class ClosingSigned extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ClosingSigned b) {
-               boolean ret = bindings.ClosingSigned_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ClosingSigned_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };