- public static Event channel_closed(byte[] channel_id, ClosureReason reason) {
- long ret = bindings.Event_channel_closed(channel_id, reason.ptr);
- if (ret < 1024) { return null; }
+ public static Event channel_closed(byte[] channel_id, long user_channel_id, ClosureReason reason) {
+ long ret = bindings.Event_channel_closed(InternalUtils.check_arr_len(channel_id, 32), user_channel_id, reason.ptr);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Event ret_hu_conv = Event.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new DiscardFunding-variant Event
+ */
+ public static Event discard_funding(byte[] channel_id, byte[] transaction) {
+ long ret = bindings.Event_discard_funding(InternalUtils.check_arr_len(channel_id, 32), transaction);
+ if (ret >= 0 && ret <= 4096) { return null; }