1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 14:28:07 +00:00

add hdnode_get_address

This commit is contained in:
Pavol Rusnak 2016-10-08 18:18:32 +02:00
parent 8764e26368
commit 4fb15a13d8
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 7 additions and 0 deletions

View File

@ -380,6 +380,12 @@ void hdnode_get_address_raw(HDNode *node, uint32_t version, uint8_t *addr_raw)
ecdsa_get_address_raw(node->public_key, version, addr_raw);
}
void hdnode_get_address(HDNode *node, uint32_t version, char *addr, int addrsize)
{
hdnode_fill_public_key(node);
ecdsa_get_address(node->public_key, version, addr, addrsize);
}
void hdnode_fill_public_key(HDNode *node)
{
if (node->public_key[0] != 0)

View File

@ -84,6 +84,7 @@ int hdnode_deserialize(const char *str, HDNode *node);
int hdnode_serialize(const HDNode *node, uint32_t fingerprint, uint32_t version, char use_public, char *str, int strsize);
void hdnode_get_address_raw(HDNode *node, uint32_t version, uint8_t *addr_raw);
void hdnode_get_address(HDNode *node, uint32_t version, char *addr, int addrsize);
const curve_info *get_curve_by_name(const char *curve_name);