+ /**
+ * Gets the list of channels we have with a given counterparty, in random order.
+ */
+ public ChannelDetails[] list_channels_with_counterparty(byte[] counterparty_node_id) {
+ long[] ret = bindings.ChannelManager_list_channels_with_counterparty(this.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33));
+ GC.KeepAlive(this);
+ GC.KeepAlive(counterparty_node_id);
+ int ret_conv_16_len = ret.Length;
+ ChannelDetails[] ret_conv_16_arr = new ChannelDetails[ret_conv_16_len];
+ for (int q = 0; q < ret_conv_16_len; q++) {
+ long ret_conv_16 = ret[q];
+ org.ldk.structs.ChannelDetails ret_conv_16_hu_conv = null; if (ret_conv_16 < 0 || ret_conv_16 > 4096) { ret_conv_16_hu_conv = new org.ldk.structs.ChannelDetails(null, ret_conv_16); }
+ if (ret_conv_16_hu_conv != null) { ret_conv_16_hu_conv.ptrs_to.AddLast(this); };
+ ret_conv_16_arr[q] = ret_conv_16_hu_conv;
+ }
+ return ret_conv_16_arr;
+ }
+
+ /**
+ * Returns in an undefined order recent payments that -- if not fulfilled -- have yet to find a
+ * successful path, or have unresolved HTLCs.
+ *
+ * This can be useful for payments that may have been prepared, but ultimately not sent, as a
+ * result of a crash. If such a payment exists, is not listed here, and an
+ * [`Event::PaymentSent`] has not been received, you may consider resending the payment.
+ *
+ * [`Event::PaymentSent`]: events::Event::PaymentSent
+ */
+ public RecentPaymentDetails[] list_recent_payments() {
+ long[] ret = bindings.ChannelManager_list_recent_payments(this.ptr);
+ GC.KeepAlive(this);
+ int ret_conv_22_len = ret.Length;
+ RecentPaymentDetails[] ret_conv_22_arr = new RecentPaymentDetails[ret_conv_22_len];
+ for (int w = 0; w < ret_conv_22_len; w++) {
+ long ret_conv_22 = ret[w];
+ org.ldk.structs.RecentPaymentDetails ret_conv_22_hu_conv = org.ldk.structs.RecentPaymentDetails.constr_from_ptr(ret_conv_22);
+ if (ret_conv_22_hu_conv != null) { ret_conv_22_hu_conv.ptrs_to.AddLast(this); };
+ ret_conv_22_arr[w] = ret_conv_22_hu_conv;
+ }
+ return ret_conv_22_arr;
+ }
+