X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FChannelMonitorUpdate.ts;h=a5ef1d14a4c6783aa373123a5bcc711cd83b595c;hb=22f5f4208b1f3b5542292250f1612b944f5cd7fd;hp=43a55d37217cf6a28c1c33b67baffefe1f3fc8e4;hpb=56e9910ffaa7fccf2cb777dc9cf55e01a9681543;p=ldk-java diff --git a/ts/structs/ChannelMonitorUpdate.ts b/ts/structs/ChannelMonitorUpdate.ts index 43a55d37..a5ef1d14 100644 --- a/ts/structs/ChannelMonitorUpdate.ts +++ b/ts/structs/ChannelMonitorUpdate.ts @@ -1,37 +1,45 @@ + import CommonBase from './CommonBase'; import * as bindings from '../bindings' // TODO: figure out location -public class ChannelMonitorUpdate extends CommonBase { - ChannelMonitorUpdate(Object _dummy, long ptr) { super(ptr); } - @Override @SuppressWarnings("deprecation") - protected void finalize() throws Throwable { - super.finalize(); - if (ptr != 0) { bindings.ChannelMonitorUpdate_free(ptr); } - } + + export default class ChannelMonitorUpdate extends CommonBase { + constructor(_dummy: object, ptr: number) { + super(ptr); + } + + + protected finalize() { + super.finalize(); + + if (this.ptr != 0) { + bindings.ChannelMonitorUpdate_free(this.ptr); + } + } public ChannelMonitorUpdate clone() { - uint32_t ret = bindings.ChannelMonitorUpdate_clone(this.ptr); - ChannelMonitorUpdate ret_hu_conv = new ChannelMonitorUpdate(null, ret); + number ret = bindings.ChannelMonitorUpdate_clone(this.ptr); + const ret_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, ret); return ret_hu_conv; } - public long get_update_id() { - long ret = bindings.ChannelMonitorUpdate_get_update_id(this.ptr); + public number get_update_id() { + number ret = bindings.ChannelMonitorUpdate_get_update_id(this.ptr); return ret; } - public void set_update_id(long val) { + public void set_update_id(number val) { bindings.ChannelMonitorUpdate_set_update_id(this.ptr, val); } - public byte[] write() { - byte[] ret = bindings.ChannelMonitorUpdate_write(this.ptr); + public Uint8Array write() { + Uint8Array ret = bindings.ChannelMonitorUpdate_write(this.ptr); return ret; } - public static Result_ChannelMonitorUpdateDecodeErrorZ constructor_read(byte[] ser) { - uint32_t ret = bindings.ChannelMonitorUpdate_read(ser); + public static Result_ChannelMonitorUpdateDecodeErrorZ constructor_read(Uint8Array ser) { + number ret = bindings.ChannelMonitorUpdate_read(ser); Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }