Update auto-generated bindings
[ldk-java] / ts / structs / QueryShortChannelIds.ts
index 84fdd1047086e0c37eeefcd036bb2861236e73cb..5afafcf5c76f16536ee2aa5fd6d520cb06138738 100644 (file)
@@ -1,48 +1,63 @@
 
+            
 import CommonBase from './CommonBase';
 import * as bindings from '../bindings' // TODO: figure out location
 
-public class QueryShortChannelIds extends CommonBase {
-       QueryShortChannelIds(Object _dummy, long ptr) { super(ptr); }
-       @Override @SuppressWarnings("deprecation")
-       protected void finalize() throws Throwable {
-               super.finalize();
-               if (ptr != 0) { bindings.QueryShortChannelIds_free(ptr); }
-       }
 
-       public QueryShortChannelIds clone() {
-               uint32_t ret = bindings.QueryShortChannelIds_clone(this.ptr);
-               QueryShortChannelIds ret_hu_conv = new QueryShortChannelIds(null, ret);
-               return ret_hu_conv;
-       }
 
-       public byte[] get_chain_hash() {
-               byte[] ret = bindings.QueryShortChannelIds_get_chain_hash(this.ptr);
+            export default class QueryShortChannelIds extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.QueryShortChannelIds_free(this.ptr);
+                    }
+                }
+       public Uint8Array get_chain_hash() {
+               Uint8Array ret = bindings.QueryShortChannelIds_get_chain_hash(this.ptr);
                return ret;
        }
 
-       public void set_chain_hash(byte[] val) {
-               bindings.QueryShortChannelIds_set_chain_hash(this.ptr, val);
+       public void set_chain_hash(Uint8Array val) {
+               bindings.QueryShortChannelIds_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
        }
 
-       public void set_short_channel_ids(long[] val) {
+       public void set_short_channel_ids(number[] val) {
                bindings.QueryShortChannelIds_set_short_channel_ids(this.ptr, val);
        }
 
-       public static QueryShortChannelIds constructor_new(byte[] chain_hash_arg, long[] short_channel_ids_arg) {
-               uint32_t ret = bindings.QueryShortChannelIds_new(chain_hash_arg, short_channel_ids_arg);
-               QueryShortChannelIds ret_hu_conv = new QueryShortChannelIds(null, ret);
+       public static QueryShortChannelIds constructor_new(Uint8Array chain_hash_arg, number[] short_channel_ids_arg) {
+               number ret = bindings.QueryShortChannelIds_new(InternalUtils.check_arr_len(chain_hash_arg, 32), short_channel_ids_arg);
+               const ret_hu_conv: QueryShortChannelIds = new QueryShortChannelIds(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public number clone_ptr() {
+               number ret = bindings.QueryShortChannelIds_clone_ptr(this.ptr);
+               return ret;
+       }
+
+       public QueryShortChannelIds clone() {
+               number ret = bindings.QueryShortChannelIds_clone(this.ptr);
+               const ret_hu_conv: QueryShortChannelIds = new QueryShortChannelIds(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
-       public static Result_QueryShortChannelIdsDecodeErrorZ constructor_read(byte[] ser) {
-               uint32_t ret = bindings.QueryShortChannelIds_read(ser);
+       public static Result_QueryShortChannelIdsDecodeErrorZ constructor_read(Uint8Array ser) {
+               number ret = bindings.QueryShortChannelIds_read(ser);
                Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public byte[] write() {
-               byte[] ret = bindings.QueryShortChannelIds_write(this.ptr);
+       public Uint8Array write() {
+               Uint8Array ret = bindings.QueryShortChannelIds_write(this.ptr);
                return ret;
        }