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

Implemented get_address API

This commit is contained in:
slush 2013-01-05 14:42:49 +00:00
parent 842720052a
commit 9d7e55ea30
2 changed files with 6 additions and 2 deletions

View File

@ -36,9 +36,12 @@ class BitkeyClient(object):
if self.master_public_key:
return self.master_public_key
self.master_public_key = self.call(proto.GetMasterPublicKey(algo=self.algo))
self.master_public_key = self.call(proto.GetMasterPublicKey(algo=self.algo)).key
return self.master_public_key
def get_address(self, n):
return self.call(proto.GetAddress(algo=self.algo, address_n=n)).address
def get_entropy(self, size):
return self.call(proto.GetEntropy(size=size)).entropy
@ -112,7 +115,7 @@ class BitkeyClient(object):
return resp
def get_uuid(self):
return self.call(proto.GetUUID())
return self.call(proto.GetUUID()).UUID
def sign_tx(self, inputs, outputs):
'''

View File

@ -1,4 +1,5 @@
import bitkey_pb2 as proto
from transport import NotImplementedException
def otp_info(otp):
print "Device asks for OTP %s" % otp.otp