mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-12 05:39:22 +02:00
Added QR display on LCD-screen for fundWallet, createInvoice and addMobileWalletShango
This commit is contained in:
parent
8b9bfe7f3a
commit
c5669a9464
21
home.admin/97addMobileWalletShango.sh
Normal file → Executable file
21
home.admin/97addMobileWalletShango.sh
Normal file → Executable file
@ -4,10 +4,7 @@
|
||||
source /home/admin/raspiblitz.info
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
|
||||
# make sure qrcode-encoder in installed
|
||||
clear
|
||||
echo "*** Setup ***"
|
||||
sudo apt-get install qrencode -y
|
||||
|
||||
# get local IP
|
||||
myip=$(ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')
|
||||
@ -35,20 +32,20 @@ echo "On Setup Step 'Choose LND Server Type' connect to 'DIY SELF HOSTED'"
|
||||
echo "(Or in the App go to --> 'Settings' > 'Connect to your LND Server')"
|
||||
echo "There you see three 3 form fields to fill out. Skip those and go right to the buttons below."
|
||||
echo ""
|
||||
echo "Click on the 'Scan QR' button"
|
||||
echo "Make the this terminal as big as possible - fullscreen would be best."
|
||||
echo "Then PRESS ENTER here in the terminal to generare the QR code and scan it with the app."
|
||||
read key
|
||||
echo "Click on the 'Scan QR' button and PRESS ENTER"
|
||||
|
||||
read key
|
||||
clear
|
||||
echo "*** STEP 2 : SCAN MACAROON (make whole QR code fill camera) ***"
|
||||
echo -e "${myip}:10009,\n$(xxd -p -c2000 ./.lnd/data/chain/${network}/${chain}net/admin.macaroon)," > qr.txt && cat ./.lnd/tls.cert >>qr.txt && qrencode -t ANSI256 < qr.txt
|
||||
echo "(To shrink QR code: OSX->CMD- / LINUX-> CTRL-) Press ENTER when finished."
|
||||
read key
|
||||
shred qr.txt
|
||||
|
||||
echo -e "${myip}:10009,\n$(xxd -p -c2000 ./.lnd/data/chain/${network}/${chain}net/admin.macaroon)," > qr.txt && cat ./.lnd/tls.cert >>qr.txt
|
||||
|
||||
./XXdisplayQR.sh
|
||||
|
||||
clear
|
||||
echo
|
||||
echo "Now press 'Connect' within the Shango Wallet."
|
||||
echo "If its not working - check issues on GitHub:"
|
||||
echo
|
||||
echo "https://github.com/neogeno/shango-lightning-wallet/issues"
|
||||
echo ""
|
||||
echo ""
|
||||
|
@ -79,10 +79,10 @@ if [ ${#error} -gt 0 ]; then
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
echo "${error}"
|
||||
else
|
||||
echo "******************************"
|
||||
echo "WIN"
|
||||
echo "******************************"
|
||||
echo "${result}"
|
||||
# echo "******************************"
|
||||
# echo "WIN"
|
||||
# echo "******************************"
|
||||
# echo "${result}"
|
||||
echo ""
|
||||
rhash=$(echo "$result" | grep r_hash | cut -d '"' -f4)
|
||||
payReq=$(echo "$result" | grep pay_req | cut -d '"' -f4)
|
||||
@ -95,4 +95,6 @@ else
|
||||
# TODO: Offer to go into monitor for incommin payment loop.
|
||||
|
||||
fi
|
||||
echo ""
|
||||
echo ""
|
||||
echo -e "${payReq}" > qr.txt
|
||||
./XXdisplayQR.sh
|
||||
|
@ -65,17 +65,10 @@ echo "Send ${coininfo} to address --> ${address}"
|
||||
if [ "$chain" = "test" ]; then
|
||||
echo "get some testnet coins from https://testnet-faucet.mempool.co"
|
||||
fi
|
||||
|
||||
echo -e "$network:${address}" > qr.txt
|
||||
/home/admin/XXdisplayQR.sh
|
||||
|
||||
echo "Whats next? --> Wait for confirmations. You can use info on LCD to check if funds have arrived."
|
||||
echo "If you want your lighting node to open channels automatically, activate the 'Autopilot' under 'Activate/Deactivate Services'"
|
||||
echo ""
|
||||
|
||||
echo ""
|
||||
echo "******************************"
|
||||
echo "QR-Code? (Y/N)"
|
||||
echo "******************************"
|
||||
echo "Would you like to see a QR-code of this address? Press Y"
|
||||
read -n1 key
|
||||
|
||||
if [ "$key" = "y" ]; then
|
||||
/home/admin/XXdisplayQR.sh $network:${address}
|
||||
fi
|
||||
|
@ -1,23 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Display a QR code provided as parameter $1
|
||||
# Display a QR code for the string in qr.txt
|
||||
|
||||
qrcode=$1
|
||||
echo
|
||||
echo "Please wait. Generating QR-code..."
|
||||
echo
|
||||
# make sure qrcode-encode and fbi are installed
|
||||
sudo apt-get install qrencode fbi -y > /dev/null
|
||||
|
||||
# make sure qrcode-encoder in installed
|
||||
clear
|
||||
echo "*** Setup ***"
|
||||
sudo apt-get install qrencode -y
|
||||
qrencode -l L -o /home/admin/qr.png < /home/admin/qr.txt > /dev/null
|
||||
sudo fbi -a -T 1 -d /dev/fb1 --noverbose /home/admin/qr.png 2> /dev/null
|
||||
|
||||
echo "************************************"
|
||||
echo "Scan the QR-Code on the LCD-Display."
|
||||
echo "************************************"
|
||||
echo
|
||||
echo "If you don't have access to the LCD, you can view it here."
|
||||
echo "Make the this terminal window as big as possible - fullscreen would be best."
|
||||
echo "Then PRESS ENTER here in the terminal to show QR code."
|
||||
|
||||
clear
|
||||
echo "Make the this terminal as big as possible - fullscreen would be best."
|
||||
echo "Then PRESS ENTER here in the terminal to generare the QR code and scan it with the app."
|
||||
read key
|
||||
|
||||
clear
|
||||
echo -e "$1" | qrencode -t ANSI256
|
||||
echo -e "$1"
|
||||
echo "(To shrink QR code: OSX->CMD- / LINUX-> CTRL-) Press ENTER when finished."
|
||||
qrencode -t ANSI256 < /home/admin/qr.txt
|
||||
shred /home/admin/qr.txt
|
||||
rm -f /home/admin/qr.txt
|
||||
echo "(To shrink QR code: macOS press CMD- / LINUX press CTRL-) Press ENTER when finished."
|
||||
read key
|
||||
|
||||
clear
|
||||
|
||||
# remove the QR picture on the raspi LCD
|
||||
sudo killall -3 fbi
|
||||
shred /home/admin/qr.png
|
||||
rm -f /home/admin/qr.png
|
||||
|
Loading…
x
Reference in New Issue
Block a user