Merge pull request #2 from TheBlueMatt/main
[ldk-java] / ts / structs / ChannelUpdate.ts
index 524e9a54caf166981771b46f9071ff4cc5d2ef55..61c2af4eb5f55718f99037bba7a198e460dcfded 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelUpdate_free(this.ptr);
                     }
                 }
-       public ChannelUpdate clone() {
-               number ret = bindings.ChannelUpdate_clone(this.ptr);
-               const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_signature() {
                Uint8Array ret = bindings.ChannelUpdate_get_signature(this.ptr);
                return ret;
@@ -54,15 +47,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ChannelUpdate clone() {
+               number ret = bindings.ChannelUpdate_clone(this.ptr);
+               const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ChannelUpdate_write(this.ptr);
                return ret;
        }
 
-       public static ChannelUpdate constructor_read(Uint8Array ser) {
+       public static Result_ChannelUpdateDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ChannelUpdate_read(ser);
-               const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }