1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-27 01:48:17 +00:00

protobuf: update messages from upstream.

This drops sign/verify messages for Lisk and Stellar so we have to
remove the corresponding methods.
This commit is contained in:
matejcik 2018-05-23 14:04:09 +02:00
parent bc27089546
commit 70172520fb
11 changed files with 9 additions and 139 deletions

View File

@ -6,10 +6,13 @@ class Initialize(p.MessageType):
MESSAGE_WIRE_TYPE = 0 MESSAGE_WIRE_TYPE = 0
FIELDS = { FIELDS = {
1: ('state', p.BytesType, 0), 1: ('state', p.BytesType, 0),
2: ('skip_passphrase', p.BoolType, 0),
} }
def __init__( def __init__(
self, self,
state: bytes = None state: bytes = None,
skip_passphrase: bool = None
) -> None: ) -> None:
self.state = state self.state = state
self.skip_passphrase = skip_passphrase

View File

@ -1,18 +0,0 @@
# Automatically generated by pb2py
from .. import protobuf as p
class LiskMessageSignature(p.MessageType):
MESSAGE_WIRE_TYPE = 119
FIELDS = {
1: ('address', p.UnicodeType, 0),
2: ('signature', p.BytesType, 0),
}
def __init__(
self,
address: str = None,
signature: bytes = None
) -> None:
self.address = address
self.signature = signature

View File

@ -1,23 +0,0 @@
# Automatically generated by pb2py
from .. import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class LiskSignMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 118
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('message', p.BytesType, 0),
}
def __init__(
self,
address_n: List[int] = None,
message: bytes = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.message = message

View File

@ -1,21 +0,0 @@
# Automatically generated by pb2py
from .. import protobuf as p
class LiskVerifyMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 120
FIELDS = {
1: ('signature', p.BytesType, 0),
2: ('public_key', p.BytesType, 0),
3: ('message', p.BytesType, 0),
}
def __init__(
self,
signature: bytes = None,
public_key: bytes = None,
message: bytes = None
) -> None:
self.signature = signature
self.public_key = public_key
self.message = message

View File

@ -88,18 +88,12 @@ LiskGetAddress = 114
LiskAddress = 115 LiskAddress = 115
LiskSignTx = 116 LiskSignTx = 116
LiskSignedTx = 117 LiskSignedTx = 117
LiskSignMessage = 118
LiskMessageSignature = 119
LiskVerifyMessage = 120
LiskGetPublicKey = 121 LiskGetPublicKey = 121
LiskPublicKey = 122 LiskPublicKey = 122
StellarGetPublicKey = 200 StellarGetPublicKey = 200
StellarPublicKey = 201 StellarPublicKey = 201
StellarSignTx = 202 StellarSignTx = 202
StellarTxOpRequest = 203 StellarTxOpRequest = 203
StellarSignMessage = 204
StellarMessageSignature = 205
StellarVerifyMessage = 206
StellarCreateAccountOp = 210 StellarCreateAccountOp = 210
StellarPaymentOp = 211 StellarPaymentOp = 211
StellarPathPaymentOp = 212 StellarPathPaymentOp = 212

View File

@ -1,18 +0,0 @@
# Automatically generated by pb2py
from .. import protobuf as p
class StellarMessageSignature(p.MessageType):
MESSAGE_WIRE_TYPE = 205
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

View File

@ -1,23 +0,0 @@
# Automatically generated by pb2py
from .. import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class StellarSignMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 204
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('message', p.BytesType, 0),
}
def __init__(
self,
address_n: List[int] = None,
message: bytes = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.message = message

View File

@ -1,21 +0,0 @@
# Automatically generated by pb2py
from .. import protobuf as p
class StellarVerifyMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 206
FIELDS = {
1: ('public_key', p.BytesType, 0),
2: ('message', p.BytesType, 0),
3: ('signature', p.BytesType, 0),
}
def __init__(
self,
public_key: bytes = None,
message: bytes = None,
signature: bytes = None
) -> None:
self.public_key = public_key
self.message = message
self.signature = signature

View File

@ -22,6 +22,7 @@ class TransactionType(p.MessageType):
8: ('extra_data', p.BytesType, 0), 8: ('extra_data', p.BytesType, 0),
9: ('extra_data_len', p.UVarintType, 0), 9: ('extra_data_len', p.UVarintType, 0),
10: ('decred_expiry', p.UVarintType, 0), 10: ('decred_expiry', p.UVarintType, 0),
11: ('overwintered', p.BoolType, 0),
} }
def __init__( def __init__(
@ -35,7 +36,8 @@ class TransactionType(p.MessageType):
outputs_cnt: int = None, outputs_cnt: int = None,
extra_data: bytes = None, extra_data: bytes = None,
extra_data_len: int = None, extra_data_len: int = None,
decred_expiry: int = None decred_expiry: int = None,
overwintered: bool = None
) -> None: ) -> None:
self.version = version self.version = version
self.inputs = inputs if inputs is not None else [] self.inputs = inputs if inputs is not None else []
@ -47,3 +49,4 @@ class TransactionType(p.MessageType):
self.extra_data = extra_data self.extra_data = extra_data
self.extra_data_len = extra_data_len self.extra_data_len = extra_data_len
self.decred_expiry = decred_expiry self.decred_expiry = decred_expiry
self.overwintered = overwintered

View File

@ -96,12 +96,9 @@ from .Initialize import Initialize
from .LiskAddress import LiskAddress from .LiskAddress import LiskAddress
from .LiskGetAddress import LiskGetAddress from .LiskGetAddress import LiskGetAddress
from .LiskGetPublicKey import LiskGetPublicKey from .LiskGetPublicKey import LiskGetPublicKey
from .LiskMessageSignature import LiskMessageSignature
from .LiskPublicKey import LiskPublicKey from .LiskPublicKey import LiskPublicKey
from .LiskSignMessage import LiskSignMessage
from .LiskSignTx import LiskSignTx from .LiskSignTx import LiskSignTx
from .LiskSignedTx import LiskSignedTx from .LiskSignedTx import LiskSignedTx
from .LiskVerifyMessage import LiskVerifyMessage
from .LoadDevice import LoadDevice from .LoadDevice import LoadDevice
from .MessageSignature import MessageSignature from .MessageSignature import MessageSignature
from .NEMAddress import NEMAddress from .NEMAddress import NEMAddress
@ -136,16 +133,13 @@ from .StellarCreatePassiveOfferOp import StellarCreatePassiveOfferOp
from .StellarGetPublicKey import StellarGetPublicKey from .StellarGetPublicKey import StellarGetPublicKey
from .StellarManageDataOp import StellarManageDataOp from .StellarManageDataOp import StellarManageDataOp
from .StellarManageOfferOp import StellarManageOfferOp from .StellarManageOfferOp import StellarManageOfferOp
from .StellarMessageSignature import StellarMessageSignature
from .StellarPathPaymentOp import StellarPathPaymentOp from .StellarPathPaymentOp import StellarPathPaymentOp
from .StellarPaymentOp import StellarPaymentOp from .StellarPaymentOp import StellarPaymentOp
from .StellarPublicKey import StellarPublicKey from .StellarPublicKey import StellarPublicKey
from .StellarSetOptionsOp import StellarSetOptionsOp from .StellarSetOptionsOp import StellarSetOptionsOp
from .StellarSignMessage import StellarSignMessage
from .StellarSignTx import StellarSignTx from .StellarSignTx import StellarSignTx
from .StellarSignedTx import StellarSignedTx from .StellarSignedTx import StellarSignedTx
from .StellarTxOpRequest import StellarTxOpRequest from .StellarTxOpRequest import StellarTxOpRequest
from .StellarVerifyMessage import StellarVerifyMessage
from .Success import Success from .Success import Success
from .TxAck import TxAck from .TxAck import TxAck
from .TxRequest import TxRequest from .TxRequest import TxRequest

@ -1 +1 @@
Subproject commit b91db285ba8947d6c65a6a807fba87ebc1d43f5d Subproject commit 8fc001154e49c2c1747957c4a9a1ab92dcc86edb