+ /**
+ * Used to indicate that a channel with the given `channel_id` is in the process of closure.
+ */
+ public final static class ChannelClosed extends Event {
+ /**
+ * The channel_id of the channel which has been closed. Note that on-chain transactions
+ * resolving the channel are likely still awaiting confirmation.
+ */
+ public final byte[] channel_id;
+ /**
+ * The `user_channel_id` value passed in to [`ChannelManager::create_channel`], or 0 for
+ * an inbound channel. This will always be zero for objects serialized with LDK versions
+ * prior to 0.0.102.
+ *
+ * [`ChannelManager::create_channel`]: crate::ln::channelmanager::ChannelManager::create_channel
+ */
+ public final long user_channel_id;
+ /**
+ * The reason the channel was closed.
+ */
+ public final ClosureReason reason;
+ private ChannelClosed(long ptr, bindings.LDKEvent.ChannelClosed obj) {
+ super(null, ptr);
+ this.channel_id = obj.channel_id;
+ this.user_channel_id = obj.user_channel_id;
+ long reason = obj.reason;
+ ClosureReason reason_hu_conv = ClosureReason.constr_from_ptr(reason);
+ reason_hu_conv.ptrs_to.add(this);
+ this.reason = reason_hu_conv;
+ }
+ }
+ /**
+ * Used to indicate to the user that they can abandon the funding transaction and recycle the
+ * inputs for another purpose.
+ */
+ public final static class DiscardFunding extends Event {
+ /**
+ * The channel_id of the channel which has been closed.
+ */
+ public final byte[] channel_id;
+ /**
+ * The full transaction received from the user
+ */
+ public final byte[] transaction;
+ private DiscardFunding(long ptr, bindings.LDKEvent.DiscardFunding obj) {
+ super(null, ptr);
+ this.channel_id = obj.channel_id;
+ this.transaction = obj.transaction;
+ }
+ }
+ long clone_ptr() {
+ long ret = bindings.Event_clone_ptr(this.ptr);
+ return ret;
+ }
+