1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-21 05:48:23 +00:00
trezor-firmware/mocks/trezor/crypto/bip32.py

13 lines
391 B
Python
Raw Normal View History

2016-10-07 11:27:43 +00:00
2017-04-08 16:43:26 +00:00
# extmod/modtrezorcrypto/modtrezorcrypto-bip32.h
2017-06-12 16:02:32 +00:00
def deserialize(value:str, version_public: int, version_private: int) -> HDNode:
2016-10-18 12:32:37 +00:00
'''
Construct a BIP0032 HD node from a base58-serialized value.
'''
2017-04-08 16:43:26 +00:00
# extmod/modtrezorcrypto/modtrezorcrypto-bip32.h
2016-10-07 11:27:43 +00:00
def from_seed(seed: bytes, curve_name: str) -> HDNode:
'''
Construct a BIP0032 HD node from a BIP0039 seed value.
'''