mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-12 21:36:18 +00:00
chore: regenerate protobuf classes
This commit is contained in:
parent
576d431058
commit
14037d0c31
@ -16,12 +16,12 @@ class BinanceAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address: str = None,
|
||||
address: str,
|
||||
) -> None:
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
1: ('address', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class BinancePublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
public_key: bytes = None,
|
||||
public_key: bytes,
|
||||
) -> None:
|
||||
self.public_key = public_key
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('public_key', p.BytesType, None),
|
||||
1: ('public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class BinanceSignedTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
signature: bytes = None,
|
||||
public_key: bytes = None,
|
||||
signature: bytes,
|
||||
public_key: bytes,
|
||||
) -> None:
|
||||
self.signature = signature
|
||||
self.public_key = public_key
|
||||
@ -25,6 +25,6 @@ class BinanceSignedTx(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('signature', p.BytesType, None),
|
||||
2: ('public_key', p.BytesType, None),
|
||||
1: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class CardanoAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address: str = None,
|
||||
address: str,
|
||||
) -> None:
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
1: ('address', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,9 +18,9 @@ class CardanoAddressParametersType(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address_type: EnumTypeCardanoAddressType,
|
||||
address_n: List[int] = None,
|
||||
address_n_staking: List[int] = None,
|
||||
address_type: EnumTypeCardanoAddressType = None,
|
||||
staking_key_hash: bytes = None,
|
||||
certificate_pointer: CardanoBlockchainPointerType = None,
|
||||
) -> None:
|
||||
@ -33,7 +33,7 @@ class CardanoAddressParametersType(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_type', p.EnumType("CardanoAddressType", (0, 1, 2, 3, 4, 5, 6, 7, 8, 14, 15)), None),
|
||||
1: ('address_type', p.EnumType("CardanoAddressType", (0, 1, 2, 3, 4, 5, 6, 7, 8, 14, 15)), p.FLAG_REQUIRED),
|
||||
2: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
3: ('address_n_staking', p.UVarintType, p.FLAG_REPEATED),
|
||||
4: ('staking_key_hash', p.BytesType, None),
|
||||
|
@ -15,9 +15,9 @@ class CardanoBlockchainPointerType(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
block_index: int = None,
|
||||
tx_index: int = None,
|
||||
certificate_index: int = None,
|
||||
block_index: int,
|
||||
tx_index: int,
|
||||
certificate_index: int,
|
||||
) -> None:
|
||||
self.block_index = block_index
|
||||
self.tx_index = tx_index
|
||||
@ -26,7 +26,7 @@ class CardanoBlockchainPointerType(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('block_index', p.UVarintType, None),
|
||||
2: ('tx_index', p.UVarintType, None),
|
||||
3: ('certificate_index', p.UVarintType, None),
|
||||
1: ('block_index', p.UVarintType, p.FLAG_REQUIRED),
|
||||
2: ('tx_index', p.UVarintType, p.FLAG_REQUIRED),
|
||||
3: ('certificate_index', p.UVarintType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,21 +18,21 @@ class CardanoGetAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
show_display: bool = None,
|
||||
protocol_magic: int = None,
|
||||
network_id: int = None,
|
||||
address_parameters: CardanoAddressParametersType = None,
|
||||
protocol_magic: int,
|
||||
network_id: int,
|
||||
address_parameters: CardanoAddressParametersType,
|
||||
show_display: bool = False,
|
||||
) -> None:
|
||||
self.show_display = show_display
|
||||
self.protocol_magic = protocol_magic
|
||||
self.network_id = network_id
|
||||
self.address_parameters = address_parameters
|
||||
self.show_display = show_display
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
2: ('show_display', p.BoolType, None),
|
||||
3: ('protocol_magic', p.UVarintType, None),
|
||||
4: ('network_id', p.UVarintType, None),
|
||||
5: ('address_parameters', CardanoAddressParametersType, None),
|
||||
2: ('show_display', p.BoolType, False), # default=false
|
||||
3: ('protocol_magic', p.UVarintType, p.FLAG_REQUIRED),
|
||||
4: ('network_id', p.UVarintType, p.FLAG_REQUIRED),
|
||||
5: ('address_parameters', CardanoAddressParametersType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ class CardanoPublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
xpub: str = None,
|
||||
node: HDNodeType = None,
|
||||
xpub: str,
|
||||
node: HDNodeType,
|
||||
) -> None:
|
||||
self.xpub = xpub
|
||||
self.node = node
|
||||
@ -27,6 +27,6 @@ class CardanoPublicKey(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('xpub', p.UnicodeType, None),
|
||||
2: ('node', HDNodeType, None),
|
||||
1: ('xpub', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
2: ('node', HDNodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -21,14 +21,14 @@ class CardanoSignTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
protocol_magic: int,
|
||||
fee: int,
|
||||
network_id: int,
|
||||
inputs: List[CardanoTxInputType] = None,
|
||||
outputs: List[CardanoTxOutputType] = None,
|
||||
certificates: List[CardanoTxCertificateType] = None,
|
||||
withdrawals: List[CardanoTxWithdrawalType] = None,
|
||||
protocol_magic: int = None,
|
||||
fee: int = None,
|
||||
ttl: int = None,
|
||||
network_id: int = None,
|
||||
metadata: bytes = None,
|
||||
validity_interval_start: int = None,
|
||||
) -> None:
|
||||
@ -38,8 +38,8 @@ class CardanoSignTx(p.MessageType):
|
||||
self.withdrawals = withdrawals if withdrawals is not None else []
|
||||
self.protocol_magic = protocol_magic
|
||||
self.fee = fee
|
||||
self.ttl = ttl
|
||||
self.network_id = network_id
|
||||
self.ttl = ttl
|
||||
self.metadata = metadata
|
||||
self.validity_interval_start = validity_interval_start
|
||||
|
||||
@ -48,10 +48,10 @@ class CardanoSignTx(p.MessageType):
|
||||
return {
|
||||
1: ('inputs', CardanoTxInputType, p.FLAG_REPEATED),
|
||||
2: ('outputs', CardanoTxOutputType, p.FLAG_REPEATED),
|
||||
5: ('protocol_magic', p.UVarintType, None),
|
||||
6: ('fee', p.UVarintType, None),
|
||||
5: ('protocol_magic', p.UVarintType, p.FLAG_REQUIRED),
|
||||
6: ('fee', p.UVarintType, p.FLAG_REQUIRED),
|
||||
7: ('ttl', p.UVarintType, None),
|
||||
8: ('network_id', p.UVarintType, None),
|
||||
8: ('network_id', p.UVarintType, p.FLAG_REQUIRED),
|
||||
9: ('certificates', CardanoTxCertificateType, p.FLAG_REPEATED),
|
||||
10: ('withdrawals', CardanoTxWithdrawalType, p.FLAG_REPEATED),
|
||||
11: ('metadata', p.BytesType, None),
|
||||
|
@ -16,8 +16,8 @@ class CardanoSignedTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
tx_hash: bytes = None,
|
||||
serialized_tx: bytes = None,
|
||||
tx_hash: bytes,
|
||||
serialized_tx: bytes,
|
||||
) -> None:
|
||||
self.tx_hash = tx_hash
|
||||
self.serialized_tx = serialized_tx
|
||||
@ -25,6 +25,6 @@ class CardanoSignedTx(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('tx_hash', p.BytesType, None),
|
||||
2: ('serialized_tx', p.BytesType, None),
|
||||
1: ('tx_hash', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('serialized_tx', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ class CardanoTxCertificateType(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
type: EnumTypeCardanoCertificateType,
|
||||
path: List[int] = None,
|
||||
type: EnumTypeCardanoCertificateType = None,
|
||||
pool: bytes = None,
|
||||
pool_parameters: CardanoPoolParametersType = None,
|
||||
) -> None:
|
||||
@ -31,7 +31,7 @@ class CardanoTxCertificateType(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('type', p.EnumType("CardanoCertificateType", (0, 1, 2, 3)), None),
|
||||
1: ('type', p.EnumType("CardanoCertificateType", (0, 1, 2, 3)), p.FLAG_REQUIRED),
|
||||
2: ('path', p.UVarintType, p.FLAG_REPEATED),
|
||||
3: ('pool', p.BytesType, None),
|
||||
4: ('pool_parameters', CardanoPoolParametersType, None),
|
||||
|
@ -15,9 +15,9 @@ class CardanoTxInputType(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
prev_hash: bytes,
|
||||
prev_index: int,
|
||||
address_n: List[int] = None,
|
||||
prev_hash: bytes = None,
|
||||
prev_index: int = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.prev_hash = prev_hash
|
||||
@ -27,6 +27,6 @@ class CardanoTxInputType(p.MessageType):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('prev_hash', p.BytesType, None),
|
||||
3: ('prev_index', p.UVarintType, None),
|
||||
2: ('prev_hash', p.BytesType, p.FLAG_REQUIRED),
|
||||
3: ('prev_index', p.UVarintType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,21 +18,21 @@ class CardanoTxOutputType(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
amount: int,
|
||||
token_bundle: List[CardanoAssetGroupType] = None,
|
||||
address: str = None,
|
||||
amount: int = None,
|
||||
address_parameters: CardanoAddressParametersType = None,
|
||||
) -> None:
|
||||
self.token_bundle = token_bundle if token_bundle is not None else []
|
||||
self.address = address
|
||||
self.amount = amount
|
||||
self.address = address
|
||||
self.address_parameters = address_parameters
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
3: ('amount', p.UVarintType, None),
|
||||
3: ('amount', p.UVarintType, p.FLAG_REQUIRED),
|
||||
4: ('address_parameters', CardanoAddressParametersType, None),
|
||||
5: ('token_bundle', CardanoAssetGroupType, p.FLAG_REPEATED),
|
||||
}
|
||||
|
@ -15,8 +15,8 @@ class CardanoTxWithdrawalType(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
amount: int,
|
||||
path: List[int] = None,
|
||||
amount: int = None,
|
||||
) -> None:
|
||||
self.path = path if path is not None else []
|
||||
self.amount = amount
|
||||
@ -25,5 +25,5 @@ class CardanoTxWithdrawalType(p.MessageType):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('path', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('amount', p.UVarintType, None),
|
||||
2: ('amount', p.UVarintType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,9 +16,9 @@ class CipherKeyValue(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
key: str,
|
||||
value: bytes,
|
||||
address_n: List[int] = None,
|
||||
key: str = None,
|
||||
value: bytes = None,
|
||||
encrypt: bool = None,
|
||||
ask_on_encrypt: bool = None,
|
||||
ask_on_decrypt: bool = None,
|
||||
@ -36,8 +36,8 @@ class CipherKeyValue(p.MessageType):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('key', p.UnicodeType, None),
|
||||
3: ('value', p.BytesType, None),
|
||||
2: ('key', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
3: ('value', p.BytesType, p.FLAG_REQUIRED),
|
||||
4: ('encrypt', p.BoolType, None),
|
||||
5: ('ask_on_encrypt', p.BoolType, None),
|
||||
6: ('ask_on_decrypt', p.BoolType, None),
|
||||
|
@ -16,12 +16,12 @@ class CipheredKeyValue(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
value: bytes = None,
|
||||
value: bytes,
|
||||
) -> None:
|
||||
self.value = value
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('value', p.BytesType, None),
|
||||
1: ('value', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class ECDHSessionKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
session_key: bytes = None,
|
||||
session_key: bytes,
|
||||
) -> None:
|
||||
self.session_key = session_key
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('session_key', p.BytesType, None),
|
||||
1: ('session_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ class EosActionUnknown(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
data_size: int = None,
|
||||
data_size: int,
|
||||
data_chunk: bytes = None,
|
||||
) -> None:
|
||||
self.data_size = data_size
|
||||
@ -24,6 +24,6 @@ class EosActionUnknown(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('data_size', p.UVarintType, None),
|
||||
1: ('data_size', p.UVarintType, p.FLAG_REQUIRED),
|
||||
2: ('data_chunk', p.BytesType, None),
|
||||
}
|
||||
|
@ -15,21 +15,21 @@ class EosAuthorizationKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
type: int,
|
||||
weight: int,
|
||||
address_n: List[int] = None,
|
||||
type: int = None,
|
||||
key: bytes = None,
|
||||
weight: int = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.type = type
|
||||
self.key = key
|
||||
self.weight = weight
|
||||
self.key = key
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('type', p.UVarintType, None),
|
||||
1: ('type', p.UVarintType, p.FLAG_REQUIRED),
|
||||
2: ('key', p.BytesType, None),
|
||||
3: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
4: ('weight', p.UVarintType, None),
|
||||
4: ('weight', p.UVarintType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class EosPublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
wif_public_key: str = None,
|
||||
raw_public_key: bytes = None,
|
||||
wif_public_key: str,
|
||||
raw_public_key: bytes,
|
||||
) -> None:
|
||||
self.wif_public_key = wif_public_key
|
||||
self.raw_public_key = raw_public_key
|
||||
@ -25,6 +25,6 @@ class EosPublicKey(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('wif_public_key', p.UnicodeType, None),
|
||||
2: ('raw_public_key', p.BytesType, None),
|
||||
1: ('wif_public_key', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
2: ('raw_public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class EosSignedTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
signature: str = None,
|
||||
signature: str,
|
||||
) -> None:
|
||||
self.signature = signature
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('signature', p.UnicodeType, None),
|
||||
1: ('signature', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class EthereumMessageSignature(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
signature: bytes = None,
|
||||
address: str = None,
|
||||
signature: bytes,
|
||||
address: str,
|
||||
) -> None:
|
||||
self.signature = signature
|
||||
self.address = address
|
||||
@ -25,6 +25,6 @@ class EthereumMessageSignature(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
2: ('signature', p.BytesType, None),
|
||||
3: ('address', p.UnicodeType, None),
|
||||
2: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
3: ('address', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ class EthereumPublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
node: HDNodeType = None,
|
||||
xpub: str = None,
|
||||
node: HDNodeType,
|
||||
xpub: str,
|
||||
) -> None:
|
||||
self.node = node
|
||||
self.xpub = xpub
|
||||
@ -27,6 +27,6 @@ class EthereumPublicKey(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('node', HDNodeType, None),
|
||||
2: ('xpub', p.UnicodeType, None),
|
||||
1: ('node', HDNodeType, p.FLAG_REQUIRED),
|
||||
2: ('xpub', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -19,11 +19,11 @@ class Features(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
major_version: int,
|
||||
minor_version: int,
|
||||
patch_version: int,
|
||||
capabilities: List[EnumTypeCapability] = None,
|
||||
vendor: str = None,
|
||||
major_version: int = None,
|
||||
minor_version: int = None,
|
||||
patch_version: int = None,
|
||||
bootloader_mode: bool = None,
|
||||
device_id: str = None,
|
||||
pin_protection: bool = None,
|
||||
@ -59,10 +59,10 @@ class Features(p.MessageType):
|
||||
experimental_features: bool = None,
|
||||
) -> None:
|
||||
self.capabilities = capabilities if capabilities is not None else []
|
||||
self.vendor = vendor
|
||||
self.major_version = major_version
|
||||
self.minor_version = minor_version
|
||||
self.patch_version = patch_version
|
||||
self.vendor = vendor
|
||||
self.bootloader_mode = bootloader_mode
|
||||
self.device_id = device_id
|
||||
self.pin_protection = pin_protection
|
||||
@ -101,9 +101,9 @@ class Features(p.MessageType):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('vendor', p.UnicodeType, None),
|
||||
2: ('major_version', p.UVarintType, None),
|
||||
3: ('minor_version', p.UVarintType, None),
|
||||
4: ('patch_version', p.UVarintType, None),
|
||||
2: ('major_version', p.UVarintType, p.FLAG_REQUIRED),
|
||||
3: ('minor_version', p.UVarintType, p.FLAG_REQUIRED),
|
||||
4: ('patch_version', p.UVarintType, p.FLAG_REQUIRED),
|
||||
5: ('bootloader_mode', p.BoolType, None),
|
||||
6: ('device_id', p.UnicodeType, None),
|
||||
7: ('pin_protection', p.BoolType, None),
|
||||
|
@ -18,8 +18,8 @@ class GetECDHSessionKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
identity: IdentityType = None,
|
||||
peer_public_key: bytes = None,
|
||||
identity: IdentityType,
|
||||
peer_public_key: bytes,
|
||||
ecdsa_curve_name: str = None,
|
||||
) -> None:
|
||||
self.identity = identity
|
||||
@ -29,7 +29,7 @@ class GetECDHSessionKey(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('identity', IdentityType, None),
|
||||
2: ('peer_public_key', p.BytesType, None),
|
||||
1: ('identity', IdentityType, p.FLAG_REQUIRED),
|
||||
2: ('peer_public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
3: ('ecdsa_curve_name', p.UnicodeType, None),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class LiskAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address: str = None,
|
||||
address: str,
|
||||
) -> None:
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
1: ('address', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class LiskMessageSignature(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
public_key: bytes = None,
|
||||
signature: bytes = None,
|
||||
public_key: bytes,
|
||||
signature: bytes,
|
||||
) -> None:
|
||||
self.public_key = public_key
|
||||
self.signature = signature
|
||||
@ -25,6 +25,6 @@ class LiskMessageSignature(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('public_key', p.BytesType, None),
|
||||
2: ('signature', p.BytesType, None),
|
||||
1: ('public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class LiskPublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
public_key: bytes = None,
|
||||
public_key: bytes,
|
||||
) -> None:
|
||||
self.public_key = public_key
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('public_key', p.BytesType, None),
|
||||
1: ('public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class LiskSignMessage(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
message: bytes,
|
||||
address_n: List[int] = None,
|
||||
message: bytes = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.message = message
|
||||
@ -26,5 +26,5 @@ class LiskSignMessage(p.MessageType):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('message', p.BytesType, None),
|
||||
2: ('message', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ class LiskSignTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
transaction: LiskTransactionCommon,
|
||||
address_n: List[int] = None,
|
||||
transaction: LiskTransactionCommon = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.transaction = transaction
|
||||
@ -28,5 +28,5 @@ class LiskSignTx(p.MessageType):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('transaction', LiskTransactionCommon, None),
|
||||
2: ('transaction', LiskTransactionCommon, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class LiskSignedTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
signature: bytes = None,
|
||||
signature: bytes,
|
||||
) -> None:
|
||||
self.signature = signature
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('signature', p.BytesType, None),
|
||||
1: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,9 +16,9 @@ class LiskVerifyMessage(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
public_key: bytes = None,
|
||||
signature: bytes = None,
|
||||
message: bytes = None,
|
||||
public_key: bytes,
|
||||
signature: bytes,
|
||||
message: bytes,
|
||||
) -> None:
|
||||
self.public_key = public_key
|
||||
self.signature = signature
|
||||
@ -27,7 +27,7 @@ class LiskVerifyMessage(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('public_key', p.BytesType, None),
|
||||
2: ('signature', p.BytesType, None),
|
||||
3: ('message', p.BytesType, None),
|
||||
1: ('public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
3: ('message', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class MessageSignature(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address: str = None,
|
||||
signature: bytes = None,
|
||||
address: str,
|
||||
signature: bytes,
|
||||
) -> None:
|
||||
self.address = address
|
||||
self.signature = signature
|
||||
@ -25,6 +25,6 @@ class MessageSignature(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
2: ('signature', p.BytesType, None),
|
||||
1: ('address', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
2: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class NEMSignedTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
data: bytes = None,
|
||||
signature: bytes = None,
|
||||
data: bytes,
|
||||
signature: bytes,
|
||||
) -> None:
|
||||
self.data = data
|
||||
self.signature = signature
|
||||
@ -25,6 +25,6 @@ class NEMSignedTx(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('data', p.BytesType, None),
|
||||
2: ('signature', p.BytesType, None),
|
||||
1: ('data', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ class Ping(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
message: str = None,
|
||||
message: str = "",
|
||||
button_protection: bool = None,
|
||||
) -> None:
|
||||
self.message = message
|
||||
@ -25,6 +25,6 @@ class Ping(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('message', p.UnicodeType, None),
|
||||
1: ('message', p.UnicodeType, ""), # default=
|
||||
2: ('button_protection', p.BoolType, None),
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ class PublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
node: HDNodeType = None,
|
||||
xpub: str = None,
|
||||
node: HDNodeType,
|
||||
xpub: str,
|
||||
root_fingerprint: int = None,
|
||||
) -> None:
|
||||
self.node = node
|
||||
@ -29,7 +29,7 @@ class PublicKey(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('node', HDNodeType, None),
|
||||
2: ('xpub', p.UnicodeType, None),
|
||||
1: ('node', HDNodeType, p.FLAG_REQUIRED),
|
||||
2: ('xpub', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
3: ('root_fingerprint', p.UVarintType, None),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class RippleAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address: str = None,
|
||||
address: str,
|
||||
) -> None:
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
1: ('address', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -15,8 +15,8 @@ class RipplePayment(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
amount: int = None,
|
||||
destination: str = None,
|
||||
amount: int,
|
||||
destination: str,
|
||||
destination_tag: int = None,
|
||||
) -> None:
|
||||
self.amount = amount
|
||||
@ -26,7 +26,7 @@ class RipplePayment(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('amount', p.UVarintType, None),
|
||||
2: ('destination', p.UnicodeType, None),
|
||||
1: ('amount', p.UVarintType, p.FLAG_REQUIRED),
|
||||
2: ('destination', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
3: ('destination_tag', p.UVarintType, None),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class RippleSignedTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
signature: bytes = None,
|
||||
serialized_tx: bytes = None,
|
||||
signature: bytes,
|
||||
serialized_tx: bytes,
|
||||
) -> None:
|
||||
self.signature = signature
|
||||
self.serialized_tx = serialized_tx
|
||||
@ -25,6 +25,6 @@ class RippleSignedTx(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('signature', p.BytesType, None),
|
||||
2: ('serialized_tx', p.BytesType, None),
|
||||
1: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('serialized_tx', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,9 +18,9 @@ class SignIdentity(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
identity: IdentityType = None,
|
||||
challenge_hidden: bytes = None,
|
||||
challenge_visual: str = None,
|
||||
identity: IdentityType,
|
||||
challenge_hidden: bytes = b"",
|
||||
challenge_visual: str = "",
|
||||
ecdsa_curve_name: str = None,
|
||||
) -> None:
|
||||
self.identity = identity
|
||||
@ -31,8 +31,8 @@ class SignIdentity(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('identity', IdentityType, None),
|
||||
2: ('challenge_hidden', p.BytesType, None),
|
||||
3: ('challenge_visual', p.UnicodeType, None),
|
||||
1: ('identity', IdentityType, p.FLAG_REQUIRED),
|
||||
2: ('challenge_hidden', p.BytesType, b""), # default=
|
||||
3: ('challenge_visual', p.UnicodeType, ""), # default=
|
||||
4: ('ecdsa_curve_name', p.UnicodeType, None),
|
||||
}
|
||||
|
@ -16,18 +16,18 @@ class SignedIdentity(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
public_key: bytes,
|
||||
signature: bytes,
|
||||
address: str = None,
|
||||
public_key: bytes = None,
|
||||
signature: bytes = None,
|
||||
) -> None:
|
||||
self.address = address
|
||||
self.public_key = public_key
|
||||
self.signature = signature
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
2: ('public_key', p.BytesType, None),
|
||||
3: ('signature', p.BytesType, None),
|
||||
2: ('public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
3: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class StellarAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address: str = None,
|
||||
address: str,
|
||||
) -> None:
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
1: ('address', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ class StellarAssetType(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
type: int = None,
|
||||
type: int,
|
||||
code: str = None,
|
||||
issuer: str = None,
|
||||
) -> None:
|
||||
@ -26,7 +26,7 @@ class StellarAssetType(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('type', p.UVarintType, None),
|
||||
1: ('type', p.UVarintType, p.FLAG_REQUIRED),
|
||||
2: ('code', p.UnicodeType, None),
|
||||
3: ('issuer', p.UnicodeType, None),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class StellarSignedTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
public_key: bytes = None,
|
||||
signature: bytes = None,
|
||||
public_key: bytes,
|
||||
signature: bytes,
|
||||
) -> None:
|
||||
self.public_key = public_key
|
||||
self.signature = signature
|
||||
@ -25,6 +25,6 @@ class StellarSignedTx(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('public_key', p.BytesType, None),
|
||||
2: ('signature', p.BytesType, None),
|
||||
1: ('public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class Success(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
message: str = None,
|
||||
message: str = "",
|
||||
) -> None:
|
||||
self.message = message
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('message', p.UnicodeType, None),
|
||||
1: ('message', p.UnicodeType, ""), # default=
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class TezosAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address: str = None,
|
||||
address: str,
|
||||
) -> None:
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
1: ('address', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class TezosContractID(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
tag: EnumTypeTezosContractType = None,
|
||||
hash: bytes = None,
|
||||
tag: EnumTypeTezosContractType,
|
||||
hash: bytes,
|
||||
) -> None:
|
||||
self.tag = tag
|
||||
self.hash = hash
|
||||
@ -25,6 +25,6 @@ class TezosContractID(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('tag', p.EnumType("TezosContractType", (0, 1)), None),
|
||||
2: ('hash', p.BytesType, None),
|
||||
1: ('tag', p.EnumType("TezosContractType", (0, 1)), p.FLAG_REQUIRED),
|
||||
2: ('hash', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -15,12 +15,12 @@ class TezosDelegationOp(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
source: bytes = None,
|
||||
fee: int = None,
|
||||
counter: int = None,
|
||||
gas_limit: int = None,
|
||||
storage_limit: int = None,
|
||||
delegate: bytes = None,
|
||||
source: bytes,
|
||||
fee: int,
|
||||
counter: int,
|
||||
gas_limit: int,
|
||||
storage_limit: int,
|
||||
delegate: bytes,
|
||||
) -> None:
|
||||
self.source = source
|
||||
self.fee = fee
|
||||
@ -32,10 +32,10 @@ class TezosDelegationOp(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
7: ('source', p.BytesType, None),
|
||||
2: ('fee', p.UVarintType, None),
|
||||
3: ('counter', p.UVarintType, None),
|
||||
4: ('gas_limit', p.UVarintType, None),
|
||||
5: ('storage_limit', p.UVarintType, None),
|
||||
6: ('delegate', p.BytesType, None),
|
||||
7: ('source', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('fee', p.UVarintType, p.FLAG_REQUIRED),
|
||||
3: ('counter', p.UVarintType, p.FLAG_REQUIRED),
|
||||
4: ('gas_limit', p.UVarintType, p.FLAG_REQUIRED),
|
||||
5: ('storage_limit', p.UVarintType, p.FLAG_REQUIRED),
|
||||
6: ('delegate', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -15,42 +15,42 @@ class TezosOriginationOp(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
source: bytes = None,
|
||||
fee: int = None,
|
||||
counter: int = None,
|
||||
gas_limit: int = None,
|
||||
storage_limit: int = None,
|
||||
source: bytes,
|
||||
fee: int,
|
||||
counter: int,
|
||||
gas_limit: int,
|
||||
storage_limit: int,
|
||||
balance: int,
|
||||
script: bytes,
|
||||
manager_pubkey: bytes = None,
|
||||
balance: int = None,
|
||||
spendable: bool = None,
|
||||
delegatable: bool = None,
|
||||
delegate: bytes = None,
|
||||
script: bytes = None,
|
||||
) -> None:
|
||||
self.source = source
|
||||
self.fee = fee
|
||||
self.counter = counter
|
||||
self.gas_limit = gas_limit
|
||||
self.storage_limit = storage_limit
|
||||
self.manager_pubkey = manager_pubkey
|
||||
self.balance = balance
|
||||
self.script = script
|
||||
self.manager_pubkey = manager_pubkey
|
||||
self.spendable = spendable
|
||||
self.delegatable = delegatable
|
||||
self.delegate = delegate
|
||||
self.script = script
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
12: ('source', p.BytesType, None),
|
||||
2: ('fee', p.UVarintType, None),
|
||||
3: ('counter', p.UVarintType, None),
|
||||
4: ('gas_limit', p.UVarintType, None),
|
||||
5: ('storage_limit', p.UVarintType, None),
|
||||
12: ('source', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('fee', p.UVarintType, p.FLAG_REQUIRED),
|
||||
3: ('counter', p.UVarintType, p.FLAG_REQUIRED),
|
||||
4: ('gas_limit', p.UVarintType, p.FLAG_REQUIRED),
|
||||
5: ('storage_limit', p.UVarintType, p.FLAG_REQUIRED),
|
||||
6: ('manager_pubkey', p.BytesType, None),
|
||||
7: ('balance', p.UVarintType, None),
|
||||
7: ('balance', p.UVarintType, p.FLAG_REQUIRED),
|
||||
8: ('spendable', p.BoolType, None),
|
||||
9: ('delegatable', p.BoolType, None),
|
||||
10: ('delegate', p.BytesType, None),
|
||||
11: ('script', p.BytesType, None),
|
||||
11: ('script', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class TezosPublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
public_key: str = None,
|
||||
public_key: str,
|
||||
) -> None:
|
||||
self.public_key = public_key
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('public_key', p.UnicodeType, None),
|
||||
1: ('public_key', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -15,12 +15,12 @@ class TezosRevealOp(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
source: bytes = None,
|
||||
fee: int = None,
|
||||
counter: int = None,
|
||||
gas_limit: int = None,
|
||||
storage_limit: int = None,
|
||||
public_key: bytes = None,
|
||||
source: bytes,
|
||||
fee: int,
|
||||
counter: int,
|
||||
gas_limit: int,
|
||||
storage_limit: int,
|
||||
public_key: bytes,
|
||||
) -> None:
|
||||
self.source = source
|
||||
self.fee = fee
|
||||
@ -32,10 +32,10 @@ class TezosRevealOp(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
7: ('source', p.BytesType, None),
|
||||
2: ('fee', p.UVarintType, None),
|
||||
3: ('counter', p.UVarintType, None),
|
||||
4: ('gas_limit', p.UVarintType, None),
|
||||
5: ('storage_limit', p.UVarintType, None),
|
||||
6: ('public_key', p.BytesType, None),
|
||||
7: ('source', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('fee', p.UVarintType, p.FLAG_REQUIRED),
|
||||
3: ('counter', p.UVarintType, p.FLAG_REQUIRED),
|
||||
4: ('gas_limit', p.UVarintType, p.FLAG_REQUIRED),
|
||||
5: ('storage_limit', p.UVarintType, p.FLAG_REQUIRED),
|
||||
6: ('public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -23,8 +23,8 @@ class TezosSignTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
branch: bytes,
|
||||
address_n: List[int] = None,
|
||||
branch: bytes = None,
|
||||
reveal: TezosRevealOp = None,
|
||||
transaction: TezosTransactionOp = None,
|
||||
origination: TezosOriginationOp = None,
|
||||
@ -45,7 +45,7 @@ class TezosSignTx(p.MessageType):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('branch', p.BytesType, None),
|
||||
2: ('branch', p.BytesType, p.FLAG_REQUIRED),
|
||||
3: ('reveal', TezosRevealOp, None),
|
||||
4: ('transaction', TezosTransactionOp, None),
|
||||
5: ('origination', TezosOriginationOp, None),
|
||||
|
@ -16,9 +16,9 @@ class TezosSignedTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
signature: str = None,
|
||||
sig_op_contents: bytes = None,
|
||||
operation_hash: str = None,
|
||||
signature: str,
|
||||
sig_op_contents: bytes,
|
||||
operation_hash: str,
|
||||
) -> None:
|
||||
self.signature = signature
|
||||
self.sig_op_contents = sig_op_contents
|
||||
@ -27,7 +27,7 @@ class TezosSignedTx(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('signature', p.UnicodeType, None),
|
||||
2: ('sig_op_contents', p.BytesType, None),
|
||||
3: ('operation_hash', p.UnicodeType, None),
|
||||
1: ('signature', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
2: ('sig_op_contents', p.BytesType, p.FLAG_REQUIRED),
|
||||
3: ('operation_hash', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,13 +18,13 @@ class TezosTransactionOp(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
source: bytes = None,
|
||||
fee: int = None,
|
||||
counter: int = None,
|
||||
gas_limit: int = None,
|
||||
storage_limit: int = None,
|
||||
amount: int = None,
|
||||
destination: TezosContractID = None,
|
||||
source: bytes,
|
||||
fee: int,
|
||||
counter: int,
|
||||
gas_limit: int,
|
||||
storage_limit: int,
|
||||
amount: int,
|
||||
destination: TezosContractID,
|
||||
parameters: bytes = None,
|
||||
parameters_manager: TezosParametersManager = None,
|
||||
) -> None:
|
||||
@ -41,13 +41,13 @@ class TezosTransactionOp(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
9: ('source', p.BytesType, None),
|
||||
2: ('fee', p.UVarintType, None),
|
||||
3: ('counter', p.UVarintType, None),
|
||||
4: ('gas_limit', p.UVarintType, None),
|
||||
5: ('storage_limit', p.UVarintType, None),
|
||||
6: ('amount', p.UVarintType, None),
|
||||
7: ('destination', TezosContractID, None),
|
||||
9: ('source', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('fee', p.UVarintType, p.FLAG_REQUIRED),
|
||||
3: ('counter', p.UVarintType, p.FLAG_REQUIRED),
|
||||
4: ('gas_limit', p.UVarintType, p.FLAG_REQUIRED),
|
||||
5: ('storage_limit', p.UVarintType, p.FLAG_REQUIRED),
|
||||
6: ('amount', p.UVarintType, p.FLAG_REQUIRED),
|
||||
7: ('destination', TezosContractID, p.FLAG_REQUIRED),
|
||||
8: ('parameters', p.BytesType, None),
|
||||
10: ('parameters_manager', TezosParametersManager, None),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class BinanceAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address: str = None,
|
||||
address: str,
|
||||
) -> None:
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
1: ('address', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class BinancePublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
public_key: bytes = None,
|
||||
public_key: bytes,
|
||||
) -> None:
|
||||
self.public_key = public_key
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('public_key', p.BytesType, None),
|
||||
1: ('public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class BinanceSignedTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
signature: bytes = None,
|
||||
public_key: bytes = None,
|
||||
signature: bytes,
|
||||
public_key: bytes,
|
||||
) -> None:
|
||||
self.signature = signature
|
||||
self.public_key = public_key
|
||||
@ -25,6 +25,6 @@ class BinanceSignedTx(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('signature', p.BytesType, None),
|
||||
2: ('public_key', p.BytesType, None),
|
||||
1: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class CardanoAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address: str = None,
|
||||
address: str,
|
||||
) -> None:
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
1: ('address', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,9 +18,9 @@ class CardanoAddressParametersType(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address_type: EnumTypeCardanoAddressType,
|
||||
address_n: List[int] = None,
|
||||
address_n_staking: List[int] = None,
|
||||
address_type: EnumTypeCardanoAddressType = None,
|
||||
staking_key_hash: bytes = None,
|
||||
certificate_pointer: CardanoBlockchainPointerType = None,
|
||||
) -> None:
|
||||
@ -33,7 +33,7 @@ class CardanoAddressParametersType(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_type', p.EnumType("CardanoAddressType", (0, 1, 2, 3, 4, 5, 6, 7, 8, 14, 15)), None),
|
||||
1: ('address_type', p.EnumType("CardanoAddressType", (0, 1, 2, 3, 4, 5, 6, 7, 8, 14, 15)), p.FLAG_REQUIRED),
|
||||
2: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
3: ('address_n_staking', p.UVarintType, p.FLAG_REPEATED),
|
||||
4: ('staking_key_hash', p.BytesType, None),
|
||||
|
@ -15,9 +15,9 @@ class CardanoBlockchainPointerType(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
block_index: int = None,
|
||||
tx_index: int = None,
|
||||
certificate_index: int = None,
|
||||
block_index: int,
|
||||
tx_index: int,
|
||||
certificate_index: int,
|
||||
) -> None:
|
||||
self.block_index = block_index
|
||||
self.tx_index = tx_index
|
||||
@ -26,7 +26,7 @@ class CardanoBlockchainPointerType(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('block_index', p.UVarintType, None),
|
||||
2: ('tx_index', p.UVarintType, None),
|
||||
3: ('certificate_index', p.UVarintType, None),
|
||||
1: ('block_index', p.UVarintType, p.FLAG_REQUIRED),
|
||||
2: ('tx_index', p.UVarintType, p.FLAG_REQUIRED),
|
||||
3: ('certificate_index', p.UVarintType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,21 +18,21 @@ class CardanoGetAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
show_display: bool = None,
|
||||
protocol_magic: int = None,
|
||||
network_id: int = None,
|
||||
address_parameters: CardanoAddressParametersType = None,
|
||||
protocol_magic: int,
|
||||
network_id: int,
|
||||
address_parameters: CardanoAddressParametersType,
|
||||
show_display: bool = False,
|
||||
) -> None:
|
||||
self.show_display = show_display
|
||||
self.protocol_magic = protocol_magic
|
||||
self.network_id = network_id
|
||||
self.address_parameters = address_parameters
|
||||
self.show_display = show_display
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
2: ('show_display', p.BoolType, None),
|
||||
3: ('protocol_magic', p.UVarintType, None),
|
||||
4: ('network_id', p.UVarintType, None),
|
||||
5: ('address_parameters', CardanoAddressParametersType, None),
|
||||
2: ('show_display', p.BoolType, False), # default=false
|
||||
3: ('protocol_magic', p.UVarintType, p.FLAG_REQUIRED),
|
||||
4: ('network_id', p.UVarintType, p.FLAG_REQUIRED),
|
||||
5: ('address_parameters', CardanoAddressParametersType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ class CardanoPublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
xpub: str = None,
|
||||
node: HDNodeType = None,
|
||||
xpub: str,
|
||||
node: HDNodeType,
|
||||
) -> None:
|
||||
self.xpub = xpub
|
||||
self.node = node
|
||||
@ -27,6 +27,6 @@ class CardanoPublicKey(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('xpub', p.UnicodeType, None),
|
||||
2: ('node', HDNodeType, None),
|
||||
1: ('xpub', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
2: ('node', HDNodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -21,14 +21,14 @@ class CardanoSignTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
protocol_magic: int,
|
||||
fee: int,
|
||||
network_id: int,
|
||||
inputs: List[CardanoTxInputType] = None,
|
||||
outputs: List[CardanoTxOutputType] = None,
|
||||
certificates: List[CardanoTxCertificateType] = None,
|
||||
withdrawals: List[CardanoTxWithdrawalType] = None,
|
||||
protocol_magic: int = None,
|
||||
fee: int = None,
|
||||
ttl: int = None,
|
||||
network_id: int = None,
|
||||
metadata: bytes = None,
|
||||
validity_interval_start: int = None,
|
||||
) -> None:
|
||||
@ -38,8 +38,8 @@ class CardanoSignTx(p.MessageType):
|
||||
self.withdrawals = withdrawals if withdrawals is not None else []
|
||||
self.protocol_magic = protocol_magic
|
||||
self.fee = fee
|
||||
self.ttl = ttl
|
||||
self.network_id = network_id
|
||||
self.ttl = ttl
|
||||
self.metadata = metadata
|
||||
self.validity_interval_start = validity_interval_start
|
||||
|
||||
@ -48,10 +48,10 @@ class CardanoSignTx(p.MessageType):
|
||||
return {
|
||||
1: ('inputs', CardanoTxInputType, p.FLAG_REPEATED),
|
||||
2: ('outputs', CardanoTxOutputType, p.FLAG_REPEATED),
|
||||
5: ('protocol_magic', p.UVarintType, None),
|
||||
6: ('fee', p.UVarintType, None),
|
||||
5: ('protocol_magic', p.UVarintType, p.FLAG_REQUIRED),
|
||||
6: ('fee', p.UVarintType, p.FLAG_REQUIRED),
|
||||
7: ('ttl', p.UVarintType, None),
|
||||
8: ('network_id', p.UVarintType, None),
|
||||
8: ('network_id', p.UVarintType, p.FLAG_REQUIRED),
|
||||
9: ('certificates', CardanoTxCertificateType, p.FLAG_REPEATED),
|
||||
10: ('withdrawals', CardanoTxWithdrawalType, p.FLAG_REPEATED),
|
||||
11: ('metadata', p.BytesType, None),
|
||||
|
@ -16,8 +16,8 @@ class CardanoSignedTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
tx_hash: bytes = None,
|
||||
serialized_tx: bytes = None,
|
||||
tx_hash: bytes,
|
||||
serialized_tx: bytes,
|
||||
) -> None:
|
||||
self.tx_hash = tx_hash
|
||||
self.serialized_tx = serialized_tx
|
||||
@ -25,6 +25,6 @@ class CardanoSignedTx(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('tx_hash', p.BytesType, None),
|
||||
2: ('serialized_tx', p.BytesType, None),
|
||||
1: ('tx_hash', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('serialized_tx', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ class CardanoTxCertificateType(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
type: EnumTypeCardanoCertificateType,
|
||||
path: List[int] = None,
|
||||
type: EnumTypeCardanoCertificateType = None,
|
||||
pool: bytes = None,
|
||||
pool_parameters: CardanoPoolParametersType = None,
|
||||
) -> None:
|
||||
@ -31,7 +31,7 @@ class CardanoTxCertificateType(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('type', p.EnumType("CardanoCertificateType", (0, 1, 2, 3)), None),
|
||||
1: ('type', p.EnumType("CardanoCertificateType", (0, 1, 2, 3)), p.FLAG_REQUIRED),
|
||||
2: ('path', p.UVarintType, p.FLAG_REPEATED),
|
||||
3: ('pool', p.BytesType, None),
|
||||
4: ('pool_parameters', CardanoPoolParametersType, None),
|
||||
|
@ -15,9 +15,9 @@ class CardanoTxInputType(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
prev_hash: bytes,
|
||||
prev_index: int,
|
||||
address_n: List[int] = None,
|
||||
prev_hash: bytes = None,
|
||||
prev_index: int = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.prev_hash = prev_hash
|
||||
@ -27,6 +27,6 @@ class CardanoTxInputType(p.MessageType):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('prev_hash', p.BytesType, None),
|
||||
3: ('prev_index', p.UVarintType, None),
|
||||
2: ('prev_hash', p.BytesType, p.FLAG_REQUIRED),
|
||||
3: ('prev_index', p.UVarintType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,21 +18,21 @@ class CardanoTxOutputType(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
amount: int,
|
||||
token_bundle: List[CardanoAssetGroupType] = None,
|
||||
address: str = None,
|
||||
amount: int = None,
|
||||
address_parameters: CardanoAddressParametersType = None,
|
||||
) -> None:
|
||||
self.token_bundle = token_bundle if token_bundle is not None else []
|
||||
self.address = address
|
||||
self.amount = amount
|
||||
self.address = address
|
||||
self.address_parameters = address_parameters
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
3: ('amount', p.UVarintType, None),
|
||||
3: ('amount', p.UVarintType, p.FLAG_REQUIRED),
|
||||
4: ('address_parameters', CardanoAddressParametersType, None),
|
||||
5: ('token_bundle', CardanoAssetGroupType, p.FLAG_REPEATED),
|
||||
}
|
||||
|
@ -15,8 +15,8 @@ class CardanoTxWithdrawalType(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
amount: int,
|
||||
path: List[int] = None,
|
||||
amount: int = None,
|
||||
) -> None:
|
||||
self.path = path if path is not None else []
|
||||
self.amount = amount
|
||||
@ -25,5 +25,5 @@ class CardanoTxWithdrawalType(p.MessageType):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('path', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('amount', p.UVarintType, None),
|
||||
2: ('amount', p.UVarintType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,9 +16,9 @@ class CipherKeyValue(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
key: str,
|
||||
value: bytes,
|
||||
address_n: List[int] = None,
|
||||
key: str = None,
|
||||
value: bytes = None,
|
||||
encrypt: bool = None,
|
||||
ask_on_encrypt: bool = None,
|
||||
ask_on_decrypt: bool = None,
|
||||
@ -36,8 +36,8 @@ class CipherKeyValue(p.MessageType):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('key', p.UnicodeType, None),
|
||||
3: ('value', p.BytesType, None),
|
||||
2: ('key', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
3: ('value', p.BytesType, p.FLAG_REQUIRED),
|
||||
4: ('encrypt', p.BoolType, None),
|
||||
5: ('ask_on_encrypt', p.BoolType, None),
|
||||
6: ('ask_on_decrypt', p.BoolType, None),
|
||||
|
@ -16,12 +16,12 @@ class CipheredKeyValue(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
value: bytes = None,
|
||||
value: bytes,
|
||||
) -> None:
|
||||
self.value = value
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('value', p.BytesType, None),
|
||||
1: ('value', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class CosiSignature(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
signature: bytes = None,
|
||||
signature: bytes,
|
||||
) -> None:
|
||||
self.signature = signature
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('signature', p.BytesType, None),
|
||||
1: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class ECDHSessionKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
session_key: bytes = None,
|
||||
session_key: bytes,
|
||||
) -> None:
|
||||
self.session_key = session_key
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('session_key', p.BytesType, None),
|
||||
1: ('session_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ class EosActionUnknown(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
data_size: int = None,
|
||||
data_size: int,
|
||||
data_chunk: bytes = None,
|
||||
) -> None:
|
||||
self.data_size = data_size
|
||||
@ -24,6 +24,6 @@ class EosActionUnknown(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('data_size', p.UVarintType, None),
|
||||
1: ('data_size', p.UVarintType, p.FLAG_REQUIRED),
|
||||
2: ('data_chunk', p.BytesType, None),
|
||||
}
|
||||
|
@ -15,21 +15,21 @@ class EosAuthorizationKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
type: int,
|
||||
weight: int,
|
||||
address_n: List[int] = None,
|
||||
type: int = None,
|
||||
key: bytes = None,
|
||||
weight: int = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.type = type
|
||||
self.key = key
|
||||
self.weight = weight
|
||||
self.key = key
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('type', p.UVarintType, None),
|
||||
1: ('type', p.UVarintType, p.FLAG_REQUIRED),
|
||||
2: ('key', p.BytesType, None),
|
||||
3: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
4: ('weight', p.UVarintType, None),
|
||||
4: ('weight', p.UVarintType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class EosPublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
wif_public_key: str = None,
|
||||
raw_public_key: bytes = None,
|
||||
wif_public_key: str,
|
||||
raw_public_key: bytes,
|
||||
) -> None:
|
||||
self.wif_public_key = wif_public_key
|
||||
self.raw_public_key = raw_public_key
|
||||
@ -25,6 +25,6 @@ class EosPublicKey(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('wif_public_key', p.UnicodeType, None),
|
||||
2: ('raw_public_key', p.BytesType, None),
|
||||
1: ('wif_public_key', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
2: ('raw_public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class EosSignedTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
signature: str = None,
|
||||
signature: str,
|
||||
) -> None:
|
||||
self.signature = signature
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('signature', p.UnicodeType, None),
|
||||
1: ('signature', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class EthereumMessageSignature(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
signature: bytes = None,
|
||||
address: str = None,
|
||||
signature: bytes,
|
||||
address: str,
|
||||
) -> None:
|
||||
self.signature = signature
|
||||
self.address = address
|
||||
@ -25,6 +25,6 @@ class EthereumMessageSignature(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
2: ('signature', p.BytesType, None),
|
||||
3: ('address', p.UnicodeType, None),
|
||||
2: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
3: ('address', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ class EthereumPublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
node: HDNodeType = None,
|
||||
xpub: str = None,
|
||||
node: HDNodeType,
|
||||
xpub: str,
|
||||
) -> None:
|
||||
self.node = node
|
||||
self.xpub = xpub
|
||||
@ -27,6 +27,6 @@ class EthereumPublicKey(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('node', HDNodeType, None),
|
||||
2: ('xpub', p.UnicodeType, None),
|
||||
1: ('node', HDNodeType, p.FLAG_REQUIRED),
|
||||
2: ('xpub', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -19,11 +19,11 @@ class Features(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
major_version: int,
|
||||
minor_version: int,
|
||||
patch_version: int,
|
||||
capabilities: List[EnumTypeCapability] = None,
|
||||
vendor: str = None,
|
||||
major_version: int = None,
|
||||
minor_version: int = None,
|
||||
patch_version: int = None,
|
||||
bootloader_mode: bool = None,
|
||||
device_id: str = None,
|
||||
pin_protection: bool = None,
|
||||
@ -59,10 +59,10 @@ class Features(p.MessageType):
|
||||
experimental_features: bool = None,
|
||||
) -> None:
|
||||
self.capabilities = capabilities if capabilities is not None else []
|
||||
self.vendor = vendor
|
||||
self.major_version = major_version
|
||||
self.minor_version = minor_version
|
||||
self.patch_version = patch_version
|
||||
self.vendor = vendor
|
||||
self.bootloader_mode = bootloader_mode
|
||||
self.device_id = device_id
|
||||
self.pin_protection = pin_protection
|
||||
@ -101,9 +101,9 @@ class Features(p.MessageType):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('vendor', p.UnicodeType, None),
|
||||
2: ('major_version', p.UVarintType, None),
|
||||
3: ('minor_version', p.UVarintType, None),
|
||||
4: ('patch_version', p.UVarintType, None),
|
||||
2: ('major_version', p.UVarintType, p.FLAG_REQUIRED),
|
||||
3: ('minor_version', p.UVarintType, p.FLAG_REQUIRED),
|
||||
4: ('patch_version', p.UVarintType, p.FLAG_REQUIRED),
|
||||
5: ('bootloader_mode', p.BoolType, None),
|
||||
6: ('device_id', p.UnicodeType, None),
|
||||
7: ('pin_protection', p.BoolType, None),
|
||||
|
@ -18,8 +18,8 @@ class GetECDHSessionKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
identity: IdentityType = None,
|
||||
peer_public_key: bytes = None,
|
||||
identity: IdentityType,
|
||||
peer_public_key: bytes,
|
||||
ecdsa_curve_name: str = None,
|
||||
) -> None:
|
||||
self.identity = identity
|
||||
@ -29,7 +29,7 @@ class GetECDHSessionKey(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('identity', IdentityType, None),
|
||||
2: ('peer_public_key', p.BytesType, None),
|
||||
1: ('identity', IdentityType, p.FLAG_REQUIRED),
|
||||
2: ('peer_public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
3: ('ecdsa_curve_name', p.UnicodeType, None),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class LiskAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address: str = None,
|
||||
address: str,
|
||||
) -> None:
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
1: ('address', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class LiskMessageSignature(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
public_key: bytes = None,
|
||||
signature: bytes = None,
|
||||
public_key: bytes,
|
||||
signature: bytes,
|
||||
) -> None:
|
||||
self.public_key = public_key
|
||||
self.signature = signature
|
||||
@ -25,6 +25,6 @@ class LiskMessageSignature(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('public_key', p.BytesType, None),
|
||||
2: ('signature', p.BytesType, None),
|
||||
1: ('public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class LiskPublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
public_key: bytes = None,
|
||||
public_key: bytes,
|
||||
) -> None:
|
||||
self.public_key = public_key
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('public_key', p.BytesType, None),
|
||||
1: ('public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class LiskSignMessage(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
message: bytes,
|
||||
address_n: List[int] = None,
|
||||
message: bytes = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.message = message
|
||||
@ -26,5 +26,5 @@ class LiskSignMessage(p.MessageType):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('message', p.BytesType, None),
|
||||
2: ('message', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ class LiskSignTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
transaction: LiskTransactionCommon,
|
||||
address_n: List[int] = None,
|
||||
transaction: LiskTransactionCommon = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.transaction = transaction
|
||||
@ -28,5 +28,5 @@ class LiskSignTx(p.MessageType):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('transaction', LiskTransactionCommon, None),
|
||||
2: ('transaction', LiskTransactionCommon, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class LiskSignedTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
signature: bytes = None,
|
||||
signature: bytes,
|
||||
) -> None:
|
||||
self.signature = signature
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('signature', p.BytesType, None),
|
||||
1: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,9 +16,9 @@ class LiskVerifyMessage(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
public_key: bytes = None,
|
||||
signature: bytes = None,
|
||||
message: bytes = None,
|
||||
public_key: bytes,
|
||||
signature: bytes,
|
||||
message: bytes,
|
||||
) -> None:
|
||||
self.public_key = public_key
|
||||
self.signature = signature
|
||||
@ -27,7 +27,7 @@ class LiskVerifyMessage(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('public_key', p.BytesType, None),
|
||||
2: ('signature', p.BytesType, None),
|
||||
3: ('message', p.BytesType, None),
|
||||
1: ('public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
3: ('message', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class MessageSignature(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address: str = None,
|
||||
signature: bytes = None,
|
||||
address: str,
|
||||
signature: bytes,
|
||||
) -> None:
|
||||
self.address = address
|
||||
self.signature = signature
|
||||
@ -25,6 +25,6 @@ class MessageSignature(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
2: ('signature', p.BytesType, None),
|
||||
1: ('address', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
2: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class NEMDecryptedMessage(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
payload: bytes = None,
|
||||
payload: bytes,
|
||||
) -> None:
|
||||
self.payload = payload
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('payload', p.BytesType, None),
|
||||
1: ('payload', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class NEMSignedTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
data: bytes = None,
|
||||
signature: bytes = None,
|
||||
data: bytes,
|
||||
signature: bytes,
|
||||
) -> None:
|
||||
self.data = data
|
||||
self.signature = signature
|
||||
@ -25,6 +25,6 @@ class NEMSignedTx(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('data', p.BytesType, None),
|
||||
2: ('signature', p.BytesType, None),
|
||||
1: ('data', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ class Ping(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
message: str = None,
|
||||
message: str = "",
|
||||
button_protection: bool = None,
|
||||
) -> None:
|
||||
self.message = message
|
||||
@ -25,6 +25,6 @@ class Ping(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('message', p.UnicodeType, None),
|
||||
1: ('message', p.UnicodeType, ""), # default=
|
||||
2: ('button_protection', p.BoolType, None),
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ class PublicKey(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
node: HDNodeType = None,
|
||||
xpub: str = None,
|
||||
node: HDNodeType,
|
||||
xpub: str,
|
||||
root_fingerprint: int = None,
|
||||
) -> None:
|
||||
self.node = node
|
||||
@ -29,7 +29,7 @@ class PublicKey(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('node', HDNodeType, None),
|
||||
2: ('xpub', p.UnicodeType, None),
|
||||
1: ('node', HDNodeType, p.FLAG_REQUIRED),
|
||||
2: ('xpub', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
3: ('root_fingerprint', p.UVarintType, None),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class RippleAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address: str = None,
|
||||
address: str,
|
||||
) -> None:
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
1: ('address', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -15,8 +15,8 @@ class RipplePayment(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
amount: int = None,
|
||||
destination: str = None,
|
||||
amount: int,
|
||||
destination: str,
|
||||
destination_tag: int = None,
|
||||
) -> None:
|
||||
self.amount = amount
|
||||
@ -26,7 +26,7 @@ class RipplePayment(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('amount', p.UVarintType, None),
|
||||
2: ('destination', p.UnicodeType, None),
|
||||
1: ('amount', p.UVarintType, p.FLAG_REQUIRED),
|
||||
2: ('destination', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
3: ('destination_tag', p.UVarintType, None),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class RippleSignedTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
signature: bytes = None,
|
||||
serialized_tx: bytes = None,
|
||||
signature: bytes,
|
||||
serialized_tx: bytes,
|
||||
) -> None:
|
||||
self.signature = signature
|
||||
self.serialized_tx = serialized_tx
|
||||
@ -25,6 +25,6 @@ class RippleSignedTx(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('signature', p.BytesType, None),
|
||||
2: ('serialized_tx', p.BytesType, None),
|
||||
1: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('serialized_tx', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -18,9 +18,9 @@ class SignIdentity(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
identity: IdentityType = None,
|
||||
challenge_hidden: bytes = None,
|
||||
challenge_visual: str = None,
|
||||
identity: IdentityType,
|
||||
challenge_hidden: bytes = b"",
|
||||
challenge_visual: str = "",
|
||||
ecdsa_curve_name: str = None,
|
||||
) -> None:
|
||||
self.identity = identity
|
||||
@ -31,8 +31,8 @@ class SignIdentity(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('identity', IdentityType, None),
|
||||
2: ('challenge_hidden', p.BytesType, None),
|
||||
3: ('challenge_visual', p.UnicodeType, None),
|
||||
1: ('identity', IdentityType, p.FLAG_REQUIRED),
|
||||
2: ('challenge_hidden', p.BytesType, b""), # default=
|
||||
3: ('challenge_visual', p.UnicodeType, ""), # default=
|
||||
4: ('ecdsa_curve_name', p.UnicodeType, None),
|
||||
}
|
||||
|
@ -16,18 +16,18 @@ class SignedIdentity(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
public_key: bytes,
|
||||
signature: bytes,
|
||||
address: str = None,
|
||||
public_key: bytes = None,
|
||||
signature: bytes = None,
|
||||
) -> None:
|
||||
self.address = address
|
||||
self.public_key = public_key
|
||||
self.signature = signature
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
2: ('public_key', p.BytesType, None),
|
||||
3: ('signature', p.BytesType, None),
|
||||
2: ('public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
3: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ class StellarAddress(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
address: str = None,
|
||||
address: str,
|
||||
) -> None:
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, None),
|
||||
1: ('address', p.UnicodeType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ class StellarAssetType(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
type: int = None,
|
||||
type: int,
|
||||
code: str = None,
|
||||
issuer: str = None,
|
||||
) -> None:
|
||||
@ -26,7 +26,7 @@ class StellarAssetType(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('type', p.UVarintType, None),
|
||||
1: ('type', p.UVarintType, p.FLAG_REQUIRED),
|
||||
2: ('code', p.UnicodeType, None),
|
||||
3: ('issuer', p.UnicodeType, None),
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ class StellarSignedTx(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
public_key: bytes = None,
|
||||
signature: bytes = None,
|
||||
public_key: bytes,
|
||||
signature: bytes,
|
||||
) -> None:
|
||||
self.public_key = public_key
|
||||
self.signature = signature
|
||||
@ -25,6 +25,6 @@ class StellarSignedTx(p.MessageType):
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('public_key', p.BytesType, None),
|
||||
2: ('signature', p.BytesType, None),
|
||||
1: ('public_key', p.BytesType, p.FLAG_REQUIRED),
|
||||
2: ('signature', p.BytesType, p.FLAG_REQUIRED),
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user