[BREAKGLASS] Lightning Network node
| .idea | ||
| 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 | ||
| openchannelstep1.sh | ||
| openchannelstep2.sh | ||
| README.md | ||
| 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
Philosophy
Barebone cli 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), that includes: providing blockchain data, managing onchain coins to open channels (via PSBT), keeping a list of peers to keep connections etc
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?)
- ...
- 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
License
MIT