1
0
mirror of https://github.com/ACINQ/eclair.git synced 2024-11-20 10:39:19 +01:00
eclair/eclair-node/eclair-cli

27 lines
805 B
Plaintext
Raw Normal View History

2016-06-02 17:15:36 +02:00
#!/bin/bash
[ -z "$1" ] && (
echo "usage: "
echo "eclair-cli list"
echo "eclair-cli sign channel-id"
2016-06-03 18:02:03 +02:00
echo "eclair-cli fulfill channel-id htlc-id htlc-preimage"
2016-06-02 17:15:36 +02:00
) && exit 1
case $1 in
"list")
curl -X POST -d '{ "method": "list", "params" : [] }' "http://localhost:8080"
;;
"sign")
2016-06-03 18:02:03 +02:00
curl -X POST -d '{ "method": "sign", "params" : ["'${2?"missing channel id"}'"] }' "http://localhost:8080"
2016-06-02 17:15:36 +02:00
;;
2016-06-09 16:20:44 +02:00
"add")
curl -X POST -d '{ "method": "addhtlc", "params" : ['${2?"missing amount"}', "'${3?"missing payment hash"}'", '${4?"missing expiry"}', "'${5?"missing node id"}'"] }' "http://localhost:8080"
;;
2016-06-02 17:15:36 +02:00
"fulfill")
2016-06-03 18:02:03 +02:00
curl -X POST -d '{ "method": "fulfillhtlc", "params" : ["'${2?"missing channel id"}'", '${3?"missing htlc id"}', "'${4?"missing htlc preimage"}'"] }' "http://localhost:8080"
2016-06-02 17:15:36 +02:00
;;
esac
2016-06-03 18:02:03 +02:00
echo