You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/python/src/trezorlib/messages/HDNodeType.py

42 lines
1.1 KiB

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