Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / UpdateAddHTLC.java
index c0c56a16d2eff3b49757629118606e717c2209db..5e9e25a212872b47cfb5bdf4daf7737d691297e0 100644 (file)
@@ -31,7 +31,7 @@ public class UpdateAddHTLC extends CommonBase {
         * The channel ID
         */
        public void set_channel_id(byte[] val) {
-               bindings.UpdateAddHTLC_set_channel_id(this.ptr, val);
+               bindings.UpdateAddHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
        }
 
        /**
@@ -76,7 +76,7 @@ public class UpdateAddHTLC extends CommonBase {
         * The payment hash, the pre-image of which controls HTLC redemption
         */
        public void set_payment_hash(byte[] val) {
-               bindings.UpdateAddHTLC_set_payment_hash(this.ptr, val);
+               bindings.UpdateAddHTLC_set_payment_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
        }
 
        /**
@@ -94,13 +94,18 @@ public class UpdateAddHTLC extends CommonBase {
                bindings.UpdateAddHTLC_set_cltv_expiry(this.ptr, val);
        }
 
+       long clone_ptr() {
+               long ret = bindings.UpdateAddHTLC_clone_ptr(this.ptr);
+               return ret;
+       }
+
        /**
         * Creates a copy of the UpdateAddHTLC
         */
        public UpdateAddHTLC clone() {
                long ret = bindings.UpdateAddHTLC_clone(this.ptr);
-               if (ret >= 0 && ret < 1024) { return null; }
-               UpdateAddHTLC ret_hu_conv = new UpdateAddHTLC(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               UpdateAddHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new UpdateAddHTLC(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -118,7 +123,7 @@ public class UpdateAddHTLC extends CommonBase {
         */
        public static Result_UpdateAddHTLCDecodeErrorZ read(byte[] ser) {
                long ret = bindings.UpdateAddHTLC_read(ser);
-               if (ret >= 0 && ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }