From 6bdaaaf514ec09df20049b3d4f3ef4cdeaca0c27 Mon Sep 17 00:00:00 2001 From: slush Date: Sat, 5 Jan 2013 14:40:53 +0000 Subject: [PATCH] Added GetAddress/Address messages --- bitkeylib/mapping.py | 2 ++ protobuf/bitkey.proto | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/bitkeylib/mapping.py b/bitkeylib/mapping.py index a671689c0..6a8419eb3 100644 --- a/bitkeylib/mapping.py +++ b/bitkeylib/mapping.py @@ -30,6 +30,8 @@ map_type_to_class = { 26: proto.ButtonRequest, 27: proto.ButtonAck, 28: proto.ButtonCancel, + 29: proto.GetAddress, + 30: proto.Address, 100: proto.DebugLinkDecision, 101: proto.DebugLinkGetState, 102: proto.DebugLinkState, diff --git a/protobuf/bitkey.proto b/protobuf/bitkey.proto index 302b0256f..1a29cf38d 100644 --- a/protobuf/bitkey.proto +++ b/protobuf/bitkey.proto @@ -174,7 +174,7 @@ message SetMaxFeeKb { // // Response: MasterPublicKey, Failure message GetMasterPublicKey { - required Algorithm algo = 1 [default=BIP32]; // Used algorithm for generating master public key + required Algorithm algo = 1 [default=BIP32]; // Used algorithm for generating the master public key } // Contains master public key derived from device's seed. @@ -182,6 +182,15 @@ message MasterPublicKey { required bytes key = 1; // master public key of requested algorithm in binary format } +message GetAddress { + required Algorithm algo = 1 [default=BIP32]; // Used algorithm for generating the address + repeated uint32 address_n = 2; // Parameter for address generation algorithm to derive the address from the master public key +} + +message Address { + required string address = 1; // Bitcoin address in base58 encoding corresponding to GetAddress(algo, n) call +} + // Load seed and related internal settings from computer to the device. Existing seed is overwritten. // // Response: Success, OtpRequest, PinRequest, Failure