added create invoice

This commit is contained in:
rootzoll
2018-08-09 14:58:44 +02:00
parent f5d2b4c823
commit 3ba027fd24
3 changed files with 86 additions and 3 deletions

View File

@@ -68,6 +68,8 @@ if [ ${#invoice} -eq 0 ]; then
exit 1
fi
# TODO: maybe try/show the decoded info first by using https://api.lightning.community/#decodepayreq
# build command
command="lncli sendpayment --pay_req=${invoice}"
@@ -80,7 +82,7 @@ echo ""
echo "COMMAND LINE: "
echo $command
echo ""
echo "RESULT:"
echo "RESULT (may wait in case of timeout):"
# execute command
result=$($command 2>$_error)
@@ -95,9 +97,10 @@ if [ ${#error} -gt 0 ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "${error}"
else
echo "${result}"
echo "******************************"
echo "WIN"
echo "******************************"
echo "${result}"
echo "It worked :) - check out the service you were paying."
fi
echo ""