mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-19 14:38:47 +00:00
vendor: trezor-common version bump, pb sync, template sync
This commit is contained in:
parent
2a0dc76981
commit
3ae4106465
@ -520,7 +520,7 @@ COINS = [
|
|||||||
address_type_p2sh=5,
|
address_type_p2sh=5,
|
||||||
maxfee_kb=10000000,
|
maxfee_kb=10000000,
|
||||||
signed_message_header="Namecoin Signed Message:\n",
|
signed_message_header="Namecoin Signed Message:\n",
|
||||||
xpub_magic=0x019da462,
|
xpub_magic=0x0488b21e,
|
||||||
xpub_magic_segwit_p2sh=None,
|
xpub_magic_segwit_p2sh=None,
|
||||||
xpub_magic_segwit_native=None,
|
xpub_magic_segwit_native=None,
|
||||||
bech32_prefix=None,
|
bech32_prefix=None,
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class Address(p.MessageType):
|
class Address(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 30
|
MESSAGE_WIRE_TYPE = 30
|
||||||
FIELDS = {
|
|
||||||
1: ('address', p.UnicodeType, 0), # required
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
address: str = None,
|
address: str = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.address = address
|
self.address = address
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('address', p.UnicodeType, 0), # required
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class ApplyFlags(p.MessageType):
|
class ApplyFlags(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 28
|
MESSAGE_WIRE_TYPE = 28
|
||||||
FIELDS = {
|
|
||||||
1: ('flags', p.UVarintType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
flags: int = None,
|
flags: int = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.flags = flags
|
self.flags = flags
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('flags', p.UVarintType, 0),
|
||||||
|
}
|
||||||
|
@ -5,14 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class ApplySettings(p.MessageType):
|
class ApplySettings(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 25
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -29,3 +21,14 @@ class ApplySettings(p.MessageType):
|
|||||||
self.homescreen = homescreen
|
self.homescreen = homescreen
|
||||||
self.passphrase_source = passphrase_source
|
self.passphrase_source = passphrase_source
|
||||||
self.auto_lock_delay_ms = auto_lock_delay_ms
|
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),
|
||||||
|
}
|
||||||
|
@ -5,10 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class ButtonRequest(p.MessageType):
|
class ButtonRequest(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 26
|
MESSAGE_WIRE_TYPE = 26
|
||||||
FIELDS = {
|
|
||||||
1: ('code', p.UVarintType, 0),
|
|
||||||
2: ('data', p.UnicodeType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -17,3 +13,10 @@ class ButtonRequest(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.code = code
|
self.code = code
|
||||||
self.data = data
|
self.data = data
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('code', p.UVarintType, 0),
|
||||||
|
2: ('data', p.UnicodeType, 0),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class CardanoAddress(p.MessageType):
|
class CardanoAddress(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 308
|
MESSAGE_WIRE_TYPE = 308
|
||||||
FIELDS = {
|
|
||||||
1: ('address', p.UnicodeType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
address: str = None,
|
address: str = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.address = address
|
self.address = address
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('address', p.UnicodeType, 0),
|
||||||
|
}
|
||||||
|
@ -11,10 +11,6 @@ if __debug__:
|
|||||||
|
|
||||||
class CardanoGetAddress(p.MessageType):
|
class CardanoGetAddress(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 307
|
MESSAGE_WIRE_TYPE = 307
|
||||||
FIELDS = {
|
|
||||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
|
||||||
2: ('show_display', p.BoolType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -23,3 +19,10 @@ class CardanoGetAddress(p.MessageType):
|
|||||||
) -> 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.show_display = show_display
|
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),
|
||||||
|
}
|
||||||
|
@ -11,10 +11,6 @@ if __debug__:
|
|||||||
|
|
||||||
class CardanoGetPublicKey(p.MessageType):
|
class CardanoGetPublicKey(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 305
|
MESSAGE_WIRE_TYPE = 305
|
||||||
FIELDS = {
|
|
||||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
|
||||||
2: ('show_display', p.BoolType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -23,3 +19,10 @@ class CardanoGetPublicKey(p.MessageType):
|
|||||||
) -> 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.show_display = show_display
|
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),
|
||||||
|
}
|
||||||
|
@ -7,10 +7,6 @@ from .HDNodeType import HDNodeType
|
|||||||
|
|
||||||
class CardanoPublicKey(p.MessageType):
|
class CardanoPublicKey(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 306
|
MESSAGE_WIRE_TYPE = 306
|
||||||
FIELDS = {
|
|
||||||
1: ('xpub', p.UnicodeType, 0),
|
|
||||||
2: ('node', HDNodeType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -19,3 +15,10 @@ class CardanoPublicKey(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.xpub = xpub
|
self.xpub = xpub
|
||||||
self.node = node
|
self.node = node
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('xpub', p.UnicodeType, 0),
|
||||||
|
2: ('node', HDNodeType, 0),
|
||||||
|
}
|
||||||
|
@ -14,12 +14,6 @@ if __debug__:
|
|||||||
|
|
||||||
class CardanoSignTx(p.MessageType):
|
class CardanoSignTx(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 303
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -32,3 +26,12 @@ class CardanoSignTx(p.MessageType):
|
|||||||
self.outputs = outputs if outputs is not None else []
|
self.outputs = outputs if outputs is not None else []
|
||||||
self.transactions_count = transactions_count
|
self.transactions_count = transactions_count
|
||||||
self.network = network
|
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),
|
||||||
|
}
|
||||||
|
@ -5,10 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class CardanoSignedTx(p.MessageType):
|
class CardanoSignedTx(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 310
|
MESSAGE_WIRE_TYPE = 310
|
||||||
FIELDS = {
|
|
||||||
1: ('tx_hash', p.BytesType, 0),
|
|
||||||
2: ('tx_body', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -17,3 +13,10 @@ class CardanoSignedTx(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.tx_hash = tx_hash
|
self.tx_hash = tx_hash
|
||||||
self.tx_body = tx_body
|
self.tx_body = tx_body
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('tx_hash', p.BytesType, 0),
|
||||||
|
2: ('tx_body', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class CardanoTxAck(p.MessageType):
|
class CardanoTxAck(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 309
|
MESSAGE_WIRE_TYPE = 309
|
||||||
FIELDS = {
|
|
||||||
1: ('transaction', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
transaction: bytes = None,
|
transaction: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.transaction = transaction
|
self.transaction = transaction
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('transaction', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -10,12 +10,6 @@ if __debug__:
|
|||||||
|
|
||||||
|
|
||||||
class CardanoTxInputType(p.MessageType):
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -28,3 +22,12 @@ class CardanoTxInputType(p.MessageType):
|
|||||||
self.prev_hash = prev_hash
|
self.prev_hash = prev_hash
|
||||||
self.prev_index = prev_index
|
self.prev_index = prev_index
|
||||||
self.type = type
|
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),
|
||||||
|
}
|
||||||
|
@ -10,11 +10,6 @@ if __debug__:
|
|||||||
|
|
||||||
|
|
||||||
class CardanoTxOutputType(p.MessageType):
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -25,3 +20,11 @@ class CardanoTxOutputType(p.MessageType):
|
|||||||
self.address = address
|
self.address = address
|
||||||
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.amount = amount
|
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),
|
||||||
|
}
|
||||||
|
@ -5,11 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class CardanoTxRequest(p.MessageType):
|
class CardanoTxRequest(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 304
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -20,3 +15,11 @@ class CardanoTxRequest(p.MessageType):
|
|||||||
self.tx_index = tx_index
|
self.tx_index = tx_index
|
||||||
self.tx_hash = tx_hash
|
self.tx_hash = tx_hash
|
||||||
self.tx_body = tx_body
|
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),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class ChangePin(p.MessageType):
|
class ChangePin(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 4
|
MESSAGE_WIRE_TYPE = 4
|
||||||
FIELDS = {
|
|
||||||
1: ('remove', p.BoolType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
remove: bool = None,
|
remove: bool = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.remove = remove
|
self.remove = remove
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('remove', p.BoolType, 0),
|
||||||
|
}
|
||||||
|
@ -11,15 +11,6 @@ if __debug__:
|
|||||||
|
|
||||||
class CipherKeyValue(p.MessageType):
|
class CipherKeyValue(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 23
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -38,3 +29,15 @@ class CipherKeyValue(p.MessageType):
|
|||||||
self.ask_on_encrypt = ask_on_encrypt
|
self.ask_on_encrypt = ask_on_encrypt
|
||||||
self.ask_on_decrypt = ask_on_decrypt
|
self.ask_on_decrypt = ask_on_decrypt
|
||||||
self.iv = iv
|
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),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class CipheredKeyValue(p.MessageType):
|
class CipheredKeyValue(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 48
|
MESSAGE_WIRE_TYPE = 48
|
||||||
FIELDS = {
|
|
||||||
1: ('value', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
value: bytes = None,
|
value: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.value = value
|
self.value = value
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('value', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -11,10 +11,6 @@ if __debug__:
|
|||||||
|
|
||||||
class CosiCommit(p.MessageType):
|
class CosiCommit(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 71
|
MESSAGE_WIRE_TYPE = 71
|
||||||
FIELDS = {
|
|
||||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
|
||||||
2: ('data', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -23,3 +19,10 @@ class CosiCommit(p.MessageType):
|
|||||||
) -> 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.data = data
|
self.data = data
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||||
|
2: ('data', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -5,10 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class CosiCommitment(p.MessageType):
|
class CosiCommitment(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 72
|
MESSAGE_WIRE_TYPE = 72
|
||||||
FIELDS = {
|
|
||||||
1: ('commitment', p.BytesType, 0),
|
|
||||||
2: ('pubkey', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -17,3 +13,10 @@ class CosiCommitment(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.commitment = commitment
|
self.commitment = commitment
|
||||||
self.pubkey = pubkey
|
self.pubkey = pubkey
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('commitment', p.BytesType, 0),
|
||||||
|
2: ('pubkey', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -11,12 +11,6 @@ if __debug__:
|
|||||||
|
|
||||||
class CosiSign(p.MessageType):
|
class CosiSign(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 73
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -29,3 +23,12 @@ class CosiSign(p.MessageType):
|
|||||||
self.data = data
|
self.data = data
|
||||||
self.global_commitment = global_commitment
|
self.global_commitment = global_commitment
|
||||||
self.global_pubkey = global_pubkey
|
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),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class CosiSignature(p.MessageType):
|
class CosiSignature(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 74
|
MESSAGE_WIRE_TYPE = 74
|
||||||
FIELDS = {
|
|
||||||
1: ('signature', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
signature: bytes = None,
|
signature: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.signature = signature
|
self.signature = signature
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('signature', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -5,11 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class DebugLinkDecision(p.MessageType):
|
class DebugLinkDecision(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 100
|
MESSAGE_WIRE_TYPE = 100
|
||||||
FIELDS = {
|
|
||||||
1: ('yes_no', p.BoolType, 0),
|
|
||||||
2: ('up_down', p.BoolType, 0),
|
|
||||||
3: ('input', p.UnicodeType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -20,3 +15,11 @@ class DebugLinkDecision(p.MessageType):
|
|||||||
self.yes_no = yes_no
|
self.yes_no = yes_no
|
||||||
self.up_down = up_down
|
self.up_down = up_down
|
||||||
self.input = input
|
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),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class DebugLinkFlashErase(p.MessageType):
|
class DebugLinkFlashErase(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 113
|
MESSAGE_WIRE_TYPE = 113
|
||||||
FIELDS = {
|
|
||||||
1: ('sector', p.UVarintType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
sector: int = None,
|
sector: int = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.sector = sector
|
self.sector = sector
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('sector', p.UVarintType, 0),
|
||||||
|
}
|
||||||
|
@ -5,11 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class DebugLinkLog(p.MessageType):
|
class DebugLinkLog(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 104
|
MESSAGE_WIRE_TYPE = 104
|
||||||
FIELDS = {
|
|
||||||
1: ('level', p.UVarintType, 0),
|
|
||||||
2: ('bucket', p.UnicodeType, 0),
|
|
||||||
3: ('text', p.UnicodeType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -20,3 +15,11 @@ class DebugLinkLog(p.MessageType):
|
|||||||
self.level = level
|
self.level = level
|
||||||
self.bucket = bucket
|
self.bucket = bucket
|
||||||
self.text = text
|
self.text = text
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('level', p.UVarintType, 0),
|
||||||
|
2: ('bucket', p.UnicodeType, 0),
|
||||||
|
3: ('text', p.UnicodeType, 0),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class DebugLinkMemory(p.MessageType):
|
class DebugLinkMemory(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 111
|
MESSAGE_WIRE_TYPE = 111
|
||||||
FIELDS = {
|
|
||||||
1: ('memory', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
memory: bytes = None,
|
memory: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.memory = memory
|
self.memory = memory
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('memory', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -5,10 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class DebugLinkMemoryRead(p.MessageType):
|
class DebugLinkMemoryRead(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 110
|
MESSAGE_WIRE_TYPE = 110
|
||||||
FIELDS = {
|
|
||||||
1: ('address', p.UVarintType, 0),
|
|
||||||
2: ('length', p.UVarintType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -17,3 +13,10 @@ class DebugLinkMemoryRead(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.address = address
|
self.address = address
|
||||||
self.length = length
|
self.length = length
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('address', p.UVarintType, 0),
|
||||||
|
2: ('length', p.UVarintType, 0),
|
||||||
|
}
|
||||||
|
@ -5,11 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class DebugLinkMemoryWrite(p.MessageType):
|
class DebugLinkMemoryWrite(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 112
|
MESSAGE_WIRE_TYPE = 112
|
||||||
FIELDS = {
|
|
||||||
1: ('address', p.UVarintType, 0),
|
|
||||||
2: ('memory', p.BytesType, 0),
|
|
||||||
3: ('flash', p.BoolType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -20,3 +15,11 @@ class DebugLinkMemoryWrite(p.MessageType):
|
|||||||
self.address = address
|
self.address = address
|
||||||
self.memory = memory
|
self.memory = memory
|
||||||
self.flash = flash
|
self.flash = flash
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('address', p.UVarintType, 0),
|
||||||
|
2: ('memory', p.BytesType, 0),
|
||||||
|
3: ('flash', p.BoolType, 0),
|
||||||
|
}
|
||||||
|
@ -7,19 +7,6 @@ from .HDNodeType import HDNodeType
|
|||||||
|
|
||||||
class DebugLinkState(p.MessageType):
|
class DebugLinkState(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 102
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -46,3 +33,19 @@ class DebugLinkState(p.MessageType):
|
|||||||
self.recovery_fake_word = recovery_fake_word
|
self.recovery_fake_word = recovery_fake_word
|
||||||
self.recovery_word_pos = recovery_word_pos
|
self.recovery_word_pos = recovery_word_pos
|
||||||
self.reset_word_pos = reset_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),
|
||||||
|
}
|
||||||
|
@ -10,15 +10,7 @@ if __debug__:
|
|||||||
|
|
||||||
|
|
||||||
class DebugMoneroDiagAck(p.MessageType):
|
class DebugMoneroDiagAck(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 537
|
MESSAGE_WIRE_TYPE = 547
|
||||||
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),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -35,3 +27,14 @@ class DebugMoneroDiagAck(p.MessageType):
|
|||||||
self.pd = pd if pd is not None else []
|
self.pd = pd if pd is not None else []
|
||||||
self.data1 = data1
|
self.data1 = data1
|
||||||
self.data2 = data2
|
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),
|
||||||
|
}
|
||||||
|
@ -10,15 +10,7 @@ if __debug__:
|
|||||||
|
|
||||||
|
|
||||||
class DebugMoneroDiagRequest(p.MessageType):
|
class DebugMoneroDiagRequest(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 536
|
MESSAGE_WIRE_TYPE = 546
|
||||||
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),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -35,3 +27,14 @@ class DebugMoneroDiagRequest(p.MessageType):
|
|||||||
self.pd = pd if pd is not None else []
|
self.pd = pd if pd is not None else []
|
||||||
self.data1 = data1
|
self.data1 = data1
|
||||||
self.data2 = data2
|
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),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class ECDHSessionKey(p.MessageType):
|
class ECDHSessionKey(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 62
|
MESSAGE_WIRE_TYPE = 62
|
||||||
FIELDS = {
|
|
||||||
1: ('session_key', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
session_key: bytes = None,
|
session_key: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.session_key = session_key
|
self.session_key = session_key
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('session_key', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class Entropy(p.MessageType):
|
class Entropy(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 10
|
MESSAGE_WIRE_TYPE = 10
|
||||||
FIELDS = {
|
|
||||||
1: ('entropy', p.BytesType, 0), # required
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
entropy: bytes = None,
|
entropy: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.entropy = entropy
|
self.entropy = entropy
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('entropy', p.BytesType, 0), # required
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class EntropyAck(p.MessageType):
|
class EntropyAck(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 36
|
MESSAGE_WIRE_TYPE = 36
|
||||||
FIELDS = {
|
|
||||||
1: ('entropy', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
entropy: bytes = None,
|
entropy: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.entropy = entropy
|
self.entropy = entropy
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('entropy', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class EthereumAddress(p.MessageType):
|
class EthereumAddress(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 57
|
MESSAGE_WIRE_TYPE = 57
|
||||||
FIELDS = {
|
|
||||||
1: ('address', p.BytesType, 0), # required
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
address: bytes = None,
|
address: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.address = address
|
self.address = address
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('address', p.BytesType, 0), # required
|
||||||
|
}
|
||||||
|
@ -11,10 +11,6 @@ if __debug__:
|
|||||||
|
|
||||||
class EthereumGetAddress(p.MessageType):
|
class EthereumGetAddress(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 56
|
MESSAGE_WIRE_TYPE = 56
|
||||||
FIELDS = {
|
|
||||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
|
||||||
2: ('show_display', p.BoolType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -23,3 +19,10 @@ class EthereumGetAddress(p.MessageType):
|
|||||||
) -> 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.show_display = show_display
|
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),
|
||||||
|
}
|
||||||
|
@ -5,10 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class EthereumMessageSignature(p.MessageType):
|
class EthereumMessageSignature(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 66
|
MESSAGE_WIRE_TYPE = 66
|
||||||
FIELDS = {
|
|
||||||
1: ('address', p.BytesType, 0),
|
|
||||||
2: ('signature', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -17,3 +13,10 @@ class EthereumMessageSignature(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.address = address
|
self.address = address
|
||||||
self.signature = signature
|
self.signature = signature
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('address', p.BytesType, 0),
|
||||||
|
2: ('signature', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -11,10 +11,6 @@ if __debug__:
|
|||||||
|
|
||||||
class EthereumSignMessage(p.MessageType):
|
class EthereumSignMessage(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 64
|
MESSAGE_WIRE_TYPE = 64
|
||||||
FIELDS = {
|
|
||||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
|
||||||
2: ('message', p.BytesType, 0), # required
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -23,3 +19,10 @@ class EthereumSignMessage(p.MessageType):
|
|||||||
) -> 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.message = message
|
self.message = message
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||||
|
2: ('message', p.BytesType, 0), # required
|
||||||
|
}
|
||||||
|
@ -11,18 +11,6 @@ if __debug__:
|
|||||||
|
|
||||||
class EthereumSignTx(p.MessageType):
|
class EthereumSignTx(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 58
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -47,3 +35,18 @@ class EthereumSignTx(p.MessageType):
|
|||||||
self.data_length = data_length
|
self.data_length = data_length
|
||||||
self.chain_id = chain_id
|
self.chain_id = chain_id
|
||||||
self.tx_type = tx_type
|
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),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class EthereumTxAck(p.MessageType):
|
class EthereumTxAck(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 60
|
MESSAGE_WIRE_TYPE = 60
|
||||||
FIELDS = {
|
|
||||||
1: ('data_chunk', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
data_chunk: bytes = None,
|
data_chunk: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.data_chunk = data_chunk
|
self.data_chunk = data_chunk
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('data_chunk', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class EthereumTxRequest(p.MessageType):
|
class EthereumTxRequest(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 59
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -23,3 +17,12 @@ class EthereumTxRequest(p.MessageType):
|
|||||||
self.signature_v = signature_v
|
self.signature_v = signature_v
|
||||||
self.signature_r = signature_r
|
self.signature_r = signature_r
|
||||||
self.signature_s = signature_s
|
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),
|
||||||
|
}
|
||||||
|
@ -5,11 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class EthereumVerifyMessage(p.MessageType):
|
class EthereumVerifyMessage(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 65
|
MESSAGE_WIRE_TYPE = 65
|
||||||
FIELDS = {
|
|
||||||
1: ('address', p.BytesType, 0),
|
|
||||||
2: ('signature', p.BytesType, 0),
|
|
||||||
3: ('message', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -20,3 +15,11 @@ class EthereumVerifyMessage(p.MessageType):
|
|||||||
self.address = address
|
self.address = address
|
||||||
self.signature = signature
|
self.signature = signature
|
||||||
self.message = message
|
self.message = message
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('address', p.BytesType, 0),
|
||||||
|
2: ('signature', p.BytesType, 0),
|
||||||
|
3: ('message', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -5,10 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class Failure(p.MessageType):
|
class Failure(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 3
|
MESSAGE_WIRE_TYPE = 3
|
||||||
FIELDS = {
|
|
||||||
1: ('code', p.UVarintType, 0),
|
|
||||||
2: ('message', p.UnicodeType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -17,3 +13,10 @@ class Failure(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.code = code
|
self.code = code
|
||||||
self.message = message
|
self.message = message
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('code', p.UVarintType, 0),
|
||||||
|
2: ('message', p.UnicodeType, 0),
|
||||||
|
}
|
||||||
|
@ -5,34 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class Features(p.MessageType):
|
class Features(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 17
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -89,3 +61,34 @@ class Features(p.MessageType):
|
|||||||
self.fw_vendor = fw_vendor
|
self.fw_vendor = fw_vendor
|
||||||
self.fw_vendor_keys = fw_vendor_keys
|
self.fw_vendor_keys = fw_vendor_keys
|
||||||
self.unfinished_backup = unfinished_backup
|
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),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class FirmwareErase(p.MessageType):
|
class FirmwareErase(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 6
|
MESSAGE_WIRE_TYPE = 6
|
||||||
FIELDS = {
|
|
||||||
1: ('length', p.UVarintType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
length: int = None,
|
length: int = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.length = length
|
self.length = length
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('length', p.UVarintType, 0),
|
||||||
|
}
|
||||||
|
@ -5,10 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class FirmwareRequest(p.MessageType):
|
class FirmwareRequest(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 8
|
MESSAGE_WIRE_TYPE = 8
|
||||||
FIELDS = {
|
|
||||||
1: ('offset', p.UVarintType, 0),
|
|
||||||
2: ('length', p.UVarintType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -17,3 +13,10 @@ class FirmwareRequest(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.offset = offset
|
self.offset = offset
|
||||||
self.length = length
|
self.length = length
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('offset', p.UVarintType, 0),
|
||||||
|
2: ('length', p.UVarintType, 0),
|
||||||
|
}
|
||||||
|
@ -5,10 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class FirmwareUpload(p.MessageType):
|
class FirmwareUpload(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 7
|
MESSAGE_WIRE_TYPE = 7
|
||||||
FIELDS = {
|
|
||||||
1: ('payload', p.BytesType, 0), # required
|
|
||||||
2: ('hash', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -17,3 +13,10 @@ class FirmwareUpload(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.payload = payload
|
self.payload = payload
|
||||||
self.hash = hash
|
self.hash = hash
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('payload', p.BytesType, 0), # required
|
||||||
|
2: ('hash', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -13,13 +13,6 @@ if __debug__:
|
|||||||
|
|
||||||
class GetAddress(p.MessageType):
|
class GetAddress(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 29
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -34,3 +27,13 @@ class GetAddress(p.MessageType):
|
|||||||
self.show_display = show_display
|
self.show_display = show_display
|
||||||
self.multisig = multisig
|
self.multisig = multisig
|
||||||
self.script_type = script_type
|
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
|
||||||
|
}
|
||||||
|
@ -7,11 +7,6 @@ from .IdentityType import IdentityType
|
|||||||
|
|
||||||
class GetECDHSessionKey(p.MessageType):
|
class GetECDHSessionKey(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 61
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -22,3 +17,11 @@ class GetECDHSessionKey(p.MessageType):
|
|||||||
self.identity = identity
|
self.identity = identity
|
||||||
self.peer_public_key = peer_public_key
|
self.peer_public_key = peer_public_key
|
||||||
self.ecdsa_curve_name = ecdsa_curve_name
|
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),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class GetEntropy(p.MessageType):
|
class GetEntropy(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 9
|
MESSAGE_WIRE_TYPE = 9
|
||||||
FIELDS = {
|
|
||||||
1: ('size', p.UVarintType, 0), # required
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
size: int = None,
|
size: int = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.size = size
|
self.size = size
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('size', p.UVarintType, 0), # required
|
||||||
|
}
|
||||||
|
@ -11,13 +11,6 @@ if __debug__:
|
|||||||
|
|
||||||
class GetPublicKey(p.MessageType):
|
class GetPublicKey(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 11
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -32,3 +25,13 @@ class GetPublicKey(p.MessageType):
|
|||||||
self.show_display = show_display
|
self.show_display = show_display
|
||||||
self.coin_name = coin_name
|
self.coin_name = coin_name
|
||||||
self.script_type = script_type
|
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
|
||||||
|
}
|
||||||
|
@ -12,10 +12,6 @@ if __debug__:
|
|||||||
|
|
||||||
|
|
||||||
class HDNodePathType(p.MessageType):
|
class HDNodePathType(p.MessageType):
|
||||||
FIELDS = {
|
|
||||||
1: ('node', HDNodeType, 0), # required
|
|
||||||
2: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -24,3 +20,10 @@ class HDNodePathType(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.node = node
|
self.node = node
|
||||||
self.address_n = address_n if address_n is not None else []
|
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),
|
||||||
|
}
|
||||||
|
@ -4,14 +4,6 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class HDNodeType(p.MessageType):
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -28,3 +20,14 @@ class HDNodeType(p.MessageType):
|
|||||||
self.chain_code = chain_code
|
self.chain_code = chain_code
|
||||||
self.private_key = private_key
|
self.private_key = private_key
|
||||||
self.public_key = public_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),
|
||||||
|
}
|
||||||
|
@ -4,14 +4,6 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class IdentityType(p.MessageType):
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -28,3 +20,14 @@ class IdentityType(p.MessageType):
|
|||||||
self.port = port
|
self.port = port
|
||||||
self.path = path
|
self.path = path
|
||||||
self.index = index
|
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
|
||||||
|
}
|
||||||
|
@ -5,10 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class Initialize(p.MessageType):
|
class Initialize(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 0
|
MESSAGE_WIRE_TYPE = 0
|
||||||
FIELDS = {
|
|
||||||
1: ('state', p.BytesType, 0),
|
|
||||||
2: ('skip_passphrase', p.BoolType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -17,3 +13,10 @@ class Initialize(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.state = state
|
self.state = state
|
||||||
self.skip_passphrase = skip_passphrase
|
self.skip_passphrase = skip_passphrase
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('state', p.BytesType, 0),
|
||||||
|
2: ('skip_passphrase', p.BoolType, 0),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class LiskAddress(p.MessageType):
|
class LiskAddress(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 115
|
MESSAGE_WIRE_TYPE = 115
|
||||||
FIELDS = {
|
|
||||||
1: ('address', p.UnicodeType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
address: str = None,
|
address: str = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.address = address
|
self.address = address
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('address', p.UnicodeType, 0),
|
||||||
|
}
|
||||||
|
@ -4,12 +4,15 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class LiskDelegateType(p.MessageType):
|
class LiskDelegateType(p.MessageType):
|
||||||
FIELDS = {
|
|
||||||
1: ('username', p.UnicodeType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
username: str = None,
|
username: str = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.username = username
|
self.username = username
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('username', p.UnicodeType, 0),
|
||||||
|
}
|
||||||
|
@ -11,10 +11,6 @@ if __debug__:
|
|||||||
|
|
||||||
class LiskGetAddress(p.MessageType):
|
class LiskGetAddress(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 114
|
MESSAGE_WIRE_TYPE = 114
|
||||||
FIELDS = {
|
|
||||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
|
||||||
2: ('show_display', p.BoolType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -23,3 +19,10 @@ class LiskGetAddress(p.MessageType):
|
|||||||
) -> 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.show_display = show_display
|
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),
|
||||||
|
}
|
||||||
|
@ -11,10 +11,6 @@ if __debug__:
|
|||||||
|
|
||||||
class LiskGetPublicKey(p.MessageType):
|
class LiskGetPublicKey(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 121
|
MESSAGE_WIRE_TYPE = 121
|
||||||
FIELDS = {
|
|
||||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
|
||||||
2: ('show_display', p.BoolType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -23,3 +19,10 @@ class LiskGetPublicKey(p.MessageType):
|
|||||||
) -> 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.show_display = show_display
|
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),
|
||||||
|
}
|
||||||
|
@ -5,10 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class LiskMessageSignature(p.MessageType):
|
class LiskMessageSignature(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 119
|
MESSAGE_WIRE_TYPE = 119
|
||||||
FIELDS = {
|
|
||||||
1: ('public_key', p.BytesType, 0),
|
|
||||||
2: ('signature', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -17,3 +13,10 @@ class LiskMessageSignature(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.public_key = public_key
|
self.public_key = public_key
|
||||||
self.signature = signature
|
self.signature = signature
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('public_key', p.BytesType, 0),
|
||||||
|
2: ('signature', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -10,11 +10,6 @@ if __debug__:
|
|||||||
|
|
||||||
|
|
||||||
class LiskMultisignatureType(p.MessageType):
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -25,3 +20,11 @@ class LiskMultisignatureType(p.MessageType):
|
|||||||
self.min = min
|
self.min = min
|
||||||
self.life_time = life_time
|
self.life_time = life_time
|
||||||
self.keys_group = keys_group if keys_group is not None else []
|
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),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class LiskPublicKey(p.MessageType):
|
class LiskPublicKey(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 122
|
MESSAGE_WIRE_TYPE = 122
|
||||||
FIELDS = {
|
|
||||||
1: ('public_key', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
public_key: bytes = None,
|
public_key: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.public_key = public_key
|
self.public_key = public_key
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('public_key', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -11,10 +11,6 @@ if __debug__:
|
|||||||
|
|
||||||
class LiskSignMessage(p.MessageType):
|
class LiskSignMessage(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 118
|
MESSAGE_WIRE_TYPE = 118
|
||||||
FIELDS = {
|
|
||||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
|
||||||
2: ('message', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -23,3 +19,10 @@ class LiskSignMessage(p.MessageType):
|
|||||||
) -> 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.message = message
|
self.message = message
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||||
|
2: ('message', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -13,10 +13,6 @@ if __debug__:
|
|||||||
|
|
||||||
class LiskSignTx(p.MessageType):
|
class LiskSignTx(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 116
|
MESSAGE_WIRE_TYPE = 116
|
||||||
FIELDS = {
|
|
||||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
|
||||||
2: ('transaction', LiskTransactionCommon, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -25,3 +21,10 @@ class LiskSignTx(p.MessageType):
|
|||||||
) -> 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.transaction = transaction
|
self.transaction = transaction
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||||
|
2: ('transaction', LiskTransactionCommon, 0),
|
||||||
|
}
|
||||||
|
@ -4,12 +4,15 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class LiskSignatureType(p.MessageType):
|
class LiskSignatureType(p.MessageType):
|
||||||
FIELDS = {
|
|
||||||
1: ('public_key', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
public_key: bytes = None,
|
public_key: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.public_key = public_key
|
self.public_key = public_key
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('public_key', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -5,12 +5,15 @@ import protobuf as p
|
|||||||
|
|
||||||
class LiskSignedTx(p.MessageType):
|
class LiskSignedTx(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 117
|
MESSAGE_WIRE_TYPE = 117
|
||||||
FIELDS = {
|
|
||||||
1: ('signature', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
signature: bytes = None,
|
signature: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.signature = signature
|
self.signature = signature
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('signature', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -14,13 +14,6 @@ if __debug__:
|
|||||||
|
|
||||||
|
|
||||||
class LiskTransactionAsset(p.MessageType):
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -35,3 +28,13 @@ class LiskTransactionAsset(p.MessageType):
|
|||||||
self.votes = votes if votes is not None else []
|
self.votes = votes if votes is not None else []
|
||||||
self.multisignature = multisignature
|
self.multisignature = multisignature
|
||||||
self.data = data
|
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),
|
||||||
|
}
|
||||||
|
@ -6,17 +6,6 @@ from .LiskTransactionAsset import LiskTransactionAsset
|
|||||||
|
|
||||||
|
|
||||||
class LiskTransactionCommon(p.MessageType):
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -39,3 +28,17 @@ class LiskTransactionCommon(p.MessageType):
|
|||||||
self.signature = signature
|
self.signature = signature
|
||||||
self.timestamp = timestamp
|
self.timestamp = timestamp
|
||||||
self.asset = asset
|
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),
|
||||||
|
}
|
||||||
|
@ -5,11 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class LiskVerifyMessage(p.MessageType):
|
class LiskVerifyMessage(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 120
|
MESSAGE_WIRE_TYPE = 120
|
||||||
FIELDS = {
|
|
||||||
1: ('public_key', p.BytesType, 0),
|
|
||||||
2: ('signature', p.BytesType, 0),
|
|
||||||
3: ('message', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -20,3 +15,11 @@ class LiskVerifyMessage(p.MessageType):
|
|||||||
self.public_key = public_key
|
self.public_key = public_key
|
||||||
self.signature = signature
|
self.signature = signature
|
||||||
self.message = message
|
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),
|
||||||
|
}
|
||||||
|
@ -7,16 +7,6 @@ from .HDNodeType import HDNodeType
|
|||||||
|
|
||||||
class LoadDevice(p.MessageType):
|
class LoadDevice(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 13
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -37,3 +27,16 @@ class LoadDevice(p.MessageType):
|
|||||||
self.label = label
|
self.label = label
|
||||||
self.skip_checksum = skip_checksum
|
self.skip_checksum = skip_checksum
|
||||||
self.u2f_counter = u2f_counter
|
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),
|
||||||
|
}
|
||||||
|
@ -5,10 +5,6 @@ import protobuf as p
|
|||||||
|
|
||||||
class MessageSignature(p.MessageType):
|
class MessageSignature(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 40
|
MESSAGE_WIRE_TYPE = 40
|
||||||
FIELDS = {
|
|
||||||
1: ('address', p.UnicodeType, 0),
|
|
||||||
2: ('signature', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -17,3 +13,10 @@ class MessageSignature(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.address = address
|
self.address = address
|
||||||
self.signature = signature
|
self.signature = signature
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('address', p.UnicodeType, 0),
|
||||||
|
2: ('signature', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -109,6 +109,10 @@ StellarAccountMergeOp = 218
|
|||||||
StellarManageDataOp = 220
|
StellarManageDataOp = 220
|
||||||
StellarBumpSequenceOp = 221
|
StellarBumpSequenceOp = 221
|
||||||
StellarSignedTx = 230
|
StellarSignedTx = 230
|
||||||
|
TronGetAddress = 250
|
||||||
|
TronAddress = 251
|
||||||
|
TronSignTx = 252
|
||||||
|
TronSignedTx = 253
|
||||||
CardanoSignTx = 303
|
CardanoSignTx = 303
|
||||||
CardanoTxRequest = 304
|
CardanoTxRequest = 304
|
||||||
CardanoGetPublicKey = 305
|
CardanoGetPublicKey = 305
|
||||||
@ -133,25 +137,35 @@ RippleGetAddress = 400
|
|||||||
RippleAddress = 401
|
RippleAddress = 401
|
||||||
RippleSignTx = 402
|
RippleSignTx = 402
|
||||||
RippleSignedTx = 403
|
RippleSignedTx = 403
|
||||||
MoneroTransactionSignRequest = 501
|
MoneroTransactionInitRequest = 501
|
||||||
MoneroTransactionInitAck = 502
|
MoneroTransactionInitAck = 502
|
||||||
MoneroTransactionSetInputAck = 503
|
MoneroTransactionSetInputRequest = 503
|
||||||
MoneroTransactionInputsPermutationAck = 504
|
MoneroTransactionSetInputAck = 504
|
||||||
MoneroTransactionInputViniAck = 505
|
MoneroTransactionInputsPermutationRequest = 505
|
||||||
MoneroTransactionAllInputsSetAck = 513
|
MoneroTransactionInputsPermutationAck = 506
|
||||||
MoneroTransactionSetOutputAck = 506
|
MoneroTransactionInputViniRequest = 507
|
||||||
MoneroTransactionRangeSigAck = 514
|
MoneroTransactionInputViniAck = 508
|
||||||
MoneroTransactionAllOutSetAck = 507
|
MoneroTransactionAllInputsSetRequest = 509
|
||||||
MoneroTransactionMlsagDoneAck = 508
|
MoneroTransactionAllInputsSetAck = 510
|
||||||
MoneroTransactionSignInputAck = 509
|
MoneroTransactionSetOutputRequest = 511
|
||||||
MoneroTransactionFinalAck = 510
|
MoneroTransactionSetOutputAck = 512
|
||||||
MoneroKeyImageSyncRequest = 511
|
MoneroTransactionAllOutSetRequest = 513
|
||||||
MoneroKeyImageExportInitAck = 520
|
MoneroTransactionAllOutSetAck = 514
|
||||||
MoneroKeyImageSyncStepAck = 521
|
MoneroTransactionMlsagDoneRequest = 515
|
||||||
MoneroKeyImageSyncFinalAck = 522
|
MoneroTransactionMlsagDoneAck = 516
|
||||||
MoneroGetAddress = 530
|
MoneroTransactionSignInputRequest = 517
|
||||||
MoneroAddress = 531
|
MoneroTransactionSignInputAck = 518
|
||||||
MoneroGetWatchKey = 532
|
MoneroTransactionFinalRequest = 519
|
||||||
MoneroWatchKey = 533
|
MoneroTransactionFinalAck = 520
|
||||||
DebugMoneroDiagRequest = 536
|
MoneroKeyImageExportInitRequest = 530
|
||||||
DebugMoneroDiagAck = 537
|
MoneroKeyImageExportInitAck = 531
|
||||||
|
MoneroKeyImageSyncStepRequest = 532
|
||||||
|
MoneroKeyImageSyncStepAck = 533
|
||||||
|
MoneroKeyImageSyncFinalRequest = 534
|
||||||
|
MoneroKeyImageSyncFinalAck = 535
|
||||||
|
MoneroGetAddress = 540
|
||||||
|
MoneroAddress = 541
|
||||||
|
MoneroGetWatchKey = 542
|
||||||
|
MoneroWatchKey = 543
|
||||||
|
DebugMoneroDiagRequest = 546
|
||||||
|
DebugMoneroDiagAck = 547
|
||||||
|
@ -4,10 +4,6 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class MoneroAccountPublicAddress(p.MessageType):
|
class MoneroAccountPublicAddress(p.MessageType):
|
||||||
FIELDS = {
|
|
||||||
1: ('spend_public_key', p.BytesType, 0),
|
|
||||||
2: ('view_public_key', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -16,3 +12,10 @@ class MoneroAccountPublicAddress(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.spend_public_key = spend_public_key
|
self.spend_public_key = spend_public_key
|
||||||
self.view_public_key = view_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),
|
||||||
|
}
|
||||||
|
@ -4,13 +4,16 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class MoneroAddress(p.MessageType):
|
class MoneroAddress(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 531
|
MESSAGE_WIRE_TYPE = 541
|
||||||
FIELDS = {
|
|
||||||
1: ('address', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
address: bytes = None,
|
address: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.address = address
|
self.address = address
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('address', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -4,11 +4,6 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class MoneroExportedKeyImage(p.MessageType):
|
class MoneroExportedKeyImage(p.MessageType):
|
||||||
FIELDS = {
|
|
||||||
1: ('iv', p.BytesType, 0),
|
|
||||||
2: ('tag', p.BytesType, 0),
|
|
||||||
3: ('blob', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -19,3 +14,11 @@ class MoneroExportedKeyImage(p.MessageType):
|
|||||||
self.iv = iv
|
self.iv = iv
|
||||||
self.tag = tag
|
self.tag = tag
|
||||||
self.blob = blob
|
self.blob = blob
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('iv', p.BytesType, 0),
|
||||||
|
2: ('tag', p.BytesType, 0),
|
||||||
|
3: ('blob', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -10,14 +10,7 @@ if __debug__:
|
|||||||
|
|
||||||
|
|
||||||
class MoneroGetAddress(p.MessageType):
|
class MoneroGetAddress(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 530
|
MESSAGE_WIRE_TYPE = 540
|
||||||
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),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -32,3 +25,13 @@ class MoneroGetAddress(p.MessageType):
|
|||||||
self.network_type = network_type
|
self.network_type = network_type
|
||||||
self.account = account
|
self.account = account
|
||||||
self.minor = minor
|
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),
|
||||||
|
}
|
||||||
|
@ -10,11 +10,7 @@ if __debug__:
|
|||||||
|
|
||||||
|
|
||||||
class MoneroGetWatchKey(p.MessageType):
|
class MoneroGetWatchKey(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 532
|
MESSAGE_WIRE_TYPE = 542
|
||||||
FIELDS = {
|
|
||||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
|
||||||
2: ('network_type', p.UVarintType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -23,3 +19,10 @@ class MoneroGetWatchKey(p.MessageType):
|
|||||||
) -> 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.network_type = network_type
|
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),
|
||||||
|
}
|
||||||
|
@ -4,4 +4,4 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class MoneroKeyImageExportInitAck(p.MessageType):
|
class MoneroKeyImageExportInitAck(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 520
|
MESSAGE_WIRE_TYPE = 531
|
||||||
|
@ -12,13 +12,7 @@ if __debug__:
|
|||||||
|
|
||||||
|
|
||||||
class MoneroKeyImageExportInitRequest(p.MessageType):
|
class MoneroKeyImageExportInitRequest(p.MessageType):
|
||||||
FIELDS = {
|
MESSAGE_WIRE_TYPE = 530
|
||||||
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),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -33,3 +27,13 @@ class MoneroKeyImageExportInitRequest(p.MessageType):
|
|||||||
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.network_type = network_type
|
self.network_type = network_type
|
||||||
self.subs = subs if subs is not None else []
|
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),
|
||||||
|
}
|
||||||
|
@ -4,13 +4,16 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class MoneroKeyImageSyncFinalAck(p.MessageType):
|
class MoneroKeyImageSyncFinalAck(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 522
|
MESSAGE_WIRE_TYPE = 535
|
||||||
FIELDS = {
|
|
||||||
1: ('enc_key', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
enc_key: bytes = None,
|
enc_key: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.enc_key = enc_key
|
self.enc_key = enc_key
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('enc_key', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -4,4 +4,4 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class MoneroKeyImageSyncFinalRequest(p.MessageType):
|
class MoneroKeyImageSyncFinalRequest(p.MessageType):
|
||||||
pass
|
MESSAGE_WIRE_TYPE = 534
|
||||||
|
@ -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
|
|
@ -12,13 +12,16 @@ if __debug__:
|
|||||||
|
|
||||||
|
|
||||||
class MoneroKeyImageSyncStepAck(p.MessageType):
|
class MoneroKeyImageSyncStepAck(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 521
|
MESSAGE_WIRE_TYPE = 533
|
||||||
FIELDS = {
|
|
||||||
1: ('kis', MoneroExportedKeyImage, p.FLAG_REPEATED),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
kis: List[MoneroExportedKeyImage] = None,
|
kis: List[MoneroExportedKeyImage] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.kis = kis if kis is not None else []
|
self.kis = kis if kis is not None else []
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('kis', MoneroExportedKeyImage, p.FLAG_REPEATED),
|
||||||
|
}
|
||||||
|
@ -12,12 +12,16 @@ if __debug__:
|
|||||||
|
|
||||||
|
|
||||||
class MoneroKeyImageSyncStepRequest(p.MessageType):
|
class MoneroKeyImageSyncStepRequest(p.MessageType):
|
||||||
FIELDS = {
|
MESSAGE_WIRE_TYPE = 532
|
||||||
1: ('tdis', MoneroTransferDetails, p.FLAG_REPEATED),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
tdis: List[MoneroTransferDetails] = None,
|
tdis: List[MoneroTransferDetails] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.tdis = tdis if tdis is not None else []
|
self.tdis = tdis if tdis is not None else []
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('tdis', MoneroTransferDetails, p.FLAG_REPEATED),
|
||||||
|
}
|
||||||
|
@ -4,12 +4,6 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class MoneroMultisigKLRki(p.MessageType):
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -22,3 +16,12 @@ class MoneroMultisigKLRki(p.MessageType):
|
|||||||
self.L = L
|
self.L = L
|
||||||
self.R = R
|
self.R = R
|
||||||
self.ki = ki
|
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),
|
||||||
|
}
|
||||||
|
@ -6,10 +6,6 @@ from .MoneroRctKey import MoneroRctKey
|
|||||||
|
|
||||||
|
|
||||||
class MoneroOutputEntry(p.MessageType):
|
class MoneroOutputEntry(p.MessageType):
|
||||||
FIELDS = {
|
|
||||||
1: ('idx', p.UVarintType, 0),
|
|
||||||
2: ('key', MoneroRctKey, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -18,3 +14,10 @@ class MoneroOutputEntry(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.idx = idx
|
self.idx = idx
|
||||||
self.key = key
|
self.key = key
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('idx', p.UVarintType, 0),
|
||||||
|
2: ('key', MoneroRctKey, 0),
|
||||||
|
}
|
||||||
|
@ -4,10 +4,6 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class MoneroRctKey(p.MessageType):
|
class MoneroRctKey(p.MessageType):
|
||||||
FIELDS = {
|
|
||||||
1: ('dest', p.BytesType, 0),
|
|
||||||
2: ('mask', p.BytesType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -16,3 +12,10 @@ class MoneroRctKey(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.dest = dest
|
self.dest = dest
|
||||||
self.mask = mask
|
self.mask = mask
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('dest', p.BytesType, 0),
|
||||||
|
2: ('mask', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
@ -4,11 +4,6 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class MoneroRingCtSig(p.MessageType):
|
class MoneroRingCtSig(p.MessageType):
|
||||||
FIELDS = {
|
|
||||||
1: ('txn_fee', p.UVarintType, 0),
|
|
||||||
2: ('message', p.BytesType, 0),
|
|
||||||
3: ('rv_type', p.UVarintType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -19,3 +14,11 @@ class MoneroRingCtSig(p.MessageType):
|
|||||||
self.txn_fee = txn_fee
|
self.txn_fee = txn_fee
|
||||||
self.message = message
|
self.message = message
|
||||||
self.rv_type = rv_type
|
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),
|
||||||
|
}
|
||||||
|
@ -10,10 +10,6 @@ if __debug__:
|
|||||||
|
|
||||||
|
|
||||||
class MoneroSubAddressIndicesList(p.MessageType):
|
class MoneroSubAddressIndicesList(p.MessageType):
|
||||||
FIELDS = {
|
|
||||||
1: ('account', p.UVarintType, 0),
|
|
||||||
2: ('minor_indices', p.UVarintType, p.FLAG_REPEATED),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -22,3 +18,10 @@ class MoneroSubAddressIndicesList(p.MessageType):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.account = account
|
self.account = account
|
||||||
self.minor_indices = minor_indices if minor_indices is not None else []
|
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),
|
||||||
|
}
|
||||||
|
@ -6,13 +6,16 @@ from .MoneroTransactionRsigData import MoneroTransactionRsigData
|
|||||||
|
|
||||||
|
|
||||||
class MoneroTransactionAllInputsSetAck(p.MessageType):
|
class MoneroTransactionAllInputsSetAck(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 513
|
MESSAGE_WIRE_TYPE = 510
|
||||||
FIELDS = {
|
|
||||||
1: ('rsig_data', MoneroTransactionRsigData, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
rsig_data: MoneroTransactionRsigData = None,
|
rsig_data: MoneroTransactionRsigData = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.rsig_data = rsig_data
|
self.rsig_data = rsig_data
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('rsig_data', MoneroTransactionRsigData, 0),
|
||||||
|
}
|
||||||
|
@ -6,12 +6,16 @@ from .MoneroTransactionRsigData import MoneroTransactionRsigData
|
|||||||
|
|
||||||
|
|
||||||
class MoneroTransactionAllInputsSetRequest(p.MessageType):
|
class MoneroTransactionAllInputsSetRequest(p.MessageType):
|
||||||
FIELDS = {
|
MESSAGE_WIRE_TYPE = 509
|
||||||
1: ('rsig_data', MoneroTransactionRsigData, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
rsig_data: MoneroTransactionRsigData = None,
|
rsig_data: MoneroTransactionRsigData = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.rsig_data = rsig_data
|
self.rsig_data = rsig_data
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('rsig_data', MoneroTransactionRsigData, 0),
|
||||||
|
}
|
||||||
|
@ -7,13 +7,7 @@ from .MoneroTransactionRsigData import MoneroTransactionRsigData
|
|||||||
|
|
||||||
|
|
||||||
class MoneroTransactionAllOutSetAck(p.MessageType):
|
class MoneroTransactionAllOutSetAck(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 507
|
MESSAGE_WIRE_TYPE = 514
|
||||||
FIELDS = {
|
|
||||||
1: ('extra', p.BytesType, 0),
|
|
||||||
2: ('tx_prefix_hash', p.BytesType, 0),
|
|
||||||
3: ('rsig_data', MoneroTransactionRsigData, 0),
|
|
||||||
4: ('rv', MoneroRingCtSig, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -26,3 +20,12 @@ class MoneroTransactionAllOutSetAck(p.MessageType):
|
|||||||
self.tx_prefix_hash = tx_prefix_hash
|
self.tx_prefix_hash = tx_prefix_hash
|
||||||
self.rsig_data = rsig_data
|
self.rsig_data = rsig_data
|
||||||
self.rv = rv
|
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),
|
||||||
|
}
|
||||||
|
@ -6,12 +6,16 @@ from .MoneroTransactionRsigData import MoneroTransactionRsigData
|
|||||||
|
|
||||||
|
|
||||||
class MoneroTransactionAllOutSetRequest(p.MessageType):
|
class MoneroTransactionAllOutSetRequest(p.MessageType):
|
||||||
FIELDS = {
|
MESSAGE_WIRE_TYPE = 513
|
||||||
1: ('rsig_data', MoneroTransactionRsigData, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
rsig_data: MoneroTransactionRsigData = None,
|
rsig_data: MoneroTransactionRsigData = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.rsig_data = rsig_data
|
self.rsig_data = rsig_data
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_fields(cls):
|
||||||
|
return {
|
||||||
|
1: ('rsig_data', MoneroTransactionRsigData, 0),
|
||||||
|
}
|
||||||
|
@ -13,23 +13,6 @@ if __debug__:
|
|||||||
|
|
||||||
|
|
||||||
class MoneroTransactionData(p.MessageType):
|
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__(
|
def __init__(
|
||||||
self,
|
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.use_tx_keys = use_tx_keys if use_tx_keys is not None else []
|
||||||
self.rsig_data = rsig_data
|
self.rsig_data = rsig_data
|
||||||
self.integrated_indices = integrated_indices if integrated_indices is not None else []
|
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),
|
||||||
|
}
|
||||||
|
@ -6,11 +6,6 @@ from .MoneroAccountPublicAddress import MoneroAccountPublicAddress
|
|||||||
|
|
||||||
|
|
||||||
class MoneroTransactionDestinationEntry(p.MessageType):
|
class MoneroTransactionDestinationEntry(p.MessageType):
|
||||||
FIELDS = {
|
|
||||||
1: ('amount', p.UVarintType, 0),
|
|
||||||
2: ('addr', MoneroAccountPublicAddress, 0),
|
|
||||||
3: ('is_subaddress', p.BoolType, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -21,3 +16,11 @@ class MoneroTransactionDestinationEntry(p.MessageType):
|
|||||||
self.amount = amount
|
self.amount = amount
|
||||||
self.addr = addr
|
self.addr = addr
|
||||||
self.is_subaddress = is_subaddress
|
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),
|
||||||
|
}
|
||||||
|
@ -4,13 +4,7 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class MoneroTransactionFinalAck(p.MessageType):
|
class MoneroTransactionFinalAck(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 510
|
MESSAGE_WIRE_TYPE = 520
|
||||||
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),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -23,3 +17,12 @@ class MoneroTransactionFinalAck(p.MessageType):
|
|||||||
self.salt = salt
|
self.salt = salt
|
||||||
self.rand_mult = rand_mult
|
self.rand_mult = rand_mult
|
||||||
self.tx_enc_keys = tx_enc_keys
|
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),
|
||||||
|
}
|
||||||
|
@ -4,4 +4,4 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class MoneroTransactionFinalRequest(p.MessageType):
|
class MoneroTransactionFinalRequest(p.MessageType):
|
||||||
pass
|
MESSAGE_WIRE_TYPE = 519
|
||||||
|
@ -13,15 +13,6 @@ if __debug__:
|
|||||||
|
|
||||||
class MoneroTransactionInitAck(p.MessageType):
|
class MoneroTransactionInitAck(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 502
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -40,3 +31,15 @@ class MoneroTransactionInitAck(p.MessageType):
|
|||||||
self.many_inputs = many_inputs
|
self.many_inputs = many_inputs
|
||||||
self.many_outputs = many_outputs
|
self.many_outputs = many_outputs
|
||||||
self.rsig_data = rsig_data
|
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),
|
||||||
|
}
|
||||||
|
@ -12,12 +12,7 @@ if __debug__:
|
|||||||
|
|
||||||
|
|
||||||
class MoneroTransactionInitRequest(p.MessageType):
|
class MoneroTransactionInitRequest(p.MessageType):
|
||||||
FIELDS = {
|
MESSAGE_WIRE_TYPE = 501
|
||||||
1: ('version', p.UVarintType, 0),
|
|
||||||
2: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
|
||||||
3: ('network_type', p.UVarintType, 0),
|
|
||||||
4: ('tsx_data', MoneroTransactionData, 0),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -30,3 +25,12 @@ class MoneroTransactionInitRequest(p.MessageType):
|
|||||||
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.network_type = network_type
|
self.network_type = network_type
|
||||||
self.tsx_data = tsx_data
|
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),
|
||||||
|
}
|
||||||
|
@ -4,4 +4,4 @@ import protobuf as p
|
|||||||
|
|
||||||
|
|
||||||
class MoneroTransactionInputViniAck(p.MessageType):
|
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
Loading…
Reference in New Issue
Block a user