[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / PaymentPurpose.cs
index ebd6168e875bd450df98150a20a9d1eb7cb42984..242ead86cc2f82b18515d5a871db4babd68724c0 100644 (file)
@@ -127,6 +127,18 @@ public class PaymentPurpose : CommonBase {
                if (!(o is 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);
+               GC.KeepAlive(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.AddLast(this); };
+               return ret_hu_conv;
+       }
+
        /**
         * Serialize the PaymentPurpose object into a byte array which can be read by PaymentPurpose_read
         */