[BREAKGLASS] Lightning Network node
| .idea | ||
| cli | ||
| example | ||
| gradle/wrapper | ||
| libs | ||
| src/main | ||
| .gitignore | ||
| build.gradle.kts | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| README.md | ||
| settings.gradle.kts | ||
Hello, Lightning!
Cli lightning network server, based on LDK (rust-lightning). Provides HTTP-RPC interface.
Example:
- build it (or download binary from releases)
- run it:
java -jar ./out/artifacts/hello_main_jar/hello.main.jar - now HTTP server listens on port 8310
- run nodejs control process from
./cli/directory (npm i && npm start)
Philosophy
Barebone Java-based server cant do much, out of the box it can only do lightning peers networking and disk persistence. All the functionality should be implemented on upper level (like, GUI application, or nodejs cli script, etc), that includes: providing blockchain data, managing onchain coins to open channels (via PSBT), keeping a list of peers to keep connections etc
Security
Server is intended to run in a secure environment. Thus, on-disk storage is not encrypted, and RPC server handles connections without TLS (plain HTTP). Also, even though RPC listens on 127.0.0.1, it has no auth.
TODO
port methods from https://github.com/BlueWallet/rn-ldk/blob/master/android/src/main/java/com/rnldk/RnLdkModule.kt while adding DUMB-RPC interface for them- create a GUI app (Electron?)
create a cli control process- ...
- Profit!
Available DUMB-RPC/HTTP calls
- start
- stop
- transactionconfirmed
- transactionunconfirmed
- getrelevanttxids
- updatebestblock
- connectpeer
- disconnectbynodeid
- sendpayment
- addinvoice
- listpeers
- getnodeid
- closechannelcooperatively
- closechannelforce
- openchannelstep1
- openchannelstep2
- listusablechannels
- listcChannels
- setrefundaddressscript
- setfeerate
- getmaturingbalance
- getmaturingheight
- savenetworkgraph
- geteventsfundinggenerationready
- geteventschannelclosed
- ldkversion
- help
- geteventsregistertx
- geteventsregisteroutput
- geteventstxbroadcast
- geteventspaymentsent
- geteventspaymentpathfailed
- geteventspaymentreceived
- geteventspaymentforwarded
License
MIT