[Java] Update auto-generated Java bindings to LDK 0.0.110
[ldk-java] / src / main / java / org / ldk / structs / ReadOnlyNetworkGraph.java
index 1d82f25b45249244e92b47814f34c8dc605b5d5a..058daad0cd89ef630e676952d6b85dc0d6ca2780 100644 (file)
@@ -18,6 +18,39 @@ public class ReadOnlyNetworkGraph extends CommonBase implements AutoCloseable {
                if (ptr != 0) { bindings.ReadOnlyNetworkGraph_free(ptr); }
        }
 
+       /**
+        * Returns information on a channel with the given id.
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
+       public ChannelInfo channel(long short_channel_id) {
+               long ret = bindings.ReadOnlyNetworkGraph_channel(this.ptr, short_channel_id);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(short_channel_id);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelInfo ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelInfo(null, ret); }
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Returns information on a node with the given id.
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
+       public NodeInfo node(NodeId node_id) {
+               long ret = bindings.ReadOnlyNetworkGraph_node(this.ptr, node_id == null ? 0 : node_id.ptr & ~1);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(node_id);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.NodeInfo ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeInfo(null, ret); }
+               ret_hu_conv.ptrs_to.add(this);
+               this.ptrs_to.add(node_id);
+               return ret_hu_conv;
+       }
+
        /**
         * Get network addresses by node id.
         * Returns None if the requested node is completely unknown,