Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.44 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. SATOSHIS="100"
  3. MESSAGE="$1"
  4. DATA='{"body":"'$MESSAGE'","votes":'$SATOSHIS'}'
  5. CONTENT_TYPE='Content-Type: application/json'
  6. RESPONSE=`curl --header "$CONTENT_TYPE" --request POST --data @data.json https://thundermessage.com/api/submit/post`
  7. INV_SATS=`echo $RESPONSE | jq '.satoshis'`
  8. BOLT=`echo $RESPONSE | jq '.bolt11'`
  9. temp="${BOLT%\"}"
  10. temp="${temp#\"}"
  11. echo $temp
  12. [ $INV_SATS == $SATOSHIS ] && lncli payinvoice $temp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement