X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FQueryShortChannelIds.ts;h=fe6f93f900dbb907008d793b0f79ac0b9aae808b;hb=ebbb6f57d6b5072730fd50ef3a011db1d6577ad9;hp=84fdd1047086e0c37eeefcd036bb2861236e73cb;hpb=822471992c6bf6f9985e531cc5940e4cc35e3e4c;p=ldk-java diff --git a/ts/structs/QueryShortChannelIds.ts b/ts/structs/QueryShortChannelIds.ts index 84fdd104..fe6f93f9 100644 --- a/ts/structs/QueryShortChannelIds.ts +++ b/ts/structs/QueryShortChannelIds.ts @@ -1,48 +1,58 @@ + 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) { + public void set_chain_hash(Uint8Array val) { bindings.QueryShortChannelIds_set_chain_hash(this.ptr, val); } - 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(chain_hash_arg, 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 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; }