- if (ret >= 0 && ret < 1024) { return null; }
- ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new FundingTimedOut-variant ClosureReason
+ */
+ public static ClosureReason funding_timed_out() {
+ long ret = bindings.ClosureReason_funding_timed_out();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };