diff --git a/pybitblock/SPV/spvblock.py b/pybitblock/SPV/spvblock.py index 2a154fe..0a3b2e5 100644 --- a/pybitblock/SPV/spvblock.py +++ b/pybitblock/SPV/spvblock.py @@ -31,6 +31,9 @@ from PIL import Image from robohash import Robohash from lnpay_py.wallet import LNPayWallet from pycoingecko import CoinGeckoAPI +from binascii import unhexlify +from embit import bip39 +from embit.wordlists.bip39 import WORDLIST version = "2.0.9" @@ -3703,6 +3706,25 @@ def callGitNostrLinTerminal(): os.system(f"cd nostr_console_pyblock && ./nostr_console_elf64 -k {responseC}") except: menuSelection() +def callGitNostrSeedTerminal(): + try: + clear() + blogo() + output = render( + "Nostr BIP39", colors=['yellow'], align='left', font='tiny' + ) + if os.path.isdir ('nostr_seed'): + print("...pass...") + else: # Check if the file 'bclock.conf' is in the same folder + os.system("mkdir nostr_seed && cd nostr_seed && wget https://gist.githubusercontent.com/odudex/93cfb5628b22f8675ab1939fd43133f4/raw/b48f047c0358a9ae50c2027106bdf5e37ee1fe5c/nostr_seed.py") + clear() + blogo() + print(output) + responseC = input("Paste your PrivateKey to convert into 24 BIP39 Seed words and vice-versa: ") + os.system(f"cd nostr_seed && python3 nostr_seed.py {responseC}") + input("\a\nContinue...") + except: + menuSelection() #---------------------------------Cashu---------------------------------- def callGitCashu(): @@ -5108,6 +5130,7 @@ def nostrConn(): \033[1;32;40mA.\033[0;37;40m Linux \033[1;32;40mB.\033[0;37;40m Windows \033[1;32;40mC.\033[0;37;40m Mac + \033[1;32;40mS.\033[0;37;40m Bip39 \u001b[31;1mR.\033[0;37;40m Return \n\n\x1b[?25h""".format(n,b, version, checkupdate())) nostrmenu(input("\033[1;32;40mSelect option: \033[0;37;40m")) @@ -7712,6 +7735,8 @@ def nostrmenu(menunos): callGitNostrWinTerminal() elif menunos in ["C", "c"]: callGitNostrMacTerminal() + elif menunos in ["S", "s"]: + callGitNostrSeedTerminal() def testClockRemote(): b = rpc('getblockcount')