1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 12:00:59 +00:00

protob: build; templates: build

This commit is contained in:
Tomas Susanka 2019-01-16 15:53:36 +01:00
parent 7c5242ce8e
commit 89dc1966df
11 changed files with 181 additions and 4 deletions

View File

@ -83,7 +83,6 @@ tokens = [
(1, b"\x78\xb7\xfa\xda\x55\xa6\x4d\xd8\x95\xd8\xc8\xc3\x57\x79\xdd\x8b\x67\xfa\x8a\x05", "ATL", 18), # eth / ATL
(1, b"\x9b\x11\xef\xca\xaa\x18\x90\xf6\xee\x52\xc6\xbb\x7c\xf8\x15\x3a\xc5\xd7\x41\x39", "ATM", 8), # eth / ATMChain
(1, b"\x97\xae\xb5\x06\x6e\x1a\x59\x0e\x86\x8b\x51\x14\x57\xbe\xb6\xfe\x99\xd3\x29\xf5", "ATMI", 18), # eth / Atonomi
(1, b"\x2d\xae\xe1\xaa\x61\xd6\x0a\x25\x2d\xc8\x05\x64\x49\x9a\x69\x80\x28\x53\x58\x3a", "ATS", 4), # eth / Authorship
(1, b"\x88\x78\x34\xd3\xb8\xd4\x50\xb6\xba\xb1\x09\xc2\x52\xdf\x3d\xa2\x86\xd7\x3c\xe4", "ATT", 18), # eth / Atmatrix Token
(1, b"\x63\x39\x78\x4d\x94\x78\xda\x43\x10\x6a\x42\x91\x96\x77\x2a\x02\x9c\x2f\x17\x7d", "ATTN", 18), # eth / Attention Token
(1, b"\x1a\x0f\x2a\xb4\x6e\xc6\x30\xf9\xfd\x63\x80\x29\x02\x7b\x55\x2a\xfa\x64\xb9\x4c", "ATX", 18), # eth / Aston X

View File

@ -16,16 +16,13 @@ class EthereumGetPublicKey(p.MessageType):
self,
address_n: List[int] = None,
show_display: bool = None,
chain_id: int = None,
) -> None:
self.address_n = address_n if address_n is not None else []
self.show_display = show_display
self.chain_id = chain_id
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
3: ('chain_id', p.UVarintType, 0),
}

View File

@ -169,3 +169,11 @@ MoneroGetWatchKey = 542
MoneroWatchKey = 543
DebugMoneroDiagRequest = 546
DebugMoneroDiagAck = 547
MoneroGetTxKeyRequest = 550
MoneroGetTxKeyAck = 551
MoneroLiveRefreshStartRequest = 552
MoneroLiveRefreshStartAck = 553
MoneroLiveRefreshStepRequest = 554
MoneroLiveRefreshStepAck = 555
MoneroLiveRefreshFinalRequest = 556
MoneroLiveRefreshFinalAck = 557

View File

@ -0,0 +1,25 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class MoneroGetTxKeyAck(p.MessageType):
MESSAGE_WIRE_TYPE = 551
def __init__(
self,
salt: bytes = None,
tx_keys: bytes = None,
tx_derivations: bytes = None,
) -> None:
self.salt = salt
self.tx_keys = tx_keys
self.tx_derivations = tx_derivations
@classmethod
def get_fields(cls):
return {
1: ('salt', p.BytesType, 0),
2: ('tx_keys', p.BytesType, 0),
3: ('tx_derivations', p.BytesType, 0),
}

View File

@ -0,0 +1,46 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None # type: ignore
class MoneroGetTxKeyRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 550
def __init__(
self,
address_n: List[int] = None,
network_type: int = None,
salt1: bytes = None,
salt2: bytes = None,
tx_enc_keys: bytes = None,
tx_prefix_hash: bytes = None,
reason: int = None,
view_public_key: bytes = None,
) -> None:
self.address_n = address_n if address_n is not None else []
self.network_type = network_type
self.salt1 = salt1
self.salt2 = salt2
self.tx_enc_keys = tx_enc_keys
self.tx_prefix_hash = tx_prefix_hash
self.reason = reason
self.view_public_key = view_public_key
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('network_type', p.UVarintType, 0),
3: ('salt1', p.BytesType, 0),
4: ('salt2', p.BytesType, 0),
5: ('tx_enc_keys', p.BytesType, 0),
6: ('tx_prefix_hash', p.BytesType, 0),
7: ('reason', p.UVarintType, 0),
8: ('view_public_key', p.BytesType, 0),
}

View File

@ -0,0 +1,7 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class MoneroLiveRefreshFinalAck(p.MessageType):
MESSAGE_WIRE_TYPE = 557

View File

@ -0,0 +1,7 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class MoneroLiveRefreshFinalRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 556

View File

@ -0,0 +1,7 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class MoneroLiveRefreshStartAck(p.MessageType):
MESSAGE_WIRE_TYPE = 553

View File

@ -0,0 +1,28 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None # type: ignore
class MoneroLiveRefreshStartRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 552
def __init__(
self,
address_n: List[int] = None,
network_type: int = None,
) -> None:
self.address_n = address_n if address_n is not None else []
self.network_type = network_type
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('network_type', p.UVarintType, 0),
}

View File

@ -0,0 +1,22 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class MoneroLiveRefreshStepAck(p.MessageType):
MESSAGE_WIRE_TYPE = 555
def __init__(
self,
salt: bytes = None,
key_image: bytes = None,
) -> None:
self.salt = salt
self.key_image = key_image
@classmethod
def get_fields(cls):
return {
1: ('salt', p.BytesType, 0),
2: ('key_image', p.BytesType, 0),
}

View File

@ -0,0 +1,31 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class MoneroLiveRefreshStepRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 554
def __init__(
self,
out_key: bytes = None,
recv_deriv: bytes = None,
real_out_idx: int = None,
sub_addr_major: int = None,
sub_addr_minor: int = None,
) -> None:
self.out_key = out_key
self.recv_deriv = recv_deriv
self.real_out_idx = real_out_idx
self.sub_addr_major = sub_addr_major
self.sub_addr_minor = sub_addr_minor
@classmethod
def get_fields(cls):
return {
1: ('out_key', p.BytesType, 0),
2: ('recv_deriv', p.BytesType, 0),
3: ('real_out_idx', p.UVarintType, 0),
4: ('sub_addr_major', p.UVarintType, 0),
5: ('sub_addr_minor', p.UVarintType, 0),
}