[Java] Update auto-generated bindings to 0.0.117
[ldk-java] / src / main / java / org / ldk / structs / HTLCDescriptor.java
index 91319a3bd51215376639bb915d6a9a2f0a828faf..50fddf0c76d71273a5a1a881fddfca842be4532f 100644 (file)
@@ -112,11 +112,11 @@ public class HTLCDescriptor extends CommonBase {
         * The preimage, if `Some`, to claim the HTLC output with. If `None`, the timeout path must be
         * taken.
         */
-       public Option_PaymentPreimageZ get_preimage() {
+       public Option_ThirtyTwoBytesZ get_preimage() {
                long ret = bindings.HTLCDescriptor_get_preimage(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Option_PaymentPreimageZ ret_hu_conv = org.ldk.structs.Option_PaymentPreimageZ.constr_from_ptr(ret);
+               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;
        }
@@ -125,7 +125,7 @@ public class HTLCDescriptor extends CommonBase {
         * The preimage, if `Some`, to claim the HTLC output with. If `None`, the timeout path must be
         * taken.
         */
-       public void set_preimage(org.ldk.structs.Option_PaymentPreimageZ val) {
+       public void set_preimage(org.ldk.structs.Option_ThirtyTwoBytesZ val) {
                bindings.HTLCDescriptor_set_preimage(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
@@ -185,6 +185,26 @@ public class HTLCDescriptor extends CommonBase {
                if (!(o instanceof HTLCDescriptor)) return false;
                return this.eq((HTLCDescriptor)o);
        }
+       /**
+        * Serialize the HTLCDescriptor object into a byte array which can be read by HTLCDescriptor_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.HTLCDescriptor_write(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Read a HTLCDescriptor from a byte array, created by HTLCDescriptor_write
+        */
+       public static Result_HTLCDescriptorDecodeErrorZ read(byte[] ser) {
+               long ret = bindings.HTLCDescriptor_read(ser);
+               Reference.reachabilityFence(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_HTLCDescriptorDecodeErrorZ ret_hu_conv = Result_HTLCDescriptorDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
        /**
         * Returns the outpoint of the HTLC output in the commitment transaction. This is the outpoint
         * being spent by the HTLC input in the HTLC transaction.