X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FQueryShortChannelIds.ts;h=3c2efc5bc07d51d8688f6aeed6bcf79aa8b9bea0;hb=22f5f4208b1f3b5542292250f1612b944f5cd7fd;hp=84fdd1047086e0c37eeefcd036bb2861236e73cb;hpb=56e9910ffaa7fccf2cb777dc9cf55e01a9681543;p=ldk-java diff --git a/ts/structs/QueryShortChannelIds.ts b/ts/structs/QueryShortChannelIds.ts index 84fdd104..3c2efc5b 100644 --- a/ts/structs/QueryShortChannelIds.ts +++ b/ts/structs/QueryShortChannelIds.ts @@ -1,48 +1,56 @@ + 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); } - } + + 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 QueryShortChannelIds clone() { - uint32_t ret = bindings.QueryShortChannelIds_clone(this.ptr); - QueryShortChannelIds ret_hu_conv = new QueryShortChannelIds(null, ret); + number ret = bindings.QueryShortChannelIds_clone(this.ptr); + const ret_hu_conv: QueryShortChannelIds = new QueryShortChannelIds(null, ret); return ret_hu_conv; } - public byte[] get_chain_hash() { - byte[] ret = bindings.QueryShortChannelIds_get_chain_hash(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); 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; }