mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-21 23:18:13 +00:00
style(common): mypy: disable implicit Optional for function arguments
This commit is contained in:
parent
8b3ac659a0
commit
0278998f72
@ -279,9 +279,12 @@ class Descriptor:
|
||||
for field in required_fields:
|
||||
yield f" {field.name}: {field.py_type},"
|
||||
for field in repeated_fields:
|
||||
yield f" {field.name}: List[{field.py_type}] = None,"
|
||||
yield f" {field.name}: Optional[List[{field.py_type}]] = None,"
|
||||
for field in optional_fields:
|
||||
yield f" {field.name}: {field.py_type} = {field.default_value},"
|
||||
if field.default_value is None:
|
||||
yield f" {field.name}: Optional[{field.py_type}] = None,"
|
||||
else:
|
||||
yield f" {field.name}: {field.py_type} = {field.default_value},"
|
||||
yield " ) -> None:"
|
||||
|
||||
for field in repeated_fields:
|
||||
@ -356,7 +359,7 @@ class Descriptor:
|
||||
yield ""
|
||||
yield "if __debug__:"
|
||||
yield " try:"
|
||||
yield " from typing import Dict, List # noqa: F401"
|
||||
yield " from typing import Dict, List, Optional # noqa: F401"
|
||||
yield " from typing_extensions import Literal # noqa: F401"
|
||||
|
||||
all_enums = [field for field in fields if field.type_name in self.enum_types]
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,7 +16,7 @@ class ApplyFlags(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
flags: int = None,
|
||||
flags: Optional[int] = None,
|
||||
) -> None:
|
||||
self.flags = flags
|
||||
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
EnumTypeSafetyCheckLevel = Literal[0, 1, 2]
|
||||
except ImportError:
|
||||
@ -17,15 +17,15 @@ class ApplySettings(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
language: str = None,
|
||||
label: str = None,
|
||||
use_passphrase: bool = None,
|
||||
homescreen: bytes = None,
|
||||
auto_lock_delay_ms: int = None,
|
||||
display_rotation: int = None,
|
||||
passphrase_always_on_device: bool = None,
|
||||
safety_checks: EnumTypeSafetyCheckLevel = None,
|
||||
experimental_features: bool = None,
|
||||
language: Optional[str] = None,
|
||||
label: Optional[str] = None,
|
||||
use_passphrase: Optional[bool] = None,
|
||||
homescreen: Optional[bytes] = None,
|
||||
auto_lock_delay_ms: Optional[int] = None,
|
||||
display_rotation: Optional[int] = None,
|
||||
passphrase_always_on_device: Optional[bool] = None,
|
||||
safety_checks: Optional[EnumTypeSafetyCheckLevel] = None,
|
||||
experimental_features: Optional[bool] = None,
|
||||
) -> None:
|
||||
self.language = language
|
||||
self.label = label
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
EnumTypeInputScriptType = Literal[0, 1, 2, 3, 4]
|
||||
EnumTypeAmountUnit = Literal[0, 1, 2, 3]
|
||||
@ -21,8 +21,8 @@ class AuthorizeCoinJoin(p.MessageType):
|
||||
*,
|
||||
coordinator: str,
|
||||
max_total_fee: int,
|
||||
address_n: List[int] = None,
|
||||
fee_per_anonymity: int = None,
|
||||
address_n: Optional[List[int]] = None,
|
||||
fee_per_anonymity: Optional[int] = None,
|
||||
coin_name: str = "Bitcoin",
|
||||
script_type: EnumTypeInputScriptType = 0,
|
||||
amount_unit: EnumTypeAmountUnit = 0,
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,9 +16,9 @@ class BinanceCancelMsg(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
refid: str = None,
|
||||
sender: str = None,
|
||||
symbol: str = None,
|
||||
refid: Optional[str] = None,
|
||||
sender: Optional[str] = None,
|
||||
symbol: Optional[str] = None,
|
||||
) -> None:
|
||||
self.refid = refid
|
||||
self.sender = sender
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -15,8 +15,8 @@ class BinanceCoin(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
amount: int = None,
|
||||
denom: str = None,
|
||||
amount: Optional[int] = None,
|
||||
denom: Optional[str] = None,
|
||||
) -> None:
|
||||
self.amount = amount
|
||||
self.denom = denom
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,8 +16,8 @@ class BinanceGetAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address_n: List[int] = None,
|
||||
show_display: bool = None,
|
||||
address_n: Optional[List[int]] = None,
|
||||
show_display: Optional[bool] = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.show_display = show_display
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,8 +16,8 @@ class BinanceGetPublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address_n: List[int] = None,
|
||||
show_display: bool = None,
|
||||
address_n: Optional[List[int]] = None,
|
||||
show_display: Optional[bool] = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.show_display = show_display
|
||||
|
@ -6,7 +6,7 @@ from .BinanceCoin import BinanceCoin
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -17,8 +17,8 @@ class BinanceInputOutput(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
coins: List[BinanceCoin] = None,
|
||||
address: str = None,
|
||||
coins: Optional[List[BinanceCoin]] = None,
|
||||
address: Optional[str] = None,
|
||||
) -> None:
|
||||
self.coins = coins if coins is not None else []
|
||||
self.address = address
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
EnumTypeBinanceOrderType = Literal[0, 1, 2, 3]
|
||||
EnumTypeBinanceOrderSide = Literal[0, 1, 2]
|
||||
@ -19,14 +19,14 @@ class BinanceOrderMsg(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
id: str = None,
|
||||
ordertype: EnumTypeBinanceOrderType = None,
|
||||
price: int = None,
|
||||
quantity: int = None,
|
||||
sender: str = None,
|
||||
side: EnumTypeBinanceOrderSide = None,
|
||||
symbol: str = None,
|
||||
timeinforce: EnumTypeBinanceTimeInForce = None,
|
||||
id: Optional[str] = None,
|
||||
ordertype: Optional[EnumTypeBinanceOrderType] = None,
|
||||
price: Optional[int] = None,
|
||||
quantity: Optional[int] = None,
|
||||
sender: Optional[str] = None,
|
||||
side: Optional[EnumTypeBinanceOrderSide] = None,
|
||||
symbol: Optional[str] = None,
|
||||
timeinforce: Optional[EnumTypeBinanceTimeInForce] = None,
|
||||
) -> None:
|
||||
self.id = id
|
||||
self.ordertype = ordertype
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,13 +16,13 @@ class BinanceSignTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address_n: List[int] = None,
|
||||
msg_count: int = None,
|
||||
account_number: int = None,
|
||||
chain_id: str = None,
|
||||
memo: str = None,
|
||||
sequence: int = None,
|
||||
source: int = None,
|
||||
address_n: Optional[List[int]] = None,
|
||||
msg_count: Optional[int] = None,
|
||||
account_number: Optional[int] = None,
|
||||
chain_id: Optional[str] = None,
|
||||
memo: Optional[str] = None,
|
||||
sequence: Optional[int] = None,
|
||||
source: Optional[int] = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.msg_count = msg_count
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -6,7 +6,7 @@ from .BinanceInputOutput import BinanceInputOutput
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -18,8 +18,8 @@ class BinanceTransferMsg(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
inputs: List[BinanceInputOutput] = None,
|
||||
outputs: List[BinanceInputOutput] = None,
|
||||
inputs: Optional[List[BinanceInputOutput]] = None,
|
||||
outputs: Optional[List[BinanceInputOutput]] = None,
|
||||
) -> None:
|
||||
self.inputs = inputs if inputs is not None else []
|
||||
self.outputs = outputs if outputs is not None else []
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
EnumTypeButtonRequestType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
|
||||
except ImportError:
|
||||
@ -17,7 +17,7 @@ class ButtonRequest(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
code: EnumTypeButtonRequestType = None,
|
||||
code: Optional[EnumTypeButtonRequestType] = None,
|
||||
) -> None:
|
||||
self.code = code
|
||||
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -6,7 +6,7 @@ from .CardanoBlockchainPointerType import CardanoBlockchainPointerType
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
EnumTypeCardanoAddressType = Literal[0, 1, 2, 3, 4, 5, 6, 7, 8, 14, 15]
|
||||
except ImportError:
|
||||
@ -19,10 +19,10 @@ class CardanoAddressParametersType(p.MessageType):
|
||||
self,
|
||||
*,
|
||||
address_type: EnumTypeCardanoAddressType,
|
||||
address_n: List[int] = None,
|
||||
address_n_staking: List[int] = None,
|
||||
staking_key_hash: bytes = None,
|
||||
certificate_pointer: CardanoBlockchainPointerType = None,
|
||||
address_n: Optional[List[int]] = None,
|
||||
address_n_staking: Optional[List[int]] = None,
|
||||
staking_key_hash: Optional[bytes] = None,
|
||||
certificate_pointer: Optional[CardanoBlockchainPointerType] = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.address_n_staking = address_n_staking if address_n_staking is not None else []
|
||||
|
@ -6,7 +6,7 @@ from .CardanoTokenType import CardanoTokenType
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -18,7 +18,7 @@ class CardanoAssetGroupType(p.MessageType):
|
||||
self,
|
||||
*,
|
||||
policy_id: bytes,
|
||||
tokens: List[CardanoTokenType] = None,
|
||||
tokens: Optional[List[CardanoTokenType]] = None,
|
||||
) -> None:
|
||||
self.tokens = tokens if tokens is not None else []
|
||||
self.policy_id = policy_id
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -6,7 +6,7 @@ from .CardanoAddressParametersType import CardanoAddressParametersType
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,8 +16,8 @@ class CardanoGetPublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address_n: List[int] = None,
|
||||
show_display: bool = None,
|
||||
address_n: Optional[List[int]] = None,
|
||||
show_display: Optional[bool] = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.show_display = show_display
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -15,8 +15,8 @@ class CardanoPoolOwnerType(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
staking_key_path: List[int] = None,
|
||||
staking_key_hash: bytes = None,
|
||||
staking_key_path: Optional[List[int]] = None,
|
||||
staking_key_hash: Optional[bytes] = None,
|
||||
) -> None:
|
||||
self.staking_key_path = staking_key_path if staking_key_path is not None else []
|
||||
self.staking_key_hash = staking_key_hash
|
||||
|
@ -8,7 +8,7 @@ from .CardanoPoolRelayParametersType import CardanoPoolRelayParametersType
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -26,9 +26,9 @@ class CardanoPoolParametersType(p.MessageType):
|
||||
margin_numerator: int,
|
||||
margin_denominator: int,
|
||||
reward_account: str,
|
||||
owners: List[CardanoPoolOwnerType] = None,
|
||||
relays: List[CardanoPoolRelayParametersType] = None,
|
||||
metadata: CardanoPoolMetadataType = None,
|
||||
owners: Optional[List[CardanoPoolOwnerType]] = None,
|
||||
relays: Optional[List[CardanoPoolRelayParametersType]] = None,
|
||||
metadata: Optional[CardanoPoolMetadataType] = None,
|
||||
) -> None:
|
||||
self.owners = owners if owners is not None else []
|
||||
self.relays = relays if relays is not None else []
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
EnumTypeCardanoPoolRelayType = Literal[0, 1, 2]
|
||||
except ImportError:
|
||||
@ -17,10 +17,10 @@ class CardanoPoolRelayParametersType(p.MessageType):
|
||||
self,
|
||||
*,
|
||||
type: EnumTypeCardanoPoolRelayType,
|
||||
ipv4_address: bytes = None,
|
||||
ipv6_address: bytes = None,
|
||||
host_name: str = None,
|
||||
port: int = None,
|
||||
ipv4_address: Optional[bytes] = None,
|
||||
ipv6_address: Optional[bytes] = None,
|
||||
host_name: Optional[str] = None,
|
||||
port: Optional[int] = None,
|
||||
) -> None:
|
||||
self.type = type
|
||||
self.ipv4_address = ipv4_address
|
||||
|
@ -6,7 +6,7 @@ from .HDNodeType import HDNodeType
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -9,7 +9,7 @@ from .CardanoTxWithdrawalType import CardanoTxWithdrawalType
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -24,13 +24,13 @@ class CardanoSignTx(p.MessageType):
|
||||
protocol_magic: int,
|
||||
fee: int,
|
||||
network_id: int,
|
||||
inputs: List[CardanoTxInputType] = None,
|
||||
outputs: List[CardanoTxOutputType] = None,
|
||||
certificates: List[CardanoTxCertificateType] = None,
|
||||
withdrawals: List[CardanoTxWithdrawalType] = None,
|
||||
ttl: int = None,
|
||||
metadata: bytes = None,
|
||||
validity_interval_start: int = None,
|
||||
inputs: Optional[List[CardanoTxInputType]] = None,
|
||||
outputs: Optional[List[CardanoTxOutputType]] = None,
|
||||
certificates: Optional[List[CardanoTxCertificateType]] = None,
|
||||
withdrawals: Optional[List[CardanoTxWithdrawalType]] = None,
|
||||
ttl: Optional[int] = None,
|
||||
metadata: Optional[bytes] = None,
|
||||
validity_interval_start: Optional[int] = None,
|
||||
) -> None:
|
||||
self.inputs = inputs if inputs is not None else []
|
||||
self.outputs = outputs if outputs is not None else []
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -17,7 +17,7 @@ class CardanoSignedTx(p.MessageType):
|
||||
self,
|
||||
*,
|
||||
tx_hash: bytes,
|
||||
serialized_tx: bytes = None,
|
||||
serialized_tx: Optional[bytes] = None,
|
||||
) -> None:
|
||||
self.tx_hash = tx_hash
|
||||
self.serialized_tx = serialized_tx
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -6,7 +6,7 @@ from .CardanoPoolParametersType import CardanoPoolParametersType
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
EnumTypeCardanoCertificateType = Literal[0, 1, 2, 3]
|
||||
except ImportError:
|
||||
@ -19,9 +19,9 @@ class CardanoTxCertificateType(p.MessageType):
|
||||
self,
|
||||
*,
|
||||
type: EnumTypeCardanoCertificateType,
|
||||
path: List[int] = None,
|
||||
pool: bytes = None,
|
||||
pool_parameters: CardanoPoolParametersType = None,
|
||||
path: Optional[List[int]] = None,
|
||||
pool: Optional[bytes] = None,
|
||||
pool_parameters: Optional[CardanoPoolParametersType] = None,
|
||||
) -> None:
|
||||
self.path = path if path is not None else []
|
||||
self.type = type
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -17,7 +17,7 @@ class CardanoTxInputType(p.MessageType):
|
||||
*,
|
||||
prev_hash: bytes,
|
||||
prev_index: int,
|
||||
address_n: List[int] = None,
|
||||
address_n: Optional[List[int]] = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.prev_hash = prev_hash
|
||||
|
@ -7,7 +7,7 @@ from .CardanoAssetGroupType import CardanoAssetGroupType
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -19,9 +19,9 @@ class CardanoTxOutputType(p.MessageType):
|
||||
self,
|
||||
*,
|
||||
amount: int,
|
||||
token_bundle: List[CardanoAssetGroupType] = None,
|
||||
address: str = None,
|
||||
address_parameters: CardanoAddressParametersType = None,
|
||||
token_bundle: Optional[List[CardanoAssetGroupType]] = None,
|
||||
address: Optional[str] = None,
|
||||
address_parameters: Optional[CardanoAddressParametersType] = None,
|
||||
) -> None:
|
||||
self.token_bundle = token_bundle if token_bundle is not None else []
|
||||
self.amount = amount
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,7 +16,7 @@ class CardanoTxWithdrawalType(p.MessageType):
|
||||
self,
|
||||
*,
|
||||
amount: int,
|
||||
path: List[int] = None,
|
||||
path: Optional[List[int]] = None,
|
||||
) -> None:
|
||||
self.path = path if path is not None else []
|
||||
self.amount = amount
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,7 +16,7 @@ class ChangePin(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
remove: bool = None,
|
||||
remove: Optional[bool] = None,
|
||||
) -> None:
|
||||
self.remove = remove
|
||||
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,7 +16,7 @@ class ChangeWipeCode(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
remove: bool = None,
|
||||
remove: Optional[bool] = None,
|
||||
) -> None:
|
||||
self.remove = remove
|
||||
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -18,11 +18,11 @@ class CipherKeyValue(p.MessageType):
|
||||
*,
|
||||
key: str,
|
||||
value: bytes,
|
||||
address_n: List[int] = None,
|
||||
encrypt: bool = None,
|
||||
ask_on_encrypt: bool = None,
|
||||
ask_on_decrypt: bool = None,
|
||||
iv: bytes = None,
|
||||
address_n: Optional[List[int]] = None,
|
||||
encrypt: Optional[bool] = None,
|
||||
ask_on_encrypt: Optional[bool] = None,
|
||||
ask_on_decrypt: Optional[bool] = None,
|
||||
iv: Optional[bytes] = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.key = key
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
EnumTypeDebugSwipeDirection = Literal[0, 1, 2, 3]
|
||||
except ImportError:
|
||||
@ -17,13 +17,13 @@ class DebugLinkDecision(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
yes_no: bool = None,
|
||||
swipe: EnumTypeDebugSwipeDirection = None,
|
||||
input: str = None,
|
||||
x: int = None,
|
||||
y: int = None,
|
||||
wait: bool = None,
|
||||
hold_ms: int = None,
|
||||
yes_no: Optional[bool] = None,
|
||||
swipe: Optional[EnumTypeDebugSwipeDirection] = None,
|
||||
input: Optional[str] = None,
|
||||
x: Optional[int] = None,
|
||||
y: Optional[int] = None,
|
||||
wait: Optional[bool] = None,
|
||||
hold_ms: Optional[int] = None,
|
||||
) -> None:
|
||||
self.yes_no = yes_no
|
||||
self.swipe = swipe
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,7 +16,7 @@ class DebugLinkEraseSdCard(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
format: bool = None,
|
||||
format: Optional[bool] = None,
|
||||
) -> None:
|
||||
self.format = format
|
||||
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,9 +16,9 @@ class DebugLinkGetState(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
wait_word_list: bool = None,
|
||||
wait_word_pos: bool = None,
|
||||
wait_layout: bool = None,
|
||||
wait_word_list: Optional[bool] = None,
|
||||
wait_word_pos: Optional[bool] = None,
|
||||
wait_layout: Optional[bool] = None,
|
||||
) -> None:
|
||||
self.wait_word_list = wait_word_list
|
||||
self.wait_word_pos = wait_word_pos
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,7 +16,7 @@ class DebugLinkLayout(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
lines: List[str] = None,
|
||||
lines: Optional[List[str]] = None,
|
||||
) -> None:
|
||||
self.lines = lines if lines is not None else []
|
||||
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,7 +16,7 @@ class DebugLinkRecordScreen(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
target_directory: str = None,
|
||||
target_directory: Optional[str] = None,
|
||||
) -> None:
|
||||
self.target_directory = target_directory
|
||||
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,7 +16,7 @@ class DebugLinkReseedRandom(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
value: int = None,
|
||||
value: Optional[int] = None,
|
||||
) -> None:
|
||||
self.value = value
|
||||
|
||||
|
@ -6,7 +6,7 @@ from .HDNodeType import HDNodeType
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -18,19 +18,19 @@ class DebugLinkState(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
layout_lines: List[str] = None,
|
||||
layout: bytes = None,
|
||||
pin: str = None,
|
||||
matrix: str = None,
|
||||
mnemonic_secret: bytes = None,
|
||||
node: HDNodeType = None,
|
||||
passphrase_protection: bool = None,
|
||||
reset_word: str = None,
|
||||
reset_entropy: bytes = None,
|
||||
recovery_fake_word: str = None,
|
||||
recovery_word_pos: int = None,
|
||||
reset_word_pos: int = None,
|
||||
mnemonic_type: int = None,
|
||||
layout_lines: Optional[List[str]] = None,
|
||||
layout: Optional[bytes] = None,
|
||||
pin: Optional[str] = None,
|
||||
matrix: Optional[str] = None,
|
||||
mnemonic_secret: Optional[bytes] = None,
|
||||
node: Optional[HDNodeType] = None,
|
||||
passphrase_protection: Optional[bool] = None,
|
||||
reset_word: Optional[str] = None,
|
||||
reset_entropy: Optional[bytes] = None,
|
||||
recovery_fake_word: Optional[str] = None,
|
||||
recovery_word_pos: Optional[int] = None,
|
||||
reset_word_pos: Optional[int] = None,
|
||||
mnemonic_type: Optional[int] = None,
|
||||
) -> None:
|
||||
self.layout_lines = layout_lines if layout_lines is not None else []
|
||||
self.layout = layout
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,7 +16,7 @@ class DebugLinkWatchLayout(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
watch: bool = None,
|
||||
watch: Optional[bool] = None,
|
||||
) -> None:
|
||||
self.watch = watch
|
||||
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,12 +16,12 @@ class DebugMoneroDiagAck(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
pd: List[int] = None,
|
||||
ins: int = None,
|
||||
p1: int = None,
|
||||
p2: int = None,
|
||||
data1: bytes = None,
|
||||
data2: bytes = None,
|
||||
pd: Optional[List[int]] = None,
|
||||
ins: Optional[int] = None,
|
||||
p1: Optional[int] = None,
|
||||
p2: Optional[int] = None,
|
||||
data1: Optional[bytes] = None,
|
||||
data2: Optional[bytes] = None,
|
||||
) -> None:
|
||||
self.pd = pd if pd is not None else []
|
||||
self.ins = ins
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,12 +16,12 @@ class DebugMoneroDiagRequest(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
pd: List[int] = None,
|
||||
ins: int = None,
|
||||
p1: int = None,
|
||||
p2: int = None,
|
||||
data1: bytes = None,
|
||||
data2: bytes = None,
|
||||
pd: Optional[List[int]] = None,
|
||||
ins: Optional[int] = None,
|
||||
p1: Optional[int] = None,
|
||||
p2: Optional[int] = None,
|
||||
data1: Optional[bytes] = None,
|
||||
data2: Optional[bytes] = None,
|
||||
) -> None:
|
||||
self.pd = pd if pd is not None else []
|
||||
self.ins = ins
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,7 +16,7 @@ class Deprecated_PassphraseStateRequest(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
state: bytes = None,
|
||||
state: Optional[bytes] = None,
|
||||
) -> None:
|
||||
self.state = state
|
||||
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -17,7 +17,7 @@ class ECDHSessionKey(p.MessageType):
|
||||
self,
|
||||
*,
|
||||
session_key: bytes,
|
||||
public_key: bytes = None,
|
||||
public_key: Optional[bytes] = None,
|
||||
) -> None:
|
||||
self.session_key = session_key
|
||||
self.public_key = public_key
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,7 +16,7 @@ class EntropyAck(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
entropy: bytes = None,
|
||||
entropy: Optional[bytes] = None,
|
||||
) -> None:
|
||||
self.entropy = entropy
|
||||
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -6,7 +6,7 @@ from .EosAsset import EosAsset
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -17,9 +17,9 @@ class EosActionBuyRam(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
payer: int = None,
|
||||
receiver: int = None,
|
||||
quantity: EosAsset = None,
|
||||
payer: Optional[int] = None,
|
||||
receiver: Optional[int] = None,
|
||||
quantity: Optional[EosAsset] = None,
|
||||
) -> None:
|
||||
self.payer = payer
|
||||
self.receiver = receiver
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -15,9 +15,9 @@ class EosActionBuyRamBytes(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
payer: int = None,
|
||||
receiver: int = None,
|
||||
bytes: int = None,
|
||||
payer: Optional[int] = None,
|
||||
receiver: Optional[int] = None,
|
||||
bytes: Optional[int] = None,
|
||||
) -> None:
|
||||
self.payer = payer
|
||||
self.receiver = receiver
|
||||
|
@ -6,7 +6,7 @@ from .EosPermissionLevel import EosPermissionLevel
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -17,9 +17,9 @@ class EosActionCommon(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
authorization: List[EosPermissionLevel] = None,
|
||||
account: int = None,
|
||||
name: int = None,
|
||||
authorization: Optional[List[EosPermissionLevel]] = None,
|
||||
account: Optional[int] = None,
|
||||
name: Optional[int] = None,
|
||||
) -> None:
|
||||
self.authorization = authorization if authorization is not None else []
|
||||
self.account = account
|
||||
|
@ -6,7 +6,7 @@ from .EosAsset import EosAsset
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -17,11 +17,11 @@ class EosActionDelegate(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
sender: int = None,
|
||||
receiver: int = None,
|
||||
net_quantity: EosAsset = None,
|
||||
cpu_quantity: EosAsset = None,
|
||||
transfer: bool = None,
|
||||
sender: Optional[int] = None,
|
||||
receiver: Optional[int] = None,
|
||||
net_quantity: Optional[EosAsset] = None,
|
||||
cpu_quantity: Optional[EosAsset] = None,
|
||||
transfer: Optional[bool] = None,
|
||||
) -> None:
|
||||
self.sender = sender
|
||||
self.receiver = receiver
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -15,8 +15,8 @@ class EosActionDeleteAuth(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
account: int = None,
|
||||
permission: int = None,
|
||||
account: Optional[int] = None,
|
||||
permission: Optional[int] = None,
|
||||
) -> None:
|
||||
self.account = account
|
||||
self.permission = permission
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -15,10 +15,10 @@ class EosActionLinkAuth(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
account: int = None,
|
||||
code: int = None,
|
||||
type: int = None,
|
||||
requirement: int = None,
|
||||
account: Optional[int] = None,
|
||||
code: Optional[int] = None,
|
||||
type: Optional[int] = None,
|
||||
requirement: Optional[int] = None,
|
||||
) -> None:
|
||||
self.account = account
|
||||
self.code = code
|
||||
|
@ -6,7 +6,7 @@ from .EosAuthorization import EosAuthorization
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -17,10 +17,10 @@ class EosActionNewAccount(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
creator: int = None,
|
||||
name: int = None,
|
||||
owner: EosAuthorization = None,
|
||||
active: EosAuthorization = None,
|
||||
creator: Optional[int] = None,
|
||||
name: Optional[int] = None,
|
||||
owner: Optional[EosAuthorization] = None,
|
||||
active: Optional[EosAuthorization] = None,
|
||||
) -> None:
|
||||
self.creator = creator
|
||||
self.name = name
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -15,7 +15,7 @@ class EosActionRefund(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
owner: int = None,
|
||||
owner: Optional[int] = None,
|
||||
) -> None:
|
||||
self.owner = owner
|
||||
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -15,8 +15,8 @@ class EosActionSellRam(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
account: int = None,
|
||||
bytes: int = None,
|
||||
account: Optional[int] = None,
|
||||
bytes: Optional[int] = None,
|
||||
) -> None:
|
||||
self.account = account
|
||||
self.bytes = bytes
|
||||
|
@ -6,7 +6,7 @@ from .EosAsset import EosAsset
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -17,10 +17,10 @@ class EosActionTransfer(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
sender: int = None,
|
||||
receiver: int = None,
|
||||
quantity: EosAsset = None,
|
||||
memo: str = None,
|
||||
sender: Optional[int] = None,
|
||||
receiver: Optional[int] = None,
|
||||
quantity: Optional[EosAsset] = None,
|
||||
memo: Optional[str] = None,
|
||||
) -> None:
|
||||
self.sender = sender
|
||||
self.receiver = receiver
|
||||
|
@ -6,7 +6,7 @@ from .EosAsset import EosAsset
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -17,10 +17,10 @@ class EosActionUndelegate(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
sender: int = None,
|
||||
receiver: int = None,
|
||||
net_quantity: EosAsset = None,
|
||||
cpu_quantity: EosAsset = None,
|
||||
sender: Optional[int] = None,
|
||||
receiver: Optional[int] = None,
|
||||
net_quantity: Optional[EosAsset] = None,
|
||||
cpu_quantity: Optional[EosAsset] = None,
|
||||
) -> None:
|
||||
self.sender = sender
|
||||
self.receiver = receiver
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,7 +16,7 @@ class EosActionUnknown(p.MessageType):
|
||||
self,
|
||||
*,
|
||||
data_size: int,
|
||||
data_chunk: bytes = None,
|
||||
data_chunk: Optional[bytes] = None,
|
||||
) -> None:
|
||||
self.data_size = data_size
|
||||
self.data_chunk = data_chunk
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -15,9 +15,9 @@ class EosActionUnlinkAuth(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
account: int = None,
|
||||
code: int = None,
|
||||
type: int = None,
|
||||
account: Optional[int] = None,
|
||||
code: Optional[int] = None,
|
||||
type: Optional[int] = None,
|
||||
) -> None:
|
||||
self.account = account
|
||||
self.code = code
|
||||
|
@ -6,7 +6,7 @@ from .EosAuthorization import EosAuthorization
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -17,10 +17,10 @@ class EosActionUpdateAuth(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
account: int = None,
|
||||
permission: int = None,
|
||||
parent: int = None,
|
||||
auth: EosAuthorization = None,
|
||||
account: Optional[int] = None,
|
||||
permission: Optional[int] = None,
|
||||
parent: Optional[int] = None,
|
||||
auth: Optional[EosAuthorization] = None,
|
||||
) -> None:
|
||||
self.account = account
|
||||
self.permission = permission
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -15,9 +15,9 @@ class EosActionVoteProducer(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
producers: List[int] = None,
|
||||
voter: int = None,
|
||||
proxy: int = None,
|
||||
producers: Optional[List[int]] = None,
|
||||
voter: Optional[int] = None,
|
||||
proxy: Optional[int] = None,
|
||||
) -> None:
|
||||
self.producers = producers if producers is not None else []
|
||||
self.voter = voter
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -15,8 +15,8 @@ class EosAsset(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
amount: int = None,
|
||||
symbol: int = None,
|
||||
amount: Optional[int] = None,
|
||||
symbol: Optional[int] = None,
|
||||
) -> None:
|
||||
self.amount = amount
|
||||
self.symbol = symbol
|
||||
|
@ -8,7 +8,7 @@ from .EosAuthorizationWait import EosAuthorizationWait
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -19,10 +19,10 @@ class EosAuthorization(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
keys: List[EosAuthorizationKey] = None,
|
||||
accounts: List[EosAuthorizationAccount] = None,
|
||||
waits: List[EosAuthorizationWait] = None,
|
||||
threshold: int = None,
|
||||
keys: Optional[List[EosAuthorizationKey]] = None,
|
||||
accounts: Optional[List[EosAuthorizationAccount]] = None,
|
||||
waits: Optional[List[EosAuthorizationWait]] = None,
|
||||
threshold: Optional[int] = None,
|
||||
) -> None:
|
||||
self.keys = keys if keys is not None else []
|
||||
self.accounts = accounts if accounts is not None else []
|
||||
|
@ -6,7 +6,7 @@ from .EosPermissionLevel import EosPermissionLevel
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -17,8 +17,8 @@ class EosAuthorizationAccount(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
account: EosPermissionLevel = None,
|
||||
weight: int = None,
|
||||
account: Optional[EosPermissionLevel] = None,
|
||||
weight: Optional[int] = None,
|
||||
) -> None:
|
||||
self.account = account
|
||||
self.weight = weight
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -17,8 +17,8 @@ class EosAuthorizationKey(p.MessageType):
|
||||
*,
|
||||
type: int,
|
||||
weight: int,
|
||||
address_n: List[int] = None,
|
||||
key: bytes = None,
|
||||
address_n: Optional[List[int]] = None,
|
||||
key: Optional[bytes] = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.type = type
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -15,8 +15,8 @@ class EosAuthorizationWait(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
wait_sec: int = None,
|
||||
weight: int = None,
|
||||
wait_sec: Optional[int] = None,
|
||||
weight: Optional[int] = None,
|
||||
) -> None:
|
||||
self.wait_sec = wait_sec
|
||||
self.weight = weight
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,8 +16,8 @@ class EosGetPublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address_n: List[int] = None,
|
||||
show_display: bool = None,
|
||||
address_n: Optional[List[int]] = None,
|
||||
show_display: Optional[bool] = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.show_display = show_display
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -15,8 +15,8 @@ class EosPermissionLevel(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
actor: int = None,
|
||||
permission: int = None,
|
||||
actor: Optional[int] = None,
|
||||
permission: Optional[int] = None,
|
||||
) -> None:
|
||||
self.actor = actor
|
||||
self.permission = permission
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -6,7 +6,7 @@ from .EosTxHeader import EosTxHeader
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -18,10 +18,10 @@ class EosSignTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address_n: List[int] = None,
|
||||
chain_id: bytes = None,
|
||||
header: EosTxHeader = None,
|
||||
num_actions: int = None,
|
||||
address_n: Optional[List[int]] = None,
|
||||
chain_id: Optional[bytes] = None,
|
||||
header: Optional[EosTxHeader] = None,
|
||||
num_actions: Optional[int] = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.chain_id = chain_id
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -20,7 +20,7 @@ from .EosActionVoteProducer import EosActionVoteProducer
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -32,21 +32,21 @@ class EosTxActionAck(p.MessageType):
|
||||
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,
|
||||
common: Optional[EosActionCommon] = None,
|
||||
transfer: Optional[EosActionTransfer] = None,
|
||||
delegate: Optional[EosActionDelegate] = None,
|
||||
undelegate: Optional[EosActionUndelegate] = None,
|
||||
refund: Optional[EosActionRefund] = None,
|
||||
buy_ram: Optional[EosActionBuyRam] = None,
|
||||
buy_ram_bytes: Optional[EosActionBuyRamBytes] = None,
|
||||
sell_ram: Optional[EosActionSellRam] = None,
|
||||
vote_producer: Optional[EosActionVoteProducer] = None,
|
||||
update_auth: Optional[EosActionUpdateAuth] = None,
|
||||
delete_auth: Optional[EosActionDeleteAuth] = None,
|
||||
link_auth: Optional[EosActionLinkAuth] = None,
|
||||
unlink_auth: Optional[EosActionUnlinkAuth] = None,
|
||||
new_account: Optional[EosActionNewAccount] = None,
|
||||
unknown: Optional[EosActionUnknown] = None,
|
||||
) -> None:
|
||||
self.common = common
|
||||
self.transfer = transfer
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,7 +16,7 @@ class EosTxActionRequest(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
data_size: int = None,
|
||||
data_size: Optional[int] = None,
|
||||
) -> None:
|
||||
self.data_size = data_size
|
||||
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,7 +16,7 @@ class EthereumAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address: str = None,
|
||||
address: Optional[str] = None,
|
||||
) -> None:
|
||||
self.address = address
|
||||
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,8 +16,8 @@ class EthereumGetAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address_n: List[int] = None,
|
||||
show_display: bool = None,
|
||||
address_n: Optional[List[int]] = None,
|
||||
show_display: Optional[bool] = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.show_display = show_display
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,8 +16,8 @@ class EthereumGetPublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address_n: List[int] = None,
|
||||
show_display: bool = None,
|
||||
address_n: Optional[List[int]] = None,
|
||||
show_display: Optional[bool] = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.show_display = show_display
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -6,7 +6,7 @@ from .HDNodeType import HDNodeType
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,8 +16,8 @@ class EthereumSignMessage(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address_n: List[int] = None,
|
||||
message: bytes = None,
|
||||
address_n: Optional[List[int]] = None,
|
||||
message: Optional[bytes] = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.message = message
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,16 +16,16 @@ class EthereumSignTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address_n: List[int] = None,
|
||||
nonce: bytes = None,
|
||||
gas_price: bytes = None,
|
||||
gas_limit: bytes = None,
|
||||
to: str = None,
|
||||
value: bytes = None,
|
||||
data_initial_chunk: bytes = None,
|
||||
data_length: int = None,
|
||||
chain_id: int = None,
|
||||
tx_type: int = None,
|
||||
address_n: Optional[List[int]] = None,
|
||||
nonce: Optional[bytes] = None,
|
||||
gas_price: Optional[bytes] = None,
|
||||
gas_limit: Optional[bytes] = None,
|
||||
to: Optional[str] = None,
|
||||
value: Optional[bytes] = None,
|
||||
data_initial_chunk: Optional[bytes] = None,
|
||||
data_length: Optional[int] = None,
|
||||
chain_id: Optional[int] = None,
|
||||
tx_type: Optional[int] = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.nonce = nonce
|
||||
|
@ -4,7 +4,7 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import Dict, List # noqa: F401
|
||||
from typing import Dict, List, Optional # noqa: F401
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
@ -16,7 +16,7 @@ class EthereumTxAck(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
data_chunk: bytes = None,
|
||||
data_chunk: Optional[bytes] = None,
|
||||
) -> None:
|
||||
self.data_chunk = data_chunk
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user