[Java] Update auto-generated Java bindings to LDK 0.0.121
[ldk-java] / src / main / java / org / ldk / structs / PaymentPurpose.java
index 8e98eb57b868f07e0345f5d61cb5bbd425fed052..4b969dd16412f336ee5dac217755dcc6c399ed34 100644 (file)
@@ -136,6 +136,18 @@ public class PaymentPurpose extends CommonBase {
                if (!(o instanceof PaymentPurpose)) return false;
                return this.eq((PaymentPurpose)o);
        }
+       /**
+        * Returns the preimage for this payment, if it is known.
+        */
+       public Option_ThirtyTwoBytesZ preimage() {
+               long ret = bindings.PaymentPurpose_preimage(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_ThirtyTwoBytesZ ret_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
        /**
         * Serialize the PaymentPurpose object into a byte array which can be read by PaymentPurpose_read
         */