Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / ChannelHandshakeConfig.java
index bf53b65c972409d66b33d207d19cc81ffd18c208..e4b3e944ffe9afbb5e4042e99bc7a647844d03d0 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;
 
 
 /**
@@ -116,9 +117,10 @@ public class ChannelHandshakeConfig extends CommonBase {
        /**
         * Constructs a new ChannelHandshakeConfig given each field
         */
-       public static ChannelHandshakeConfig constructor_new(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg) {
+       public static ChannelHandshakeConfig of(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg) {
                long ret = bindings.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
-               ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               ChannelHandshakeConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelHandshakeConfig(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
@@ -128,7 +130,8 @@ public class ChannelHandshakeConfig extends CommonBase {
         */
        public ChannelHandshakeConfig clone() {
                long ret = bindings.ChannelHandshakeConfig_clone(this.ptr);
-               ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               ChannelHandshakeConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelHandshakeConfig(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -136,9 +139,10 @@ public class ChannelHandshakeConfig extends CommonBase {
        /**
         * Creates a "default" ChannelHandshakeConfig. See struct and individual field documentaiton for details on which values are used.
         */
-       public static ChannelHandshakeConfig constructor_default() {
+       public static ChannelHandshakeConfig with_default() {
                long ret = bindings.ChannelHandshakeConfig_default();
-               ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               ChannelHandshakeConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelHandshakeConfig(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }