X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FReadOnlyNetworkGraph.java;fp=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FReadOnlyNetworkGraph.java;h=caeb6b97e3c41063a0732e5a204709c9684e2433;hb=d2f3f4f519c59885fa071f3f77d582e192ecd436;hp=058daad0cd89ef630e676952d6b85dc0d6ca2780;hpb=bbf1ef578b7cfe9fc7d3ad8b6626ae6204e370e5;p=ldk-java diff --git a/src/main/java/org/ldk/structs/ReadOnlyNetworkGraph.java b/src/main/java/org/ldk/structs/ReadOnlyNetworkGraph.java index 058daad0..caeb6b97 100644 --- a/src/main/java/org/ldk/structs/ReadOnlyNetworkGraph.java +++ b/src/main/java/org/ldk/structs/ReadOnlyNetworkGraph.java @@ -34,6 +34,15 @@ public class ReadOnlyNetworkGraph extends CommonBase implements AutoCloseable { return ret_hu_conv; } + /** + * Returns the list of channels in the graph + */ + public long[] list_channels() { + long[] ret = bindings.ReadOnlyNetworkGraph_list_channels(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + /** * Returns information on a node with the given id. * @@ -51,6 +60,23 @@ public class ReadOnlyNetworkGraph extends CommonBase implements AutoCloseable { return ret_hu_conv; } + /** + * Returns the list of nodes in the graph + */ + public NodeId[] list_nodes() { + long[] ret = bindings.ReadOnlyNetworkGraph_list_nodes(this.ptr); + Reference.reachabilityFence(this); + int ret_conv_8_len = ret.length; + NodeId[] ret_conv_8_arr = new NodeId[ret_conv_8_len]; + for (int i = 0; i < ret_conv_8_len; i++) { + long ret_conv_8 = ret[i]; + org.ldk.structs.NodeId ret_conv_8_hu_conv = null; if (ret_conv_8 < 0 || ret_conv_8 > 4096) { ret_conv_8_hu_conv = new org.ldk.structs.NodeId(null, ret_conv_8); } + ret_conv_8_hu_conv.ptrs_to.add(this); + ret_conv_8_arr[i] = ret_conv_8_hu_conv; + } + return ret_conv_8_arr; + } + /** * Get network addresses by node id. * Returns None if the requested node is completely unknown,