mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-15 11:08:08 +00:00
vendor: update trezor-common, regenerate messages
This commit is contained in:
parent
6d5a8645fd
commit
13c659c202
16
src/trezor/messages/CardanoAddress.py
Normal file
16
src/trezor/messages/CardanoAddress.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
|
||||||
|
class CardanoAddress(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 308
|
||||||
|
FIELDS = {
|
||||||
|
1: ('address', p.UnicodeType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
address: str = None,
|
||||||
|
) -> None:
|
||||||
|
self.address = address
|
24
src/trezor/messages/CardanoGetAddress.py
Normal file
24
src/trezor/messages/CardanoGetAddress.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import List
|
||||||
|
except ImportError:
|
||||||
|
List = None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class CardanoGetAddress(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 307
|
||||||
|
FIELDS = {
|
||||||
|
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||||
|
2: ('show_display', p.BoolType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
address_n: List[int] = None,
|
||||||
|
show_display: bool = None,
|
||||||
|
) -> None:
|
||||||
|
self.address_n = address_n if address_n is not None else []
|
||||||
|
self.show_display = show_display
|
21
src/trezor/messages/CardanoGetPublicKey.py
Normal file
21
src/trezor/messages/CardanoGetPublicKey.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import List
|
||||||
|
except ImportError:
|
||||||
|
List = None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class CardanoGetPublicKey(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 305
|
||||||
|
FIELDS = {
|
||||||
|
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
address_n: List[int] = None,
|
||||||
|
) -> None:
|
||||||
|
self.address_n = address_n if address_n is not None else []
|
19
src/trezor/messages/CardanoMessageSignature.py
Normal file
19
src/trezor/messages/CardanoMessageSignature.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
|
||||||
|
class CardanoMessageSignature(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 301
|
||||||
|
FIELDS = {
|
||||||
|
1: ('public_key', p.BytesType, 0),
|
||||||
|
2: ('signature', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
public_key: bytes = None,
|
||||||
|
signature: bytes = None,
|
||||||
|
) -> None:
|
||||||
|
self.public_key = public_key
|
||||||
|
self.signature = signature
|
23
src/trezor/messages/CardanoPublicKey.py
Normal file
23
src/trezor/messages/CardanoPublicKey.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
from .HDNodeType import HDNodeType
|
||||||
|
|
||||||
|
|
||||||
|
class CardanoPublicKey(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 306
|
||||||
|
FIELDS = {
|
||||||
|
1: ('xpub', p.UnicodeType, 0),
|
||||||
|
2: ('node', HDNodeType, 0),
|
||||||
|
3: ('root_hd_passphrase', p.UnicodeType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
xpub: str = None,
|
||||||
|
node: HDNodeType = None,
|
||||||
|
root_hd_passphrase: str = None,
|
||||||
|
) -> None:
|
||||||
|
self.xpub = xpub
|
||||||
|
self.node = node
|
||||||
|
self.root_hd_passphrase = root_hd_passphrase
|
@ -8,23 +8,17 @@ if __debug__:
|
|||||||
List = None # type: ignore
|
List = None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
class DecryptMessage(p.MessageType):
|
class CardanoSignMessage(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 51
|
MESSAGE_WIRE_TYPE = 300
|
||||||
FIELDS = {
|
FIELDS = {
|
||||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||||
2: ('nonce', p.BytesType, 0),
|
2: ('message', p.BytesType, 0),
|
||||||
3: ('message', p.BytesType, 0),
|
|
||||||
4: ('hmac', p.BytesType, 0),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
address_n: List[int] = None,
|
address_n: List[int] = None,
|
||||||
nonce: bytes = None,
|
|
||||||
message: bytes = None,
|
message: bytes = None,
|
||||||
hmac: bytes = None,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
self.address_n = address_n if address_n is not None else []
|
self.address_n = address_n if address_n is not None else []
|
||||||
self.nonce = nonce
|
|
||||||
self.message = message
|
self.message = message
|
||||||
self.hmac = hmac
|
|
29
src/trezor/messages/CardanoSignTransaction.py
Normal file
29
src/trezor/messages/CardanoSignTransaction.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import List
|
||||||
|
except ImportError:
|
||||||
|
List = None # type: ignore
|
||||||
|
from .CardanoTxInputType import CardanoTxInputType
|
||||||
|
from .CardanoTxOutputType import CardanoTxOutputType
|
||||||
|
|
||||||
|
|
||||||
|
class CardanoSignTransaction(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 303
|
||||||
|
FIELDS = {
|
||||||
|
1: ('inputs', CardanoTxInputType, p.FLAG_REPEATED),
|
||||||
|
2: ('outputs', CardanoTxOutputType, p.FLAG_REPEATED),
|
||||||
|
3: ('transactions_count', p.UVarintType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
inputs: List[CardanoTxInputType] = None,
|
||||||
|
outputs: List[CardanoTxOutputType] = None,
|
||||||
|
transactions_count: int = None,
|
||||||
|
) -> None:
|
||||||
|
self.inputs = inputs if inputs is not None else []
|
||||||
|
self.outputs = outputs if outputs is not None else []
|
||||||
|
self.transactions_count = transactions_count
|
19
src/trezor/messages/CardanoSignedTransaction.py
Normal file
19
src/trezor/messages/CardanoSignedTransaction.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
|
||||||
|
class CardanoSignedTransaction(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 310
|
||||||
|
FIELDS = {
|
||||||
|
1: ('tx_hash', p.BytesType, 0),
|
||||||
|
2: ('tx_body', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
tx_hash: bytes = None,
|
||||||
|
tx_body: bytes = None,
|
||||||
|
) -> None:
|
||||||
|
self.tx_hash = tx_hash
|
||||||
|
self.tx_body = tx_body
|
16
src/trezor/messages/CardanoTxAck.py
Normal file
16
src/trezor/messages/CardanoTxAck.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
|
||||||
|
class CardanoTxAck(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 309
|
||||||
|
FIELDS = {
|
||||||
|
1: ('transaction', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
transaction: bytes = None,
|
||||||
|
) -> None:
|
||||||
|
self.transaction = transaction
|
29
src/trezor/messages/CardanoTxInputType.py
Normal file
29
src/trezor/messages/CardanoTxInputType.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import List
|
||||||
|
except ImportError:
|
||||||
|
List = None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class CardanoTxInputType(p.MessageType):
|
||||||
|
FIELDS = {
|
||||||
|
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||||
|
2: ('prev_hash', p.BytesType, 0),
|
||||||
|
3: ('prev_index', p.UVarintType, 0),
|
||||||
|
4: ('type', p.UVarintType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
address_n: List[int] = None,
|
||||||
|
prev_hash: bytes = None,
|
||||||
|
prev_index: int = None,
|
||||||
|
type: int = None,
|
||||||
|
) -> None:
|
||||||
|
self.address_n = address_n if address_n is not None else []
|
||||||
|
self.prev_hash = prev_hash
|
||||||
|
self.prev_index = prev_index
|
||||||
|
self.type = type
|
26
src/trezor/messages/CardanoTxOutputType.py
Normal file
26
src/trezor/messages/CardanoTxOutputType.py
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import List
|
||||||
|
except ImportError:
|
||||||
|
List = None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class CardanoTxOutputType(p.MessageType):
|
||||||
|
FIELDS = {
|
||||||
|
1: ('address', p.UnicodeType, 0),
|
||||||
|
2: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||||
|
3: ('amount', p.UVarintType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
address: str = None,
|
||||||
|
address_n: List[int] = None,
|
||||||
|
amount: int = None,
|
||||||
|
) -> None:
|
||||||
|
self.address = address
|
||||||
|
self.address_n = address_n if address_n is not None else []
|
||||||
|
self.amount = amount
|
22
src/trezor/messages/CardanoTxRequest.py
Normal file
22
src/trezor/messages/CardanoTxRequest.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
|
||||||
|
class CardanoTxRequest(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 304
|
||||||
|
FIELDS = {
|
||||||
|
1: ('tx_index', p.UVarintType, 0),
|
||||||
|
2: ('tx_hash', p.BytesType, 0),
|
||||||
|
3: ('tx_body', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
tx_index: int = None,
|
||||||
|
tx_hash: bytes = None,
|
||||||
|
tx_body: bytes = None,
|
||||||
|
) -> None:
|
||||||
|
self.tx_index = tx_index
|
||||||
|
self.tx_hash = tx_hash
|
||||||
|
self.tx_body = tx_body
|
22
src/trezor/messages/CardanoVerifyMessage.py
Normal file
22
src/trezor/messages/CardanoVerifyMessage.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
|
||||||
|
class CardanoVerifyMessage(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 302
|
||||||
|
FIELDS = {
|
||||||
|
1: ('public_key', p.BytesType, 0),
|
||||||
|
2: ('signature', p.BytesType, 0),
|
||||||
|
3: ('message', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
public_key: bytes = None,
|
||||||
|
signature: bytes = None,
|
||||||
|
message: bytes = None,
|
||||||
|
) -> None:
|
||||||
|
self.public_key = public_key
|
||||||
|
self.signature = signature
|
||||||
|
self.message = message
|
@ -1,19 +0,0 @@
|
|||||||
# Automatically generated by pb2py
|
|
||||||
# fmt: off
|
|
||||||
import protobuf as p
|
|
||||||
|
|
||||||
|
|
||||||
class DecryptedMessage(p.MessageType):
|
|
||||||
MESSAGE_WIRE_TYPE = 52
|
|
||||||
FIELDS = {
|
|
||||||
1: ('message', p.BytesType, 0),
|
|
||||||
2: ('address', p.UnicodeType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
message: bytes = None,
|
|
||||||
address: str = None,
|
|
||||||
) -> None:
|
|
||||||
self.message = message
|
|
||||||
self.address = address
|
|
@ -1,33 +0,0 @@
|
|||||||
# Automatically generated by pb2py
|
|
||||||
# fmt: off
|
|
||||||
import protobuf as p
|
|
||||||
if __debug__:
|
|
||||||
try:
|
|
||||||
from typing import List
|
|
||||||
except ImportError:
|
|
||||||
List = None # type: ignore
|
|
||||||
|
|
||||||
|
|
||||||
class EncryptMessage(p.MessageType):
|
|
||||||
MESSAGE_WIRE_TYPE = 49
|
|
||||||
FIELDS = {
|
|
||||||
1: ('pubkey', p.BytesType, 0),
|
|
||||||
2: ('message', p.BytesType, 0),
|
|
||||||
3: ('display_only', p.BoolType, 0),
|
|
||||||
4: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
|
||||||
5: ('coin_name', p.UnicodeType, 0), # default=Bitcoin
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
pubkey: bytes = None,
|
|
||||||
message: bytes = None,
|
|
||||||
display_only: bool = None,
|
|
||||||
address_n: List[int] = None,
|
|
||||||
coin_name: str = None,
|
|
||||||
) -> None:
|
|
||||||
self.pubkey = pubkey
|
|
||||||
self.message = message
|
|
||||||
self.display_only = display_only
|
|
||||||
self.address_n = address_n if address_n is not None else []
|
|
||||||
self.coin_name = coin_name
|
|
@ -1,22 +0,0 @@
|
|||||||
# Automatically generated by pb2py
|
|
||||||
# fmt: off
|
|
||||||
import protobuf as p
|
|
||||||
|
|
||||||
|
|
||||||
class EncryptedMessage(p.MessageType):
|
|
||||||
MESSAGE_WIRE_TYPE = 50
|
|
||||||
FIELDS = {
|
|
||||||
1: ('nonce', p.BytesType, 0),
|
|
||||||
2: ('message', p.BytesType, 0),
|
|
||||||
3: ('hmac', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
nonce: bytes = None,
|
|
||||||
message: bytes = None,
|
|
||||||
hmac: bytes = None,
|
|
||||||
) -> None:
|
|
||||||
self.nonce = nonce
|
|
||||||
self.message = message
|
|
||||||
self.hmac = hmac
|
|
@ -1,22 +0,0 @@
|
|||||||
# Automatically generated by pb2py
|
|
||||||
# fmt: off
|
|
||||||
import protobuf as p
|
|
||||||
|
|
||||||
|
|
||||||
class EstimateTxSize(p.MessageType):
|
|
||||||
MESSAGE_WIRE_TYPE = 43
|
|
||||||
FIELDS = {
|
|
||||||
1: ('outputs_count', p.UVarintType, 0), # required
|
|
||||||
2: ('inputs_count', p.UVarintType, 0), # required
|
|
||||||
3: ('coin_name', p.UnicodeType, 0), # default=Bitcoin
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
outputs_count: int = None,
|
|
||||||
inputs_count: int = None,
|
|
||||||
coin_name: str = None,
|
|
||||||
) -> None:
|
|
||||||
self.outputs_count = outputs_count
|
|
||||||
self.inputs_count = inputs_count
|
|
||||||
self.coin_name = coin_name
|
|
@ -6,76 +6,55 @@ Success = 2
|
|||||||
Failure = 3
|
Failure = 3
|
||||||
ChangePin = 4
|
ChangePin = 4
|
||||||
WipeDevice = 5
|
WipeDevice = 5
|
||||||
FirmwareErase = 6
|
|
||||||
FirmwareUpload = 7
|
|
||||||
FirmwareRequest = 8
|
|
||||||
GetEntropy = 9
|
GetEntropy = 9
|
||||||
Entropy = 10
|
Entropy = 10
|
||||||
GetPublicKey = 11
|
|
||||||
PublicKey = 12
|
|
||||||
LoadDevice = 13
|
LoadDevice = 13
|
||||||
ResetDevice = 14
|
ResetDevice = 14
|
||||||
SignTx = 15
|
|
||||||
SimpleSignTx = 16
|
|
||||||
Features = 17
|
Features = 17
|
||||||
PinMatrixRequest = 18
|
PinMatrixRequest = 18
|
||||||
PinMatrixAck = 19
|
PinMatrixAck = 19
|
||||||
Cancel = 20
|
Cancel = 20
|
||||||
TxRequest = 21
|
|
||||||
TxAck = 22
|
|
||||||
CipherKeyValue = 23
|
|
||||||
ClearSession = 24
|
ClearSession = 24
|
||||||
ApplySettings = 25
|
ApplySettings = 25
|
||||||
ButtonRequest = 26
|
ButtonRequest = 26
|
||||||
ButtonAck = 27
|
ButtonAck = 27
|
||||||
ApplyFlags = 28
|
ApplyFlags = 28
|
||||||
GetAddress = 29
|
|
||||||
Address = 30
|
|
||||||
SelfTest = 32
|
|
||||||
BackupDevice = 34
|
BackupDevice = 34
|
||||||
EntropyRequest = 35
|
EntropyRequest = 35
|
||||||
EntropyAck = 36
|
EntropyAck = 36
|
||||||
SignMessage = 38
|
|
||||||
VerifyMessage = 39
|
|
||||||
MessageSignature = 40
|
|
||||||
PassphraseRequest = 41
|
PassphraseRequest = 41
|
||||||
PassphraseAck = 42
|
PassphraseAck = 42
|
||||||
PassphraseStateRequest = 77
|
PassphraseStateRequest = 77
|
||||||
PassphraseStateAck = 78
|
PassphraseStateAck = 78
|
||||||
EstimateTxSize = 43
|
|
||||||
TxSize = 44
|
|
||||||
RecoveryDevice = 45
|
RecoveryDevice = 45
|
||||||
WordRequest = 46
|
WordRequest = 46
|
||||||
WordAck = 47
|
WordAck = 47
|
||||||
|
GetFeatures = 55
|
||||||
|
SetU2FCounter = 63
|
||||||
|
FirmwareErase = 6
|
||||||
|
FirmwareUpload = 7
|
||||||
|
FirmwareRequest = 8
|
||||||
|
SelfTest = 32
|
||||||
|
GetPublicKey = 11
|
||||||
|
PublicKey = 12
|
||||||
|
SignTx = 15
|
||||||
|
TxRequest = 21
|
||||||
|
TxAck = 22
|
||||||
|
GetAddress = 29
|
||||||
|
Address = 30
|
||||||
|
SignMessage = 38
|
||||||
|
VerifyMessage = 39
|
||||||
|
MessageSignature = 40
|
||||||
|
CipherKeyValue = 23
|
||||||
CipheredKeyValue = 48
|
CipheredKeyValue = 48
|
||||||
EncryptMessage = 49
|
|
||||||
EncryptedMessage = 50
|
|
||||||
DecryptMessage = 51
|
|
||||||
DecryptedMessage = 52
|
|
||||||
SignIdentity = 53
|
SignIdentity = 53
|
||||||
SignedIdentity = 54
|
SignedIdentity = 54
|
||||||
GetFeatures = 55
|
|
||||||
EthereumGetAddress = 56
|
|
||||||
EthereumAddress = 57
|
|
||||||
EthereumSignTx = 58
|
|
||||||
EthereumTxRequest = 59
|
|
||||||
EthereumTxAck = 60
|
|
||||||
GetECDHSessionKey = 61
|
GetECDHSessionKey = 61
|
||||||
ECDHSessionKey = 62
|
ECDHSessionKey = 62
|
||||||
SetU2FCounter = 63
|
|
||||||
EthereumSignMessage = 64
|
|
||||||
EthereumVerifyMessage = 65
|
|
||||||
EthereumMessageSignature = 66
|
|
||||||
NEMGetAddress = 67
|
|
||||||
NEMAddress = 68
|
|
||||||
NEMSignTx = 69
|
|
||||||
NEMSignedTx = 70
|
|
||||||
CosiCommit = 71
|
CosiCommit = 71
|
||||||
CosiCommitment = 72
|
CosiCommitment = 72
|
||||||
CosiSign = 73
|
CosiSign = 73
|
||||||
CosiSignature = 74
|
CosiSignature = 74
|
||||||
NEMDecryptMessage = 75
|
|
||||||
NEMDecryptedMessage = 76
|
|
||||||
DebugLinkDecision = 100
|
DebugLinkDecision = 100
|
||||||
DebugLinkGetState = 101
|
DebugLinkGetState = 101
|
||||||
DebugLinkState = 102
|
DebugLinkState = 102
|
||||||
@ -85,6 +64,20 @@ DebugLinkMemoryRead = 110
|
|||||||
DebugLinkMemory = 111
|
DebugLinkMemory = 111
|
||||||
DebugLinkMemoryWrite = 112
|
DebugLinkMemoryWrite = 112
|
||||||
DebugLinkFlashErase = 113
|
DebugLinkFlashErase = 113
|
||||||
|
EthereumGetAddress = 56
|
||||||
|
EthereumAddress = 57
|
||||||
|
EthereumSignTx = 58
|
||||||
|
EthereumTxRequest = 59
|
||||||
|
EthereumTxAck = 60
|
||||||
|
EthereumSignMessage = 64
|
||||||
|
EthereumVerifyMessage = 65
|
||||||
|
EthereumMessageSignature = 66
|
||||||
|
NEMGetAddress = 67
|
||||||
|
NEMAddress = 68
|
||||||
|
NEMSignTx = 69
|
||||||
|
NEMSignedTx = 70
|
||||||
|
NEMDecryptMessage = 75
|
||||||
|
NEMDecryptedMessage = 76
|
||||||
LiskGetAddress = 114
|
LiskGetAddress = 114
|
||||||
LiskAddress = 115
|
LiskAddress = 115
|
||||||
LiskSignTx = 116
|
LiskSignTx = 116
|
||||||
@ -94,6 +87,12 @@ LiskMessageSignature = 119
|
|||||||
LiskVerifyMessage = 120
|
LiskVerifyMessage = 120
|
||||||
LiskGetPublicKey = 121
|
LiskGetPublicKey = 121
|
||||||
LiskPublicKey = 122
|
LiskPublicKey = 122
|
||||||
|
TezosGetAddress = 150
|
||||||
|
TezosAddress = 151
|
||||||
|
TezosSignTx = 152
|
||||||
|
TezosSignedTx = 153
|
||||||
|
TezosGetPublicKey = 154
|
||||||
|
TezosPublicKey = 155
|
||||||
StellarGetPublicKey = 200
|
StellarGetPublicKey = 200
|
||||||
StellarPublicKey = 201
|
StellarPublicKey = 201
|
||||||
StellarSignTx = 202
|
StellarSignTx = 202
|
||||||
@ -112,3 +111,14 @@ StellarAccountMergeOp = 218
|
|||||||
StellarManageDataOp = 220
|
StellarManageDataOp = 220
|
||||||
StellarBumpSequenceOp = 221
|
StellarBumpSequenceOp = 221
|
||||||
StellarSignedTx = 230
|
StellarSignedTx = 230
|
||||||
|
CardanoSignMessage = 300
|
||||||
|
CardanoMessageSignature = 301
|
||||||
|
CardanoVerifyMessage = 302
|
||||||
|
CardanoSignTransaction = 303
|
||||||
|
CardanoTxRequest = 304
|
||||||
|
CardanoGetPublicKey = 305
|
||||||
|
CardanoPublicKey = 306
|
||||||
|
CardanoGetAddress = 307
|
||||||
|
CardanoAddress = 308
|
||||||
|
CardanoTxAck = 309
|
||||||
|
CardanoSignedTransaction = 310
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
# Automatically generated by pb2py
|
|
||||||
# fmt: off
|
|
||||||
import protobuf as p
|
|
||||||
if __debug__:
|
|
||||||
try:
|
|
||||||
from typing import List
|
|
||||||
except ImportError:
|
|
||||||
List = None # type: ignore
|
|
||||||
from .TransactionType import TransactionType
|
|
||||||
from .TxInputType import TxInputType
|
|
||||||
from .TxOutputType import TxOutputType
|
|
||||||
|
|
||||||
|
|
||||||
class SimpleSignTx(p.MessageType):
|
|
||||||
MESSAGE_WIRE_TYPE = 16
|
|
||||||
FIELDS = {
|
|
||||||
1: ('inputs', TxInputType, p.FLAG_REPEATED),
|
|
||||||
2: ('outputs', TxOutputType, p.FLAG_REPEATED),
|
|
||||||
3: ('transactions', TransactionType, p.FLAG_REPEATED),
|
|
||||||
4: ('coin_name', p.UnicodeType, 0), # default=Bitcoin
|
|
||||||
5: ('version', p.UVarintType, 0), # default=1
|
|
||||||
6: ('lock_time', p.UVarintType, 0), # default=0
|
|
||||||
7: ('expiry', p.UVarintType, 0),
|
|
||||||
8: ('overwintered', p.BoolType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
inputs: List[TxInputType] = None,
|
|
||||||
outputs: List[TxOutputType] = None,
|
|
||||||
transactions: List[TransactionType] = None,
|
|
||||||
coin_name: str = None,
|
|
||||||
version: int = None,
|
|
||||||
lock_time: int = None,
|
|
||||||
expiry: int = None,
|
|
||||||
overwintered: bool = None,
|
|
||||||
) -> None:
|
|
||||||
self.inputs = inputs if inputs is not None else []
|
|
||||||
self.outputs = outputs if outputs is not None else []
|
|
||||||
self.transactions = transactions if transactions is not None else []
|
|
||||||
self.coin_name = coin_name
|
|
||||||
self.version = version
|
|
||||||
self.lock_time = lock_time
|
|
||||||
self.expiry = expiry
|
|
||||||
self.overwintered = overwintered
|
|
16
src/trezor/messages/TezosAddress.py
Normal file
16
src/trezor/messages/TezosAddress.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
|
||||||
|
class TezosAddress(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 151
|
||||||
|
FIELDS = {
|
||||||
|
1: ('address', p.UnicodeType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
address: str = None,
|
||||||
|
) -> None:
|
||||||
|
self.address = address
|
18
src/trezor/messages/TezosContractID.py
Normal file
18
src/trezor/messages/TezosContractID.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
|
||||||
|
class TezosContractID(p.MessageType):
|
||||||
|
FIELDS = {
|
||||||
|
1: ('tag', p.UVarintType, 0),
|
||||||
|
2: ('hash', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
tag: int = None,
|
||||||
|
hash: bytes = None,
|
||||||
|
) -> None:
|
||||||
|
self.tag = tag
|
||||||
|
self.hash = hash
|
4
src/trezor/messages/TezosContractType.py
Normal file
4
src/trezor/messages/TezosContractType.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
Implicit = 0
|
||||||
|
Originated = 1
|
15
src/trezor/messages/TezosDelegationType.py
Normal file
15
src/trezor/messages/TezosDelegationType.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
|
||||||
|
class TezosDelegationType(p.MessageType):
|
||||||
|
FIELDS = {
|
||||||
|
1: ('delegate', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
delegate: bytes = None,
|
||||||
|
) -> None:
|
||||||
|
self.delegate = delegate
|
24
src/trezor/messages/TezosGetAddress.py
Normal file
24
src/trezor/messages/TezosGetAddress.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import List
|
||||||
|
except ImportError:
|
||||||
|
List = None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class TezosGetAddress(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 150
|
||||||
|
FIELDS = {
|
||||||
|
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||||
|
2: ('show_display', p.BoolType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
address_n: List[int] = None,
|
||||||
|
show_display: bool = None,
|
||||||
|
) -> None:
|
||||||
|
self.address_n = address_n if address_n is not None else []
|
||||||
|
self.show_display = show_display
|
24
src/trezor/messages/TezosGetPublicKey.py
Normal file
24
src/trezor/messages/TezosGetPublicKey.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import List
|
||||||
|
except ImportError:
|
||||||
|
List = None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
class TezosGetPublicKey(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 154
|
||||||
|
FIELDS = {
|
||||||
|
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||||
|
2: ('show_display', p.BoolType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
address_n: List[int] = None,
|
||||||
|
show_display: bool = None,
|
||||||
|
) -> None:
|
||||||
|
self.address_n = address_n if address_n is not None else []
|
||||||
|
self.show_display = show_display
|
34
src/trezor/messages/TezosOperationCommon.py
Normal file
34
src/trezor/messages/TezosOperationCommon.py
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
from .TezosContractID import TezosContractID
|
||||||
|
|
||||||
|
|
||||||
|
class TezosOperationCommon(p.MessageType):
|
||||||
|
FIELDS = {
|
||||||
|
1: ('branch', p.BytesType, 0),
|
||||||
|
2: ('tag', p.UVarintType, 0),
|
||||||
|
3: ('source', TezosContractID, 0),
|
||||||
|
4: ('fee', p.UVarintType, 0),
|
||||||
|
5: ('counter', p.UVarintType, 0),
|
||||||
|
6: ('gas_limit', p.UVarintType, 0),
|
||||||
|
7: ('storage_limit', p.UVarintType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
branch: bytes = None,
|
||||||
|
tag: int = None,
|
||||||
|
source: TezosContractID = None,
|
||||||
|
fee: int = None,
|
||||||
|
counter: int = None,
|
||||||
|
gas_limit: int = None,
|
||||||
|
storage_limit: int = None,
|
||||||
|
) -> None:
|
||||||
|
self.branch = branch
|
||||||
|
self.tag = tag
|
||||||
|
self.source = source
|
||||||
|
self.fee = fee
|
||||||
|
self.counter = counter
|
||||||
|
self.gas_limit = gas_limit
|
||||||
|
self.storage_limit = storage_limit
|
5
src/trezor/messages/TezosOperationType.py
Normal file
5
src/trezor/messages/TezosOperationType.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
Transaction = 8
|
||||||
|
Origination = 9
|
||||||
|
Delegation = 10
|
30
src/trezor/messages/TezosOriginationType.py
Normal file
30
src/trezor/messages/TezosOriginationType.py
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
|
||||||
|
class TezosOriginationType(p.MessageType):
|
||||||
|
FIELDS = {
|
||||||
|
1: ('manager_pubkey', p.BytesType, 0),
|
||||||
|
2: ('balance', p.UVarintType, 0),
|
||||||
|
3: ('spendable', p.BoolType, 0),
|
||||||
|
4: ('delegatable', p.BoolType, 0),
|
||||||
|
5: ('delegate', p.BytesType, 0),
|
||||||
|
6: ('script', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
manager_pubkey: bytes = None,
|
||||||
|
balance: int = None,
|
||||||
|
spendable: bool = None,
|
||||||
|
delegatable: bool = None,
|
||||||
|
delegate: bytes = None,
|
||||||
|
script: bytes = None,
|
||||||
|
) -> None:
|
||||||
|
self.manager_pubkey = manager_pubkey
|
||||||
|
self.balance = balance
|
||||||
|
self.spendable = spendable
|
||||||
|
self.delegatable = delegatable
|
||||||
|
self.delegate = delegate
|
||||||
|
self.script = script
|
16
src/trezor/messages/TezosPublicKey.py
Normal file
16
src/trezor/messages/TezosPublicKey.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
|
||||||
|
class TezosPublicKey(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 155
|
||||||
|
FIELDS = {
|
||||||
|
1: ('public_key', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
public_key: bytes = None,
|
||||||
|
) -> None:
|
||||||
|
self.public_key = public_key
|
37
src/trezor/messages/TezosSignTx.py
Normal file
37
src/trezor/messages/TezosSignTx.py
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import List
|
||||||
|
except ImportError:
|
||||||
|
List = None # type: ignore
|
||||||
|
from .TezosDelegationType import TezosDelegationType
|
||||||
|
from .TezosOperationCommon import TezosOperationCommon
|
||||||
|
from .TezosOriginationType import TezosOriginationType
|
||||||
|
from .TezosTransactionType import TezosTransactionType
|
||||||
|
|
||||||
|
|
||||||
|
class TezosSignTx(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 152
|
||||||
|
FIELDS = {
|
||||||
|
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||||
|
2: ('operation', TezosOperationCommon, 0),
|
||||||
|
3: ('transaction', TezosTransactionType, 0),
|
||||||
|
4: ('origination', TezosOriginationType, 0),
|
||||||
|
5: ('delegation', TezosDelegationType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
address_n: List[int] = None,
|
||||||
|
operation: TezosOperationCommon = None,
|
||||||
|
transaction: TezosTransactionType = None,
|
||||||
|
origination: TezosOriginationType = None,
|
||||||
|
delegation: TezosDelegationType = None,
|
||||||
|
) -> None:
|
||||||
|
self.address_n = address_n if address_n is not None else []
|
||||||
|
self.operation = operation
|
||||||
|
self.transaction = transaction
|
||||||
|
self.origination = origination
|
||||||
|
self.delegation = delegation
|
22
src/trezor/messages/TezosSignedTx.py
Normal file
22
src/trezor/messages/TezosSignedTx.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
|
||||||
|
class TezosSignedTx(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 153
|
||||||
|
FIELDS = {
|
||||||
|
1: ('signature', p.BytesType, 0),
|
||||||
|
2: ('sig_op_contents', p.BytesType, 0),
|
||||||
|
3: ('operation_hash', p.UnicodeType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
signature: bytes = None,
|
||||||
|
sig_op_contents: bytes = None,
|
||||||
|
operation_hash: str = None,
|
||||||
|
) -> None:
|
||||||
|
self.signature = signature
|
||||||
|
self.sig_op_contents = sig_op_contents
|
||||||
|
self.operation_hash = operation_hash
|
22
src/trezor/messages/TezosTransactionType.py
Normal file
22
src/trezor/messages/TezosTransactionType.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
from .TezosContractID import TezosContractID
|
||||||
|
|
||||||
|
|
||||||
|
class TezosTransactionType(p.MessageType):
|
||||||
|
FIELDS = {
|
||||||
|
1: ('amount', p.UVarintType, 0),
|
||||||
|
2: ('destination', TezosContractID, 0),
|
||||||
|
3: ('parameters', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
amount: int = None,
|
||||||
|
destination: TezosContractID = None,
|
||||||
|
parameters: bytes = None,
|
||||||
|
) -> None:
|
||||||
|
self.amount = amount
|
||||||
|
self.destination = destination
|
||||||
|
self.parameters = parameters
|
@ -16,8 +16,8 @@ class TransactionType(p.MessageType):
|
|||||||
1: ('version', p.UVarintType, 0),
|
1: ('version', p.UVarintType, 0),
|
||||||
2: ('inputs', TxInputType, p.FLAG_REPEATED),
|
2: ('inputs', TxInputType, p.FLAG_REPEATED),
|
||||||
3: ('bin_outputs', TxOutputBinType, p.FLAG_REPEATED),
|
3: ('bin_outputs', TxOutputBinType, p.FLAG_REPEATED),
|
||||||
5: ('outputs', TxOutputType, p.FLAG_REPEATED),
|
|
||||||
4: ('lock_time', p.UVarintType, 0),
|
4: ('lock_time', p.UVarintType, 0),
|
||||||
|
5: ('outputs', TxOutputType, p.FLAG_REPEATED),
|
||||||
6: ('inputs_cnt', p.UVarintType, 0),
|
6: ('inputs_cnt', p.UVarintType, 0),
|
||||||
7: ('outputs_cnt', p.UVarintType, 0),
|
7: ('outputs_cnt', p.UVarintType, 0),
|
||||||
8: ('extra_data', p.BytesType, 0),
|
8: ('extra_data', p.BytesType, 0),
|
||||||
@ -31,8 +31,8 @@ class TransactionType(p.MessageType):
|
|||||||
version: int = None,
|
version: int = None,
|
||||||
inputs: List[TxInputType] = None,
|
inputs: List[TxInputType] = None,
|
||||||
bin_outputs: List[TxOutputBinType] = None,
|
bin_outputs: List[TxOutputBinType] = None,
|
||||||
outputs: List[TxOutputType] = None,
|
|
||||||
lock_time: int = None,
|
lock_time: int = None,
|
||||||
|
outputs: List[TxOutputType] = None,
|
||||||
inputs_cnt: int = None,
|
inputs_cnt: int = None,
|
||||||
outputs_cnt: int = None,
|
outputs_cnt: int = None,
|
||||||
extra_data: bytes = None,
|
extra_data: bytes = None,
|
||||||
@ -43,8 +43,8 @@ class TransactionType(p.MessageType):
|
|||||||
self.version = version
|
self.version = version
|
||||||
self.inputs = inputs if inputs is not None else []
|
self.inputs = inputs if inputs is not None else []
|
||||||
self.bin_outputs = bin_outputs if bin_outputs is not None else []
|
self.bin_outputs = bin_outputs if bin_outputs is not None else []
|
||||||
self.outputs = outputs if outputs is not None else []
|
|
||||||
self.lock_time = lock_time
|
self.lock_time = lock_time
|
||||||
|
self.outputs = outputs if outputs is not None else []
|
||||||
self.inputs_cnt = inputs_cnt
|
self.inputs_cnt = inputs_cnt
|
||||||
self.outputs_cnt = outputs_cnt
|
self.outputs_cnt = outputs_cnt
|
||||||
self.extra_data = extra_data
|
self.extra_data = extra_data
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
# Automatically generated by pb2py
|
|
||||||
# fmt: off
|
|
||||||
import protobuf as p
|
|
||||||
|
|
||||||
|
|
||||||
class TxSize(p.MessageType):
|
|
||||||
MESSAGE_WIRE_TYPE = 44
|
|
||||||
FIELDS = {
|
|
||||||
1: ('tx_size', p.UVarintType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
tx_size: int = None,
|
|
||||||
) -> None:
|
|
||||||
self.tx_size = tx_size
|
|
@ -4,4 +4,6 @@ set -e
|
|||||||
../vendor/trezor-common/protob/pb2py \
|
../vendor/trezor-common/protob/pb2py \
|
||||||
--no-init-py \
|
--no-init-py \
|
||||||
-o ../src/trezor/messages \
|
-o ../src/trezor/messages \
|
||||||
../vendor/trezor-common/protob/{types,messages}.proto
|
../vendor/trezor-common/protob/common.proto \
|
||||||
|
../vendor/trezor-common/protob/messages.proto \
|
||||||
|
../vendor/trezor-common/protob/messages-*.proto
|
||||||
|
2
vendor/trezor-common
vendored
2
vendor/trezor-common
vendored
@ -1 +1 @@
|
|||||||
Subproject commit c4420e41d3d98368d42fa59ae3bee88599d72fec
|
Subproject commit 1b9b7d6c8ed44b24a7f105a83dc10ea7cc796ed9
|
Loading…
Reference in New Issue
Block a user