- Translate docstrings, comments, print statements, input prompts and error messages across all src/ scripts and __main__.py - Update LICENSE copyright holder to Davide Grilli (2026) - p2pk: input prompt changed from s/n to y/n for compressed key selection
37 lines
900 B
Python
37 lines
900 B
Python
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()
|