+ /**
+ * Constructs a new Listen which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned Listen must be freed before this_arg is
+ */
+ public Listen as_Listen() {
+ long ret = bindings.ChannelManager_as_Listen(this.ptr);
+ Listen ret_hu_conv = new Listen(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Updates channel state to take note of transactions which were confirmed in the given block
+ * at the given height.
+ *
+ * Note that you must still call (or have called) [`update_best_block`] with the block
+ * information which is included here.
+ *
+ * This method may be called before or after [`update_best_block`] for a given block's
+ * transaction data and may be called multiple times with additional transaction data for a
+ * given block.
+ *
+ * This method may be called for a previous block after an [`update_best_block`] call has
+ * been made for a later block, however it must *not* be called with transaction data from a
+ * block which is no longer in the best chain (ie where [`update_best_block`] has already
+ * been informed about a blockchain reorganization which no longer includes the block which
+ * corresponds to `header`).
+ *
+ * [`update_best_block`]: `Self::update_best_block`
+ */
+ public void transactions_confirmed(byte[] header, int height, TwoTuple<Long, byte[]>[] txdata) {
+ bindings.ChannelManager_transactions_confirmed(this.ptr, header, height, Arrays.stream(txdata).mapToLong(txdata_conv_24 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_24.a, txdata_conv_24.b)).toArray());
+ /* TODO 2 TwoTuple<Long, byte[]> */;
+ }
+
+ /**
+ * Updates channel state with the current best blockchain tip. You should attempt to call this
+ * quickly after a new block becomes available, however if multiple new blocks become
+ * available at the same time, only a single `update_best_block()` call needs to be made.
+ *
+ * This method should also be called immediately after any block disconnections, once at the
+ * reorganization fork point, and once with the new chain tip. Calling this method at the
+ * blockchain reorganization fork point ensures we learn when a funding transaction which was
+ * previously confirmed is reorganized out of the blockchain, ensuring we do not continue to
+ * accept payments which cannot be enforced on-chain.
+ *
+ * In both the block-connection and block-disconnection case, this method may be called either
+ * once per block connected or disconnected, or simply at the fork point and new tip(s),
+ * skipping any intermediary blocks.
+ */
+ public void update_best_block(byte[] header, int height) {
+ bindings.ChannelManager_update_best_block(this.ptr, header, height);