How can I export the Lightning Network graph?
How can I export the Lightning Network graph?
Loading saved threads...
Degenomics · External communityPost link
External question — Bitcoin Stack Exchange
Author: Degenomics
Original post: https://bitcoin.stackexchange.com/questions/123920
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I want to know if it is possible to see all nodes, their capacity and channels (of the whole Lightning network)?
I am doing some network research and I really have a hard time finding this information, I would love some guidance.
I thought by installing a Lightning Node I would be able to get this data by command line? Is this possible via Voltage?
In Voltage I cannot write commands like
lightning-cli listchannels
and
lightning-cli listnodes
, or with lnd it should be only one API call
describechannelgraph
.
Quote
Report
Hyunhum Cho · External communityPost link
External answer — Bitcoin Stack Exchange
Author: Hyunhum Cho
Original post: https://bitcoin.stackexchange.com/a/123924
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I want to know if it is possible to see all nodes, their capacity and channels (In the whole Lightning network)?
Below 2 websites provide capacity and channels in the whole lightning network.
Lightning Terminal
mempool.space
I thought by installing a Lightning Node I would be able to get this data by command line? Is this possible via Voltage?
Yes, Voltage provides a
guide
to command with
lncli
via RPC call.
Quote
Report
Eijaz Pardhan · External communityPost link
External answer — Bitcoin Stack Exchange
Author: Eijaz Pardhan
Original post: https://bitcoin.stackexchange.com/a/123959
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Alright, so if you want to export the Lightning Network graph, it’s actually pretty doable. If you’re using lnd, you can grab the whole network graph by running the describegraph command. Just type in lncli describegraph, and boom—you get a JSON file with all the nodes and channels. You can save that file and do whatever you need with it.
If you’re on c-lightning, it’s a bit different. You’ll need to use the listchannels and listnodes commands to get the data. You can save each of those as JSON files too, like lightning-cli listchannels > channels.json for the channels, and the same for nodes.
After you’ve got the data, you can use something like Python’s NetworkX to visualize it, or you can just pop it into one of the Lightning Network explorers if you want a quick look.
It’s pretty simple once you know the commands. Let me know if you need any more help!
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External question — Bitcoin Stack Exchange Author: Degenomics Source score (net votes, not local likes): 0 Original post: https://bitcoin.stackexchange.com/questions/123920 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. I want to know if it is possible to see all nodes, their capacity and channels (of the whole Lightning network)? I am doing some network research and I really have a hard time finding this information, I would love some guidance. I thought by installing a Lightning Node I would be able to get this data by command line? Is this possible via Voltage? In Voltage I cannot write commands like lightning-cli listchannels and lightning-cli listnodes , or with lnd it should be only one API call describechannelgraph .
Checking account access…