Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / UpdateFee.java
index 0edfefcf99140de04527a43e9687d8df9305d987..d5f5a6e64bf175a16f3e316b94fb23724dab6426 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;
 
 
 /**
@@ -51,9 +52,10 @@ public class UpdateFee extends CommonBase {
        /**
         * Constructs a new UpdateFee given each field
         */
-       public static UpdateFee constructor_new(byte[] channel_id_arg, int feerate_per_kw_arg) {
+       public static UpdateFee of(byte[] channel_id_arg, int feerate_per_kw_arg) {
                long ret = bindings.UpdateFee_new(channel_id_arg, feerate_per_kw_arg);
-               UpdateFee ret_hu_conv = new UpdateFee(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               UpdateFee ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new UpdateFee(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
@@ -63,7 +65,8 @@ public class UpdateFee extends CommonBase {
         */
        public UpdateFee clone() {
                long ret = bindings.UpdateFee_clone(this.ptr);
-               UpdateFee ret_hu_conv = new UpdateFee(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               UpdateFee ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new UpdateFee(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -79,8 +82,9 @@ public class UpdateFee extends CommonBase {
        /**
         * Read a UpdateFee from a byte array, created by UpdateFee_write
         */
-       public static Result_UpdateFeeDecodeErrorZ constructor_read(byte[] ser) {
+       public static Result_UpdateFeeDecodeErrorZ read(byte[] ser) {
                long ret = bindings.UpdateFee_read(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
                Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }