https://github.com/roosoft/lnq
Lightning Network Graph Query Tool
https://github.com/roosoft/lnq
bitcoin lightning-network
Last synced: 3 months ago
JSON representation
Lightning Network Graph Query Tool
- Host: GitHub
- URL: https://github.com/roosoft/lnq
- Owner: RooSoft
- Created: 2021-11-27T19:42:45.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-28T17:08:49.000Z (over 4 years ago)
- Last Synced: 2025-03-15T04:36:00.181Z (over 1 year ago)
- Topics: bitcoin, lightning-network
- Language: Elixir
- Homepage:
- Size: 40 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lightning Network Graph Query Tool
Query the network graph for nodes based on proximity
## Install
Prerequisites
* [Elixir](https://elixir-lang.org/install.html)
* [Docker](https://docs.docker.com/engine/install/)
* [Docker Compose](https://docs.docker.com/compose/install/)
* [jq](https://stedolan.github.io/jq/)
Then, clone this repository and execute these commands
```bash
mix deps.get
mix escript.build
```
## Create a neo4j container
```bash
mkdir -s ~/neo4j/data
mkdir -s ~/neo4j/import
docker-compose up -d
```
## Import network graph from LND
On a Lightning Node running LND, execute
```bash
lncli describegraph > lightning-graph.json
```
Get the `lightning-graph.json` file on the computer running LNQ, and then run these commands in that same exact sequence
```bash
lnq convert lightning-graph.json
lnq import
lnq analyze
```
## Do some queries
Get a help screen listing possible queries by running
```bash
./lnq
```