[BREAKGLASS] Lightning Network node
| .idea | ||
| cli | ||
| gradle/wrapper | ||
| libs | ||
| src/main | ||
| .gitignore | ||
| build.gradle.kts | ||
| connectpeer.sh | ||
| geteventschannelclosed.sh | ||
| geteventsfundinggenerationready.sh | ||
| getnodeid.sh | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| ldkversion.sh | ||
| LICENSE | ||
| listchannels.sh | ||
| listpeers.sh | ||
| listusablechannels.sh | ||
| openchannelstep1.sh | ||
| openchannelstep2.sh | ||
| README.md | ||
| savenetworkgraph.sh | ||
| setfeerate.sh | ||
| setrefundaddressscript.sh | ||
| settings.gradle.kts | ||
| start.sh | ||
| stop.sh | ||
| updatebestblock.sh | ||
Hello, Lightning!
Cli lightning network server, based on LDK (rust-lightning). Provides DUMB-RPC (telnet friendly) and HTTP interface.
Example:
- build it
- run it:
java -jar ./out/artifacts/hello_main_jar/hello.main.jar - now DUMB-RPC/HTTP server listens on port 8310
- start the server with
start.shscript - ...or 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)
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 controll process
- ...
- Profit!
Available DUMB-RPC/HTTP calls
- start
- stop
- transactionConfirmed
- transactionUnconfirmed
- getRelevantTxids
- updateBestBlock
- connectPeer
- disconnectByNodeId
- sendPayment
- addInvoice
- listPeers
- getNodeId
- closeChannelCooperatively
- closeChannelForce
- openChannelStep1
- openChannelStep2
- listUsableChannels
- listChannels
- setRefundAddressScript
- setFeerate
- getMaturingBalance
- getMaturingHeight
- savenetworkgraph
- geteventsfundinggenerationready
- geteventschannelclosed
- ldkversion
- help
- geteventsregistertx
- geteventsregisteroutput
- geteventstxbroadcast
- geteventspaymentsent
- geteventspaymentpathfailed
- geteventspaymentreceived
- geteventspaymentforwarded
License
MIT