+
import CommonBase from './CommonBase';
import * as bindings from '../bindings' // TODO: figure out location
-public class HTLCUpdate extends CommonBase {
- HTLCUpdate(Object _dummy, long ptr) { super(ptr); }
- @Override @SuppressWarnings("deprecation")
- protected void finalize() throws Throwable {
- super.finalize();
- if (ptr != 0) { bindings.HTLCUpdate_free(ptr); }
+
+
+ export default class HTLCUpdate extends CommonBase {
+ constructor(_dummy: object, ptr: number) {
+ super(ptr);
+ }
+
+
+ protected finalize() {
+ super.finalize();
+
+ if (this.ptr != 0) {
+ bindings.HTLCUpdate_free(this.ptr);
+ }
+ }
+ public number clone_ptr() {
+ number ret = bindings.HTLCUpdate_clone_ptr(this.ptr);
+ return ret;
}
public HTLCUpdate clone() {
- uint32_t ret = bindings.HTLCUpdate_clone(this.ptr);
- HTLCUpdate ret_hu_conv = new HTLCUpdate(null, ret);
+ number ret = bindings.HTLCUpdate_clone(this.ptr);
+ const ret_hu_conv: HTLCUpdate = new HTLCUpdate(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
- public byte[] write() {
- byte[] ret = bindings.HTLCUpdate_write(this.ptr);
+ public Uint8Array write() {
+ Uint8Array ret = bindings.HTLCUpdate_write(this.ptr);
return ret;
}
- public static HTLCUpdate constructor_read(byte[] ser) {
- uint32_t ret = bindings.HTLCUpdate_read(ser);
- HTLCUpdate ret_hu_conv = new HTLCUpdate(null, ret);
+ public static Result_HTLCUpdateDecodeErrorZ constructor_read(Uint8Array ser) {
+ number ret = bindings.HTLCUpdate_read(ser);
+ Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}