Update auto-generated bindings
[ldk-java] / ts / structs / Init.ts
index b1cca231127e9770abb4ae3b747d5a1e0df7e2cf..94cd5d87e5a4e1ad6838d6bd1b2752cc6654de99 100644 (file)
@@ -1,28 +1,60 @@
 
+            
 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 InitFeatures get_features() {
+               number ret = bindings.Init_get_features(this.ptr);
+               const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public void set_features(InitFeatures val) {
+               bindings.Init_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
+       }
+
+       public static Init constructor_new(InitFeatures features_arg) {
+               number ret = bindings.Init_new(features_arg == null ? 0 : features_arg.ptr & ~1);
+               const ret_hu_conv: Init = new Init(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public number clone_ptr() {
+               number ret = bindings.Init_clone_ptr(this.ptr);
+               return ret;
        }
 
        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);
+               ret_hu_conv.ptrs_to.add(this);
                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;
        }