X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FChannelMonitorUpdate.ts;h=3217804ef0ae7b04ea8bb4e02aab064edf124a95;hb=fed2245c60159f6c074c9ed5c0f3ce273ad9841b;hp=43a55d37217cf6a28c1c33b67baffefe1f3fc8e4;hpb=822471992c6bf6f9985e531cc5940e4cc35e3e4c;p=ldk-java diff --git a/ts/structs/ChannelMonitorUpdate.ts b/ts/structs/ChannelMonitorUpdate.ts index 43a55d37..3217804e 100644 --- a/ts/structs/ChannelMonitorUpdate.ts +++ b/ts/structs/ChannelMonitorUpdate.ts @@ -1,37 +1,46 @@ + 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); + ret_hu_conv.ptrs_to.add(this); 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; }