Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / InitFeatures.java
index 1844618d57e0c2e7f149f47845961cb9b45054cb..cdc9a58b489a397384cacb78d4bfae82c1e238be 100644 (file)
@@ -4,6 +4,7 @@ import org.ldk.impl.bindings;
 import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
+import javax.annotation.Nullable;
 
 
 /**
@@ -29,12 +30,18 @@ public class InitFeatures extends CommonBase {
                return ret;
        }
 
+       long clone_ptr() {
+               long ret = bindings.InitFeatures_clone_ptr(this.ptr);
+               return ret;
+       }
+
        /**
         * Creates a copy of the InitFeatures
         */
        public InitFeatures clone() {
                long ret = bindings.InitFeatures_clone(this.ptr);
-               InitFeatures ret_hu_conv = new InitFeatures(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new InitFeatures(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -44,7 +51,8 @@ public class InitFeatures extends CommonBase {
         */
        public static InitFeatures empty() {
                long ret = bindings.InitFeatures_empty();
-               InitFeatures ret_hu_conv = new InitFeatures(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new InitFeatures(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
@@ -54,11 +62,21 @@ public class InitFeatures extends CommonBase {
         */
        public static InitFeatures known() {
                long ret = bindings.InitFeatures_known();
-               InitFeatures ret_hu_conv = new InitFeatures(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new InitFeatures(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
+       /**
+        * Returns true if this `Features` object contains unknown feature flags which are set as
+        * \"required\".
+        */
+       public boolean requires_unknown_bits() {
+               boolean ret = bindings.InitFeatures_requires_unknown_bits(this.ptr);
+               return ret;
+       }
+
        /**
         * Returns whether the `payment_secret` feature is supported.
         */
@@ -80,6 +98,7 @@ public class InitFeatures extends CommonBase {
         */
        public static Result_InitFeaturesDecodeErrorZ read(byte[] ser) {
                long ret = bindings.InitFeatures_read(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
                Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }