[Java] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / src / main / java / org / ldk / structs / SendError.java
index a6be0b7fc909755946e357263ab85fbcc7de41e2..295b29cb49409a6cab7e5f4430d1ab7ee6ba99b4 100644 (file)
@@ -47,6 +47,9 @@ public class SendError extends CommonBase {
                if (raw_val.getClass() == bindings.LDKSendError.GetNodeIdFailed.class) {
                        return new GetNodeIdFailed(ptr, (bindings.LDKSendError.GetNodeIdFailed)raw_val);
                }
+               if (raw_val.getClass() == bindings.LDKSendError.UnresolvedIntroductionNode.class) {
+                       return new UnresolvedIntroductionNode(ptr, (bindings.LDKSendError.UnresolvedIntroductionNode)raw_val);
+               }
                if (raw_val.getClass() == bindings.LDKSendError.BlindedPathAdvanceFailed.class) {
                        return new BlindedPathAdvanceFailed(ptr, (bindings.LDKSendError.BlindedPathAdvanceFailed)raw_val);
                }
@@ -125,6 +128,16 @@ public class SendError extends CommonBase {
                        super(null, ptr);
                }
        }
+       /**
+        * The provided [`Destination`] has a blinded path with an unresolved introduction node. An
+        * attempt to resolve it in the [`MessageRouter`] when finding an [`OnionMessagePath`] likely
+        * failed.
+        */
+       public final static class UnresolvedIntroductionNode extends SendError {
+               private UnresolvedIntroductionNode(long ptr, bindings.LDKSendError.UnresolvedIntroductionNode obj) {
+                       super(null, ptr);
+               }
+       }
        /**
         * We attempted to send to a blinded path where we are the introduction node, and failed to
         * advance the blinded path to make the second hop the new introduction node. Either
@@ -244,6 +257,17 @@ public class SendError extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new UnresolvedIntroductionNode-variant SendError
+        */
+       public static SendError unresolved_introduction_node() {
+               long ret = bindings.SendError_unresolved_introduction_node();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.SendError ret_hu_conv = org.ldk.structs.SendError.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 BlindedPathAdvanceFailed-variant SendError
         */
@@ -255,12 +279,24 @@ public class SendError extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Generates a non-cryptographic 64-bit hash of the SendError.
+        */
+       public long hash() {
+               long ret = bindings.SendError_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
        /**
         * Checks if two SendErrors contain equal inner contents.
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.SendError b) {
-               boolean ret = bindings.SendError_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.SendError_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;