2026-01-30 16:22:09 +01:00
|
|
|
import backend.p2pk as p2pk
|
|
|
|
|
import backend.p2pkh as p2pkh
|
|
|
|
|
import backend.p2sh as p2sh
|
|
|
|
|
import backend.p2wpkh as p2wpkh
|
|
|
|
|
import backend.p2tr as p2tr
|
2026-01-30 09:32:05 +01:00
|
|
|
|
|
|
|
|
def main():
|
|
|
|
|
print("=== GENERATORE INDIRIZZI BITCOIN ===")
|
|
|
|
|
print("Seleziona il tipo di indirizzo:")
|
|
|
|
|
print("1. P2PK")
|
|
|
|
|
print("2. P2PKH")
|
|
|
|
|
print("3. P2SH")
|
|
|
|
|
print("4. P2WPKH")
|
|
|
|
|
print("5. P2TR")
|
|
|
|
|
|
|
|
|
|
choice = input("Inserisci la tua scelta: ").strip()
|
|
|
|
|
|
2026-01-30 16:22:09 +01:00
|
|
|
actions = {
|
|
|
|
|
'1': p2pk.main,
|
|
|
|
|
'2': p2pkh.main,
|
|
|
|
|
'3': p2sh.main,
|
|
|
|
|
'4': p2wpkh.main,
|
|
|
|
|
'5': p2tr.main,
|
2026-01-30 09:32:05 +01:00
|
|
|
}
|
2026-01-30 16:22:09 +01:00
|
|
|
|
|
|
|
|
action = actions.get(choice)
|
|
|
|
|
if not action:
|
2026-01-30 09:32:05 +01:00
|
|
|
print("Scelta non valida.")
|
2026-01-30 16:22:09 +01:00
|
|
|
return
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
action()
|
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
|
print("\nOperazione interrotta.")
|
2026-01-30 09:32:05 +01:00
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2026-01-30 16:22:09 +01:00
|
|
|
main()
|