+ /**
+ * Source node of the second direction of a channel
+ */
+ public NodeId get_node_two() {
+ long ret = bindings.ChannelInfo_get_node_two(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new NodeId(null, ret); }
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Source node of the second direction of a channel
+ */
+ public void set_node_two(NodeId val) {
+ bindings.ChannelInfo_set_node_two(this.ptr, val == null ? 0 : val.ptr & ~1);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Details about the second direction of a channel
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ @Nullable
+ public ChannelUpdateInfo get_two_to_one() {
+ long ret = bindings.ChannelInfo_get_two_to_one(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ ChannelUpdateInfo ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelUpdateInfo(null, ret); }
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Details about the second direction of a channel
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public void set_two_to_one(@Nullable ChannelUpdateInfo val) {
+ bindings.ChannelInfo_set_two_to_one(this.ptr, val == null ? 0 : val.ptr & ~1);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The channel capacity as seen on-chain, if chain lookup is available.
+ */
+ public Option_u64Z get_capacity_sats() {
+ long ret = bindings.ChannelInfo_get_capacity_sats(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * The channel capacity as seen on-chain, if chain lookup is available.
+ */
+ public void set_capacity_sats(Option_u64Z val) {
+ bindings.ChannelInfo_set_capacity_sats(this.ptr, val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(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.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ @Nullable
+ public ChannelAnnouncement get_announcement_message() {
+ long ret = bindings.ChannelInfo_get_announcement_message(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ ChannelAnnouncement ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelAnnouncement(null, ret); }
+ ret_hu_conv.ptrs_to.add(this);
+ 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.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public void set_announcement_message(@Nullable ChannelAnnouncement val) {
+ bindings.ChannelInfo_set_announcement_message(this.ptr, val == null ? 0 : val.ptr & ~1);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);