+ /**
+ * Gets a list of txids, with their output scripts (in the order they appear in the
+ * transaction), which we must learn about spends of via block_connected().
+ */
+ public TwoTuple<byte[], TwoTuple<Integer, byte[]>[]>[] get_outputs_to_watch() {
+ long[] ret = bindings.ChannelMonitor_get_outputs_to_watch(this.ptr);
+ TwoTuple<byte[], TwoTuple<Integer, byte[]>[]>[] ret_conv_47_arr = new TwoTuple[ret.length];
+ for (int v = 0; v < ret.length; v++) {
+ long ret_conv_47 = ret[v];
+ byte[] ret_conv_47_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(ret_conv_47);
+ long[] ret_conv_47_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(ret_conv_47);
+ TwoTuple<Integer, byte[]>[] ret_conv_47_b_conv_27_arr = new TwoTuple[ret_conv_47_b.length];
+ for (int b = 0; b < ret_conv_47_b.length; b++) {
+ long ret_conv_47_b_conv_27 = ret_conv_47_b[b];
+ int ret_conv_47_b_conv_27_a = bindings.LDKC2Tuple_u32ScriptZ_get_a(ret_conv_47_b_conv_27);
+ byte[] ret_conv_47_b_conv_27_b = bindings.LDKC2Tuple_u32ScriptZ_get_b(ret_conv_47_b_conv_27);
+ TwoTuple<Integer, byte[]> ret_conv_47_b_conv_27_conv = new TwoTuple<Integer, byte[]>(ret_conv_47_b_conv_27_a, ret_conv_47_b_conv_27_b, () -> {
+ bindings.C2Tuple_u32ScriptZ_free(ret_conv_47_b_conv_27);
+ });
+ ret_conv_47_b_conv_27_arr[b] = ret_conv_47_b_conv_27_conv;
+ };
+ TwoTuple<byte[], TwoTuple<Integer, byte[]>[]> ret_conv_47_conv = new TwoTuple<byte[], TwoTuple<Integer, byte[]>[]>(ret_conv_47_a, ret_conv_47_b_conv_27_arr);
+ // Warning: We may not free the C tuple object!
+ ret_conv_47_arr[v] = ret_conv_47_conv;
+ }
+ return ret_conv_47_arr;
+ }
+
+ /**
+ * Loads the funding txo and outputs to watch into the given `chain::Filter` by repeatedly
+ * calling `chain::Filter::register_output` and `chain::Filter::register_tx` until all outputs
+ * have been registered.
+ */
+ public void load_outputs_to_watch(Filter filter) {
+ bindings.ChannelMonitor_load_outputs_to_watch(this.ptr, filter == null ? 0 : filter.ptr);
+ this.ptrs_to.add(filter);
+ }
+
+ /**
+ * Get the list of HTLCs who's status has been updated on chain. This should be called by
+ * ChannelManager via [`chain::Watch::release_pending_monitor_events`].
+ *
+ * [`chain::Watch::release_pending_monitor_events`]: ../trait.Watch.html#tymethod.release_pending_monitor_events
+ */