1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-22 22:25:26 +01:00

added a 'help' method

This commit is contained in:
pm47 2016-02-17 11:57:24 +01:00
parent 626f4d9b6a
commit 9a839ffe58
2 changed files with 9 additions and 0 deletions

View file

@ -49,6 +49,7 @@ eclair.bitcoind.rpcpassword (default: bar)
addhtlc | channel_id, amount, rhash, locktime | sends an htlc
fulfillhtlc | channel_id, r | fulfills an htlc
close | channel_id | closes a channel
help | | displays available methods
## Status
- [X] Network

View file

@ -81,6 +81,14 @@ trait Service extends HttpService with Logging {
sendCommand(channel, CMD_SEND_HTLC_FULFILL(BinaryData(r)))
case JsonRPCBody(_, _, "close", JString(channel) :: Nil) =>
sendCommand(channel, CMD_CLOSE(Globals.closing_fee))
case JsonRPCBody(_, _, "help", _) =>
Future.successful(List(
"connect (host, port, anchor_amount): opens a channel with another eclair or lightningd instance",
"list: lists existing channels",
"addhtlc (channel_id, amount, rhash, locktime): sends an htlc",
"fulfillhtlc (channel_id, r): fulfills an htlc",
"close (channel_id): closes a channel",
"help: displays this message"))
case _ => Future.failed(new RuntimeException("method not found"))
}