Update auto-generated bindings with new upstream.
[ldk-java] / src / main / java / org / ldk / structs / CommitmentSigned.java
index a29b4623976ced2947cb848dd9ee69a122cb1404..b14e1ca416d28204e5dfd9ba858120bc07850ff0 100644 (file)
@@ -14,13 +14,6 @@ public class CommitmentSigned extends CommonBase {
                if (ptr != 0) { bindings.CommitmentSigned_free(ptr); }
        }
 
-       public static CommitmentSigned constructor_clone(CommitmentSigned orig) {
-               long ret = bindings.CommitmentSigned_clone(orig == null ? 0 : orig.ptr & ~1);
-               CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(orig);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.CommitmentSigned_get_channel_id(this.ptr);
                return ret;
@@ -46,18 +39,25 @@ public class CommitmentSigned extends CommonBase {
        public static CommitmentSigned constructor_new(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg) {
                long ret = bindings.CommitmentSigned_new(channel_id_arg, signature_arg, htlc_signatures_arg);
                CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
-       public byte[] write(CommitmentSigned obj) {
-               byte[] ret = bindings.CommitmentSigned_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public CommitmentSigned clone() {
+               long ret = bindings.CommitmentSigned_clone(this.ptr);
+               CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public byte[] write() {
+               byte[] ret = bindings.CommitmentSigned_write(this.ptr);
                return ret;
        }
 
-       public static CommitmentSigned constructor_read(byte[] ser) {
+       public static Result_CommitmentSignedDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.CommitmentSigned_read(ser);
-               CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);
+               Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }