Bindings updates
[ldk-java] / ts / structs / Init.ts
index b1cca231127e9770abb4ae3b747d5a1e0df7e2cf..69918e57301a9e91e24165892477b91c4dbbe0a2 100644 (file)
@@ -1,28 +1,36 @@
 
+            
 import CommonBase from './CommonBase';
 import * as bindings from '../bindings' // TODO: figure out location
 
-public class Init extends CommonBase {
-       Init(Object _dummy, long ptr) { super(ptr); }
-       @Override @SuppressWarnings("deprecation")
-       protected void finalize() throws Throwable {
-               super.finalize();
-               if (ptr != 0) { bindings.Init_free(ptr); }
-       }
 
+
+            export default class Init extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.Init_free(this.ptr);
+                    }
+                }
        public Init clone() {
-               uint32_t ret = bindings.Init_clone(this.ptr);
-               Init ret_hu_conv = new Init(null, ret);
+               number ret = bindings.Init_clone(this.ptr);
+               const ret_hu_conv: Init = new Init(null, ret);
                return ret_hu_conv;
        }
 
-       public byte[] write() {
-               byte[] ret = bindings.Init_write(this.ptr);
+       public Uint8Array write() {
+               Uint8Array ret = bindings.Init_write(this.ptr);
                return ret;
        }
 
-       public static Result_InitDecodeErrorZ constructor_read(byte[] ser) {
-               uint32_t ret = bindings.Init_read(ser);
+       public static Result_InitDecodeErrorZ constructor_read(Uint8Array ser) {
+               number ret = bindings.Init_read(ser);
                Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }