1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-16 11:28:14 +00:00

protobuf: rebuild

This commit is contained in:
Tomas Susanka 2019-01-25 16:08:23 +01:00
parent b5f6ae52d8
commit 02abf11798
35 changed files with 806 additions and 12 deletions

View File

@ -0,0 +1,26 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
from .EosAsset import EosAsset
class EosActionBuyRam(p.MessageType):
def __init__(
self,
payer: int = None,
receiver: int = None,
quantity: EosAsset = None,
) -> None:
self.payer = payer
self.receiver = receiver
self.quantity = quantity
@classmethod
def get_fields(cls):
return {
1: ('payer', p.UVarintType, 0),
2: ('receiver', p.UVarintType, 0),
3: ('quantity', EosAsset, 0),
}

View File

@ -0,0 +1,24 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class EosActionBuyRamBytes(p.MessageType):
def __init__(
self,
payer: int = None,
receiver: int = None,
bytes: int = None,
) -> None:
self.payer = payer
self.receiver = receiver
self.bytes = bytes
@classmethod
def get_fields(cls):
return {
1: ('payer', p.UVarintType, 0),
2: ('receiver', p.UVarintType, 0),
3: ('bytes', p.UVarintType, 0),
}

View File

@ -0,0 +1,32 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
from .EosPermissionLevel import EosPermissionLevel
if __debug__:
try:
from typing import List
except ImportError:
List = None # type: ignore
class EosActionCommon(p.MessageType):
def __init__(
self,
account: int = None,
name: int = None,
authorization: List[EosPermissionLevel] = None,
) -> None:
self.account = account
self.name = name
self.authorization = authorization if authorization is not None else []
@classmethod
def get_fields(cls):
return {
1: ('account', p.UVarintType, 0),
2: ('name', p.UVarintType, 0),
3: ('authorization', EosPermissionLevel, p.FLAG_REPEATED),
}

View File

@ -0,0 +1,32 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
from .EosAsset import EosAsset
class EosActionDelegate(p.MessageType):
def __init__(
self,
sender: int = None,
receiver: int = None,
net_quantity: EosAsset = None,
cpu_quantity: EosAsset = None,
transfer: bool = None,
) -> None:
self.sender = sender
self.receiver = receiver
self.net_quantity = net_quantity
self.cpu_quantity = cpu_quantity
self.transfer = transfer
@classmethod
def get_fields(cls):
return {
1: ('sender', p.UVarintType, 0),
2: ('receiver', p.UVarintType, 0),
3: ('net_quantity', EosAsset, 0),
4: ('cpu_quantity', EosAsset, 0),
5: ('transfer', p.BoolType, 0),
}

View File

@ -0,0 +1,21 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class EosActionDeleteAuth(p.MessageType):
def __init__(
self,
account: int = None,
permission: int = None,
) -> None:
self.account = account
self.permission = permission
@classmethod
def get_fields(cls):
return {
1: ('account', p.UVarintType, 0),
2: ('permission', p.UVarintType, 0),
}

View File

@ -0,0 +1,27 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class EosActionLinkAuth(p.MessageType):
def __init__(
self,
account: int = None,
code: int = None,
type: int = None,
requirement: int = None,
) -> None:
self.account = account
self.code = code
self.type = type
self.requirement = requirement
@classmethod
def get_fields(cls):
return {
1: ('account', p.UVarintType, 0),
2: ('code', p.UVarintType, 0),
3: ('type', p.UVarintType, 0),
4: ('requirement', p.UVarintType, 0),
}

View File

@ -0,0 +1,29 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
from .EosAuthorization import EosAuthorization
class EosActionNewAccount(p.MessageType):
def __init__(
self,
creator: int = None,
name: int = None,
owner: EosAuthorization = None,
active: EosAuthorization = None,
) -> None:
self.creator = creator
self.name = name
self.owner = owner
self.active = active
@classmethod
def get_fields(cls):
return {
1: ('creator', p.UVarintType, 0),
2: ('name', p.UVarintType, 0),
3: ('owner', EosAuthorization, 0),
4: ('active', EosAuthorization, 0),
}

View File

@ -0,0 +1,18 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class EosActionRefund(p.MessageType):
def __init__(
self,
owner: int = None,
) -> None:
self.owner = owner
@classmethod
def get_fields(cls):
return {
1: ('owner', p.UVarintType, 0),
}

View File

@ -0,0 +1,21 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class EosActionSellRam(p.MessageType):
def __init__(
self,
account: int = None,
bytes: int = None,
) -> None:
self.account = account
self.bytes = bytes
@classmethod
def get_fields(cls):
return {
1: ('account', p.UVarintType, 0),
2: ('bytes', p.UVarintType, 0),
}

View File

@ -0,0 +1,29 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
from .EosAsset import EosAsset
class EosActionTransfer(p.MessageType):
def __init__(
self,
sender: int = None,
receiver: int = None,
quantity: EosAsset = None,
memo: str = None,
) -> None:
self.sender = sender
self.receiver = receiver
self.quantity = quantity
self.memo = memo
@classmethod
def get_fields(cls):
return {
1: ('sender', p.UVarintType, 0),
2: ('receiver', p.UVarintType, 0),
3: ('quantity', EosAsset, 0),
4: ('memo', p.UnicodeType, 0),
}

View File

@ -0,0 +1,29 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
from .EosAsset import EosAsset
class EosActionUndelegate(p.MessageType):
def __init__(
self,
sender: int = None,
receiver: int = None,
net_quantity: EosAsset = None,
cpu_quantity: EosAsset = None,
) -> None:
self.sender = sender
self.receiver = receiver
self.net_quantity = net_quantity
self.cpu_quantity = cpu_quantity
@classmethod
def get_fields(cls):
return {
1: ('sender', p.UVarintType, 0),
2: ('receiver', p.UVarintType, 0),
3: ('net_quantity', EosAsset, 0),
4: ('cpu_quantity', EosAsset, 0),
}

View File

@ -0,0 +1,21 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class EosActionUnknown(p.MessageType):
def __init__(
self,
data_size: int = None,
data_chunk: bytes = None,
) -> None:
self.data_size = data_size
self.data_chunk = data_chunk
@classmethod
def get_fields(cls):
return {
1: ('data_size', p.UVarintType, 0),
2: ('data_chunk', p.BytesType, 0),
}

View File

@ -0,0 +1,24 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class EosActionUnlinkAuth(p.MessageType):
def __init__(
self,
account: int = None,
code: int = None,
type: int = None,
) -> None:
self.account = account
self.code = code
self.type = type
@classmethod
def get_fields(cls):
return {
1: ('account', p.UVarintType, 0),
2: ('code', p.UVarintType, 0),
3: ('type', p.UVarintType, 0),
}

View File

@ -0,0 +1,29 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
from .EosAuthorization import EosAuthorization
class EosActionUpdateAuth(p.MessageType):
def __init__(
self,
account: int = None,
permission: int = None,
parent: int = None,
auth: EosAuthorization = None,
) -> None:
self.account = account
self.permission = permission
self.parent = parent
self.auth = auth
@classmethod
def get_fields(cls):
return {
1: ('account', p.UVarintType, 0),
2: ('permission', p.UVarintType, 0),
3: ('parent', p.UVarintType, 0),
4: ('auth', EosAuthorization, 0),
}

View File

@ -0,0 +1,30 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None # type: ignore
class EosActionVoteProducer(p.MessageType):
def __init__(
self,
voter: int = None,
proxy: int = None,
producers: List[int] = None,
) -> None:
self.voter = voter
self.proxy = proxy
self.producers = producers if producers is not None else []
@classmethod
def get_fields(cls):
return {
1: ('voter', p.UVarintType, 0),
2: ('proxy', p.UVarintType, 0),
3: ('producers', p.UVarintType, p.FLAG_REPEATED),
}

View File

@ -0,0 +1,21 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class EosAsset(p.MessageType):
def __init__(
self,
amount: int = None,
symbol: int = None,
) -> None:
self.amount = amount
self.symbol = symbol
@classmethod
def get_fields(cls):
return {
1: ('amount', p.SVarintType, 0),
2: ('symbol', p.UVarintType, 0),
}

View File

@ -0,0 +1,37 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
from .EosAuthorizationAccount import EosAuthorizationAccount
from .EosAuthorizationKey import EosAuthorizationKey
from .EosAuthorizationWait import EosAuthorizationWait
if __debug__:
try:
from typing import List
except ImportError:
List = None # type: ignore
class EosAuthorization(p.MessageType):
def __init__(
self,
threshold: int = None,
keys: List[EosAuthorizationKey] = None,
accounts: List[EosAuthorizationAccount] = None,
waits: List[EosAuthorizationWait] = None,
) -> None:
self.threshold = threshold
self.keys = keys if keys is not None else []
self.accounts = accounts if accounts is not None else []
self.waits = waits if waits is not None else []
@classmethod
def get_fields(cls):
return {
1: ('threshold', p.UVarintType, 0),
2: ('keys', EosAuthorizationKey, p.FLAG_REPEATED),
3: ('accounts', EosAuthorizationAccount, p.FLAG_REPEATED),
4: ('waits', EosAuthorizationWait, p.FLAG_REPEATED),
}

View File

@ -0,0 +1,23 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
from .EosPermissionLevel import EosPermissionLevel
class EosAuthorizationAccount(p.MessageType):
def __init__(
self,
account: EosPermissionLevel = None,
weight: int = None,
) -> None:
self.account = account
self.weight = weight
@classmethod
def get_fields(cls):
return {
1: ('account', EosPermissionLevel, 0),
2: ('weight', p.UVarintType, 0),
}

View File

@ -0,0 +1,33 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None # type: ignore
class EosAuthorizationKey(p.MessageType):
def __init__(
self,
type: int = None,
key: bytes = None,
address_n: List[int] = None,
weight: int = None,
) -> None:
self.type = type
self.key = key
self.address_n = address_n if address_n is not None else []
self.weight = weight
@classmethod
def get_fields(cls):
return {
1: ('type', p.UVarintType, 0),
2: ('key', p.BytesType, 0),
3: ('address_n', p.UVarintType, p.FLAG_REPEATED),
4: ('weight', p.UVarintType, 0),
}

View File

@ -0,0 +1,21 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class EosAuthorizationWait(p.MessageType):
def __init__(
self,
wait_sec: int = None,
weight: int = None,
) -> None:
self.wait_sec = wait_sec
self.weight = weight
@classmethod
def get_fields(cls):
return {
1: ('wait_sec', p.UVarintType, 0),
2: ('weight', p.UVarintType, 0),
}

View File

@ -0,0 +1,28 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None # type: ignore
class EosGetPublicKey(p.MessageType):
MESSAGE_WIRE_TYPE = 600
def __init__(
self,
address_n: List[int] = None,
show_display: bool = None,
) -> None:
self.address_n = address_n if address_n is not None else []
self.show_display = show_display
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
}

View File

@ -0,0 +1,21 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class EosPermissionLevel(p.MessageType):
def __init__(
self,
actor: int = None,
permission: int = None,
) -> None:
self.actor = actor
self.permission = permission
@classmethod
def get_fields(cls):
return {
1: ('actor', p.UVarintType, 0),
2: ('permission', p.UVarintType, 0),
}

View File

@ -0,0 +1,22 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class EosPublicKey(p.MessageType):
MESSAGE_WIRE_TYPE = 601
def __init__(
self,
wif_public_key: str = None,
raw_public_key: bytes = None,
) -> None:
self.wif_public_key = wif_public_key
self.raw_public_key = raw_public_key
@classmethod
def get_fields(cls):
return {
1: ('wif_public_key', p.UnicodeType, 0),
2: ('raw_public_key', p.BytesType, 0),
}

View File

@ -0,0 +1,36 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
from .EosTxHeader import EosTxHeader
if __debug__:
try:
from typing import List
except ImportError:
List = None # type: ignore
class EosSignTx(p.MessageType):
MESSAGE_WIRE_TYPE = 602
def __init__(
self,
address_n: List[int] = None,
chain_id: bytes = None,
header: EosTxHeader = None,
num_actions: int = None,
) -> None:
self.address_n = address_n if address_n is not None else []
self.chain_id = chain_id
self.header = header
self.num_actions = num_actions
@classmethod
def get_fields(cls):
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('chain_id', p.BytesType, 0),
3: ('header', EosTxHeader, 0),
4: ('num_actions', p.UVarintType, 0),
}

View File

@ -0,0 +1,25 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class EosSignedTx(p.MessageType):
MESSAGE_WIRE_TYPE = 605
def __init__(
self,
signature_v: int = None,
signature_r: bytes = None,
signature_s: bytes = None,
) -> None:
self.signature_v = signature_v
self.signature_r = signature_r
self.signature_s = signature_s
@classmethod
def get_fields(cls):
return {
1: ('signature_v', p.UVarintType, 0),
2: ('signature_r', p.BytesType, 0),
3: ('signature_s', p.BytesType, 0),
}

View File

@ -0,0 +1,77 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
from .EosActionBuyRam import EosActionBuyRam
from .EosActionBuyRamBytes import EosActionBuyRamBytes
from .EosActionCommon import EosActionCommon
from .EosActionDelegate import EosActionDelegate
from .EosActionDeleteAuth import EosActionDeleteAuth
from .EosActionLinkAuth import EosActionLinkAuth
from .EosActionNewAccount import EosActionNewAccount
from .EosActionRefund import EosActionRefund
from .EosActionSellRam import EosActionSellRam
from .EosActionTransfer import EosActionTransfer
from .EosActionUndelegate import EosActionUndelegate
from .EosActionUnknown import EosActionUnknown
from .EosActionUnlinkAuth import EosActionUnlinkAuth
from .EosActionUpdateAuth import EosActionUpdateAuth
from .EosActionVoteProducer import EosActionVoteProducer
class EosTxActionAck(p.MessageType):
MESSAGE_WIRE_TYPE = 604
def __init__(
self,
common: EosActionCommon = None,
transfer: EosActionTransfer = None,
delegate: EosActionDelegate = None,
undelegate: EosActionUndelegate = None,
refund: EosActionRefund = None,
buy_ram: EosActionBuyRam = None,
buy_ram_bytes: EosActionBuyRamBytes = None,
sell_ram: EosActionSellRam = None,
vote_producer: EosActionVoteProducer = None,
update_auth: EosActionUpdateAuth = None,
delete_auth: EosActionDeleteAuth = None,
link_auth: EosActionLinkAuth = None,
unlink_auth: EosActionUnlinkAuth = None,
new_account: EosActionNewAccount = None,
unknown: EosActionUnknown = None,
) -> None:
self.common = common
self.transfer = transfer
self.delegate = delegate
self.undelegate = undelegate
self.refund = refund
self.buy_ram = buy_ram
self.buy_ram_bytes = buy_ram_bytes
self.sell_ram = sell_ram
self.vote_producer = vote_producer
self.update_auth = update_auth
self.delete_auth = delete_auth
self.link_auth = link_auth
self.unlink_auth = unlink_auth
self.new_account = new_account
self.unknown = unknown
@classmethod
def get_fields(cls):
return {
1: ('common', EosActionCommon, 0),
2: ('transfer', EosActionTransfer, 0),
3: ('delegate', EosActionDelegate, 0),
4: ('undelegate', EosActionUndelegate, 0),
5: ('refund', EosActionRefund, 0),
6: ('buy_ram', EosActionBuyRam, 0),
7: ('buy_ram_bytes', EosActionBuyRamBytes, 0),
8: ('sell_ram', EosActionSellRam, 0),
9: ('vote_producer', EosActionVoteProducer, 0),
10: ('update_auth', EosActionUpdateAuth, 0),
11: ('delete_auth', EosActionDeleteAuth, 0),
12: ('link_auth', EosActionLinkAuth, 0),
13: ('unlink_auth', EosActionUnlinkAuth, 0),
14: ('new_account', EosActionNewAccount, 0),
15: ('unknown', EosActionUnknown, 0),
}

View File

@ -0,0 +1,19 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class EosTxActionRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 603
def __init__(
self,
data_size: int = None,
) -> None:
self.data_size = data_size
@classmethod
def get_fields(cls):
return {
1: ('data_size', p.UVarintType, 0),
}

View File

@ -0,0 +1,33 @@
# Automatically generated by pb2py
# fmt: off
import protobuf as p
class EosTxHeader(p.MessageType):
def __init__(
self,
expiration: int = None,
ref_block_num: int = None,
ref_block_prefix: int = None,
max_net_usage_words: int = None,
max_cpu_usage_ms: int = None,
delay_sec: int = None,
) -> None:
self.expiration = expiration
self.ref_block_num = ref_block_num
self.ref_block_prefix = ref_block_prefix
self.max_net_usage_words = max_net_usage_words
self.max_cpu_usage_ms = max_cpu_usage_ms
self.delay_sec = delay_sec
@classmethod
def get_fields(cls):
return {
1: ('expiration', p.UVarintType, 0), # required
2: ('ref_block_num', p.UVarintType, 0), # required
3: ('ref_block_prefix', p.UVarintType, 0), # required
4: ('max_net_usage_words', p.UVarintType, 0), # required
5: ('max_cpu_usage_ms', p.UVarintType, 0), # required
6: ('delay_sec', p.UVarintType, 0), # required
}

View File

@ -8,12 +8,12 @@ class EthereumAddress(p.MessageType):
def __init__( def __init__(
self, self,
address: bytes = None, address: str = None,
) -> None: ) -> None:
self.address = address self.address = address
@classmethod @classmethod
def get_fields(cls): def get_fields(cls):
return { return {
1: ('address', p.BytesType, 0), # required 2: ('address', p.UnicodeType, 0),
} }

View File

@ -8,15 +8,15 @@ class EthereumMessageSignature(p.MessageType):
def __init__( def __init__(
self, self,
address: bytes = None,
signature: bytes = None, signature: bytes = None,
address: str = None,
) -> None: ) -> None:
self.address = address
self.signature = signature self.signature = signature
self.address = address
@classmethod @classmethod
def get_fields(cls): def get_fields(cls):
return { return {
1: ('address', p.BytesType, 0),
2: ('signature', p.BytesType, 0), 2: ('signature', p.BytesType, 0),
3: ('address', p.UnicodeType, 0),
} }

View File

@ -19,6 +19,6 @@ class EthereumPublicKey(p.MessageType):
@classmethod @classmethod
def get_fields(cls): def get_fields(cls):
return { return {
1: ('node', HDNodeType, 0), # required 1: ('node', HDNodeType, 0),
2: ('xpub', p.UnicodeType, 0), 2: ('xpub', p.UnicodeType, 0),
} }

View File

@ -24,5 +24,5 @@ class EthereumSignMessage(p.MessageType):
def get_fields(cls): def get_fields(cls):
return { return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED), 1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('message', p.BytesType, 0), # required 2: ('message', p.BytesType, 0),
} }

View File

@ -18,7 +18,7 @@ class EthereumSignTx(p.MessageType):
nonce: bytes = None, nonce: bytes = None,
gas_price: bytes = None, gas_price: bytes = None,
gas_limit: bytes = None, gas_limit: bytes = None,
to: bytes = None, to: str = None,
value: bytes = None, value: bytes = None,
data_initial_chunk: bytes = None, data_initial_chunk: bytes = None,
data_length: int = None, data_length: int = None,
@ -43,7 +43,7 @@ class EthereumSignTx(p.MessageType):
2: ('nonce', p.BytesType, 0), 2: ('nonce', p.BytesType, 0),
3: ('gas_price', p.BytesType, 0), 3: ('gas_price', p.BytesType, 0),
4: ('gas_limit', p.BytesType, 0), 4: ('gas_limit', p.BytesType, 0),
5: ('to', p.BytesType, 0), 11: ('to', p.UnicodeType, 0),
6: ('value', p.BytesType, 0), 6: ('value', p.BytesType, 0),
7: ('data_initial_chunk', p.BytesType, 0), 7: ('data_initial_chunk', p.BytesType, 0),
8: ('data_length', p.UVarintType, 0), 8: ('data_length', p.UVarintType, 0),

View File

@ -8,18 +8,18 @@ class EthereumVerifyMessage(p.MessageType):
def __init__( def __init__(
self, self,
address: bytes = None,
signature: bytes = None, signature: bytes = None,
message: bytes = None, message: bytes = None,
address: str = None,
) -> None: ) -> None:
self.address = address
self.signature = signature self.signature = signature
self.message = message self.message = message
self.address = address
@classmethod @classmethod
def get_fields(cls): def get_fields(cls):
return { return {
1: ('address', p.BytesType, 0),
2: ('signature', p.BytesType, 0), 2: ('signature', p.BytesType, 0),
3: ('message', p.BytesType, 0), 3: ('message', p.BytesType, 0),
4: ('address', p.UnicodeType, 0),
} }

View File

@ -177,3 +177,9 @@ MoneroLiveRefreshStepRequest = 554
MoneroLiveRefreshStepAck = 555 MoneroLiveRefreshStepAck = 555
MoneroLiveRefreshFinalRequest = 556 MoneroLiveRefreshFinalRequest = 556
MoneroLiveRefreshFinalAck = 557 MoneroLiveRefreshFinalAck = 557
EosGetPublicKey = 600
EosPublicKey = 601
EosSignTx = 602
EosTxActionRequest = 603
EosTxActionAck = 604
EosSignedTx = 605