Package org.ldk.structs
Class ReadOnlyNetworkGraph
- java.lang.Object
-
- org.ldk.structs.ReadOnlyNetworkGraph
-
- All Implemented Interfaces:
AutoCloseable
public class ReadOnlyNetworkGraph extends Object implements AutoCloseable
A read-only view of [`NetworkGraph`].
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChannelInfo
channel(long short_channel_id)
Returns information on a channel with the given id.void
close()
Option_CVec_NetAddressZZ
get_addresses(byte[] pubkey)
Get network addresses by node id.long[]
list_channels()
Returns the list of channels in the graphNodeId[]
list_nodes()
Returns the list of nodes in the graphNodeInfo
node(NodeId node_id)
Returns information on a node with the given id.
-
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
channel
@Nullable public ChannelInfo channel(long short_channel_id)
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
-
list_channels
public long[] list_channels()
Returns the list of channels in the graph
-
node
@Nullable public NodeInfo node(NodeId node_id)
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
-
list_nodes
public NodeId[] list_nodes()
Returns the list of nodes in the graph
-
get_addresses
public Option_CVec_NetAddressZZ get_addresses(byte[] pubkey)
Get network addresses by node id. Returns None if the requested node is completely unknown, or if node announcement for the node was never received.
-
-