[Java] Update auto-generated bindings to LDK 0.0.118
[ldk-java] / src / main / java / org / ldk / structs / Event.java
index 90a5fecf781b7d5d3b84c7f3f5dc636aa38f45c7..2862a7fe4c51edde4e9cf343f849f9ba953e1b64 100644 (file)
@@ -34,6 +34,9 @@ public class Event extends CommonBase {
                if (raw_val.getClass() == bindings.LDKEvent.PaymentClaimed.class) {
                        return new PaymentClaimed(ptr, (bindings.LDKEvent.PaymentClaimed)raw_val);
                }
+               if (raw_val.getClass() == bindings.LDKEvent.InvoiceRequestFailed.class) {
+                       return new InvoiceRequestFailed(ptr, (bindings.LDKEvent.InvoiceRequestFailed)raw_val);
+               }
                if (raw_val.getClass() == bindings.LDKEvent.PaymentSent.class) {
                        return new PaymentSent(ptr, (bindings.LDKEvent.PaymentSent)raw_val);
                }
@@ -358,6 +361,26 @@ public class Event extends CommonBase {
                        this.sender_intended_total_msat = sender_intended_total_msat_hu_conv;
                }
        }
+       /**
+        * Indicates a request for an invoice failed to yield a response in a reasonable amount of time
+        * or was explicitly abandoned by [`ChannelManager::abandon_payment`]. This may be for an
+        * [`InvoiceRequest`] sent for an [`Offer`] or for a [`Refund`] that hasn't been redeemed.
+        * 
+        * [`ChannelManager::abandon_payment`]: crate::ln::channelmanager::ChannelManager::abandon_payment
+        * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+        * [`Offer`]: crate::offers::offer::Offer
+        * [`Refund`]: crate::offers::refund::Refund
+        */
+       public final static class InvoiceRequestFailed extends Event {
+               /**
+                * The `payment_id` to have been associated with payment for the requested invoice.
+               */
+               public final byte[] payment_id;
+               private InvoiceRequestFailed(long ptr, bindings.LDKEvent.InvoiceRequestFailed obj) {
+                       super(null, ptr);
+                       this.payment_id = obj.payment_id;
+               }
+       }
        /**
         * Indicates an outbound payment we made succeeded (i.e. it made it all the way to its target
         * and we got back the payment preimage for it).
@@ -1206,6 +1229,18 @@ public class Event extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new InvoiceRequestFailed-variant Event
+        */
+       public static Event invoice_request_failed(byte[] payment_id) {
+               long ret = bindings.Event_invoice_request_failed(InternalUtils.check_arr_len(payment_id, 32));
+               Reference.reachabilityFence(payment_id);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.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 PaymentSent-variant Event
         */