[Java] Update auto-generated Java bindings for 0.0.113
[ldk-java] / src / main / java / org / ldk / structs / HTLCDestination.java
index 8d0c94bd63521c110c339ec3190e8fe247f2019b..9c873801016eb758b885605f054a923c13269d79 100644 (file)
@@ -27,6 +27,9 @@ public class HTLCDestination extends CommonBase {
                if (raw_val.getClass() == bindings.LDKHTLCDestination.UnknownNextHop.class) {
                        return new UnknownNextHop(ptr, (bindings.LDKHTLCDestination.UnknownNextHop)raw_val);
                }
+               if (raw_val.getClass() == bindings.LDKHTLCDestination.InvalidForward.class) {
+                       return new InvalidForward(ptr, (bindings.LDKHTLCDestination.InvalidForward)raw_val);
+               }
                if (raw_val.getClass() == bindings.LDKHTLCDestination.FailedPayment.class) {
                        return new FailedPayment(ptr, (bindings.LDKHTLCDestination.FailedPayment)raw_val);
                }
@@ -69,6 +72,20 @@ public class HTLCDestination extends CommonBase {
                        this.requested_forward_scid = obj.requested_forward_scid;
                }
        }
+       /**
+        * We couldn't forward to the outgoing scid. An example would be attempting to send a duplicate
+        * intercept HTLC.
+        */
+       public final static class InvalidForward extends HTLCDestination {
+               /**
+                * Short channel id we are requesting to forward an HTLC to.
+               */
+               public final long requested_forward_scid;
+               private InvalidForward(long ptr, bindings.LDKHTLCDestination.InvalidForward obj) {
+                       super(null, ptr);
+                       this.requested_forward_scid = obj.requested_forward_scid;
+               }
+       }
        /**
         * Failure scenario where an HTLC may have been forwarded to be intended for us,
         * but is invalid for some reason, so we reject it.
@@ -131,6 +148,18 @@ public class HTLCDestination extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new InvalidForward-variant HTLCDestination
+        */
+       public static HTLCDestination invalid_forward(long requested_forward_scid) {
+               long ret = bindings.HTLCDestination_invalid_forward(requested_forward_scid);
+               Reference.reachabilityFence(requested_forward_scid);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.HTLCDestination ret_hu_conv = org.ldk.structs.HTLCDestination.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 FailedPayment-variant HTLCDestination
         */
@@ -147,7 +176,7 @@ public class HTLCDestination extends CommonBase {
         * Checks if two HTLCDestinations contain equal inner contents.
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
-       public boolean eq(HTLCDestination b) {
+       public boolean eq(org.ldk.structs.HTLCDestination b) {
                boolean ret = bindings.HTLCDestination_eq(this.ptr, b == null ? 0 : b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);