1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

Removed algorithm switching

This commit is contained in:
slush 2013-04-05 17:12:18 +02:00
parent 1ae4ab42f8
commit d0bc74ff21

10
cmd.py
View File

@ -9,7 +9,6 @@ from bitkeylib.debuglink import DebugLink
def parse_args(commands):
parser = argparse.ArgumentParser(description='Commandline tool for Bitkey devices.')
parser.add_argument('-a', '--algorithm', dest='algorithm', choices=['bip32', 'electrum'], default='bip32', help='Key derivation algorithm')
parser.add_argument('-t', '--transport', dest='transport', choices=['usb', 'serial', 'pipe', 'socket'], default='serial', help="Transport used for talking with the device")
parser.add_argument('-p', '--path', dest='path', default='/dev/ttyAMA0', help="Path used by the transport (usually serial port)")
parser.add_argument('-dt', '--debuglink-transport', dest='debuglink_transport', choices=['usb', 'serial', 'pipe', 'socket'], default='socket', help="Debuglink transport")
@ -133,14 +132,7 @@ def main():
else:
debuglink = None
if args.algorithm == 'electrum':
algo = proto.ELECTRUM
elif args.algorithm == 'bip32':
algo = proto.BIP32
else:
raise Exception("Unknown algorithm")
client = BitkeyClient(transport, debuglink=debuglink, algo=algo)
client = BitkeyClient(transport, debuglink=debuglink)
client.setup_debuglink(button=True, otp_correct=True, pin_correct=True)
cmds = Commands(client)