1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-21 23:18:13 +00:00

vendor: trezor-common version bump, pb sync, template sync

This commit is contained in:
Dusan Klinec 2018-09-18 14:12:35 +02:00 committed by Jan Pochyla
parent 2a0dc76981
commit 3ae4106465
238 changed files with 2375 additions and 1277 deletions

View File

@ -520,7 +520,7 @@ COINS = [
address_type_p2sh=5,
maxfee_kb=10000000,
signed_message_header="Namecoin Signed Message:\n",
xpub_magic=0x019da462,
xpub_magic=0x0488b21e,
xpub_magic_segwit_p2sh=None,
xpub_magic_segwit_native=None,
bech32_prefix=None,

View File

@ -5,12 +5,15 @@ import protobuf as p
class Address(p.MessageType):
MESSAGE_WIRE_TYPE = 30
FIELDS = {
1: ('address', p.UnicodeType, 0), # required
}
def __init__(
self,
address: str = None,
) -> None:
self.address = address
@classmethod
def get_fields(cls):
return {
1: ('address', p.UnicodeType, 0), # required
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class ApplyFlags(p.MessageType):
MESSAGE_WIRE_TYPE = 28
FIELDS = {
1: ('flags', p.UVarintType, 0),
}
def __init__(
self,
flags: int = None,
) -> None:
self.flags = flags
@classmethod
def get_fields(cls):
return {
1: ('flags', p.UVarintType, 0),
}

View File

@ -5,14 +5,6 @@ import protobuf as p
class ApplySettings(p.MessageType):
MESSAGE_WIRE_TYPE = 25
FIELDS = {
1: ('language', p.UnicodeType, 0),
2: ('label', p.UnicodeType, 0),
3: ('use_passphrase', p.BoolType, 0),
4: ('homescreen', p.BytesType, 0),
5: ('passphrase_source', p.UVarintType, 0),
6: ('auto_lock_delay_ms', p.UVarintType, 0),
}
def __init__(
self,
@ -29,3 +21,14 @@ class ApplySettings(p.MessageType):
self.homescreen = homescreen
self.passphrase_source = passphrase_source
self.auto_lock_delay_ms = auto_lock_delay_ms
@classmethod
def get_fields(cls):
return {
1: ('language', p.UnicodeType, 0),
2: ('label', p.UnicodeType, 0),
3: ('use_passphrase', p.BoolType, 0),
4: ('homescreen', p.BytesType, 0),
5: ('passphrase_source', p.UVarintType, 0),
6: ('auto_lock_delay_ms', p.UVarintType, 0),
}

View File

@ -5,10 +5,6 @@ import protobuf as p
class ButtonRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 26
FIELDS = {
1: ('code', p.UVarintType, 0),
2: ('data', p.UnicodeType, 0),
}
def __init__(
self,
@ -17,3 +13,10 @@ class ButtonRequest(p.MessageType):
) -> None:
self.code = code
self.data = data
@classmethod
def get_fields(cls):
return {
1: ('code', p.UVarintType, 0),
2: ('data', p.UnicodeType, 0),
}

View File

@ -5,12 +5,15 @@ 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
@classmethod
def get_fields(cls):
return {
1: ('address', p.UnicodeType, 0),
}

View File

@ -11,10 +11,6 @@ if __debug__:
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,
@ -23,3 +19,10 @@ class CardanoGetAddress(p.MessageType):
) -> None:
self.address_n = address_n if address_n is not None else []
self.show_display = show_display
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
}

View File

@ -11,10 +11,6 @@ if __debug__:
class CardanoGetPublicKey(p.MessageType):
MESSAGE_WIRE_TYPE = 305
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
}
def __init__(
self,
@ -23,3 +19,10 @@ class CardanoGetPublicKey(p.MessageType):
) -> None:
self.address_n = address_n if address_n is not None else []
self.show_display = show_display
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
}

View File

@ -7,10 +7,6 @@ from .HDNodeType import HDNodeType
class CardanoPublicKey(p.MessageType):
MESSAGE_WIRE_TYPE = 306
FIELDS = {
1: ('xpub', p.UnicodeType, 0),
2: ('node', HDNodeType, 0),
}
def __init__(
self,
@ -19,3 +15,10 @@ class CardanoPublicKey(p.MessageType):
) -> None:
self.xpub = xpub
self.node = node
@classmethod
def get_fields(cls):
return {
1: ('xpub', p.UnicodeType, 0),
2: ('node', HDNodeType, 0),
}

View File

@ -14,12 +14,6 @@ if __debug__:
class CardanoSignTx(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),
4: ('network', p.UVarintType, 0),
}
def __init__(
self,
@ -32,3 +26,12 @@ class CardanoSignTx(p.MessageType):
self.outputs = outputs if outputs is not None else []
self.transactions_count = transactions_count
self.network = network
@classmethod
def get_fields(cls):
return {
1: ('inputs', CardanoTxInputType, p.FLAG_REPEATED),
2: ('outputs', CardanoTxOutputType, p.FLAG_REPEATED),
3: ('transactions_count', p.UVarintType, 0),
4: ('network', p.UVarintType, 0),
}

View File

@ -5,10 +5,6 @@ import protobuf as p
class CardanoSignedTx(p.MessageType):
MESSAGE_WIRE_TYPE = 310
FIELDS = {
1: ('tx_hash', p.BytesType, 0),
2: ('tx_body', p.BytesType, 0),
}
def __init__(
self,
@ -17,3 +13,10 @@ class CardanoSignedTx(p.MessageType):
) -> None:
self.tx_hash = tx_hash
self.tx_body = tx_body
@classmethod
def get_fields(cls):
return {
1: ('tx_hash', p.BytesType, 0),
2: ('tx_body', p.BytesType, 0),
}

View File

@ -5,12 +5,15 @@ 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
@classmethod
def get_fields(cls):
return {
1: ('transaction', p.BytesType, 0),
}

View File

@ -10,12 +10,6 @@ if __debug__:
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,
@ -28,3 +22,12 @@ class CardanoTxInputType(p.MessageType):
self.prev_hash = prev_hash
self.prev_index = prev_index
self.type = type
@classmethod
def get_fields(cls):
return {
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),
}

View File

@ -10,11 +10,6 @@ if __debug__:
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,
@ -25,3 +20,11 @@ class CardanoTxOutputType(p.MessageType):
self.address = address
self.address_n = address_n if address_n is not None else []
self.amount = amount
@classmethod
def get_fields(cls):
return {
1: ('address', p.UnicodeType, 0),
2: ('address_n', p.UVarintType, p.FLAG_REPEATED),
3: ('amount', p.UVarintType, 0),
}

View File

@ -5,11 +5,6 @@ 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,
@ -20,3 +15,11 @@ class CardanoTxRequest(p.MessageType):
self.tx_index = tx_index
self.tx_hash = tx_hash
self.tx_body = tx_body
@classmethod
def get_fields(cls):
return {
1: ('tx_index', p.UVarintType, 0),
2: ('tx_hash', p.BytesType, 0),
3: ('tx_body', p.BytesType, 0),
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class ChangePin(p.MessageType):
MESSAGE_WIRE_TYPE = 4
FIELDS = {
1: ('remove', p.BoolType, 0),
}
def __init__(
self,
remove: bool = None,
) -> None:
self.remove = remove
@classmethod
def get_fields(cls):
return {
1: ('remove', p.BoolType, 0),
}

View File

@ -11,15 +11,6 @@ if __debug__:
class CipherKeyValue(p.MessageType):
MESSAGE_WIRE_TYPE = 23
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('key', p.UnicodeType, 0),
3: ('value', p.BytesType, 0),
4: ('encrypt', p.BoolType, 0),
5: ('ask_on_encrypt', p.BoolType, 0),
6: ('ask_on_decrypt', p.BoolType, 0),
7: ('iv', p.BytesType, 0),
}
def __init__(
self,
@ -38,3 +29,15 @@ class CipherKeyValue(p.MessageType):
self.ask_on_encrypt = ask_on_encrypt
self.ask_on_decrypt = ask_on_decrypt
self.iv = iv
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('key', p.UnicodeType, 0),
3: ('value', p.BytesType, 0),
4: ('encrypt', p.BoolType, 0),
5: ('ask_on_encrypt', p.BoolType, 0),
6: ('ask_on_decrypt', p.BoolType, 0),
7: ('iv', p.BytesType, 0),
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class CipheredKeyValue(p.MessageType):
MESSAGE_WIRE_TYPE = 48
FIELDS = {
1: ('value', p.BytesType, 0),
}
def __init__(
self,
value: bytes = None,
) -> None:
self.value = value
@classmethod
def get_fields(cls):
return {
1: ('value', p.BytesType, 0),
}

View File

@ -11,10 +11,6 @@ if __debug__:
class CosiCommit(p.MessageType):
MESSAGE_WIRE_TYPE = 71
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('data', p.BytesType, 0),
}
def __init__(
self,
@ -23,3 +19,10 @@ class CosiCommit(p.MessageType):
) -> None:
self.address_n = address_n if address_n is not None else []
self.data = data
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('data', p.BytesType, 0),
}

View File

@ -5,10 +5,6 @@ import protobuf as p
class CosiCommitment(p.MessageType):
MESSAGE_WIRE_TYPE = 72
FIELDS = {
1: ('commitment', p.BytesType, 0),
2: ('pubkey', p.BytesType, 0),
}
def __init__(
self,
@ -17,3 +13,10 @@ class CosiCommitment(p.MessageType):
) -> None:
self.commitment = commitment
self.pubkey = pubkey
@classmethod
def get_fields(cls):
return {
1: ('commitment', p.BytesType, 0),
2: ('pubkey', p.BytesType, 0),
}

View File

@ -11,12 +11,6 @@ if __debug__:
class CosiSign(p.MessageType):
MESSAGE_WIRE_TYPE = 73
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('data', p.BytesType, 0),
3: ('global_commitment', p.BytesType, 0),
4: ('global_pubkey', p.BytesType, 0),
}
def __init__(
self,
@ -29,3 +23,12 @@ class CosiSign(p.MessageType):
self.data = data
self.global_commitment = global_commitment
self.global_pubkey = global_pubkey
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('data', p.BytesType, 0),
3: ('global_commitment', p.BytesType, 0),
4: ('global_pubkey', p.BytesType, 0),
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class CosiSignature(p.MessageType):
MESSAGE_WIRE_TYPE = 74
FIELDS = {
1: ('signature', p.BytesType, 0),
}
def __init__(
self,
signature: bytes = None,
) -> None:
self.signature = signature
@classmethod
def get_fields(cls):
return {
1: ('signature', p.BytesType, 0),
}

View File

@ -5,11 +5,6 @@ import protobuf as p
class DebugLinkDecision(p.MessageType):
MESSAGE_WIRE_TYPE = 100
FIELDS = {
1: ('yes_no', p.BoolType, 0),
2: ('up_down', p.BoolType, 0),
3: ('input', p.UnicodeType, 0),
}
def __init__(
self,
@ -20,3 +15,11 @@ class DebugLinkDecision(p.MessageType):
self.yes_no = yes_no
self.up_down = up_down
self.input = input
@classmethod
def get_fields(cls):
return {
1: ('yes_no', p.BoolType, 0),
2: ('up_down', p.BoolType, 0),
3: ('input', p.UnicodeType, 0),
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class DebugLinkFlashErase(p.MessageType):
MESSAGE_WIRE_TYPE = 113
FIELDS = {
1: ('sector', p.UVarintType, 0),
}
def __init__(
self,
sector: int = None,
) -> None:
self.sector = sector
@classmethod
def get_fields(cls):
return {
1: ('sector', p.UVarintType, 0),
}

View File

@ -5,11 +5,6 @@ import protobuf as p
class DebugLinkLog(p.MessageType):
MESSAGE_WIRE_TYPE = 104
FIELDS = {
1: ('level', p.UVarintType, 0),
2: ('bucket', p.UnicodeType, 0),
3: ('text', p.UnicodeType, 0),
}
def __init__(
self,
@ -20,3 +15,11 @@ class DebugLinkLog(p.MessageType):
self.level = level
self.bucket = bucket
self.text = text
@classmethod
def get_fields(cls):
return {
1: ('level', p.UVarintType, 0),
2: ('bucket', p.UnicodeType, 0),
3: ('text', p.UnicodeType, 0),
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class DebugLinkMemory(p.MessageType):
MESSAGE_WIRE_TYPE = 111
FIELDS = {
1: ('memory', p.BytesType, 0),
}
def __init__(
self,
memory: bytes = None,
) -> None:
self.memory = memory
@classmethod
def get_fields(cls):
return {
1: ('memory', p.BytesType, 0),
}

View File

@ -5,10 +5,6 @@ import protobuf as p
class DebugLinkMemoryRead(p.MessageType):
MESSAGE_WIRE_TYPE = 110
FIELDS = {
1: ('address', p.UVarintType, 0),
2: ('length', p.UVarintType, 0),
}
def __init__(
self,
@ -17,3 +13,10 @@ class DebugLinkMemoryRead(p.MessageType):
) -> None:
self.address = address
self.length = length
@classmethod
def get_fields(cls):
return {
1: ('address', p.UVarintType, 0),
2: ('length', p.UVarintType, 0),
}

View File

@ -5,11 +5,6 @@ import protobuf as p
class DebugLinkMemoryWrite(p.MessageType):
MESSAGE_WIRE_TYPE = 112
FIELDS = {
1: ('address', p.UVarintType, 0),
2: ('memory', p.BytesType, 0),
3: ('flash', p.BoolType, 0),
}
def __init__(
self,
@ -20,3 +15,11 @@ class DebugLinkMemoryWrite(p.MessageType):
self.address = address
self.memory = memory
self.flash = flash
@classmethod
def get_fields(cls):
return {
1: ('address', p.UVarintType, 0),
2: ('memory', p.BytesType, 0),
3: ('flash', p.BoolType, 0),
}

View File

@ -7,19 +7,6 @@ from .HDNodeType import HDNodeType
class DebugLinkState(p.MessageType):
MESSAGE_WIRE_TYPE = 102
FIELDS = {
1: ('layout', p.BytesType, 0),
2: ('pin', p.UnicodeType, 0),
3: ('matrix', p.UnicodeType, 0),
4: ('mnemonic', p.UnicodeType, 0),
5: ('node', HDNodeType, 0),
6: ('passphrase_protection', p.BoolType, 0),
7: ('reset_word', p.UnicodeType, 0),
8: ('reset_entropy', p.BytesType, 0),
9: ('recovery_fake_word', p.UnicodeType, 0),
10: ('recovery_word_pos', p.UVarintType, 0),
11: ('reset_word_pos', p.UVarintType, 0),
}
def __init__(
self,
@ -46,3 +33,19 @@ class DebugLinkState(p.MessageType):
self.recovery_fake_word = recovery_fake_word
self.recovery_word_pos = recovery_word_pos
self.reset_word_pos = reset_word_pos
@classmethod
def get_fields(cls):
return {
1: ('layout', p.BytesType, 0),
2: ('pin', p.UnicodeType, 0),
3: ('matrix', p.UnicodeType, 0),
4: ('mnemonic', p.UnicodeType, 0),
5: ('node', HDNodeType, 0),
6: ('passphrase_protection', p.BoolType, 0),
7: ('reset_word', p.UnicodeType, 0),
8: ('reset_entropy', p.BytesType, 0),
9: ('recovery_fake_word', p.UnicodeType, 0),
10: ('recovery_word_pos', p.UVarintType, 0),
11: ('reset_word_pos', p.UVarintType, 0),
}

View File

@ -10,15 +10,7 @@ if __debug__:
class DebugMoneroDiagAck(p.MessageType):
MESSAGE_WIRE_TYPE = 537
FIELDS = {
1: ('ins', p.UVarintType, 0),
2: ('p1', p.UVarintType, 0),
3: ('p2', p.UVarintType, 0),
4: ('pd', p.UVarintType, p.FLAG_REPEATED),
5: ('data1', p.BytesType, 0),
6: ('data2', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 547
def __init__(
self,
@ -35,3 +27,14 @@ class DebugMoneroDiagAck(p.MessageType):
self.pd = pd if pd is not None else []
self.data1 = data1
self.data2 = data2
@classmethod
def get_fields(cls):
return {
1: ('ins', p.UVarintType, 0),
2: ('p1', p.UVarintType, 0),
3: ('p2', p.UVarintType, 0),
4: ('pd', p.UVarintType, p.FLAG_REPEATED),
5: ('data1', p.BytesType, 0),
6: ('data2', p.BytesType, 0),
}

View File

@ -10,15 +10,7 @@ if __debug__:
class DebugMoneroDiagRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 536
FIELDS = {
1: ('ins', p.UVarintType, 0),
2: ('p1', p.UVarintType, 0),
3: ('p2', p.UVarintType, 0),
4: ('pd', p.UVarintType, p.FLAG_REPEATED),
5: ('data1', p.BytesType, 0),
6: ('data2', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 546
def __init__(
self,
@ -35,3 +27,14 @@ class DebugMoneroDiagRequest(p.MessageType):
self.pd = pd if pd is not None else []
self.data1 = data1
self.data2 = data2
@classmethod
def get_fields(cls):
return {
1: ('ins', p.UVarintType, 0),
2: ('p1', p.UVarintType, 0),
3: ('p2', p.UVarintType, 0),
4: ('pd', p.UVarintType, p.FLAG_REPEATED),
5: ('data1', p.BytesType, 0),
6: ('data2', p.BytesType, 0),
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class ECDHSessionKey(p.MessageType):
MESSAGE_WIRE_TYPE = 62
FIELDS = {
1: ('session_key', p.BytesType, 0),
}
def __init__(
self,
session_key: bytes = None,
) -> None:
self.session_key = session_key
@classmethod
def get_fields(cls):
return {
1: ('session_key', p.BytesType, 0),
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class Entropy(p.MessageType):
MESSAGE_WIRE_TYPE = 10
FIELDS = {
1: ('entropy', p.BytesType, 0), # required
}
def __init__(
self,
entropy: bytes = None,
) -> None:
self.entropy = entropy
@classmethod
def get_fields(cls):
return {
1: ('entropy', p.BytesType, 0), # required
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class EntropyAck(p.MessageType):
MESSAGE_WIRE_TYPE = 36
FIELDS = {
1: ('entropy', p.BytesType, 0),
}
def __init__(
self,
entropy: bytes = None,
) -> None:
self.entropy = entropy
@classmethod
def get_fields(cls):
return {
1: ('entropy', p.BytesType, 0),
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class EthereumAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 57
FIELDS = {
1: ('address', p.BytesType, 0), # required
}
def __init__(
self,
address: bytes = None,
) -> None:
self.address = address
@classmethod
def get_fields(cls):
return {
1: ('address', p.BytesType, 0), # required
}

View File

@ -11,10 +11,6 @@ if __debug__:
class EthereumGetAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 56
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
}
def __init__(
self,
@ -23,3 +19,10 @@ class EthereumGetAddress(p.MessageType):
) -> None:
self.address_n = address_n if address_n is not None else []
self.show_display = show_display
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
}

View File

@ -5,10 +5,6 @@ import protobuf as p
class EthereumMessageSignature(p.MessageType):
MESSAGE_WIRE_TYPE = 66
FIELDS = {
1: ('address', p.BytesType, 0),
2: ('signature', p.BytesType, 0),
}
def __init__(
self,
@ -17,3 +13,10 @@ class EthereumMessageSignature(p.MessageType):
) -> None:
self.address = address
self.signature = signature
@classmethod
def get_fields(cls):
return {
1: ('address', p.BytesType, 0),
2: ('signature', p.BytesType, 0),
}

View File

@ -11,10 +11,6 @@ if __debug__:
class EthereumSignMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 64
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('message', p.BytesType, 0), # required
}
def __init__(
self,
@ -23,3 +19,10 @@ class EthereumSignMessage(p.MessageType):
) -> None:
self.address_n = address_n if address_n is not None else []
self.message = message
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('message', p.BytesType, 0), # required
}

View File

@ -11,18 +11,6 @@ if __debug__:
class EthereumSignTx(p.MessageType):
MESSAGE_WIRE_TYPE = 58
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('nonce', p.BytesType, 0),
3: ('gas_price', p.BytesType, 0),
4: ('gas_limit', p.BytesType, 0),
5: ('to', p.BytesType, 0),
6: ('value', p.BytesType, 0),
7: ('data_initial_chunk', p.BytesType, 0),
8: ('data_length', p.UVarintType, 0),
9: ('chain_id', p.UVarintType, 0),
10: ('tx_type', p.UVarintType, 0),
}
def __init__(
self,
@ -47,3 +35,18 @@ class EthereumSignTx(p.MessageType):
self.data_length = data_length
self.chain_id = chain_id
self.tx_type = tx_type
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('nonce', p.BytesType, 0),
3: ('gas_price', p.BytesType, 0),
4: ('gas_limit', p.BytesType, 0),
5: ('to', p.BytesType, 0),
6: ('value', p.BytesType, 0),
7: ('data_initial_chunk', p.BytesType, 0),
8: ('data_length', p.UVarintType, 0),
9: ('chain_id', p.UVarintType, 0),
10: ('tx_type', p.UVarintType, 0),
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class EthereumTxAck(p.MessageType):
MESSAGE_WIRE_TYPE = 60
FIELDS = {
1: ('data_chunk', p.BytesType, 0),
}
def __init__(
self,
data_chunk: bytes = None,
) -> None:
self.data_chunk = data_chunk
@classmethod
def get_fields(cls):
return {
1: ('data_chunk', p.BytesType, 0),
}

View File

@ -5,12 +5,6 @@ import protobuf as p
class EthereumTxRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 59
FIELDS = {
1: ('data_length', p.UVarintType, 0),
2: ('signature_v', p.UVarintType, 0),
3: ('signature_r', p.BytesType, 0),
4: ('signature_s', p.BytesType, 0),
}
def __init__(
self,
@ -23,3 +17,12 @@ class EthereumTxRequest(p.MessageType):
self.signature_v = signature_v
self.signature_r = signature_r
self.signature_s = signature_s
@classmethod
def get_fields(cls):
return {
1: ('data_length', p.UVarintType, 0),
2: ('signature_v', p.UVarintType, 0),
3: ('signature_r', p.BytesType, 0),
4: ('signature_s', p.BytesType, 0),
}

View File

@ -5,11 +5,6 @@ import protobuf as p
class EthereumVerifyMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 65
FIELDS = {
1: ('address', p.BytesType, 0),
2: ('signature', p.BytesType, 0),
3: ('message', p.BytesType, 0),
}
def __init__(
self,
@ -20,3 +15,11 @@ class EthereumVerifyMessage(p.MessageType):
self.address = address
self.signature = signature
self.message = message
@classmethod
def get_fields(cls):
return {
1: ('address', p.BytesType, 0),
2: ('signature', p.BytesType, 0),
3: ('message', p.BytesType, 0),
}

View File

@ -5,10 +5,6 @@ import protobuf as p
class Failure(p.MessageType):
MESSAGE_WIRE_TYPE = 3
FIELDS = {
1: ('code', p.UVarintType, 0),
2: ('message', p.UnicodeType, 0),
}
def __init__(
self,
@ -17,3 +13,10 @@ class Failure(p.MessageType):
) -> None:
self.code = code
self.message = message
@classmethod
def get_fields(cls):
return {
1: ('code', p.UVarintType, 0),
2: ('message', p.UnicodeType, 0),
}

View File

@ -5,34 +5,6 @@ import protobuf as p
class Features(p.MessageType):
MESSAGE_WIRE_TYPE = 17
FIELDS = {
1: ('vendor', p.UnicodeType, 0),
2: ('major_version', p.UVarintType, 0),
3: ('minor_version', p.UVarintType, 0),
4: ('patch_version', p.UVarintType, 0),
5: ('bootloader_mode', p.BoolType, 0),
6: ('device_id', p.UnicodeType, 0),
7: ('pin_protection', p.BoolType, 0),
8: ('passphrase_protection', p.BoolType, 0),
9: ('language', p.UnicodeType, 0),
10: ('label', p.UnicodeType, 0),
12: ('initialized', p.BoolType, 0),
13: ('revision', p.BytesType, 0),
14: ('bootloader_hash', p.BytesType, 0),
15: ('imported', p.BoolType, 0),
16: ('pin_cached', p.BoolType, 0),
17: ('passphrase_cached', p.BoolType, 0),
18: ('firmware_present', p.BoolType, 0),
19: ('needs_backup', p.BoolType, 0),
20: ('flags', p.UVarintType, 0),
21: ('model', p.UnicodeType, 0),
22: ('fw_major', p.UVarintType, 0),
23: ('fw_minor', p.UVarintType, 0),
24: ('fw_patch', p.UVarintType, 0),
25: ('fw_vendor', p.UnicodeType, 0),
26: ('fw_vendor_keys', p.BytesType, 0),
27: ('unfinished_backup', p.BoolType, 0),
}
def __init__(
self,
@ -89,3 +61,34 @@ class Features(p.MessageType):
self.fw_vendor = fw_vendor
self.fw_vendor_keys = fw_vendor_keys
self.unfinished_backup = unfinished_backup
@classmethod
def get_fields(cls):
return {
1: ('vendor', p.UnicodeType, 0),
2: ('major_version', p.UVarintType, 0),
3: ('minor_version', p.UVarintType, 0),
4: ('patch_version', p.UVarintType, 0),
5: ('bootloader_mode', p.BoolType, 0),
6: ('device_id', p.UnicodeType, 0),
7: ('pin_protection', p.BoolType, 0),
8: ('passphrase_protection', p.BoolType, 0),
9: ('language', p.UnicodeType, 0),
10: ('label', p.UnicodeType, 0),
12: ('initialized', p.BoolType, 0),
13: ('revision', p.BytesType, 0),
14: ('bootloader_hash', p.BytesType, 0),
15: ('imported', p.BoolType, 0),
16: ('pin_cached', p.BoolType, 0),
17: ('passphrase_cached', p.BoolType, 0),
18: ('firmware_present', p.BoolType, 0),
19: ('needs_backup', p.BoolType, 0),
20: ('flags', p.UVarintType, 0),
21: ('model', p.UnicodeType, 0),
22: ('fw_major', p.UVarintType, 0),
23: ('fw_minor', p.UVarintType, 0),
24: ('fw_patch', p.UVarintType, 0),
25: ('fw_vendor', p.UnicodeType, 0),
26: ('fw_vendor_keys', p.BytesType, 0),
27: ('unfinished_backup', p.BoolType, 0),
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class FirmwareErase(p.MessageType):
MESSAGE_WIRE_TYPE = 6
FIELDS = {
1: ('length', p.UVarintType, 0),
}
def __init__(
self,
length: int = None,
) -> None:
self.length = length
@classmethod
def get_fields(cls):
return {
1: ('length', p.UVarintType, 0),
}

View File

@ -5,10 +5,6 @@ import protobuf as p
class FirmwareRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 8
FIELDS = {
1: ('offset', p.UVarintType, 0),
2: ('length', p.UVarintType, 0),
}
def __init__(
self,
@ -17,3 +13,10 @@ class FirmwareRequest(p.MessageType):
) -> None:
self.offset = offset
self.length = length
@classmethod
def get_fields(cls):
return {
1: ('offset', p.UVarintType, 0),
2: ('length', p.UVarintType, 0),
}

View File

@ -5,10 +5,6 @@ import protobuf as p
class FirmwareUpload(p.MessageType):
MESSAGE_WIRE_TYPE = 7
FIELDS = {
1: ('payload', p.BytesType, 0), # required
2: ('hash', p.BytesType, 0),
}
def __init__(
self,
@ -17,3 +13,10 @@ class FirmwareUpload(p.MessageType):
) -> None:
self.payload = payload
self.hash = hash
@classmethod
def get_fields(cls):
return {
1: ('payload', p.BytesType, 0), # required
2: ('hash', p.BytesType, 0),
}

View File

@ -13,13 +13,6 @@ if __debug__:
class GetAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 29
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('coin_name', p.UnicodeType, 0), # default=Bitcoin
3: ('show_display', p.BoolType, 0),
4: ('multisig', MultisigRedeemScriptType, 0),
5: ('script_type', p.UVarintType, 0), # default=SPENDADDRESS
}
def __init__(
self,
@ -34,3 +27,13 @@ class GetAddress(p.MessageType):
self.show_display = show_display
self.multisig = multisig
self.script_type = script_type
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('coin_name', p.UnicodeType, 0), # default=Bitcoin
3: ('show_display', p.BoolType, 0),
4: ('multisig', MultisigRedeemScriptType, 0),
5: ('script_type', p.UVarintType, 0), # default=SPENDADDRESS
}

View File

@ -7,11 +7,6 @@ from .IdentityType import IdentityType
class GetECDHSessionKey(p.MessageType):
MESSAGE_WIRE_TYPE = 61
FIELDS = {
1: ('identity', IdentityType, 0),
2: ('peer_public_key', p.BytesType, 0),
3: ('ecdsa_curve_name', p.UnicodeType, 0),
}
def __init__(
self,
@ -22,3 +17,11 @@ class GetECDHSessionKey(p.MessageType):
self.identity = identity
self.peer_public_key = peer_public_key
self.ecdsa_curve_name = ecdsa_curve_name
@classmethod
def get_fields(cls):
return {
1: ('identity', IdentityType, 0),
2: ('peer_public_key', p.BytesType, 0),
3: ('ecdsa_curve_name', p.UnicodeType, 0),
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class GetEntropy(p.MessageType):
MESSAGE_WIRE_TYPE = 9
FIELDS = {
1: ('size', p.UVarintType, 0), # required
}
def __init__(
self,
size: int = None,
) -> None:
self.size = size
@classmethod
def get_fields(cls):
return {
1: ('size', p.UVarintType, 0), # required
}

View File

@ -11,13 +11,6 @@ if __debug__:
class GetPublicKey(p.MessageType):
MESSAGE_WIRE_TYPE = 11
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('ecdsa_curve_name', p.UnicodeType, 0),
3: ('show_display', p.BoolType, 0),
4: ('coin_name', p.UnicodeType, 0), # default=Bitcoin
5: ('script_type', p.UVarintType, 0), # default=SPENDADDRESS
}
def __init__(
self,
@ -32,3 +25,13 @@ class GetPublicKey(p.MessageType):
self.show_display = show_display
self.coin_name = coin_name
self.script_type = script_type
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('ecdsa_curve_name', p.UnicodeType, 0),
3: ('show_display', p.BoolType, 0),
4: ('coin_name', p.UnicodeType, 0), # default=Bitcoin
5: ('script_type', p.UVarintType, 0), # default=SPENDADDRESS
}

View File

@ -12,10 +12,6 @@ if __debug__:
class HDNodePathType(p.MessageType):
FIELDS = {
1: ('node', HDNodeType, 0), # required
2: ('address_n', p.UVarintType, p.FLAG_REPEATED),
}
def __init__(
self,
@ -24,3 +20,10 @@ class HDNodePathType(p.MessageType):
) -> None:
self.node = node
self.address_n = address_n if address_n is not None else []
@classmethod
def get_fields(cls):
return {
1: ('node', HDNodeType, 0), # required
2: ('address_n', p.UVarintType, p.FLAG_REPEATED),
}

View File

@ -4,14 +4,6 @@ import protobuf as p
class HDNodeType(p.MessageType):
FIELDS = {
1: ('depth', p.UVarintType, 0), # required
2: ('fingerprint', p.UVarintType, 0), # required
3: ('child_num', p.UVarintType, 0), # required
4: ('chain_code', p.BytesType, 0), # required
5: ('private_key', p.BytesType, 0),
6: ('public_key', p.BytesType, 0),
}
def __init__(
self,
@ -28,3 +20,14 @@ class HDNodeType(p.MessageType):
self.chain_code = chain_code
self.private_key = private_key
self.public_key = public_key
@classmethod
def get_fields(cls):
return {
1: ('depth', p.UVarintType, 0), # required
2: ('fingerprint', p.UVarintType, 0), # required
3: ('child_num', p.UVarintType, 0), # required
4: ('chain_code', p.BytesType, 0), # required
5: ('private_key', p.BytesType, 0),
6: ('public_key', p.BytesType, 0),
}

View File

@ -4,14 +4,6 @@ import protobuf as p
class IdentityType(p.MessageType):
FIELDS = {
1: ('proto', p.UnicodeType, 0),
2: ('user', p.UnicodeType, 0),
3: ('host', p.UnicodeType, 0),
4: ('port', p.UnicodeType, 0),
5: ('path', p.UnicodeType, 0),
6: ('index', p.UVarintType, 0), # default=0
}
def __init__(
self,
@ -28,3 +20,14 @@ class IdentityType(p.MessageType):
self.port = port
self.path = path
self.index = index
@classmethod
def get_fields(cls):
return {
1: ('proto', p.UnicodeType, 0),
2: ('user', p.UnicodeType, 0),
3: ('host', p.UnicodeType, 0),
4: ('port', p.UnicodeType, 0),
5: ('path', p.UnicodeType, 0),
6: ('index', p.UVarintType, 0), # default=0
}

View File

@ -5,10 +5,6 @@ import protobuf as p
class Initialize(p.MessageType):
MESSAGE_WIRE_TYPE = 0
FIELDS = {
1: ('state', p.BytesType, 0),
2: ('skip_passphrase', p.BoolType, 0),
}
def __init__(
self,
@ -17,3 +13,10 @@ class Initialize(p.MessageType):
) -> None:
self.state = state
self.skip_passphrase = skip_passphrase
@classmethod
def get_fields(cls):
return {
1: ('state', p.BytesType, 0),
2: ('skip_passphrase', p.BoolType, 0),
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class LiskAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 115
FIELDS = {
1: ('address', p.UnicodeType, 0),
}
def __init__(
self,
address: str = None,
) -> None:
self.address = address
@classmethod
def get_fields(cls):
return {
1: ('address', p.UnicodeType, 0),
}

View File

@ -4,12 +4,15 @@ import protobuf as p
class LiskDelegateType(p.MessageType):
FIELDS = {
1: ('username', p.UnicodeType, 0),
}
def __init__(
self,
username: str = None,
) -> None:
self.username = username
@classmethod
def get_fields(cls):
return {
1: ('username', p.UnicodeType, 0),
}

View File

@ -11,10 +11,6 @@ if __debug__:
class LiskGetAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 114
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
}
def __init__(
self,
@ -23,3 +19,10 @@ class LiskGetAddress(p.MessageType):
) -> None:
self.address_n = address_n if address_n is not None else []
self.show_display = show_display
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
}

View File

@ -11,10 +11,6 @@ if __debug__:
class LiskGetPublicKey(p.MessageType):
MESSAGE_WIRE_TYPE = 121
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
}
def __init__(
self,
@ -23,3 +19,10 @@ class LiskGetPublicKey(p.MessageType):
) -> None:
self.address_n = address_n if address_n is not None else []
self.show_display = show_display
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
}

View File

@ -5,10 +5,6 @@ import protobuf as p
class LiskMessageSignature(p.MessageType):
MESSAGE_WIRE_TYPE = 119
FIELDS = {
1: ('public_key', p.BytesType, 0),
2: ('signature', p.BytesType, 0),
}
def __init__(
self,
@ -17,3 +13,10 @@ class LiskMessageSignature(p.MessageType):
) -> None:
self.public_key = public_key
self.signature = signature
@classmethod
def get_fields(cls):
return {
1: ('public_key', p.BytesType, 0),
2: ('signature', p.BytesType, 0),
}

View File

@ -10,11 +10,6 @@ if __debug__:
class LiskMultisignatureType(p.MessageType):
FIELDS = {
1: ('min', p.UVarintType, 0),
2: ('life_time', p.UVarintType, 0),
3: ('keys_group', p.UnicodeType, p.FLAG_REPEATED),
}
def __init__(
self,
@ -25,3 +20,11 @@ class LiskMultisignatureType(p.MessageType):
self.min = min
self.life_time = life_time
self.keys_group = keys_group if keys_group is not None else []
@classmethod
def get_fields(cls):
return {
1: ('min', p.UVarintType, 0),
2: ('life_time', p.UVarintType, 0),
3: ('keys_group', p.UnicodeType, p.FLAG_REPEATED),
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class LiskPublicKey(p.MessageType):
MESSAGE_WIRE_TYPE = 122
FIELDS = {
1: ('public_key', p.BytesType, 0),
}
def __init__(
self,
public_key: bytes = None,
) -> None:
self.public_key = public_key
@classmethod
def get_fields(cls):
return {
1: ('public_key', p.BytesType, 0),
}

View File

@ -11,10 +11,6 @@ if __debug__:
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,
@ -23,3 +19,10 @@ class LiskSignMessage(p.MessageType):
) -> None:
self.address_n = address_n if address_n is not None else []
self.message = message
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('message', p.BytesType, 0),
}

View File

@ -13,10 +13,6 @@ if __debug__:
class LiskSignTx(p.MessageType):
MESSAGE_WIRE_TYPE = 116
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('transaction', LiskTransactionCommon, 0),
}
def __init__(
self,
@ -25,3 +21,10 @@ class LiskSignTx(p.MessageType):
) -> None:
self.address_n = address_n if address_n is not None else []
self.transaction = transaction
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('transaction', LiskTransactionCommon, 0),
}

View File

@ -4,12 +4,15 @@ import protobuf as p
class LiskSignatureType(p.MessageType):
FIELDS = {
1: ('public_key', p.BytesType, 0),
}
def __init__(
self,
public_key: bytes = None,
) -> None:
self.public_key = public_key
@classmethod
def get_fields(cls):
return {
1: ('public_key', p.BytesType, 0),
}

View File

@ -5,12 +5,15 @@ import protobuf as p
class LiskSignedTx(p.MessageType):
MESSAGE_WIRE_TYPE = 117
FIELDS = {
1: ('signature', p.BytesType, 0),
}
def __init__(
self,
signature: bytes = None,
) -> None:
self.signature = signature
@classmethod
def get_fields(cls):
return {
1: ('signature', p.BytesType, 0),
}

View File

@ -14,13 +14,6 @@ if __debug__:
class LiskTransactionAsset(p.MessageType):
FIELDS = {
1: ('signature', LiskSignatureType, 0),
2: ('delegate', LiskDelegateType, 0),
3: ('votes', p.UnicodeType, p.FLAG_REPEATED),
4: ('multisignature', LiskMultisignatureType, 0),
5: ('data', p.UnicodeType, 0),
}
def __init__(
self,
@ -35,3 +28,13 @@ class LiskTransactionAsset(p.MessageType):
self.votes = votes if votes is not None else []
self.multisignature = multisignature
self.data = data
@classmethod
def get_fields(cls):
return {
1: ('signature', LiskSignatureType, 0),
2: ('delegate', LiskDelegateType, 0),
3: ('votes', p.UnicodeType, p.FLAG_REPEATED),
4: ('multisignature', LiskMultisignatureType, 0),
5: ('data', p.UnicodeType, 0),
}

View File

@ -6,17 +6,6 @@ from .LiskTransactionAsset import LiskTransactionAsset
class LiskTransactionCommon(p.MessageType):
FIELDS = {
1: ('type', p.UVarintType, 0),
2: ('amount', p.UVarintType, 0), # default=0
3: ('fee', p.UVarintType, 0),
4: ('recipient_id', p.UnicodeType, 0),
5: ('sender_public_key', p.BytesType, 0),
6: ('requester_public_key', p.BytesType, 0),
7: ('signature', p.BytesType, 0),
8: ('timestamp', p.UVarintType, 0),
9: ('asset', LiskTransactionAsset, 0),
}
def __init__(
self,
@ -39,3 +28,17 @@ class LiskTransactionCommon(p.MessageType):
self.signature = signature
self.timestamp = timestamp
self.asset = asset
@classmethod
def get_fields(cls):
return {
1: ('type', p.UVarintType, 0),
2: ('amount', p.UVarintType, 0), # default=0
3: ('fee', p.UVarintType, 0),
4: ('recipient_id', p.UnicodeType, 0),
5: ('sender_public_key', p.BytesType, 0),
6: ('requester_public_key', p.BytesType, 0),
7: ('signature', p.BytesType, 0),
8: ('timestamp', p.UVarintType, 0),
9: ('asset', LiskTransactionAsset, 0),
}

View File

@ -5,11 +5,6 @@ import protobuf as p
class LiskVerifyMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 120
FIELDS = {
1: ('public_key', p.BytesType, 0),
2: ('signature', p.BytesType, 0),
3: ('message', p.BytesType, 0),
}
def __init__(
self,
@ -20,3 +15,11 @@ class LiskVerifyMessage(p.MessageType):
self.public_key = public_key
self.signature = signature
self.message = message
@classmethod
def get_fields(cls):
return {
1: ('public_key', p.BytesType, 0),
2: ('signature', p.BytesType, 0),
3: ('message', p.BytesType, 0),
}

View File

@ -7,16 +7,6 @@ from .HDNodeType import HDNodeType
class LoadDevice(p.MessageType):
MESSAGE_WIRE_TYPE = 13
FIELDS = {
1: ('mnemonic', p.UnicodeType, 0),
2: ('node', HDNodeType, 0),
3: ('pin', p.UnicodeType, 0),
4: ('passphrase_protection', p.BoolType, 0),
5: ('language', p.UnicodeType, 0), # default=english
6: ('label', p.UnicodeType, 0),
7: ('skip_checksum', p.BoolType, 0),
8: ('u2f_counter', p.UVarintType, 0),
}
def __init__(
self,
@ -37,3 +27,16 @@ class LoadDevice(p.MessageType):
self.label = label
self.skip_checksum = skip_checksum
self.u2f_counter = u2f_counter
@classmethod
def get_fields(cls):
return {
1: ('mnemonic', p.UnicodeType, 0),
2: ('node', HDNodeType, 0),
3: ('pin', p.UnicodeType, 0),
4: ('passphrase_protection', p.BoolType, 0),
5: ('language', p.UnicodeType, 0), # default=english
6: ('label', p.UnicodeType, 0),
7: ('skip_checksum', p.BoolType, 0),
8: ('u2f_counter', p.UVarintType, 0),
}

View File

@ -5,10 +5,6 @@ import protobuf as p
class MessageSignature(p.MessageType):
MESSAGE_WIRE_TYPE = 40
FIELDS = {
1: ('address', p.UnicodeType, 0),
2: ('signature', p.BytesType, 0),
}
def __init__(
self,
@ -17,3 +13,10 @@ class MessageSignature(p.MessageType):
) -> None:
self.address = address
self.signature = signature
@classmethod
def get_fields(cls):
return {
1: ('address', p.UnicodeType, 0),
2: ('signature', p.BytesType, 0),
}

View File

@ -109,6 +109,10 @@ StellarAccountMergeOp = 218
StellarManageDataOp = 220
StellarBumpSequenceOp = 221
StellarSignedTx = 230
TronGetAddress = 250
TronAddress = 251
TronSignTx = 252
TronSignedTx = 253
CardanoSignTx = 303
CardanoTxRequest = 304
CardanoGetPublicKey = 305
@ -133,25 +137,35 @@ RippleGetAddress = 400
RippleAddress = 401
RippleSignTx = 402
RippleSignedTx = 403
MoneroTransactionSignRequest = 501
MoneroTransactionInitRequest = 501
MoneroTransactionInitAck = 502
MoneroTransactionSetInputAck = 503
MoneroTransactionInputsPermutationAck = 504
MoneroTransactionInputViniAck = 505
MoneroTransactionAllInputsSetAck = 513
MoneroTransactionSetOutputAck = 506
MoneroTransactionRangeSigAck = 514
MoneroTransactionAllOutSetAck = 507
MoneroTransactionMlsagDoneAck = 508
MoneroTransactionSignInputAck = 509
MoneroTransactionFinalAck = 510
MoneroKeyImageSyncRequest = 511
MoneroKeyImageExportInitAck = 520
MoneroKeyImageSyncStepAck = 521
MoneroKeyImageSyncFinalAck = 522
MoneroGetAddress = 530
MoneroAddress = 531
MoneroGetWatchKey = 532
MoneroWatchKey = 533
DebugMoneroDiagRequest = 536
DebugMoneroDiagAck = 537
MoneroTransactionSetInputRequest = 503
MoneroTransactionSetInputAck = 504
MoneroTransactionInputsPermutationRequest = 505
MoneroTransactionInputsPermutationAck = 506
MoneroTransactionInputViniRequest = 507
MoneroTransactionInputViniAck = 508
MoneroTransactionAllInputsSetRequest = 509
MoneroTransactionAllInputsSetAck = 510
MoneroTransactionSetOutputRequest = 511
MoneroTransactionSetOutputAck = 512
MoneroTransactionAllOutSetRequest = 513
MoneroTransactionAllOutSetAck = 514
MoneroTransactionMlsagDoneRequest = 515
MoneroTransactionMlsagDoneAck = 516
MoneroTransactionSignInputRequest = 517
MoneroTransactionSignInputAck = 518
MoneroTransactionFinalRequest = 519
MoneroTransactionFinalAck = 520
MoneroKeyImageExportInitRequest = 530
MoneroKeyImageExportInitAck = 531
MoneroKeyImageSyncStepRequest = 532
MoneroKeyImageSyncStepAck = 533
MoneroKeyImageSyncFinalRequest = 534
MoneroKeyImageSyncFinalAck = 535
MoneroGetAddress = 540
MoneroAddress = 541
MoneroGetWatchKey = 542
MoneroWatchKey = 543
DebugMoneroDiagRequest = 546
DebugMoneroDiagAck = 547

View File

@ -4,10 +4,6 @@ import protobuf as p
class MoneroAccountPublicAddress(p.MessageType):
FIELDS = {
1: ('spend_public_key', p.BytesType, 0),
2: ('view_public_key', p.BytesType, 0),
}
def __init__(
self,
@ -16,3 +12,10 @@ class MoneroAccountPublicAddress(p.MessageType):
) -> None:
self.spend_public_key = spend_public_key
self.view_public_key = view_public_key
@classmethod
def get_fields(cls):
return {
1: ('spend_public_key', p.BytesType, 0),
2: ('view_public_key', p.BytesType, 0),
}

View File

@ -4,13 +4,16 @@ import protobuf as p
class MoneroAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 531
FIELDS = {
1: ('address', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 541
def __init__(
self,
address: bytes = None,
) -> None:
self.address = address
@classmethod
def get_fields(cls):
return {
1: ('address', p.BytesType, 0),
}

View File

@ -4,11 +4,6 @@ import protobuf as p
class MoneroExportedKeyImage(p.MessageType):
FIELDS = {
1: ('iv', p.BytesType, 0),
2: ('tag', p.BytesType, 0),
3: ('blob', p.BytesType, 0),
}
def __init__(
self,
@ -19,3 +14,11 @@ class MoneroExportedKeyImage(p.MessageType):
self.iv = iv
self.tag = tag
self.blob = blob
@classmethod
def get_fields(cls):
return {
1: ('iv', p.BytesType, 0),
2: ('tag', p.BytesType, 0),
3: ('blob', p.BytesType, 0),
}

View File

@ -10,14 +10,7 @@ if __debug__:
class MoneroGetAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 530
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
3: ('network_type', p.UVarintType, 0),
4: ('account', p.UVarintType, 0),
5: ('minor', p.UVarintType, 0),
}
MESSAGE_WIRE_TYPE = 540
def __init__(
self,
@ -32,3 +25,13 @@ class MoneroGetAddress(p.MessageType):
self.network_type = network_type
self.account = account
self.minor = minor
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
3: ('network_type', p.UVarintType, 0),
4: ('account', p.UVarintType, 0),
5: ('minor', p.UVarintType, 0),
}

View File

@ -10,11 +10,7 @@ if __debug__:
class MoneroGetWatchKey(p.MessageType):
MESSAGE_WIRE_TYPE = 532
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('network_type', p.UVarintType, 0),
}
MESSAGE_WIRE_TYPE = 542
def __init__(
self,
@ -23,3 +19,10 @@ class MoneroGetWatchKey(p.MessageType):
) -> 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

@ -4,4 +4,4 @@ import protobuf as p
class MoneroKeyImageExportInitAck(p.MessageType):
MESSAGE_WIRE_TYPE = 520
MESSAGE_WIRE_TYPE = 531

View File

@ -12,13 +12,7 @@ if __debug__:
class MoneroKeyImageExportInitRequest(p.MessageType):
FIELDS = {
1: ('num', p.UVarintType, 0),
2: ('hash', p.BytesType, 0),
3: ('address_n', p.UVarintType, p.FLAG_REPEATED),
4: ('network_type', p.UVarintType, 0),
5: ('subs', MoneroSubAddressIndicesList, p.FLAG_REPEATED),
}
MESSAGE_WIRE_TYPE = 530
def __init__(
self,
@ -33,3 +27,13 @@ class MoneroKeyImageExportInitRequest(p.MessageType):
self.address_n = address_n if address_n is not None else []
self.network_type = network_type
self.subs = subs if subs is not None else []
@classmethod
def get_fields(cls):
return {
1: ('num', p.UVarintType, 0),
2: ('hash', p.BytesType, 0),
3: ('address_n', p.UVarintType, p.FLAG_REPEATED),
4: ('network_type', p.UVarintType, 0),
5: ('subs', MoneroSubAddressIndicesList, p.FLAG_REPEATED),
}

View File

@ -4,13 +4,16 @@ import protobuf as p
class MoneroKeyImageSyncFinalAck(p.MessageType):
MESSAGE_WIRE_TYPE = 522
FIELDS = {
1: ('enc_key', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 535
def __init__(
self,
enc_key: bytes = None,
) -> None:
self.enc_key = enc_key
@classmethod
def get_fields(cls):
return {
1: ('enc_key', p.BytesType, 0),
}

View File

@ -4,4 +4,4 @@ import protobuf as p
class MoneroKeyImageSyncFinalRequest(p.MessageType):
pass
MESSAGE_WIRE_TYPE = 534

View File

@ -1,26 +0,0 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
from .MoneroKeyImageExportInitRequest import MoneroKeyImageExportInitRequest
from .MoneroKeyImageSyncFinalRequest import MoneroKeyImageSyncFinalRequest
from .MoneroKeyImageSyncStepRequest import MoneroKeyImageSyncStepRequest
class MoneroKeyImageSyncRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 511
FIELDS = {
1: ('init', MoneroKeyImageExportInitRequest, 0),
2: ('step', MoneroKeyImageSyncStepRequest, 0),
3: ('final_msg', MoneroKeyImageSyncFinalRequest, 0),
}
def __init__(
self,
init: MoneroKeyImageExportInitRequest = None,
step: MoneroKeyImageSyncStepRequest = None,
final_msg: MoneroKeyImageSyncFinalRequest = None,
) -> None:
self.init = init
self.step = step
self.final_msg = final_msg

View File

@ -12,13 +12,16 @@ if __debug__:
class MoneroKeyImageSyncStepAck(p.MessageType):
MESSAGE_WIRE_TYPE = 521
FIELDS = {
1: ('kis', MoneroExportedKeyImage, p.FLAG_REPEATED),
}
MESSAGE_WIRE_TYPE = 533
def __init__(
self,
kis: List[MoneroExportedKeyImage] = None,
) -> None:
self.kis = kis if kis is not None else []
@classmethod
def get_fields(cls):
return {
1: ('kis', MoneroExportedKeyImage, p.FLAG_REPEATED),
}

View File

@ -12,12 +12,16 @@ if __debug__:
class MoneroKeyImageSyncStepRequest(p.MessageType):
FIELDS = {
1: ('tdis', MoneroTransferDetails, p.FLAG_REPEATED),
}
MESSAGE_WIRE_TYPE = 532
def __init__(
self,
tdis: List[MoneroTransferDetails] = None,
) -> None:
self.tdis = tdis if tdis is not None else []
@classmethod
def get_fields(cls):
return {
1: ('tdis', MoneroTransferDetails, p.FLAG_REPEATED),
}

View File

@ -4,12 +4,6 @@ import protobuf as p
class MoneroMultisigKLRki(p.MessageType):
FIELDS = {
1: ('K', p.BytesType, 0),
2: ('L', p.BytesType, 0),
3: ('R', p.BytesType, 0),
4: ('ki', p.BytesType, 0),
}
def __init__(
self,
@ -22,3 +16,12 @@ class MoneroMultisigKLRki(p.MessageType):
self.L = L
self.R = R
self.ki = ki
@classmethod
def get_fields(cls):
return {
1: ('K', p.BytesType, 0),
2: ('L', p.BytesType, 0),
3: ('R', p.BytesType, 0),
4: ('ki', p.BytesType, 0),
}

View File

@ -6,10 +6,6 @@ from .MoneroRctKey import MoneroRctKey
class MoneroOutputEntry(p.MessageType):
FIELDS = {
1: ('idx', p.UVarintType, 0),
2: ('key', MoneroRctKey, 0),
}
def __init__(
self,
@ -18,3 +14,10 @@ class MoneroOutputEntry(p.MessageType):
) -> None:
self.idx = idx
self.key = key
@classmethod
def get_fields(cls):
return {
1: ('idx', p.UVarintType, 0),
2: ('key', MoneroRctKey, 0),
}

View File

@ -4,10 +4,6 @@ import protobuf as p
class MoneroRctKey(p.MessageType):
FIELDS = {
1: ('dest', p.BytesType, 0),
2: ('mask', p.BytesType, 0),
}
def __init__(
self,
@ -16,3 +12,10 @@ class MoneroRctKey(p.MessageType):
) -> None:
self.dest = dest
self.mask = mask
@classmethod
def get_fields(cls):
return {
1: ('dest', p.BytesType, 0),
2: ('mask', p.BytesType, 0),
}

View File

@ -4,11 +4,6 @@ import protobuf as p
class MoneroRingCtSig(p.MessageType):
FIELDS = {
1: ('txn_fee', p.UVarintType, 0),
2: ('message', p.BytesType, 0),
3: ('rv_type', p.UVarintType, 0),
}
def __init__(
self,
@ -19,3 +14,11 @@ class MoneroRingCtSig(p.MessageType):
self.txn_fee = txn_fee
self.message = message
self.rv_type = rv_type
@classmethod
def get_fields(cls):
return {
1: ('txn_fee', p.UVarintType, 0),
2: ('message', p.BytesType, 0),
3: ('rv_type', p.UVarintType, 0),
}

View File

@ -10,10 +10,6 @@ if __debug__:
class MoneroSubAddressIndicesList(p.MessageType):
FIELDS = {
1: ('account', p.UVarintType, 0),
2: ('minor_indices', p.UVarintType, p.FLAG_REPEATED),
}
def __init__(
self,
@ -22,3 +18,10 @@ class MoneroSubAddressIndicesList(p.MessageType):
) -> None:
self.account = account
self.minor_indices = minor_indices if minor_indices is not None else []
@classmethod
def get_fields(cls):
return {
1: ('account', p.UVarintType, 0),
2: ('minor_indices', p.UVarintType, p.FLAG_REPEATED),
}

View File

@ -6,13 +6,16 @@ from .MoneroTransactionRsigData import MoneroTransactionRsigData
class MoneroTransactionAllInputsSetAck(p.MessageType):
MESSAGE_WIRE_TYPE = 513
FIELDS = {
1: ('rsig_data', MoneroTransactionRsigData, 0),
}
MESSAGE_WIRE_TYPE = 510
def __init__(
self,
rsig_data: MoneroTransactionRsigData = None,
) -> None:
self.rsig_data = rsig_data
@classmethod
def get_fields(cls):
return {
1: ('rsig_data', MoneroTransactionRsigData, 0),
}

View File

@ -6,12 +6,16 @@ from .MoneroTransactionRsigData import MoneroTransactionRsigData
class MoneroTransactionAllInputsSetRequest(p.MessageType):
FIELDS = {
1: ('rsig_data', MoneroTransactionRsigData, 0),
}
MESSAGE_WIRE_TYPE = 509
def __init__(
self,
rsig_data: MoneroTransactionRsigData = None,
) -> None:
self.rsig_data = rsig_data
@classmethod
def get_fields(cls):
return {
1: ('rsig_data', MoneroTransactionRsigData, 0),
}

View File

@ -7,13 +7,7 @@ from .MoneroTransactionRsigData import MoneroTransactionRsigData
class MoneroTransactionAllOutSetAck(p.MessageType):
MESSAGE_WIRE_TYPE = 507
FIELDS = {
1: ('extra', p.BytesType, 0),
2: ('tx_prefix_hash', p.BytesType, 0),
3: ('rsig_data', MoneroTransactionRsigData, 0),
4: ('rv', MoneroRingCtSig, 0),
}
MESSAGE_WIRE_TYPE = 514
def __init__(
self,
@ -26,3 +20,12 @@ class MoneroTransactionAllOutSetAck(p.MessageType):
self.tx_prefix_hash = tx_prefix_hash
self.rsig_data = rsig_data
self.rv = rv
@classmethod
def get_fields(cls):
return {
1: ('extra', p.BytesType, 0),
2: ('tx_prefix_hash', p.BytesType, 0),
3: ('rsig_data', MoneroTransactionRsigData, 0),
4: ('rv', MoneroRingCtSig, 0),
}

View File

@ -6,12 +6,16 @@ from .MoneroTransactionRsigData import MoneroTransactionRsigData
class MoneroTransactionAllOutSetRequest(p.MessageType):
FIELDS = {
1: ('rsig_data', MoneroTransactionRsigData, 0),
}
MESSAGE_WIRE_TYPE = 513
def __init__(
self,
rsig_data: MoneroTransactionRsigData = None,
) -> None:
self.rsig_data = rsig_data
@classmethod
def get_fields(cls):
return {
1: ('rsig_data', MoneroTransactionRsigData, 0),
}

View File

@ -13,23 +13,6 @@ if __debug__:
class MoneroTransactionData(p.MessageType):
FIELDS = {
1: ('version', p.UVarintType, 0),
2: ('payment_id', p.BytesType, 0),
3: ('unlock_time', p.UVarintType, 0),
4: ('outputs', MoneroTransactionDestinationEntry, p.FLAG_REPEATED),
5: ('change_dts', MoneroTransactionDestinationEntry, 0),
6: ('num_inputs', p.UVarintType, 0),
7: ('mixin', p.UVarintType, 0),
8: ('fee', p.UVarintType, 0),
9: ('account', p.UVarintType, 0),
10: ('minor_indices', p.UVarintType, p.FLAG_REPEATED),
11: ('is_multisig', p.BoolType, 0),
12: ('exp_tx_prefix_hash', p.BytesType, 0),
13: ('use_tx_keys', p.BytesType, p.FLAG_REPEATED),
14: ('rsig_data', MoneroTransactionRsigData, 0),
15: ('integrated_indices', p.UVarintType, p.FLAG_REPEATED),
}
def __init__(
self,
@ -64,3 +47,23 @@ class MoneroTransactionData(p.MessageType):
self.use_tx_keys = use_tx_keys if use_tx_keys is not None else []
self.rsig_data = rsig_data
self.integrated_indices = integrated_indices if integrated_indices is not None else []
@classmethod
def get_fields(cls):
return {
1: ('version', p.UVarintType, 0),
2: ('payment_id', p.BytesType, 0),
3: ('unlock_time', p.UVarintType, 0),
4: ('outputs', MoneroTransactionDestinationEntry, p.FLAG_REPEATED),
5: ('change_dts', MoneroTransactionDestinationEntry, 0),
6: ('num_inputs', p.UVarintType, 0),
7: ('mixin', p.UVarintType, 0),
8: ('fee', p.UVarintType, 0),
9: ('account', p.UVarintType, 0),
10: ('minor_indices', p.UVarintType, p.FLAG_REPEATED),
11: ('is_multisig', p.BoolType, 0),
12: ('exp_tx_prefix_hash', p.BytesType, 0),
13: ('use_tx_keys', p.BytesType, p.FLAG_REPEATED),
14: ('rsig_data', MoneroTransactionRsigData, 0),
15: ('integrated_indices', p.UVarintType, p.FLAG_REPEATED),
}

View File

@ -6,11 +6,6 @@ from .MoneroAccountPublicAddress import MoneroAccountPublicAddress
class MoneroTransactionDestinationEntry(p.MessageType):
FIELDS = {
1: ('amount', p.UVarintType, 0),
2: ('addr', MoneroAccountPublicAddress, 0),
3: ('is_subaddress', p.BoolType, 0),
}
def __init__(
self,
@ -21,3 +16,11 @@ class MoneroTransactionDestinationEntry(p.MessageType):
self.amount = amount
self.addr = addr
self.is_subaddress = is_subaddress
@classmethod
def get_fields(cls):
return {
1: ('amount', p.UVarintType, 0),
2: ('addr', MoneroAccountPublicAddress, 0),
3: ('is_subaddress', p.BoolType, 0),
}

View File

@ -4,13 +4,7 @@ import protobuf as p
class MoneroTransactionFinalAck(p.MessageType):
MESSAGE_WIRE_TYPE = 510
FIELDS = {
1: ('cout_key', p.BytesType, 0),
2: ('salt', p.BytesType, 0),
3: ('rand_mult', p.BytesType, 0),
4: ('tx_enc_keys', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 520
def __init__(
self,
@ -23,3 +17,12 @@ class MoneroTransactionFinalAck(p.MessageType):
self.salt = salt
self.rand_mult = rand_mult
self.tx_enc_keys = tx_enc_keys
@classmethod
def get_fields(cls):
return {
1: ('cout_key', p.BytesType, 0),
2: ('salt', p.BytesType, 0),
3: ('rand_mult', p.BytesType, 0),
4: ('tx_enc_keys', p.BytesType, 0),
}

View File

@ -4,4 +4,4 @@ import protobuf as p
class MoneroTransactionFinalRequest(p.MessageType):
pass
MESSAGE_WIRE_TYPE = 519

View File

@ -13,15 +13,6 @@ if __debug__:
class MoneroTransactionInitAck(p.MessageType):
MESSAGE_WIRE_TYPE = 502
FIELDS = {
1: ('version', p.UVarintType, 0),
2: ('status', p.UVarintType, 0),
3: ('in_memory', p.BoolType, 0),
4: ('hmacs', p.BytesType, p.FLAG_REPEATED),
5: ('many_inputs', p.BoolType, 0),
6: ('many_outputs', p.BoolType, 0),
7: ('rsig_data', MoneroTransactionRsigData, 0),
}
def __init__(
self,
@ -40,3 +31,15 @@ class MoneroTransactionInitAck(p.MessageType):
self.many_inputs = many_inputs
self.many_outputs = many_outputs
self.rsig_data = rsig_data
@classmethod
def get_fields(cls):
return {
1: ('version', p.UVarintType, 0),
2: ('status', p.UVarintType, 0),
3: ('in_memory', p.BoolType, 0),
4: ('hmacs', p.BytesType, p.FLAG_REPEATED),
5: ('many_inputs', p.BoolType, 0),
6: ('many_outputs', p.BoolType, 0),
7: ('rsig_data', MoneroTransactionRsigData, 0),
}

View File

@ -12,12 +12,7 @@ if __debug__:
class MoneroTransactionInitRequest(p.MessageType):
FIELDS = {
1: ('version', p.UVarintType, 0),
2: ('address_n', p.UVarintType, p.FLAG_REPEATED),
3: ('network_type', p.UVarintType, 0),
4: ('tsx_data', MoneroTransactionData, 0),
}
MESSAGE_WIRE_TYPE = 501
def __init__(
self,
@ -30,3 +25,12 @@ class MoneroTransactionInitRequest(p.MessageType):
self.address_n = address_n if address_n is not None else []
self.network_type = network_type
self.tsx_data = tsx_data
@classmethod
def get_fields(cls):
return {
1: ('version', p.UVarintType, 0),
2: ('address_n', p.UVarintType, p.FLAG_REPEATED),
3: ('network_type', p.UVarintType, 0),
4: ('tsx_data', MoneroTransactionData, 0),
}

View File

@ -4,4 +4,4 @@ import protobuf as p
class MoneroTransactionInputViniAck(p.MessageType):
MESSAGE_WIRE_TYPE = 505
MESSAGE_WIRE_TYPE = 508

Some files were not shown because too many files have changed in this diff Show More