2018-08-31 20:52:29 +02:00
#!/bin/bash
2018-12-21 01:22:30 +01:00
# get raspiblitz config
2019-02-02 23:49:04 +01:00
source /home/admin/raspiblitz.info
2018-12-21 01:22:30 +01:00
source /mnt/hdd/raspiblitz.conf
2021-08-24 13:17:41 +01:00
if [ " $1 " = "-h" ] || [ " $1 " = "-help" ] ; then
echo "Usage:"
2021-09-26 10:30:09 +01:00
echo "97addMobileWallet.sh <lnd|cl> <mainnet|testnet|signet>"
2021-08-24 13:17:41 +01:00
echo "defaults from the configs are:"
echo " ligthning= ${ lightning } "
echo " chain= ${ chain } "
fi
source <( /home/admin/config.scripts/network.aliases.sh getvars $1 $2 )
2022-02-17 12:22:39 +01:00
justLocal = 1
2020-05-27 02:36:27 +02:00
# if TOR is activated then outside reach is possible (no notice)
if [ " ${ runBehindTor } " = "on" ] ; then
2020-09-14 23:39:06 +02:00
echo "# runBehindTor ON"
2020-05-27 02:36:27 +02:00
justLocal = 0
fi
2019-04-03 13:07:25 +01:00
# if dynDomain is set connect from outside is possible (no notice)
if [ ${# dynDomain } -gt 0 ] ; then
2020-09-14 23:39:06 +02:00
echo "# dynDomain ON"
2019-04-03 13:07:25 +01:00
justLocal = 0
fi
# if sshtunnel to 10009/8080 then outside reach is possible (no notice)
isForwarded = $( echo ${ sshtunnel } | grep -c "10009<" )
if [ ${ isForwarded } -gt 0 ] ; then
2020-09-14 23:39:06 +02:00
echo "# forward 10009 ON"
2019-04-03 13:07:25 +01:00
justLocal = 0
fi
2022-02-17 12:22:39 +01:00
2019-04-03 13:07:25 +01:00
isForwarded = $( echo ${ sshtunnel } | grep -c "8080<" )
if [ ${ isForwarded } -gt 0 ] ; then
2020-09-14 23:39:06 +02:00
echo "# forward 8080 ON"
2019-04-03 13:07:25 +01:00
justLocal = 0
2020-01-23 17:23:51 +01:00
fi
2018-12-21 01:22:30 +01:00
# check if dynamic domain is set
2019-04-03 13:07:25 +01:00
if [ ${ justLocal } -eq 1 ] ; then
2019-02-24 07:08:33 +01:00
whiptail --title " Just Local Network? " --yesno " If you want to connect with your RaspiBlitz
2018-12-21 01:22:30 +01:00
also from outside your local network you need to
2019-04-03 13:07:25 +01:00
activate 'Services' -> 'DynamicDNS' FIRST.
2020-01-23 17:23:51 +01:00
OR use SSH tunnel forwarding for port 10009
OR have TOR activated.
2018-12-21 01:22:30 +01:00
2018-12-21 01:32:43 +01:00
Do you JUST want to connect with your mobile
2018-12-21 01:22:30 +01:00
when your are on the same LOCAL NETWORK?
2019-04-03 13:07:25 +01:00
" 15 54
2018-12-21 01:22:30 +01:00
response = $?
case $response in
1) exit ; ;
esac
fi
2020-01-24 17:57:21 +01:00
if [ " ${ chain } " = = "test" ] ; then
whiptail --title " Testnet Notice " --msgbox " You are running your node in testnet.
Not all mobile Apps may support running in testnet.
For full support switch to mainnet.
" 9 55
fi
2021-08-27 03:59:21 -04:00
# function to call for wallets that support TOR
2021-10-01 13:40:17 +02:00
OPTIONS = ( )
if [ " ${ lightning } " = = "lnd" ] || [ " ${ lnd } " = = "on" ] ; then
2021-10-01 13:52:30 +02:00
OPTIONS += ( ZEUS_IOS "Zeus to LND (iOS)" )
OPTIONS += ( ZEUS_ANDROID "Zeus to LND (Android)" )
2021-12-11 19:38:35 +01:00
OPTIONS += ( ZAP_IOS "Zap to LND (iOS)" )
OPTIONS += ( ZAP_ANDROID "Zap to LND (Android)" )
2021-10-01 13:52:30 +02:00
OPTIONS += ( SPHINX "Sphinx Chat to LND (Android/iOS)" )
OPTIONS += ( SENDMANY_ANDROID "SendMany to LND (Android)" )
2021-10-08 16:12:43 +01:00
OPTIONS += ( FULLYNODED_LND "Fully Noded to LND REST (iOS+Tor)" )
2021-10-01 13:40:17 +02:00
fi
2020-07-22 23:06:04 +02:00
2021-10-01 13:40:17 +02:00
if [ " ${ lightning } " = = "cl" ] || [ " ${ cl } " = = "on" ] ; then
OPTIONS += ( ZEUS_CLREST "Zeus to C-lightningREST (Android or iOS)" )
OPTIONS += ( ZEUS_SPARK "Zeus to Sparko (Android or iOS)" )
OPTIONS += ( SPARK "Spark Wallet to Sparko (Android - EXPERIMENTAL)" )
2021-10-08 16:12:43 +01:00
OPTIONS += ( FULLYNODED_CL "Fully Noded to CL REST (iOS+Tor)" )
2021-08-24 13:17:41 +01:00
fi
# Additional Options with Tor
2020-01-23 19:09:52 +01:00
if [ " ${ runBehindTor } " = "on" ] ; then
2021-10-08 16:12:43 +01:00
OPTIONS += ( FULLYNODED_BTC "Fully Noded to bitcoinRPC (iOS+Tor)" )
2020-01-23 19:09:52 +01:00
fi
2021-12-11 19:38:35 +01:00
CHOICE = $( whiptail --clear --title "Choose Mobile Wallet" --menu "" 18 75 12 " ${ OPTIONS [@] } " 2>& 1 >/dev/tty)
2019-02-24 07:08:33 +01:00
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh hide
2018-08-31 20:52:29 +02:00
clear
2019-08-13 00:53:14 +02:00
echo "creating install info ..."
2018-08-31 20:52:29 +02:00
case $CHOICE in
2019-04-04 02:44:42 +01:00
CLOSE)
2021-08-04 00:18:30 +02:00
exit 0;
2019-04-04 02:44:42 +01:00
; ;
2020-11-15 22:07:53 +01:00
SPHINX)
if [ " ${ sphinxrelay } " != "on" ] ; then
whiptail --title " Install Sphinx Relay Server? " \
--yes-button "Install" \
--no-button "Cancel" \
--yesno "To use the Sphinx Chat App you need to install the Sphinx Relay Server on your RaspiBlitz. If you want to deinstall the relay later on, just switch it off under MENU > SERVICES.\n\nDo you want to install the Sphinx Relay Server now?" 14 60
if [ " $? " = "0" ] ; then
/home/admin/config.scripts/bonus.sphinxrelay.sh on
else
echo "No install ... returning to main menu."
sleep 2
exit 0
fi
fi
# make pairing thru sphinx relay script
/home/admin/config.scripts/bonus.sphinxrelay.sh menu
2021-08-04 00:18:30 +02:00
exit 0;
2020-11-15 22:07:53 +01:00
; ;
2019-08-13 00:48:13 +02:00
ZAP_IOS)
2020-01-24 17:57:21 +01:00
appstoreLink = "https://apps.apple.com/us/app/zap-bitcoin-lightning-wallet/id1406311960"
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh image /home/admin/raspiblitz/pictures/app_zap.png
2020-09-14 23:39:06 +02:00
whiptail --title "Install Fully Noded on your iOS device" \
--yes-button "Continue" \
--no-button "StoreLink" \
--yesno "Open the Apple App Store on your mobile phone.\n\nSearch for --> 'Zap Bitcoin'\n\nCheck that logo is like on LCD & author: Zap Technologies LLC\nWhen app is installed and started --> Continue." 12 65
2019-04-04 03:25:13 +01:00
if [ $? -eq 1 ] ; then
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh qr ${ appstoreLink }
2020-09-14 23:39:06 +02:00
whiptail --title " App Store Link " --msgbox " \
To install app open the following link:\n
${ appstoreLink } \n
Or scan the qr code on the LCD with your mobile phone.
" 11 70
2019-04-04 03:25:13 +01:00
fi
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh hide
2021-12-11 19:38:35 +01:00
/home/admin/config.scripts/bonus.lndconnect.sh zap-ios tor
2021-08-04 00:18:30 +02:00
exit 0;
2019-04-04 02:44:42 +01:00
; ;
2019-08-13 00:48:13 +02:00
ZAP_ANDROID)
2020-01-24 17:57:21 +01:00
appstoreLink = "https://play.google.com/store/apps/details?id=zapsolutions.zap"
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh image /home/admin/raspiblitz/pictures/app_zap.png
2020-09-14 23:39:06 +02:00
whiptail --title "Install Zap on your Android Phone" \
--yes-button "Continue" \
--no-button "StoreLink" \
--yesno "Open the Android Play Store on your mobile phone.\n\nSearch for --> 'zap bitcoin app'\n\nCheck that logo is like on LCD and author is: Zap\nWhen app is installed and started --> Continue." 12 65
2019-08-13 00:48:13 +02:00
if [ $? -eq 1 ] ; then
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh qr ${ appstoreLink }
2020-09-14 23:39:06 +02:00
whiptail --title " App Store Link " --msgbox " \
To install app open the following link:\n
${ appstoreLink } \n
Or scan the qr code on the LCD with your mobile phone.
" 11 70
2019-08-13 00:48:13 +02:00
fi
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh hide
2021-12-11 19:38:35 +01:00
/home/admin/config.scripts/bonus.lndconnect.sh zap-android tor
2021-08-04 00:18:30 +02:00
exit 0;
2019-08-13 00:48:13 +02:00
; ;
2020-04-05 16:13:14 +02:00
SENDMANY_ANDROID)
2020-04-05 16:25:41 +02:00
# check if keysend is activated first
source <( /home/admin/config.scripts/lnd.keysend.sh status)
if [ " ${ keysendOn } " = = "0" ] ; then
whiptail --title " KEYSEND NEEDED " --msgbox "
To use the chat feature of the SendMany app, you need to activate the Keysend feature first.
Please go to MAINMENU > SERVICES and activate KEYSEND first.
" 12 65
2021-08-04 00:18:30 +02:00
exit 0
2020-04-05 16:25:41 +02:00
fi
2020-04-05 16:13:14 +02:00
appstoreLink = "https://github.com/fusion44/sendmany/releases"
2020-09-14 23:39:06 +02:00
whiptail --title "Install SendMany APK from GithubReleases" \
--yes-button "Continue" \
--no-button "Link as QR code" \
2020-05-08 13:05:43 +02:00
--yesno " Download & install the SendMany APK (armeabi-v7) from GitHub:\n\n ${ appstoreLink } \n\nEasiest way to scan QR code on LCD and download/install.\n\nWhen installed and started -> continue. " 13 65
2020-04-05 16:13:14 +02:00
if [ $? -eq 1 ] ; then
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh qr ${ appstoreLink }
2021-04-08 00:02:57 +02:00
/home/admin/config.scripts/blitz.display.sh qr-console ${ appstoreLink }
2020-04-05 16:13:14 +02:00
fi
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh hide
2022-02-17 12:22:39 +01:00
/home/admin/config.scripts/bonus.lndconnect.sh sendmany-android ip
2021-08-04 00:18:30 +02:00
exit 0;
2020-04-05 16:13:14 +02:00
; ;
2019-04-04 03:25:13 +01:00
ZEUS_IOS)
2021-08-18 17:49:29 +01:00
appstoreLink = "https://apps.apple.com/us/app/zeus-ln/id1456038895"
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh image /home/admin/raspiblitz/pictures/app_zeus.png
2021-08-18 17:49:29 +01:00
whiptail --title "Install Zeus on your iOS device" \
2020-09-14 23:39:06 +02:00
--yes-button "Continue" \
2021-08-18 17:49:29 +01:00
--no-button "Link as QRcode" \
--yesno "Open the Apple App Store on your mobile phone.\n\nSearch for --> 'zeus ln'\n\nCheck that logo is like on LCD and author is: Zeus LN LLC\nWhen the app is installed and started --> Continue." 12 65
2019-04-04 03:25:13 +01:00
if [ $? -eq 1 ] ; then
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh qr ${ appstoreLink }
2021-04-08 00:02:57 +02:00
/home/admin/config.scripts/blitz.display.sh qr-console ${ appstoreLink }
2019-04-04 03:25:13 +01:00
fi
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh hide
2021-03-24 00:20:05 +01:00
/home/admin/config.scripts/bonus.lndconnect.sh zeus-ios tor
2021-08-04 00:18:30 +02:00
exit 0;
2019-04-04 03:25:13 +01:00
; ;
ZEUS_ANDROID)
2020-08-21 12:27:36 -04:00
appstoreLink = "https://play.google.com/store/apps/details?id=app.zeusln.zeus"
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh image /home/admin/raspiblitz/pictures/app_zeus.png
2020-01-27 23:55:12 +01:00
whiptail --title "Install Zeus on your Android Phone" \
2020-09-14 23:39:06 +02:00
--yes-button "Continue" \
--no-button "StoreLink" \
2021-08-24 13:17:41 +01:00
--yesno "Open the Android Play Store on your mobile phone.\n\nSearch for --> 'zeus ln'\n\nCheck that logo is like on LCD and author is: Evan Kaloudis\nWhen app is installed and started --> Continue." 12 65
2019-04-04 03:25:13 +01:00
if [ $? -eq 1 ] ; then
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh qr ${ appstoreLink }
2020-09-14 23:39:06 +02:00
whiptail --title " App Store Link " --msgbox " \
To install app open the following link:\n
${ appstoreLink } \n
Or scan the qr code on the LCD with your mobile phone.
" 11 70
2019-04-04 03:25:13 +01:00
fi
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh hide
2021-03-24 00:20:05 +01:00
/home/admin/config.scripts/bonus.lndconnect.sh zeus-android tor
2021-08-04 00:18:30 +02:00
exit 0;
2019-04-04 02:44:42 +01:00
; ;
2021-10-08 16:12:43 +01:00
FULLYNODED_BTC)
2020-07-19 01:01:09 +02:00
appstoreLink = "https://apps.apple.com/us/app/fully-noded/id1436425586"
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh image /home/admin/raspiblitz/pictures/app_fullynoded.png
2020-01-25 01:15:38 +01:00
whiptail --title "Install Fully Noded on your iOS device" \
2020-09-14 23:39:06 +02:00
--yes-button "Continue" \
--no-button "StoreLink" \
--yesno "Open the Apple App Store on your mobile phone.\n\nSearch for --> 'fully noded'\n\nCheck that logo is like on LCD and author is: Denton LLC\nWhen app is installed and started --> Continue." 12 65
2020-01-25 01:15:38 +01:00
if [ $? -eq 1 ] ; then
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh qr ${ appstoreLink }
2020-09-14 23:39:06 +02:00
whiptail --title " App Store Link " --msgbox " \
To install app open the following link:\n
${ appstoreLink } \n
Or scan the qr code on the LCD with your mobile phone.
" 11 70
2020-01-25 01:15:38 +01:00
fi
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh hide
2020-01-25 01:15:38 +01:00
/home/admin/config.scripts/bonus.fullynoded.sh
2021-08-04 00:18:30 +02:00
exit 0;
2020-01-25 01:15:38 +01:00
; ;
2021-08-24 13:17:41 +01:00
2021-10-08 16:12:43 +01:00
FULLYNODED_LND)
appstoreLink = "https://apps.apple.com/us/app/fully-noded/id1436425586"
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh image /home/admin/raspiblitz/pictures/app_fullynoded.png
2021-10-08 16:12:43 +01:00
whiptail --title "Install Fully Noded on your iOS device" \
--yes-button "Continue" \
--no-button "StoreLink" \
--yesno "Open the Apple App Store on your mobile phone.\n\nSearch for --> 'fully noded'\n\nCheck that logo is like on LCD and author is: Denton LLC\nWhen app is installed and started --> Continue." 12 65
if [ $? -eq 1 ] ; then
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh qr ${ appstoreLink }
2021-10-08 16:12:43 +01:00
whiptail --title " App Store Link " --msgbox " \
To install app open the following link:\n
${ appstoreLink } \n
Or scan the qr code on the LCD with your mobile phone.
" 11 70
fi
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh hide
2021-10-08 16:12:43 +01:00
/home/admin/config.scripts/bonus.lndconnect.sh fullynoded-lnd tor
exit 0;
; ;
FULLYNODED_CL)
if [ ! -L /home/bitcoin/cl-plugins-enabled/c-lightning-http-plugin ] ; then
/home/admin/config.scripts/cl-plugin.http.sh on
fi
appstoreLink = "https://apps.apple.com/us/app/fully-noded/id1436425586"
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh image /home/admin/raspiblitz/pictures/app_fullynoded.png
2021-10-08 16:12:43 +01:00
whiptail --title "Install Fully Noded on your iOS device" \
--yes-button "Continue" \
--no-button "StoreLink" \
--yesno "Open the Apple App Store on your mobile phone.\n\nSearch for --> 'fully noded'\n\nCheck that logo is like on LCD and author is: Denton LLC\nWhen app is installed and started --> Continue." 12 65
if [ $? -eq 1 ] ; then
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh qr ${ appstoreLink }
2021-10-08 16:12:43 +01:00
whiptail --title " App Store Link " --msgbox " \
To install app open the following link:\n
${ appstoreLink } \n
Or scan the qr code on the LCD with your mobile phone.
" 11 70
fi
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh hide
2021-10-08 16:12:43 +01:00
/home/admin/config.scripts/cl-plugin.http.sh connect
exit 0;
; ;
2021-09-26 10:30:09 +01:00
ZEUS_CLREST)
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh image /home/admin/raspiblitz/pictures/app_zeus.png
2021-08-24 13:17:41 +01:00
whiptail --title "Install Zeus on your Android or iOS Phone" \
--yes-button "Continue" \
--no-button "Cancel" \
--yesno "Open the https://zeusln.app/ on your mobile phone to find the App Store link or binary for your phone.\n\nWhen the app is installed and started --> Continue." 12 65
if [ $? -eq 1 ] ; then
exit 0
fi
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh hide
2021-09-26 10:30:09 +01:00
/home/admin/config.scripts/cl.rest.sh connect
2021-08-24 13:17:41 +01:00
exit 0;
; ;
ZEUS_SPARK)
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh image /home/admin/raspiblitz/pictures/app_zeus.png
2021-08-24 13:17:41 +01:00
whiptail --title "Install Zeus on your Android or iOS Phone" \
--yes-button "Continue" \
--no-button "Cancel" \
--yesno "Open the https://zeusln.app/ on your mobile phone to find the App Store link or binary for your phone.\n\nWhen the app is installed and started --> Continue." 12 65
if [ $? -eq 1 ] ; then
exit 0
fi
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh hide
2021-09-26 10:30:09 +01:00
/home/admin/config.scripts/cl-plugin.sparko.sh connect
2021-08-24 13:17:41 +01:00
exit 0;
; ;
SPARK)
appstoreLink = "https://github.com/shesek/spark-wallet#mobile-app"
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh image /home/admin/raspiblitz/pictures/app_zeus.png
2021-08-24 13:17:41 +01:00
whiptail --title "Install Zeus on your Android Phone" \
--yes-button "Continue" \
--no-button "GitHub link" \
--yesno " Open the ${ appstoreLink } on Android to find the App Store link or binary for your phone.\n\nWhen the app is installed and started --> Continue. " 12 65
if [ $? -eq 1 ] ; then
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh qr ${ appstoreLink }
2021-08-24 13:17:41 +01:00
whiptail --title " GitHub link " --msgbox " \
To install app open the following link:\n
${ appstoreLink } \n
Or scan the QR code on the LCD with your mobile phone.
" 11 70
fi
2022-02-13 12:23:34 +00:00
sudo /home/admin/config.scripts/blitz.display.sh hide
2021-09-26 10:30:09 +01:00
/home/admin/config.scripts/cl-plugin.sparko.sh connect
2021-08-24 13:17:41 +01:00
exit 0;
; ;
2020-08-21 12:27:36 -04:00
esac