Remove need for lndgrpc

This commit is contained in:
Taylor Helsper 2021-12-18 21:36:31 -06:00
parent c3224856eb
commit b4436162bc
3 changed files with 8 additions and 13 deletions

View File

@ -1,5 +1,5 @@
#!/usr/local/bin/python3
from lnd_grpc import lnd_grpc
import base64, codecs, json, requests
import os
def format_seed_numbered(seed):
@ -19,16 +19,11 @@ def format_seed_raw(seed):
# This is the main entry point for the program
if __name__ == "__main__":
network="mainnet"
if os.path.isfile("/mnt/hdd/mynode/settings/.testnet_enabled"):
network="testnet"
REST_GEN_SEED_URL="https://localhost:10080/v1/genseed"
REST_CERT_PATH="/home/bitcoin/.lnd/tls.cert"
# Generate the seed
rpc = lnd_grpc.Client(lnd_dir="/home/bitcoin/.lnd/",
macaroon_path="/home/bitcoin/.lnd/data/chain/bitcoin/{}/admin.macaroon".format(network))
# Get seed and print
data = rpc.gen_seed()
formatted_seed = format_seed_raw(data.cipher_seed_mnemonic)
r = requests.get(REST_GEN_SEED_URL, verify=REST_CERT_PATH)
data = r.json()
formatted_seed = format_seed_raw( data['cipher_seed_mnemonic'] )
print(formatted_seed)

View File

@ -195,7 +195,7 @@ if ! skip_base_upgrades ; then
# Install any pip3 software
pip3 install --upgrade pip setuptools wheel
pip3 install lnd-grpc gnureadline docker-compose pipenv bcrypt pysocks redis --no-cache-dir
pip3 install gnureadline docker-compose pipenv bcrypt pysocks redis systemd --no-cache-dir
pip3 install flask pam python-bitcoinrpc prometheus_client psutil transmissionrpc --no-cache-dir
pip3 install qrcode image pyudev --no-cache-dir

View File

@ -276,7 +276,7 @@ fi
# Install Python3 specific tools (run multiple times to make sure success)
pip3 install --upgrade pip wheel setuptools
pip3 install lnd-grpc gnureadline docker-compose pipenv bcrypt pysocks redis --no-cache-dir
pip3 install gnureadline docker-compose pipenv bcrypt pysocks redis systemd --no-cache-dir
pip3 install flask pam python-bitcoinrpc prometheus_client psutil transmissionrpc --no-cache-dir
pip3 install qrcode image pyudev --no-cache-dir