Update java bindings with new generator and new upstream code
[ldk-java] / src / main / java / org / ldk / structs / ChannelInfo.java
index 90f1f4b7bd8ff9599fe6a17a87a5ce457303b25c..8206d572a63b52e1d1d4ff2d81e8f49350c34fa0 100644 (file)
@@ -5,6 +5,11 @@ import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
 
+
+/**
+ * Details about a channel (both directions).
+ * Received within a channel announcement.
+ */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class ChannelInfo extends CommonBase {
        ChannelInfo(Object _dummy, long ptr) { super(ptr); }
@@ -14,6 +19,9 @@ public class ChannelInfo extends CommonBase {
                if (ptr != 0) { bindings.ChannelInfo_free(ptr); }
        }
 
+       /**
+        * Protocol features of a channel communicated during its announcement
+        */
        public ChannelFeatures get_features() {
                long ret = bindings.ChannelInfo_get_features(this.ptr);
                ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
@@ -21,20 +29,32 @@ public class ChannelInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Protocol features of a channel communicated during its announcement
+        */
        public void set_features(ChannelFeatures val) {
                bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
        }
 
+       /**
+        * Source node of the first direction of a channel
+        */
        public byte[] get_node_one() {
                byte[] ret = bindings.ChannelInfo_get_node_one(this.ptr);
                return ret;
        }
 
+       /**
+        * Source node of the first direction of a channel
+        */
        public void set_node_one(byte[] val) {
                bindings.ChannelInfo_set_node_one(this.ptr, val);
        }
 
+       /**
+        * Details about the first direction of a channel
+        */
        public DirectionalChannelInfo get_one_to_two() {
                long ret = bindings.ChannelInfo_get_one_to_two(this.ptr);
                DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
@@ -42,20 +62,32 @@ public class ChannelInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Details about the first direction of a channel
+        */
        public void set_one_to_two(DirectionalChannelInfo val) {
                bindings.ChannelInfo_set_one_to_two(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
        }
 
+       /**
+        * Source node of the second direction of a channel
+        */
        public byte[] get_node_two() {
                byte[] ret = bindings.ChannelInfo_get_node_two(this.ptr);
                return ret;
        }
 
+       /**
+        * Source node of the second direction of a channel
+        */
        public void set_node_two(byte[] val) {
                bindings.ChannelInfo_set_node_two(this.ptr, val);
        }
 
+       /**
+        * Details about the second direction of a channel
+        */
        public DirectionalChannelInfo get_two_to_one() {
                long ret = bindings.ChannelInfo_get_two_to_one(this.ptr);
                DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
@@ -63,11 +95,20 @@ public class ChannelInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Details about the second direction of a channel
+        */
        public void set_two_to_one(DirectionalChannelInfo val) {
                bindings.ChannelInfo_set_two_to_one(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
        }
 
+       /**
+        * An initial announcement of the channel
+        * Mostly redundant with the data we store in fields explicitly.
+        * Everything else is useful only for sending out for initial routing sync.
+        * Not stored if contains excess data to prevent DoS.
+        */
        public ChannelAnnouncement get_announcement_message() {
                long ret = bindings.ChannelInfo_get_announcement_message(this.ptr);
                ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);
@@ -75,11 +116,20 @@ public class ChannelInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * An initial announcement of the channel
+        * Mostly redundant with the data we store in fields explicitly.
+        * Everything else is useful only for sending out for initial routing sync.
+        * Not stored if contains excess data to prevent DoS.
+        */
        public void set_announcement_message(ChannelAnnouncement val) {
                bindings.ChannelInfo_set_announcement_message(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
        }
 
+       /**
+        * Creates a copy of the ChannelInfo
+        */
        public ChannelInfo clone() {
                long ret = bindings.ChannelInfo_clone(this.ptr);
                ChannelInfo ret_hu_conv = new ChannelInfo(null, ret);
@@ -87,11 +137,17 @@ public class ChannelInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Serialize the ChannelInfo object into a byte array which can be read by ChannelInfo_read
+        */
        public byte[] write() {
                byte[] ret = bindings.ChannelInfo_write(this.ptr);
                return ret;
        }
 
+       /**
+        * Read a ChannelInfo from a byte array, created by ChannelInfo_write
+        */
        public static Result_ChannelInfoDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ChannelInfo_read(ser);
                Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);