mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 06:48:16 +00:00
protobuf: build (Ripple, Stellar drop protocol version)
This commit is contained in:
parent
1e0874bf50
commit
12d622a496
@ -122,3 +122,7 @@ CardanoGetAddress = 307
|
||||
CardanoAddress = 308
|
||||
CardanoTxAck = 309
|
||||
CardanoSignedTransaction = 310
|
||||
RippleGetAddress = 400
|
||||
RippleAddress = 401
|
||||
RippleSignTx = 402
|
||||
RippleSignedTx = 403
|
||||
|
16
src/trezor/messages/RippleAddress.py
Normal file
16
src/trezor/messages/RippleAddress.py
Normal file
@ -0,0 +1,16 @@
|
||||
# Automatically generated by pb2py
|
||||
# fmt: off
|
||||
import protobuf as p
|
||||
|
||||
|
||||
class RippleAddress(p.MessageType):
|
||||
MESSAGE_WIRE_TYPE = 401
|
||||
FIELDS = {
|
||||
1: ('address', p.UnicodeType, 0),
|
||||
}
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
address: str = None,
|
||||
) -> None:
|
||||
self.address = address
|
24
src/trezor/messages/RippleGetAddress.py
Normal file
24
src/trezor/messages/RippleGetAddress.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 RippleGetAddress(p.MessageType):
|
||||
MESSAGE_WIRE_TYPE = 400
|
||||
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
|
18
src/trezor/messages/RipplePayment.py
Normal file
18
src/trezor/messages/RipplePayment.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Automatically generated by pb2py
|
||||
# fmt: off
|
||||
import protobuf as p
|
||||
|
||||
|
||||
class RipplePayment(p.MessageType):
|
||||
FIELDS = {
|
||||
1: ('amount', p.UVarintType, 0),
|
||||
2: ('destination', p.UnicodeType, 0),
|
||||
}
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
amount: int = None,
|
||||
destination: str = None,
|
||||
) -> None:
|
||||
self.amount = amount
|
||||
self.destination = destination
|
37
src/trezor/messages/RippleSignTx.py
Normal file
37
src/trezor/messages/RippleSignTx.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 .RipplePayment import RipplePayment
|
||||
|
||||
|
||||
class RippleSignTx(p.MessageType):
|
||||
MESSAGE_WIRE_TYPE = 402
|
||||
FIELDS = {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('fee', p.UVarintType, 0),
|
||||
3: ('flags', p.UVarintType, 0),
|
||||
4: ('sequence', p.UVarintType, 0),
|
||||
5: ('last_ledger_sequence', p.UVarintType, 0),
|
||||
6: ('payment', RipplePayment, 0),
|
||||
}
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
address_n: List[int] = None,
|
||||
fee: int = None,
|
||||
flags: int = None,
|
||||
sequence: int = None,
|
||||
last_ledger_sequence: int = None,
|
||||
payment: RipplePayment = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.fee = fee
|
||||
self.flags = flags
|
||||
self.sequence = sequence
|
||||
self.last_ledger_sequence = last_ledger_sequence
|
||||
self.payment = payment
|
19
src/trezor/messages/RippleSignedTx.py
Normal file
19
src/trezor/messages/RippleSignedTx.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Automatically generated by pb2py
|
||||
# fmt: off
|
||||
import protobuf as p
|
||||
|
||||
|
||||
class RippleSignedTx(p.MessageType):
|
||||
MESSAGE_WIRE_TYPE = 403
|
||||
FIELDS = {
|
||||
1: ('signature', p.BytesType, 0),
|
||||
2: ('serialized_tx', p.BytesType, 0),
|
||||
}
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
signature: bytes = None,
|
||||
serialized_tx: bytes = None,
|
||||
) -> None:
|
||||
self.signature = signature
|
||||
self.serialized_tx = serialized_tx
|
@ -11,7 +11,6 @@ if __debug__:
|
||||
class StellarSignTx(p.MessageType):
|
||||
MESSAGE_WIRE_TYPE = 202
|
||||
FIELDS = {
|
||||
1: ('protocol_version', p.UVarintType, 0),
|
||||
2: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
3: ('network_passphrase', p.UnicodeType, 0),
|
||||
4: ('source_account', p.UnicodeType, 0),
|
||||
@ -28,7 +27,6 @@ class StellarSignTx(p.MessageType):
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
protocol_version: int = None,
|
||||
address_n: List[int] = None,
|
||||
network_passphrase: str = None,
|
||||
source_account: str = None,
|
||||
@ -42,7 +40,6 @@ class StellarSignTx(p.MessageType):
|
||||
memo_hash: bytes = None,
|
||||
num_operations: int = None,
|
||||
) -> None:
|
||||
self.protocol_version = protocol_version
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.network_passphrase = network_passphrase
|
||||
self.source_account = source_account
|
||||
|
Loading…
Reference in New Issue
Block a user