mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
add PublicKey.xpub field
This commit is contained in:
parent
e5bdf1943a
commit
63c6d046d1
@ -273,7 +273,8 @@ void fsm_msgGetPublicKey(GetPublicKey *msg)
|
||||
resp->node.has_public_key = true;
|
||||
resp->node.public_key.size = 33;
|
||||
memcpy(resp->node.public_key.bytes, node->public_key, 33);
|
||||
|
||||
resp->has_xpub = true;
|
||||
hdnode_serialize_public(node, resp->xpub);
|
||||
msg_write(MessageType_MessageType_PublicKey, resp);
|
||||
layoutHome();
|
||||
}
|
||||
|
@ -26,6 +26,8 @@ Entropy.entropy max_size:1024
|
||||
|
||||
GetPublicKey.address_n max_count:8
|
||||
|
||||
PublicKey.xpub max_size:113
|
||||
|
||||
GetAddress.address_n max_count:8
|
||||
GetAddress.coin_name max_size:17
|
||||
|
||||
|
@ -120,8 +120,9 @@ const pb_field_t GetPublicKey_fields[2] = {
|
||||
PB_LAST_FIELD
|
||||
};
|
||||
|
||||
const pb_field_t PublicKey_fields[2] = {
|
||||
const pb_field_t PublicKey_fields[3] = {
|
||||
PB_FIELD2( 1, MESSAGE , REQUIRED, STATIC , FIRST, PublicKey, node, node, &HDNodeType_fields),
|
||||
PB_FIELD2( 2, STRING , OPTIONAL, STATIC , OTHER, PublicKey, xpub, node, 0),
|
||||
PB_LAST_FIELD
|
||||
};
|
||||
|
||||
|
@ -364,6 +364,8 @@ typedef struct _Ping {
|
||||
|
||||
typedef struct _PublicKey {
|
||||
HDNodeType node;
|
||||
bool has_xpub;
|
||||
char xpub[113];
|
||||
} PublicKey;
|
||||
|
||||
typedef struct _RecoveryDevice {
|
||||
@ -568,6 +570,7 @@ extern const char SimpleSignTx_coin_name_default[17];
|
||||
#define Ping_pin_protection_tag 3
|
||||
#define Ping_passphrase_protection_tag 4
|
||||
#define PublicKey_node_tag 1
|
||||
#define PublicKey_xpub_tag 2
|
||||
#define RecoveryDevice_word_count_tag 1
|
||||
#define RecoveryDevice_passphrase_protection_tag 2
|
||||
#define RecoveryDevice_pin_protection_tag 3
|
||||
@ -621,7 +624,7 @@ extern const pb_field_t PassphraseAck_fields[2];
|
||||
extern const pb_field_t GetEntropy_fields[2];
|
||||
extern const pb_field_t Entropy_fields[2];
|
||||
extern const pb_field_t GetPublicKey_fields[2];
|
||||
extern const pb_field_t PublicKey_fields[2];
|
||||
extern const pb_field_t PublicKey_fields[3];
|
||||
extern const pb_field_t GetAddress_fields[3];
|
||||
extern const pb_field_t Address_fields[2];
|
||||
extern const pb_field_t WipeDevice_fields[1];
|
||||
@ -671,7 +674,7 @@ extern const pb_field_t DebugLinkLog_fields[4];
|
||||
#define GetEntropy_size 6
|
||||
#define Entropy_size 1027
|
||||
#define GetPublicKey_size 48
|
||||
#define PublicKey_size (6 + HDNodeType_size)
|
||||
#define PublicKey_size (121 + HDNodeType_size)
|
||||
#define GetAddress_size 67
|
||||
#define Address_size 37
|
||||
#define WipeDevice_size 0
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit fc98712da5c260f3828dab703880eb5e9da00580
|
||||
Subproject commit ce8e99465ea1fbcbdc5e7b477cfdab73244a444d
|
Loading…
Reference in New Issue
Block a user