1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

src/trezor/messages: regenerate

This commit is contained in:
Jan Pochyla 2018-02-27 00:09:02 +01:00
parent 048e0706b3
commit 0c9cc99bd7
24 changed files with 58 additions and 58 deletions

View File

@ -16,7 +16,7 @@ class CipherKeyValue(p.MessageType):
def __init__(
self,
address_n: list = [],
address_n: list = None,
key: str = None,
value: bytes = None,
encrypt: bool = None,
@ -25,7 +25,7 @@ class CipherKeyValue(p.MessageType):
iv: bytes = None,
**kwargs,
):
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.key = key
self.value = value
self.encrypt = encrypt

View File

@ -11,10 +11,10 @@ class CosiCommit(p.MessageType):
def __init__(
self,
address_n: list = [],
address_n: list = None,
data: bytes = None,
**kwargs,
):
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.data = data
p.MessageType.__init__(self, **kwargs)

View File

@ -13,13 +13,13 @@ class CosiSign(p.MessageType):
def __init__(
self,
address_n: list = [],
address_n: list = None,
data: bytes = None,
global_commitment: bytes = None,
global_pubkey: bytes = None,
**kwargs,
):
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.data = data
self.global_commitment = global_commitment
self.global_pubkey = global_pubkey

View File

@ -13,13 +13,13 @@ class DecryptMessage(p.MessageType):
def __init__(
self,
address_n: list = [],
address_n: list = None,
nonce: bytes = None,
message: bytes = None,
hmac: bytes = None,
**kwargs,
):
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.nonce = nonce
self.message = message
self.hmac = hmac

View File

@ -17,13 +17,13 @@ class EncryptMessage(p.MessageType):
pubkey: bytes = None,
message: bytes = None,
display_only: bool = None,
address_n: list = [],
address_n: list = None,
coin_name: str = None,
**kwargs,
):
self.pubkey = pubkey
self.message = message
self.display_only = display_only
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.coin_name = coin_name
p.MessageType.__init__(self, **kwargs)

View File

@ -11,10 +11,10 @@ class EthereumGetAddress(p.MessageType):
def __init__(
self,
address_n: list = [],
address_n: list = None,
show_display: bool = None,
**kwargs,
):
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.show_display = show_display
p.MessageType.__init__(self, **kwargs)

View File

@ -11,10 +11,10 @@ class EthereumSignMessage(p.MessageType):
def __init__(
self,
address_n: list = [],
address_n: list = None,
message: bytes = None,
**kwargs,
):
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.message = message
p.MessageType.__init__(self, **kwargs)

View File

@ -18,7 +18,7 @@ class EthereumSignTx(p.MessageType):
def __init__(
self,
address_n: list = [],
address_n: list = None,
nonce: bytes = None,
gas_price: bytes = None,
gas_limit: bytes = None,
@ -29,7 +29,7 @@ class EthereumSignTx(p.MessageType):
chain_id: int = None,
**kwargs,
):
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.nonce = nonce
self.gas_price = gas_price
self.gas_limit = gas_limit

View File

@ -47,7 +47,7 @@ class Features(p.MessageType):
passphrase_protection: bool = None,
language: str = None,
label: str = None,
coins: list = [],
coins: list = None,
initialized: bool = None,
revision: bytes = None,
bootloader_hash: bytes = None,
@ -76,7 +76,7 @@ class Features(p.MessageType):
self.passphrase_protection = passphrase_protection
self.language = language
self.label = label
self.coins = coins
self.coins = [] if coins is None else coins
self.initialized = initialized
self.revision = revision
self.bootloader_hash = bootloader_hash

View File

@ -15,14 +15,14 @@ class GetAddress(p.MessageType):
def __init__(
self,
address_n: list = [],
address_n: list = None,
coin_name: str = None,
show_display: bool = None,
multisig: MultisigRedeemScriptType = None,
script_type: int = None,
**kwargs,
):
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.coin_name = coin_name
self.show_display = show_display
self.multisig = multisig

View File

@ -13,13 +13,13 @@ class GetPublicKey(p.MessageType):
def __init__(
self,
address_n: list = [],
address_n: list = None,
ecdsa_curve_name: str = None,
show_display: bool = None,
coin_name: str = None,
**kwargs,
):
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.ecdsa_curve_name = ecdsa_curve_name
self.show_display = show_display
self.coin_name = coin_name

View File

@ -12,9 +12,9 @@ class HDNodePathType(p.MessageType):
def __init__(
self,
node: HDNodeType = None,
address_n: list = [],
address_n: list = None,
**kwargs,
):
self.node = node
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
p.MessageType.__init__(self, **kwargs)

View File

@ -12,12 +12,12 @@ class MultisigRedeemScriptType(p.MessageType):
def __init__(
self,
pubkeys: list = [],
signatures: list = [],
pubkeys: list = None,
signatures: list = None,
m: int = None,
**kwargs,
):
self.pubkeys = pubkeys
self.signatures = signatures
self.pubkeys = [] if pubkeys is None else pubkeys
self.signatures = [] if signatures is None else signatures
self.m = m
p.MessageType.__init__(self, **kwargs)

View File

@ -11,10 +11,10 @@ class NEMAggregateModification(p.MessageType):
def __init__(
self,
modifications: list = [],
modifications: list = None,
relative_change: int = None,
**kwargs,
):
self.modifications = modifications
self.modifications = [] if modifications is None else modifications
self.relative_change = relative_change
p.MessageType.__init__(self, **kwargs)

View File

@ -13,13 +13,13 @@ class NEMDecryptMessage(p.MessageType):
def __init__(
self,
address_n: list = [],
address_n: list = None,
network: int = None,
public_key: bytes = None,
payload: bytes = None,
**kwargs,
):
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.network = network
self.public_key = public_key
self.payload = payload

View File

@ -12,12 +12,12 @@ class NEMGetAddress(p.MessageType):
def __init__(
self,
address_n: list = [],
address_n: list = None,
network: int = None,
show_display: bool = None,
**kwargs,
):
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.network = network
self.show_display = show_display
p.MessageType.__init__(self, **kwargs)

View File

@ -37,7 +37,7 @@ class NEMMosaicDefinition(p.MessageType):
mutable_supply: bool = None,
transferable: bool = None,
description: str = None,
networks: list = [],
networks: list = None,
**kwargs,
):
self.name = name
@ -54,5 +54,5 @@ class NEMMosaicDefinition(p.MessageType):
self.mutable_supply = mutable_supply
self.transferable = transferable
self.description = description
self.networks = networks
self.networks = [] if networks is None else networks
p.MessageType.__init__(self, **kwargs)

View File

@ -14,7 +14,7 @@ class NEMTransactionCommon(p.MessageType):
def __init__(
self,
address_n: list = [],
address_n: list = None,
network: int = None,
timestamp: int = None,
fee: int = None,
@ -22,7 +22,7 @@ class NEMTransactionCommon(p.MessageType):
signer: bytes = None,
**kwargs,
):
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.network = network
self.timestamp = timestamp
self.fee = fee

View File

@ -18,12 +18,12 @@ class NEMTransfer(p.MessageType):
amount: int = None,
payload: bytes = None,
public_key: bytes = None,
mosaics: list = [],
mosaics: list = None,
**kwargs,
):
self.recipient = recipient
self.amount = amount
self.payload = payload
self.public_key = public_key
self.mosaics = mosaics
self.mosaics = [] if mosaics is None else mosaics
p.MessageType.__init__(self, **kwargs)

View File

@ -13,13 +13,13 @@ class SignMessage(p.MessageType):
def __init__(
self,
address_n: list = [],
address_n: list = None,
message: bytes = None,
coin_name: str = None,
script_type: int = None,
**kwargs,
):
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.message = message
self.coin_name = coin_name
self.script_type = script_type

View File

@ -18,17 +18,17 @@ class SimpleSignTx(p.MessageType):
def __init__(
self,
inputs: list = [],
outputs: list = [],
transactions: list = [],
inputs: list = None,
outputs: list = None,
transactions: list = None,
coin_name: str = None,
version: int = None,
lock_time: int = None,
**kwargs,
):
self.inputs = inputs
self.outputs = outputs
self.transactions = transactions
self.inputs = [] if inputs is None else inputs
self.outputs = [] if outputs is None else outputs
self.transactions = [] if transactions is None else transactions
self.coin_name = coin_name
self.version = version
self.lock_time = lock_time

View File

@ -22,10 +22,10 @@ class TransactionType(p.MessageType):
def __init__(
self,
version: int = None,
inputs: list = [],
bin_outputs: list = [],
inputs: list = None,
bin_outputs: list = None,
lock_time: int = None,
outputs: list = [],
outputs: list = None,
inputs_cnt: int = None,
outputs_cnt: int = None,
extra_data: bytes = None,
@ -34,10 +34,10 @@ class TransactionType(p.MessageType):
**kwargs,
):
self.version = version
self.inputs = inputs
self.bin_outputs = bin_outputs
self.inputs = [] if inputs is None else inputs
self.bin_outputs = [] if bin_outputs is None else bin_outputs
self.lock_time = lock_time
self.outputs = outputs
self.outputs = [] if outputs is None else outputs
self.inputs_cnt = inputs_cnt
self.outputs_cnt = outputs_cnt
self.extra_data = extra_data

View File

@ -19,7 +19,7 @@ class TxInputType(p.MessageType):
def __init__(
self,
address_n: list = [],
address_n: list = None,
prev_hash: bytes = None,
prev_index: int = None,
script_sig: bytes = None,
@ -31,7 +31,7 @@ class TxInputType(p.MessageType):
decred_script_version: int = None,
**kwargs,
):
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.prev_hash = prev_hash
self.prev_index = prev_index
self.script_sig = script_sig

View File

@ -17,7 +17,7 @@ class TxOutputType(p.MessageType):
def __init__(
self,
address: str = None,
address_n: list = [],
address_n: list = None,
amount: int = None,
script_type: int = None,
multisig: MultisigRedeemScriptType = None,
@ -26,7 +26,7 @@ class TxOutputType(p.MessageType):
**kwargs,
):
self.address = address
self.address_n = address_n
self.address_n = [] if address_n is None else address_n
self.amount = amount
self.script_type = script_type
self.multisig = multisig