1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-07-06 23:02:33 +00:00
trezor-firmware/core/src/trezor/messages/HDNodeType.py
2019-08-02 19:06:01 +02:00

41 lines
1.2 KiB
Python

# Automatically generated by pb2py
# fmt: off
import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
from typing_extensions import Literal # noqa: F401
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class HDNodeType(p.MessageType):
def __init__(
self,
depth: int = None,
fingerprint: int = None,
child_num: int = None,
chain_code: bytes = None,
private_key: bytes = None,
public_key: bytes = None,
) -> None:
self.depth = depth
self.fingerprint = fingerprint
self.child_num = child_num
self.chain_code = chain_code
self.private_key = private_key
self.public_key = public_key
@classmethod
def get_fields(cls) -> Dict:
return {
1: ('depth', p.UVarintType, 0), # required
2: ('fingerprint', p.UVarintType, 0), # required
3: ('child_num', p.UVarintType, 0), # required
4: ('chain_code', p.BytesType, 0), # required
5: ('private_key', p.BytesType, 0),
6: ('public_key', p.BytesType, 0),
}