Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / SignOrCreationError.java
index 918d862e8f09acf4dbc1e24aa5c9fb9f802d41fd..8273e9b157ff26766dba334d8ef3e4772aea4ab7 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;
 
 
 /**
@@ -46,18 +47,40 @@ public class SignOrCreationError extends CommonBase {
         */
        public SignOrCreationError clone() {
                long ret = bindings.SignOrCreationError_clone(this.ptr);
+               if (ret >= 0 && ret <= 4096) { return null; }
                SignOrCreationError ret_hu_conv = SignOrCreationError.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new SignError-variant SignOrCreationError
+        */
+       public static SignOrCreationError sign_error() {
+               long ret = bindings.SignOrCreationError_sign_error();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               SignOrCreationError ret_hu_conv = SignOrCreationError.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new CreationError-variant SignOrCreationError
+        */
+       public static SignOrCreationError creation_error(org.ldk.enums.CreationError a) {
+               long ret = bindings.SignOrCreationError_creation_error(a);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               SignOrCreationError ret_hu_conv = SignOrCreationError.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
        /**
         * Checks if two SignOrCreationErrors contain equal inner contents.
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(SignOrCreationError b) {
                boolean ret = bindings.SignOrCreationError_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
-               this.ptrs_to.add(b);
                return ret;
        }