From 9d7e55ea306b05d2347b786e5a4159872d643fef Mon Sep 17 00:00:00 2001 From: slush Date: Sat, 5 Jan 2013 14:42:49 +0000 Subject: [PATCH] Implemented get_address API --- bitkeylib/client.py | 7 +++++-- bitkeylib/debuglink.py | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bitkeylib/client.py b/bitkeylib/client.py index 2fd7dbcb8..51e6d23ab 100644 --- a/bitkeylib/client.py +++ b/bitkeylib/client.py @@ -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): ''' diff --git a/bitkeylib/debuglink.py b/bitkeylib/debuglink.py index 2e072f6fb..93e5825d4 100644 --- a/bitkeylib/debuglink.py +++ b/bitkeylib/debuglink.py @@ -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