Files
easy-wallet/__main__.py

37 lines
900 B
Python
Raw Normal View History

import subprocess
import sys
def main():
print("=== BITCOIN ADDRESS GENERATOR ===")
print("Select address type:")
print("1. P2PK")
print("2. P2PKH")
print("3. P2SH")
print("4. P2WPKH")
print("5. P2TR")
print("6. HD Wallet (BIP-44/49/84/86)")
choice = input("Enter your choice: ").strip()
scripts = {
'1': 'src/p2pk.py',
'2': 'src/p2pkh.py',
'3': 'src/p2sh.py',
'4': 'src/p2wpkh.py',
'5': 'src/p2tr.py',
'6': 'src/hd_wallet.py',
}
if choice in scripts:
try:
subprocess.run([sys.executable, scripts[choice]], check=True)
except subprocess.CalledProcessError as e:
print(f"Error running script: {e}")
except KeyboardInterrupt:
print("\nOperation interrupted.")
else:
print("Invalid choice.")
if __name__ == '__main__':
main()