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:
parent
8764e26368
commit
4fb15a13d8
6
bip32.c
6
bip32.c
@ -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)
|
||||
|
1
bip32.h
1
bip32.h
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user