X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FReplyShortChannelIdsEnd.ts;h=6b2a21016f83168f97ea214e4195c145f802f98c;hb=fed2245c60159f6c074c9ed5c0f3ce273ad9841b;hp=cd60c20d7d6e89898411d29f52597b352da39c5d;hpb=822471992c6bf6f9985e531cc5940e4cc35e3e4c;p=ldk-java diff --git a/ts/structs/ReplyShortChannelIdsEnd.ts b/ts/structs/ReplyShortChannelIdsEnd.ts index cd60c20d..6b2a2101 100644 --- a/ts/structs/ReplyShortChannelIdsEnd.ts +++ b/ts/structs/ReplyShortChannelIdsEnd.ts @@ -1,27 +1,36 @@ + import CommonBase from './CommonBase'; import * as bindings from '../bindings' // TODO: figure out location -public class ReplyShortChannelIdsEnd extends CommonBase { - ReplyShortChannelIdsEnd(Object _dummy, long ptr) { super(ptr); } - @Override @SuppressWarnings("deprecation") - protected void finalize() throws Throwable { - super.finalize(); - if (ptr != 0) { bindings.ReplyShortChannelIdsEnd_free(ptr); } - } + + export default class ReplyShortChannelIdsEnd extends CommonBase { + constructor(_dummy: object, ptr: number) { + super(ptr); + } + + + protected finalize() { + super.finalize(); + + if (this.ptr != 0) { + bindings.ReplyShortChannelIdsEnd_free(this.ptr); + } + } public ReplyShortChannelIdsEnd clone() { - uint32_t ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr); - ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret); + number ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr); + const ret_hu_conv: ReplyShortChannelIdsEnd = new ReplyShortChannelIdsEnd(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } - public byte[] get_chain_hash() { - byte[] ret = bindings.ReplyShortChannelIdsEnd_get_chain_hash(this.ptr); + public Uint8Array get_chain_hash() { + Uint8Array ret = bindings.ReplyShortChannelIdsEnd_get_chain_hash(this.ptr); return ret; } - public void set_chain_hash(byte[] val) { + public void set_chain_hash(Uint8Array val) { bindings.ReplyShortChannelIdsEnd_set_chain_hash(this.ptr, val); } @@ -34,20 +43,21 @@ public class ReplyShortChannelIdsEnd extends CommonBase { bindings.ReplyShortChannelIdsEnd_set_full_information(this.ptr, val); } - public static ReplyShortChannelIdsEnd constructor_new(byte[] chain_hash_arg, boolean full_information_arg) { - uint32_t ret = bindings.ReplyShortChannelIdsEnd_new(chain_hash_arg, full_information_arg); - ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret); + public static ReplyShortChannelIdsEnd constructor_new(Uint8Array chain_hash_arg, boolean full_information_arg) { + number ret = bindings.ReplyShortChannelIdsEnd_new(chain_hash_arg, full_information_arg); + const ret_hu_conv: ReplyShortChannelIdsEnd = new ReplyShortChannelIdsEnd(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } - public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor_read(byte[] ser) { - uint32_t ret = bindings.ReplyShortChannelIdsEnd_read(ser); + public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor_read(Uint8Array ser) { + number ret = bindings.ReplyShortChannelIdsEnd_read(ser); Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } - public byte[] write() { - byte[] ret = bindings.ReplyShortChannelIdsEnd_write(this.ptr); + public Uint8Array write() { + Uint8Array ret = bindings.ReplyShortChannelIdsEnd_write(this.ptr); return ret; }