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