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

Removed 'algorithm' from protobuf

This commit is contained in:
slush 2013-04-05 17:12:54 +02:00
parent ea3c8eaef0
commit d363c2448d

View File

@ -24,12 +24,10 @@ class OtpException(CallException):
class BitkeyClient(object): class BitkeyClient(object):
def __init__(self, transport, debuglink=None, def __init__(self, transport, debuglink=None,
algo=proto.BIP32,
message_func=show_message, input_func=show_input, debug=False): message_func=show_message, input_func=show_input, debug=False):
self.transport = transport self.transport = transport
self.debuglink = debuglink self.debuglink = debuglink
self.algo = algo
self.message_func = message_func self.message_func = message_func
self.input_func = input_func self.input_func = input_func
self.debug = debug self.debug = debug
@ -50,11 +48,11 @@ class BitkeyClient(object):
if self.master_public_key: if self.master_public_key:
return self.master_public_key return self.master_public_key
self.master_public_key = self.call(proto.GetMasterPublicKey(algo=self.algo)).key self.master_public_key = self.call(proto.GetMasterPublicKey()).key
return self.master_public_key return self.master_public_key
def get_address(self, n): def get_address(self, n):
return self.call(proto.GetAddress(algo=self.algo, address_n=n)).address return self.call(proto.GetAddress(address_n=n)).address
def get_entropy(self, size): def get_entropy(self, size):
return self.call(proto.GetEntropy(size=size)).entropy return self.call(proto.GetEntropy(size=size)).entropy
@ -155,7 +153,6 @@ class BitkeyClient(object):
# Prepare and send initial message # Prepare and send initial message
tx = proto.SignTx() tx = proto.SignTx()
tx.algo = self.algo # Choose BIP32 or ELECTRUM way for deterministic keys
tx.random = self._get_local_entropy() # Provide additional entropy to the device tx.random = self._get_local_entropy() # Provide additional entropy to the device
tx.inputs_count = len(inputs) tx.inputs_count = len(inputs)
tx.outputs_count = len(outputs) tx.outputs_count = len(outputs)