// todo: in-line interface filling
watch_channel (funding_txo: number, monitor: number): number {
const funding_txo_hu_conv: OutPoint = new OutPoint(null, funding_txo);
+ funding_txo_hu_conv.ptrs_to.add(this);
const monitor_hu_conv: ChannelMonitor = new ChannelMonitor(null, monitor);
+ monitor_hu_conv.ptrs_to.add(this);
Result_NoneChannelMonitorUpdateErrZ ret = arg.watch_channel(funding_txo_hu_conv, monitor_hu_conv);
result: number = ret != null ? ret.ptr : 0;
return result;
update_channel (funding_txo: number, update: number): number {
const funding_txo_hu_conv: OutPoint = new OutPoint(null, funding_txo);
+ funding_txo_hu_conv.ptrs_to.add(this);
const update_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, update);
+ update_hu_conv.ptrs_to.add(this);
Result_NoneChannelMonitorUpdateErrZ ret = arg.update_channel(funding_txo_hu_conv, update_hu_conv);
result: number = ret != null ? ret.ptr : 0;
return result;
release_pending_monitor_events (): number[] {
MonitorEvent[] ret = arg.release_pending_monitor_events();
- result: number[] = (number[])Arrays.stream(ret).map(arr_conv_14 -> arr_conv_14 == null ? 0 : arr_conv_14.ptr & ~1).toArray();
+ result: number[] = Arrays.stream(ret).map(arr_conv_14 -> arr_conv_14 == null ? 0 : arr_conv_14.ptr & ~1).toArray(number[]::new);
/* TODO 2 MonitorEvent */;
return result;
},
for (int o = 0; o < ret.length; o++) {
number arr_conv_14 = ret[o];
const arr_conv_14_hu_conv: MonitorEvent = new MonitorEvent(null, arr_conv_14);
+ arr_conv_14_hu_conv.ptrs_to.add(this);
arr_conv_14_arr[o] = arr_conv_14_hu_conv;
}
return arr_conv_14_arr;