Bindings updates
[ldk-java] / ts / structs / ChannelUpdate.ts
index c16675d551439d5b8c5b89b84e5d2a93422a6909..9a8244da910bb8595ae8f5c7a5d2cff321b58e50 100644 (file)
@@ -1,33 +1,41 @@
 
+            
 import CommonBase from './CommonBase';
 import * as bindings from '../bindings' // TODO: figure out location
 
-public class ChannelUpdate extends CommonBase {
-       ChannelUpdate(Object _dummy, long ptr) { super(ptr); }
-       @Override @SuppressWarnings("deprecation")
-       protected void finalize() throws Throwable {
-               super.finalize();
-               if (ptr != 0) { bindings.ChannelUpdate_free(ptr); }
-       }
 
+
+            export default class ChannelUpdate extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.ChannelUpdate_free(this.ptr);
+                    }
+                }
        public ChannelUpdate clone() {
-               uint32_t ret = bindings.ChannelUpdate_clone(this.ptr);
-               ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret);
+               number ret = bindings.ChannelUpdate_clone(this.ptr);
+               const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);
                return ret_hu_conv;
        }
 
-       public byte[] get_signature() {
-               byte[] ret = bindings.ChannelUpdate_get_signature(this.ptr);
+       public Uint8Array get_signature() {
+               Uint8Array ret = bindings.ChannelUpdate_get_signature(this.ptr);
                return ret;
        }
 
-       public void set_signature(byte[] val) {
+       public void set_signature(Uint8Array val) {
                bindings.ChannelUpdate_set_signature(this.ptr, val);
        }
 
        public UnsignedChannelUpdate get_contents() {
-               uint32_t ret = bindings.ChannelUpdate_get_contents(this.ptr);
-               UnsignedChannelUpdate ret_hu_conv = new UnsignedChannelUpdate(null, ret);
+               number ret = bindings.ChannelUpdate_get_contents(this.ptr);
+               const ret_hu_conv: UnsignedChannelUpdate = new UnsignedChannelUpdate(null, ret);
                return ret_hu_conv;
        }
 
@@ -36,21 +44,21 @@ public class ChannelUpdate extends CommonBase {
                this.ptrs_to.add(val);
        }
 
-       public static ChannelUpdate constructor_new(byte[] signature_arg, UnsignedChannelUpdate contents_arg) {
-               uint32_t ret = bindings.ChannelUpdate_new(signature_arg, contents_arg == null ? 0 : contents_arg.ptr & ~1);
-               ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret);
+       public static ChannelUpdate constructor_new(Uint8Array signature_arg, UnsignedChannelUpdate contents_arg) {
+               number ret = bindings.ChannelUpdate_new(signature_arg, contents_arg == null ? 0 : contents_arg.ptr & ~1);
+               const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);
                ret_hu_conv.ptrs_to.add(contents_arg);
                return ret_hu_conv;
        }
 
-       public byte[] write() {
-               byte[] ret = bindings.ChannelUpdate_write(this.ptr);
+       public Uint8Array write() {
+               Uint8Array ret = bindings.ChannelUpdate_write(this.ptr);
                return ret;
        }
 
-       public static ChannelUpdate constructor_read(byte[] ser) {
-               uint32_t ret = bindings.ChannelUpdate_read(ser);
-               ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret);
+       public static ChannelUpdate constructor_read(Uint8Array ser) {
+               number ret = bindings.ChannelUpdate_read(ser);
+               const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);
                return ret_hu_conv;
        }