Add Zap-specific QR codes for pairing

This commit is contained in:
Taylor Helsper 2021-08-18 17:35:59 -05:00
parent 5dc048dbaf
commit eb8473d3ed
2 changed files with 8 additions and 1 deletions

View File

@ -45,12 +45,16 @@ while true; do
cp -f lndconnect-qr.png lndconnect_tor_grpc.png
lndconnect --lnddir=/mnt/hdd/mynode/lnd -o $net --host=$LND_TOR_ADDR -p 10080
cp -f lndconnect-qr.png lndconnect_tor_rest.png
lndconnect --lnddir=/mnt/hdd/mynode/lnd -o $net --host=$LND_TOR_ADDR --nocert
cp -f lndconnect-qr.png zap_tor.png
# Generate Text Files
lndconnect --lnddir=/mnt/hdd/mynode/lnd -j $net --host=$LOCAL_IP_ADDR | grep lndconnect > lndconnect_local_grpc.txt
lndconnect --lnddir=/mnt/hdd/mynode/lnd -j $net --host=$LOCAL_IP_ADDR -p 10080 | grep lndconnect > lndconnect_local_rest.txt
lndconnect --lnddir=/mnt/hdd/mynode/lnd -j $net --host=$LND_TOR_ADDR | grep lndconnect > lndconnect_tor_grpc.txt
lndconnect --lnddir=/mnt/hdd/mynode/lnd -j $net --host=$LND_TOR_ADDR -p 10080 | grep lndconnect > lndconnect_tor_rest.txt
lndconnect --lnddir=/mnt/hdd/mynode/lnd -j $net --host=$LND_TOR_ADDR --nocert | grep lndconnect > zap_tor.txt
echo "Done! Waiting until LND changes, then regen lndconnect codes! (or 24 hours)"
inotifywait -t 86400 -e modify -e create -e delete $LND_TLS_CERT_FILE $LND_ADMIN_MACAROON_FILE

View File

@ -399,11 +399,13 @@ def page_lnd_pair_wallet():
lndconnect_local_rest_text = get_text_contents("/tmp/mynode_lndconnect/lndconnect_local_rest.txt")
lndconnect_tor_grpc_text = get_text_contents("/tmp/mynode_lndconnect/lndconnect_tor_grpc.txt")
lndconnect_tor_rest_text = get_text_contents("/tmp/mynode_lndconnect/lndconnect_tor_rest.txt")
zap_tor_text = get_text_contents("/tmp/mynode_lndconnect/zap_tor.txt")
lndconnect_local_grpc_img = get_image_src_b64("/tmp/mynode_lndconnect/lndconnect_local_grpc.png")
lndconnect_local_rest_img = get_image_src_b64("/tmp/mynode_lndconnect/lndconnect_local_rest.png")
lndconnect_tor_grpc_img = get_image_src_b64("/tmp/mynode_lndconnect/lndconnect_tor_grpc.png")
lndconnect_tor_rest_img = get_image_src_b64("/tmp/mynode_lndconnect/lndconnect_tor_rest.png")
zap_tor_img = get_image_src_b64("/tmp/mynode_lndconnect/zap_tor.png")
# Blue Wallet Data
electrs_onion_url = get_onion_url_electrs()
@ -435,7 +437,8 @@ def page_lnd_pair_wallet():
pairs.append( create_pair(name="Blue Wallet (Electrum + Local IP)", image_src=bluewallet_electrs_local_img,text=bluewallet_electrs_local_text,premium=False) )
pairs.append( create_pair(name="Blue Wallet (Electrum + Tor)", image_src=bluewallet_electrs_tor_img,text=bluewallet_electrs_tor_text,premium=True) )
#pairs.append( create_pair(name="Fully Noded (Tor)", image_src="",text="",premium=True) ) # Maybe not? pairs diff wallet
pairs.append( create_pair(name="Zap (Local IP)", image_src=lndconnect_local_grpc_img,text=lndconnect_local_grpc_text,premium=False) )
pairs.append( create_pair(name="Zap (Tor)", image_src=zap_tor_img,text=zap_tor_text,premium=True) )
# Show lndconnect page
templateData = {