diff --git a/home.admin/70initLND.sh b/home.admin/70initLND.sh index b7c6b6e..6cd5f64 100755 --- a/home.admin/70initLND.sh +++ b/home.admin/70initLND.sh @@ -187,8 +187,8 @@ if [ ${walletExists} -eq 0 ]; then ack=0 while [ ${ack} -eq 0 ] do - whiptail --title "IMPORTANT - PLEASE WRITE DOWN" --msgbox "LND Wallet got created. Store these numbered words in a safe location:" 8 76 - whiptail --title "Please Confirm" --yes-button "Show Again" --no-button "CONTINUE" --yesno " Are you sure that you wrote down the word list?\n${seedwords}" 8 55 + whiptail --title "IMPORTANT - PLEASE WRITE DOWN" --msgbox "LND Wallet got created. Store these numbered words in a safe location:\n${seedwords}" 8 76 + whiptail --title "Please Confirm" --yes-button "Show Again" --no-button "CONTINUE" --yesno " Are you sure that you wrote down the word list?" 8 55 if [ $? -eq 1 ]; then ack=1 fi diff --git a/home.admin/config.scripts/lnd.initwallet.py b/home.admin/config.scripts/lnd.initwallet.py index 1edc11f..6b91a19 100644 --- a/home.admin/config.scripts/lnd.initwallet.py +++ b/home.admin/config.scripts/lnd.initwallet.py @@ -57,15 +57,24 @@ channel = grpc.secure_channel('localhost:10009', ssl_creds) stub = lnrpc.WalletUnlockerStub(channel) if mode=="new": - #request = ln.GenSeedRequest( - # aezeed_passphrase= - #) request = ln.GenSeedRequest() try: response = stub.GenSeed(request) seedwords = response.cipher_seed_mnemonic seedwordsString=','.join(seedwords) print("seedwords='"+seedwordsString+"'") + + # add a 6x4 formatted version to the output + seedwords6x4="" + for i in range(0,len(seedwords)): + if (i % 6 == 0) && (i != 0): + seedwords6x4=seedwords6x4+"\n" + singleWord=(i+1)+":"+seedwords[i] + while len(singleWord)<12 + singleWord=singleWord+" " + seedwords6x4=seedwords6x4+singleWord + print("seedwords6x4='"+seedwords6x4+"'") + except grpc.RpcError as err: # - wallet might already exist print("err='grpc.RpcError'") @@ -76,12 +85,6 @@ if mode=="new": print >> sys.stderr, err sys.exit(1) - # TODO: do first https://api.lightning.community/#genseed - - #if len(seedpassword)>0: - # request = ln.InitWalletRequest(wallet_password=base64.b64encode(walletpassword.decode(),aezeed_passphrase=base64.b64encode(seedpassword).decode()) - #else: - request = ln.InitWalletRequest( wallet_password=walletpassword, cipher_seed_mnemonic=seedwords