Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / Event.java
index abc24cecb67d30afd7de75a275f0ebed81e4fa28..edfa67cde20e10d46a0f0cab3e8654c510819077 100644 (file)
@@ -5,6 +5,14 @@ import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
 
+
+/**
+ * An Event which you should probably take some action in response to.
+ * 
+ * Note that while Writeable and Readable are implemented for Event, you probably shouldn't use
+ * them directly as they don't round-trip exactly (for example FundingGenerationReady is never
+ * written as it makes no sense to respond to it after reconnecting to peers).
+ */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class Event extends CommonBase {
        private Event(Object _dummy, long ptr) { super(ptr); }
@@ -113,4 +121,22 @@ public class Event extends CommonBase {
                        this.outputs = outputs_conv_27_arr;
                }
        }
+       /**
+        * Creates a copy of the Event
+        */
+       public Event clone() {
+               long ret = bindings.Event_clone(this.ptr);
+               Event ret_hu_conv = Event.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Serialize the Event object into a byte array which can be read by Event_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.Event_write(this.ptr);
+               return ret;
+       }
+
 }