diff --git a/common/protob/messages-bitcoin.proto b/common/protob/messages-bitcoin.proto index 50ae0d6df..2b3ff3035 100644 --- a/common/protob/messages-bitcoin.proto +++ b/common/protob/messages-bitcoin.proto @@ -51,7 +51,6 @@ enum AmountUnit { MILLIBITCOIN = 1; // mBTC MICROBITCOIN = 2; // uBTC SATOSHI = 3; // sat - ML = 4; // Mintlayer } /** diff --git a/common/protob/messages-mintlayer.proto b/common/protob/messages-mintlayer.proto index d3d270227..e01c65d6b 100644 --- a/common/protob/messages-mintlayer.proto +++ b/common/protob/messages-mintlayer.proto @@ -53,15 +53,15 @@ message MintlayerPublicKey { } /** - * Request: Ask device to verify message + * Request: Ask device to sign a message * @start * @next Success * @next Failure */ -message MintlayerVerifySig { +message MintlayerSignMessage { repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node - required bytes signature = 2; // signature to verify - required bytes message = 3; // message to verify + required string address = 2; // destination address in Base58 encoding; script_type must be PAYTOADDRESS + required bytes message = 3; // message to verify } /** @@ -112,12 +112,19 @@ message MintlayerTxRequest { optional bytes tx_hash = 2; // tx_hash of requested transaction } /** + * Structure representing request details + */ + message MintlayerSignature { + required bytes signature = 1; // a single signature + optional uint32 multisig_idx = 2; // in case of multisig the index of the key + } + /** * Structure representing serialized data */ message MintlayerTxRequestSerializedType { - optional uint32 signature_index = 1; // 'signature' field contains signed input of this index - optional bytes signature = 2; // signature of the signature_index input - optional bytes serialized_tx = 3; // part of serialized and signed transaction + optional uint32 signature_index = 1; // 'signature' field contains signed input of this index + repeated MintlayerSignature signatures = 2; // signature of the signature_index input + optional bytes serialized_tx = 3; // part of serialized and signed transaction } } @@ -139,16 +146,24 @@ enum MintlayerUtxoType { BLOCK = 1; } +/** Data type for output value coins or token + * @embed + */ +message MintlayerAddressPath { + repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node + optional uint32 multisig_idx = 2; // in case of a multisig the key index +} + /** Data type for transaction input to be signed. * * @embed */ message MintlayerUtxoTxInput { - repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node + repeated MintlayerAddressPath address_n = 1; // BIP-32 path to derive the key from master node required string address = 2; // destination address in Base58 encoding; script_type must be PAYTOADDRESS required bytes prev_hash = 3; // hash of previous transaction output to spend by this input required uint32 prev_index = 4; // index of previous output to spend - required MintlayerUtxoType type = 5; // index of previous output to spend + required MintlayerUtxoType type = 5; // source type of the utxo (Transaction or BlockReward) optional uint32 sequence = 6 [default=0xffffffff]; // sequence required MintlayerOutputValue value = 7; // amount of previous transaction output } @@ -158,7 +173,7 @@ message MintlayerUtxoTxInput { * @embed */ message MintlayerAccountTxInput { - repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node + repeated MintlayerAddressPath address_n = 1; // BIP-32 path to derive the key from master node required string address = 2; // destination address in Base58 encoding; script_type must be PAYTOADDRESS optional uint32 sequence = 3 [default=0xffffffff]; // sequence required MintlayerOutputValue value = 4; // amount of previous transaction output @@ -171,7 +186,7 @@ message MintlayerAccountTxInput { * @embed */ message MintlayerAccountCommandTxInput { - repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node + repeated MintlayerAddressPath address_n = 1; // BIP-32 path to derive the key from master node required string address = 2; // destination address in Base58 encoding; script_type must be PAYTOADDRESS optional uint32 sequence = 3 [default=0xffffffff]; // sequence required uint64 nonce = 4; // incrementing account nonce @@ -257,8 +272,7 @@ message MintlayerOutputValue { */ message MintlayerTransferTxOutput { optional string address = 1; // destination address in Base58 encoding; script_type must be PAYTOADDRESS - repeated uint32 address_n = 2; // BIP-32 path to derive the destination (used for change addresses) - required MintlayerOutputValue value = 3; // amount to spend in atoms for coin or token + required MintlayerOutputValue value = 2; // amount to spend in atoms for coin or token } /** Data type for time lock of an output @@ -276,9 +290,8 @@ message MintlayerOutputTimeLock { */ message MintlayerLockThenTransferTxOutput { optional string address = 1; // destination address in Base58 encoding; script_type must be PAYTOADDRESS - repeated uint32 address_n = 2; // BIP-32 path to derive the destination (used for change addresses) - required MintlayerOutputValue value = 3; // amount to spend in atoms - required MintlayerOutputTimeLock lock = 4; // output lock + required MintlayerOutputValue value = 2; // amount to spend in atoms + required MintlayerOutputTimeLock lock = 3; // output lock } /** Data type for transaction output to be signed. diff --git a/common/protob/messages.proto b/common/protob/messages.proto index 15d5e4ed9..66eae5d2e 100644 --- a/common/protob/messages.proto +++ b/common/protob/messages.proto @@ -381,7 +381,7 @@ enum MessageType { MessageType_MintlayerAddress = 1001 [(wire_out) = true]; MessageType_MintlayerGetPublicKey = 1002 [(wire_in) = true]; MessageType_MintlayerPublicKey = 1003 [(wire_out) = true]; - MessageType_MintlayerVerifySig = 1004 [(wire_in) = true]; + MessageType_MintlayerSignMessage = 1004 [(wire_in) = true]; MessageType_MintlayerSignTx = 1005 [(wire_in) = true]; MessageType_MintlayerTxRequest = 1006 [(wire_out) = true]; MessageType_MintlayerTxAckUtxoInput = 1007 [(wire_in) = true]; diff --git a/core/src/all_modules.py b/core/src/all_modules.py index 93fd92ccb..781d76ddf 100644 --- a/core/src/all_modules.py +++ b/core/src/all_modules.py @@ -549,6 +549,8 @@ import apps.mintlayer.get_address apps.mintlayer.get_public_key import apps.mintlayer.get_public_key + apps.mintlayer.sign_message + import apps.mintlayer.sign_message apps.mintlayer.sign_tx import apps.mintlayer.sign_tx apps.mintlayer.sign_tx.helpers @@ -559,8 +561,6 @@ import apps.mintlayer.sign_tx.progress apps.mintlayer.sign_tx.signer import apps.mintlayer.sign_tx.signer - apps.mintlayer.verify_sig - import apps.mintlayer.verify_sig apps.mintlayer.writers import apps.mintlayer.writers apps.monero diff --git a/core/src/apps/mintlayer/sign_message.py b/core/src/apps/mintlayer/sign_message.py new file mode 100644 index 000000000..55da410ef --- /dev/null +++ b/core/src/apps/mintlayer/sign_message.py @@ -0,0 +1,57 @@ +from typing import TYPE_CHECKING +from apps.common.keychain import auto_keychain + +from trezor.crypto import hashlib + +if TYPE_CHECKING: + from trezor.enums import InputScriptType + from trezor.messages import MessageSignature, MintlayerSignMessage + + from apps.common.keychain import Keychain + + +@auto_keychain(__name__) +async def sign_message(msg: MintlayerSignMessage, keychain: Keychain) -> MessageSignature: + from trezor import TR, utils + from trezor.crypto.curve import bip340 + from trezor.enums import InputScriptType + from trezor.messages import Success + from trezor.ui.layouts import confirm_signverify, show_success + from trezor.wire import ProcessError + from trezor.messages import MessageSignature + + from apps.common import coins + from apps.common.signverify import decode_message, message_digest + + message = msg.message + address_n = msg.address_n + MESSAGE_MAGIC_PREFIX = b"===MINTLAYER MESSAGE BEGIN===\n" + MESSAGE_MAGIC_SUFFIX = b"\n===MINTLAYER MESSAGE END===" + + await confirm_signverify( + decode_message(message), + msg.address, + verify=False, + account=None, + path=None, + chunkify=False, + ) + node = keychain.derive(address_n) + pubkey = bip340.publickey(node.private_key()) + + msg2 = MESSAGE_MAGIC_PREFIX + message + MESSAGE_MAGIC_SUFFIX + digest = hashlib.blake2b(msg2).digest()[:32] + digest = hashlib.blake2b(digest).digest()[:32] + print(f"digest {digest}") + + other_sig = bip340.sign(node.private_key(), digest) + print(f"other sig: {len(other_sig)} {other_sig}") + + correct = bip340.verify(pubkey, other_sig, digest) + print(f"verify self: {correct}") + + correct = bip340.verify_publickey(pubkey) + print(f"verify pk: {correct}") + + return MessageSignature(signature=other_sig, address="") + diff --git a/core/src/apps/mintlayer/sign_tx/helpers.py b/core/src/apps/mintlayer/sign_tx/helpers.py index 84cf3de02..2e8d9d823 100644 --- a/core/src/apps/mintlayer/sign_tx/helpers.py +++ b/core/src/apps/mintlayer/sign_tx/helpers.py @@ -497,14 +497,10 @@ def _sanitize_tx_output(txo: MintlayerTxOutput) -> MintlayerTxOutput: from trezor.wire import DataError # local_cache_global if txo.transfer: - address_n = txo.transfer.address_n # local_cache_attribute - if txo.transfer.value is None: raise DataError("Missing amount field.") - if address_n and txo.transfer.address: - raise DataError("Both address and address_n provided.") - if not address_n and not txo.transfer.address: + if not txo.transfer.address: raise DataError("Missing address") else: # TODO: senitize other tx outputs diff --git a/core/src/apps/mintlayer/sign_tx/signer.py b/core/src/apps/mintlayer/sign_tx/signer.py index 04d33c376..21d4f30ae 100644 --- a/core/src/apps/mintlayer/sign_tx/signer.py +++ b/core/src/apps/mintlayer/sign_tx/signer.py @@ -1,6 +1,6 @@ from apps.common.coininfo import by_name from trezor.crypto.bech32 import bech32_encode, bech32_decode, convertbits, reverse_convertbits, decode_address_to_bytes, Encoding -from trezor.messages import MintlayerSignTx, MintlayerTxRequestSerializedType, MintlayerTxInput, MintlayerTxOutput +from trezor.messages import MintlayerSignTx, MintlayerTxRequestSerializedType, MintlayerSignature, MintlayerTxInput, MintlayerTxOutput from micropython import const from typing import TYPE_CHECKING @@ -36,7 +36,7 @@ _SERIALIZED_TX_BUFFER = empty_bytearray(_MAX_SERIALIZED_CHUNK_SIZE) class TxUtxoInput: - def __init__(self, input: MintlayerTxInput, utxo: MintlayerTxOutput | None, node: bip32.HDNode | None): + def __init__(self, input: MintlayerTxInput, utxo: MintlayerTxOutput | None, node: List[Tuple[bip32.HDNode, int | None]]): self.input = input self.utxo = utxo self.node = node @@ -49,7 +49,7 @@ def __init__(self, tx: MintlayerSignTx, inputs: List[TxUtxoInput], outputs: List self.outputs = outputs - def add_input(self, txi: MintlayerTxInput, txo: MintlayerTxOutput | None, node: bip32.HDNode | None): + def add_input(self, txi: MintlayerTxInput, txo: MintlayerTxOutput | None, node: List[Tuple[bip32.HDNode, int | None]]): self.inputs.append(TxUtxoInput(input= txi, utxo= txo, node= node)) def add_output(self, txo: MintlayerTxOutput): @@ -183,25 +183,22 @@ async def step1_process_inputs(self) -> None: if txi.utxo: # get the utxo txo = await helpers.request_tx_output(self.tx_req, txi.utxo.prev_index, txi.utxo.prev_hash) - if txi.utxo.address_n: - node = self.keychain.derive(txi.utxo.address_n) - else: - node = None + node = [] + for address in txi.utxo.address_n: + node.append((self.keychain.derive(address.address_n), address.multisig_idx)) self.tx_info.add_input(txi, txo, node) elif txi.account: # get the utxo - if txi.account.address_n: - node = self.keychain.derive(txi.account.address_n) - else: - node = None + node = [] + for address in txi.account.address_n: + node.append((self.keychain.derive(address.address_n), address.multisig_idx)) self.tx_info.add_input(txi, None, node) elif txi.account_command: # get the utxo - if txi.account_command.address_n: - node = self.keychain.derive(txi.account_command.address_n) - else: - node = None + node = [] + for address in txi.account_command.address_n: + node.append((self.keychain.derive(address.address_n), address.multisig_idx)) self.tx_info.add_input(txi, None, node) else: # TODO: handle other input types @@ -236,27 +233,10 @@ async def step4_serialize_inputs(self) -> Tuple[List[bytes], List[bytes]]: x = inp.input.utxo encoded_inp = mintlayer_utils.encode_utxo_input(x.prev_hash, x.prev_index, int(x.type)) encoded_inputs.append(encoded_inp) - if inp.node: - pk = bytes([0]) + inp.node.public_key() - print("pk", pk) - hrp = 'mptc' - hrp = 'mtc' - - pkh = blake2b(pk).digest()[:20] - - data = convertbits(bytes([1])+pkh, 8, 5) - address = bech32_encode(hrp, data, Encoding.BECH32M) - - data = decode_address_to_bytes(address) - - print(f'addr: {address} bytes: {data}') - encoded_inp_utxo = self.serialize_output(inp.utxo) - encoded_input_utxos.append(b'\x01' + encoded_inp_utxo) - else: - data = decode_address_to_bytes(x.address) + data = decode_address_to_bytes(x.address) - encoded_inp_utxo = self.serialize_output(inp.utxo) - encoded_input_utxos.append(b'\x01' + encoded_inp_utxo) + encoded_inp_utxo = self.serialize_output(inp.utxo) + encoded_input_utxos.append(b'\x01' + encoded_inp_utxo) elif inp.input.account: x = inp.input.account encoded_inp = mintlayer_utils.encode_account_spending_input(x.nonce, x.delegation_id, x.value.amount) @@ -366,55 +346,54 @@ async def step5_serialize_outputs(self) -> List[bytes]: return encoded_outputs - async def step6_sign_inputs(self, encoded_inputs: List[bytes], encoded_input_utxos: List[bytes], encoded_outputs: List[bytes]) -> List[bytes | None]: + async def step6_sign_inputs(self, encoded_inputs: List[bytes], encoded_input_utxos: List[bytes], encoded_outputs: List[bytes]) -> List[List[Tuple[bytes, int | None]]]: from trezor.utils import HashWriter signatures = [] for i in range(self.tx_info.tx.inputs_count): - node = self.tx_info.inputs[i].node - if node is None: - signatures.append(None) - continue - writer = HashWriter(blake2b()) - # mode - writer.extend(b'\x01') - - # version - writer.extend(b'\x01') - # flags - writer.extend(bytes([0]*16)) - - - writer.extend(len(encoded_inputs).to_bytes(4, 'little')) - print(f'encoded inputs {encoded_inputs}') - for inp in encoded_inputs: - writer.extend(inp) - - writer.extend(len(encoded_input_utxos).to_bytes(4, 'little')) - print(encoded_input_utxos) - for utxo in encoded_input_utxos: - writer.extend(utxo) - - encoded_len = mintlayer_utils.encode_compact_length(len(encoded_outputs)) - print(f'compact len {encoded_len}') - print(f'encoded outputs {encoded_outputs}') - writer.extend(encoded_len) - for out in encoded_outputs: - writer.extend(out) - - hash = writer.get_digest()[:32] - private_key = node.private_key() - digest = blake2b(hash).digest()[:32] - print(f"hash {list(hash)}, digest {list(digest)}") - - sig = bip340.sign(private_key, digest) - print("got a signature", sig) - signatures.append(sig) + sigs = [] + for node, multisig_idx in self.tx_info.inputs[i].node: + writer = HashWriter(blake2b()) + # mode + writer.extend(b'\x01') + + # version + writer.extend(b'\x01') + # flags + writer.extend(bytes([0]*16)) + + + writer.extend(len(encoded_inputs).to_bytes(4, 'little')) + print(f'encoded inputs {encoded_inputs}') + for inp in encoded_inputs: + writer.extend(inp) + + writer.extend(len(encoded_input_utxos).to_bytes(4, 'little')) + print(encoded_input_utxos) + for utxo in encoded_input_utxos: + writer.extend(utxo) + + encoded_len = mintlayer_utils.encode_compact_length(len(encoded_outputs)) + print(f'compact len {encoded_len}') + print(f'encoded outputs {encoded_outputs}') + writer.extend(encoded_len) + for out in encoded_outputs: + writer.extend(out) + + hash = writer.get_digest()[:32] + private_key = node.private_key() + digest = blake2b(hash).digest()[:32] + print(f"hash {list(hash)}, digest {list(digest)}") + + sig = bip340.sign(private_key, digest) + print("got a signature", sig) + sigs.append((sig, multisig_idx)) + signatures.append(sigs) return signatures - async def step7_finish(self, signatures: List[bytes | None]) -> None: - sigs = [MintlayerTxRequestSerializedType(signature_index=i, signature=sig) for i, sig in enumerate(signatures)] + async def step7_finish(self, signatures: List[List[Tuple[bytes, int | None]]]) -> None: + sigs = [MintlayerTxRequestSerializedType(signature_index=i, signatures=[MintlayerSignature(signature=s[0], multisig_idx=s[1]) for s in sigs]) for i, sigs in enumerate(signatures)] self.tx_req.serialized = sigs # if self.serialize: # self.write_tx_footer(self.serialized_tx, self.tx_info.tx) diff --git a/core/src/apps/mintlayer/verify_sig.py b/core/src/apps/mintlayer/verify_sig.py deleted file mode 100644 index c9ec76f3c..000000000 --- a/core/src/apps/mintlayer/verify_sig.py +++ /dev/null @@ -1,70 +0,0 @@ -from typing import TYPE_CHECKING -from apps.common.keychain import auto_keychain - -from trezor.crypto import hashlib - -if TYPE_CHECKING: - from trezor.enums import InputScriptType - from trezor.messages import Success, MintlayerVerifySig - - from apps.common.keychain import Keychain - - -@auto_keychain(__name__) -async def verify_sig(msg: MintlayerVerifySig, keychain: Keychain) -> Success: - from trezor import TR, utils - from trezor.crypto.curve import bip340 - from trezor.enums import InputScriptType - from trezor.messages import Success - from trezor.ui.layouts import confirm_signverify, show_success - from trezor.wire import ProcessError - - from apps.common import coins - from apps.common.signverify import decode_message, message_digest - - message = msg.message - address_n = msg.address_n - signature = msg.signature - - node = keychain.derive(address_n) - pubkey = node.public_key() - - # digest = message_digest(coin, message) - digest = message - msg2 = bytes([141, 246, 62, 11, 137, 75, 1, 173, 157, 218, 61, 108, 3, 21, 251, 144, 237, 220, 224, 196, 81, 17, 81, 241, 69, 237, 70, 214, 41, 159, 45, 165]) - digest2 = hashlib.blake2b(msg2).digest() - print(f"digest: {digest}") - print(f"digest2: {digest2}") - - other_sig = bip340.sign(node.private_key(), digest) - print(f"other sig: {len(other_sig)} {other_sig}") - print(f"ML sig: {len(signature)} {signature}") - - correct = bip340.verify(pubkey, signature, digest) - print(f"verify ML: {correct}") - - correct = bip340.verify(pubkey, other_sig, digest) - print(f"verify self: {correct}") - - correct = bip340.verify_publickey(pubkey) - print(f"verify pk: {correct}") - - # ============= other pubkey - print(f"pk: {len(pubkey)} {pubkey}") - pubkey = bip340.publickey(node.private_key()) - print(f"pk: {len(pubkey)} {pubkey}") - - correct = bip340.verify_publickey(pubkey) - print(f"verify pk: {correct}") - - correct = bip340.verify(pubkey, signature, digest) - print(f"verify ML: {correct}") - - correct = bip340.verify(pubkey, other_sig, digest) - print(f"verify self: {correct}") - - # TODO: if not correct show error - - await show_success("verify_message", TR.bitcoin__valid_signature) - return Success(message="Message verified") - diff --git a/core/src/apps/workflow_handlers.py b/core/src/apps/workflow_handlers.py index 89c33a596..459155c8a 100644 --- a/core/src/apps/workflow_handlers.py +++ b/core/src/apps/workflow_handlers.py @@ -206,8 +206,8 @@ def _find_message_handler_module(msg_type: int) -> str: if msg_type == MessageType.MintlayerGetPublicKey: print("returning app mintlayer get public key") return "apps.mintlayer.get_public_key" - if msg_type == MessageType.MintlayerVerifySig: - return "apps.mintlayer.verify_sig" + if msg_type == MessageType.MintlayerSignMessage: + return "apps.mintlayer.sign_message" if msg_type == MessageType.MintlayerSignTx: return "apps.mintlayer.sign_tx" diff --git a/core/src/trezor/enums/AmountUnit.py b/core/src/trezor/enums/AmountUnit.py index 9cd729800..efac9ed76 100644 --- a/core/src/trezor/enums/AmountUnit.py +++ b/core/src/trezor/enums/AmountUnit.py @@ -6,4 +6,3 @@ MILLIBITCOIN = 1 MICROBITCOIN = 2 SATOSHI = 3 -ML = 4 diff --git a/core/src/trezor/enums/MessageType.py b/core/src/trezor/enums/MessageType.py index 6d74d05a7..3af348768 100644 --- a/core/src/trezor/enums/MessageType.py +++ b/core/src/trezor/enums/MessageType.py @@ -250,7 +250,7 @@ MintlayerAddress = 1001 MintlayerGetPublicKey = 1002 MintlayerPublicKey = 1003 - MintlayerVerifySig = 1004 + MintlayerSignMessage = 1004 MintlayerSignTx = 1005 MintlayerTxRequest = 1006 MintlayerTxAckUtxoInput = 1007 diff --git a/core/src/trezor/enums/__init__.py b/core/src/trezor/enums/__init__.py index da49a0f7d..ed6bc9455 100644 --- a/core/src/trezor/enums/__init__.py +++ b/core/src/trezor/enums/__init__.py @@ -268,7 +268,7 @@ class MessageType(IntEnum): MintlayerAddress = 1001 MintlayerGetPublicKey = 1002 MintlayerPublicKey = 1003 - MintlayerVerifySig = 1004 + MintlayerSignMessage = 1004 MintlayerSignTx = 1005 MintlayerTxRequest = 1006 MintlayerTxAckUtxoInput = 1007 @@ -346,7 +346,6 @@ class AmountUnit(IntEnum): MILLIBITCOIN = 1 MICROBITCOIN = 2 SATOSHI = 3 - ML = 4 class RequestType(IntEnum): TXINPUT = 0 diff --git a/core/src/trezor/messages.py b/core/src/trezor/messages.py index 35c207a81..bc0c1b198 100644 --- a/core/src/trezor/messages.py +++ b/core/src/trezor/messages.py @@ -4062,22 +4062,22 @@ def __init__( def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerPublicKey"]: return isinstance(msg, cls) - class MintlayerVerifySig(protobuf.MessageType): + class MintlayerSignMessage(protobuf.MessageType): address_n: "list[int]" - signature: "bytes" + address: "str" message: "bytes" def __init__( self, *, - signature: "bytes", + address: "str", message: "bytes", address_n: "list[int] | None" = None, ) -> None: pass @classmethod - def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerVerifySig"]: + def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerSignMessage"]: return isinstance(msg, cls) class MintlayerSignTx(protobuf.MessageType): @@ -4138,8 +4138,24 @@ def __init__( def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerTxInput"]: return isinstance(msg, cls) - class MintlayerUtxoTxInput(protobuf.MessageType): + class MintlayerAddressPath(protobuf.MessageType): address_n: "list[int]" + multisig_idx: "int | None" + + def __init__( + self, + *, + address_n: "list[int] | None" = None, + multisig_idx: "int | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerAddressPath"]: + return isinstance(msg, cls) + + class MintlayerUtxoTxInput(protobuf.MessageType): + address_n: "list[MintlayerAddressPath]" address: "str" prev_hash: "bytes" prev_index: "int" @@ -4155,7 +4171,7 @@ def __init__( prev_index: "int", type: "MintlayerUtxoType", value: "MintlayerOutputValue", - address_n: "list[int] | None" = None, + address_n: "list[MintlayerAddressPath] | None" = None, sequence: "int | None" = None, ) -> None: pass @@ -4165,7 +4181,7 @@ def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerUtxoTxInput"]: return isinstance(msg, cls) class MintlayerAccountTxInput(protobuf.MessageType): - address_n: "list[int]" + address_n: "list[MintlayerAddressPath]" address: "str" sequence: "int" value: "MintlayerOutputValue" @@ -4179,7 +4195,7 @@ def __init__( value: "MintlayerOutputValue", nonce: "int", delegation_id: "bytes", - address_n: "list[int] | None" = None, + address_n: "list[MintlayerAddressPath] | None" = None, sequence: "int | None" = None, ) -> None: pass @@ -4189,7 +4205,7 @@ def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerAccountTxInput"]: return isinstance(msg, cls) class MintlayerAccountCommandTxInput(protobuf.MessageType): - address_n: "list[int]" + address_n: "list[MintlayerAddressPath]" address: "str" sequence: "int" nonce: "int" @@ -4205,7 +4221,7 @@ def __init__( *, address: "str", nonce: "int", - address_n: "list[int] | None" = None, + address_n: "list[MintlayerAddressPath] | None" = None, sequence: "int | None" = None, mint: "MintlayerMintTokens | None" = None, unmint: "MintlayerUnmintTokens | None" = None, @@ -4360,14 +4376,12 @@ def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerOutputValue"]: class MintlayerTransferTxOutput(protobuf.MessageType): address: "str | None" - address_n: "list[int]" value: "MintlayerOutputValue" def __init__( self, *, value: "MintlayerOutputValue", - address_n: "list[int] | None" = None, address: "str | None" = None, ) -> None: pass @@ -4398,7 +4412,6 @@ def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerOutputTimeLock"]: class MintlayerLockThenTransferTxOutput(protobuf.MessageType): address: "str | None" - address_n: "list[int]" value: "MintlayerOutputValue" lock: "MintlayerOutputTimeLock" @@ -4407,7 +4420,6 @@ def __init__( *, value: "MintlayerOutputValue", lock: "MintlayerOutputTimeLock", - address_n: "list[int] | None" = None, address: "str | None" = None, ) -> None: pass @@ -4682,16 +4694,32 @@ def __init__( def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerTxRequestDetailsType"]: return isinstance(msg, cls) + class MintlayerSignature(protobuf.MessageType): + signature: "bytes" + multisig_idx: "int | None" + + def __init__( + self, + *, + signature: "bytes", + multisig_idx: "int | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["MintlayerSignature"]: + return isinstance(msg, cls) + class MintlayerTxRequestSerializedType(protobuf.MessageType): signature_index: "int | None" - signature: "bytes | None" + signatures: "list[MintlayerSignature]" serialized_tx: "bytes | None" def __init__( self, *, + signatures: "list[MintlayerSignature] | None" = None, signature_index: "int | None" = None, - signature: "bytes | None" = None, serialized_tx: "bytes | None" = None, ) -> None: pass diff --git a/python/src/trezorlib/messages.py b/python/src/trezorlib/messages.py index 9dbd6d38f..b5a7c80d3 100644 --- a/python/src/trezorlib/messages.py +++ b/python/src/trezorlib/messages.py @@ -276,7 +276,7 @@ class MessageType(IntEnum): MintlayerAddress = 1001 MintlayerGetPublicKey = 1002 MintlayerPublicKey = 1003 - MintlayerVerifySig = 1004 + MintlayerSignMessage = 1004 MintlayerSignTx = 1005 MintlayerTxRequest = 1006 MintlayerTxAckUtxoInput = 1007 @@ -361,7 +361,6 @@ class AmountUnit(IntEnum): MILLIBITCOIN = 1 MICROBITCOIN = 2 SATOSHI = 3 - ML = 4 class RequestType(IntEnum): @@ -5402,23 +5401,23 @@ def __init__( self.chain_code = chain_code -class MintlayerVerifySig(protobuf.MessageType): +class MintlayerSignMessage(protobuf.MessageType): MESSAGE_WIRE_TYPE = 1004 FIELDS = { 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None), - 2: protobuf.Field("signature", "bytes", repeated=False, required=True), + 2: protobuf.Field("address", "string", repeated=False, required=True), 3: protobuf.Field("message", "bytes", repeated=False, required=True), } def __init__( self, *, - signature: "bytes", + address: "str", message: "bytes", address_n: Optional[Sequence["int"]] = None, ) -> None: self.address_n: Sequence["int"] = address_n if address_n is not None else [] - self.signature = signature + self.address = address self.message = message @@ -5488,10 +5487,27 @@ def __init__( self.account_command = account_command -class MintlayerUtxoTxInput(protobuf.MessageType): +class MintlayerAddressPath(protobuf.MessageType): MESSAGE_WIRE_TYPE = None FIELDS = { 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None), + 2: protobuf.Field("multisig_idx", "uint32", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + address_n: Optional[Sequence["int"]] = None, + multisig_idx: Optional["int"] = None, + ) -> None: + self.address_n: Sequence["int"] = address_n if address_n is not None else [] + self.multisig_idx = multisig_idx + + +class MintlayerUtxoTxInput(protobuf.MessageType): + MESSAGE_WIRE_TYPE = None + FIELDS = { + 1: protobuf.Field("address_n", "MintlayerAddressPath", repeated=True, required=False, default=None), 2: protobuf.Field("address", "string", repeated=False, required=True), 3: protobuf.Field("prev_hash", "bytes", repeated=False, required=True), 4: protobuf.Field("prev_index", "uint32", repeated=False, required=True), @@ -5508,10 +5524,10 @@ def __init__( prev_index: "int", type: "MintlayerUtxoType", value: "MintlayerOutputValue", - address_n: Optional[Sequence["int"]] = None, + address_n: Optional[Sequence["MintlayerAddressPath"]] = None, sequence: Optional["int"] = 4294967295, ) -> None: - self.address_n: Sequence["int"] = address_n if address_n is not None else [] + self.address_n: Sequence["MintlayerAddressPath"] = address_n if address_n is not None else [] self.address = address self.prev_hash = prev_hash self.prev_index = prev_index @@ -5523,7 +5539,7 @@ def __init__( class MintlayerAccountTxInput(protobuf.MessageType): MESSAGE_WIRE_TYPE = None FIELDS = { - 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None), + 1: protobuf.Field("address_n", "MintlayerAddressPath", repeated=True, required=False, default=None), 2: protobuf.Field("address", "string", repeated=False, required=True), 3: protobuf.Field("sequence", "uint32", repeated=False, required=False, default=4294967295), 4: protobuf.Field("value", "MintlayerOutputValue", repeated=False, required=True), @@ -5538,10 +5554,10 @@ def __init__( value: "MintlayerOutputValue", nonce: "int", delegation_id: "bytes", - address_n: Optional[Sequence["int"]] = None, + address_n: Optional[Sequence["MintlayerAddressPath"]] = None, sequence: Optional["int"] = 4294967295, ) -> None: - self.address_n: Sequence["int"] = address_n if address_n is not None else [] + self.address_n: Sequence["MintlayerAddressPath"] = address_n if address_n is not None else [] self.address = address self.value = value self.nonce = nonce @@ -5552,7 +5568,7 @@ def __init__( class MintlayerAccountCommandTxInput(protobuf.MessageType): MESSAGE_WIRE_TYPE = None FIELDS = { - 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None), + 1: protobuf.Field("address_n", "MintlayerAddressPath", repeated=True, required=False, default=None), 2: protobuf.Field("address", "string", repeated=False, required=True), 3: protobuf.Field("sequence", "uint32", repeated=False, required=False, default=4294967295), 4: protobuf.Field("nonce", "uint64", repeated=False, required=True), @@ -5569,7 +5585,7 @@ def __init__( *, address: "str", nonce: "int", - address_n: Optional[Sequence["int"]] = None, + address_n: Optional[Sequence["MintlayerAddressPath"]] = None, sequence: Optional["int"] = 4294967295, mint: Optional["MintlayerMintTokens"] = None, unmint: Optional["MintlayerUnmintTokens"] = None, @@ -5578,7 +5594,7 @@ def __init__( unfreeze_token: Optional["MintlayerUnfreezeToken"] = None, change_token_authority: Optional["MintlayerChangeTokenAuhtority"] = None, ) -> None: - self.address_n: Sequence["int"] = address_n if address_n is not None else [] + self.address_n: Sequence["MintlayerAddressPath"] = address_n if address_n is not None else [] self.address = address self.nonce = nonce self.sequence = sequence @@ -5745,18 +5761,15 @@ class MintlayerTransferTxOutput(protobuf.MessageType): MESSAGE_WIRE_TYPE = None FIELDS = { 1: protobuf.Field("address", "string", repeated=False, required=False, default=None), - 2: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None), - 3: protobuf.Field("value", "MintlayerOutputValue", repeated=False, required=True), + 2: protobuf.Field("value", "MintlayerOutputValue", repeated=False, required=True), } def __init__( self, *, value: "MintlayerOutputValue", - address_n: Optional[Sequence["int"]] = None, address: Optional["str"] = None, ) -> None: - self.address_n: Sequence["int"] = address_n if address_n is not None else [] self.value = value self.address = address @@ -5788,9 +5801,8 @@ class MintlayerLockThenTransferTxOutput(protobuf.MessageType): MESSAGE_WIRE_TYPE = None FIELDS = { 1: protobuf.Field("address", "string", repeated=False, required=False, default=None), - 2: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None), - 3: protobuf.Field("value", "MintlayerOutputValue", repeated=False, required=True), - 4: protobuf.Field("lock", "MintlayerOutputTimeLock", repeated=False, required=True), + 2: protobuf.Field("value", "MintlayerOutputValue", repeated=False, required=True), + 3: protobuf.Field("lock", "MintlayerOutputTimeLock", repeated=False, required=True), } def __init__( @@ -5798,10 +5810,8 @@ def __init__( *, value: "MintlayerOutputValue", lock: "MintlayerOutputTimeLock", - address_n: Optional[Sequence["int"]] = None, address: Optional["str"] = None, ) -> None: - self.address_n: Sequence["int"] = address_n if address_n is not None else [] self.value = value self.lock = lock self.address = address @@ -6101,23 +6111,40 @@ def __init__( self.tx_hash = tx_hash +class MintlayerSignature(protobuf.MessageType): + MESSAGE_WIRE_TYPE = None + FIELDS = { + 1: protobuf.Field("signature", "bytes", repeated=False, required=True), + 2: protobuf.Field("multisig_idx", "uint32", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + signature: "bytes", + multisig_idx: Optional["int"] = None, + ) -> None: + self.signature = signature + self.multisig_idx = multisig_idx + + class MintlayerTxRequestSerializedType(protobuf.MessageType): MESSAGE_WIRE_TYPE = None FIELDS = { 1: protobuf.Field("signature_index", "uint32", repeated=False, required=False, default=None), - 2: protobuf.Field("signature", "bytes", repeated=False, required=False, default=None), + 2: protobuf.Field("signatures", "MintlayerSignature", repeated=True, required=False, default=None), 3: protobuf.Field("serialized_tx", "bytes", repeated=False, required=False, default=None), } def __init__( self, *, + signatures: Optional[Sequence["MintlayerSignature"]] = None, signature_index: Optional["int"] = None, - signature: Optional["bytes"] = None, serialized_tx: Optional["bytes"] = None, ) -> None: + self.signatures: Sequence["MintlayerSignature"] = signatures if signatures is not None else [] self.signature_index = signature_index - self.signature = signature self.serialized_tx = serialized_tx diff --git a/python/src/trezorlib/mintlayer.py b/python/src/trezorlib/mintlayer.py index c8e73aaab..a37153f7d 100644 --- a/python/src/trezorlib/mintlayer.py +++ b/python/src/trezorlib/mintlayer.py @@ -49,26 +49,29 @@ def get_public_key( messages.MintlayerGetPublicKey(address_n=address_n, show_display=show_display) ) -def verify_sig( +def sign_message( client: "TrezorClient", address_n: "Address", - signature: bytes, message: bytes, -) -> bool: +) -> bytes: try: resp = client.call( - messages.MintlayerVerifySig( + messages.MintlayerSignMessage( address_n=address_n, - signature=signature, message=message ) ) + + if isinstance(resp, messages.MessageSignature): + return resp.signature + + return b'' # TODO: add exceptions like btc # except exceptions.TrezorFailure: except: print("got exception in verify sig Mintlayer") - return False - return isinstance(resp, messages.Success) + return b'' + Input = messages.MintlayerTxInput Output = messages.MintlayerTxOutput diff --git a/rust/trezor-client/src/client/mintlayer.rs b/rust/trezor-client/src/client/mintlayer.rs index a2154e7a4..152e3c080 100644 --- a/rust/trezor-client/src/client/mintlayer.rs +++ b/rust/trezor-client/src/client/mintlayer.rs @@ -18,16 +18,24 @@ use crate::{ /// A chain code #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct ChainCode(pub [u8; 32]); -// impl_array_newtype!(ChainCode, u8, 32); -// impl_bytes_newtype!(ChainCode, 32); pub struct XPub { - /// Public key pub public_key: secp256k1::PublicKey, - /// Chain code pub chain_code: ChainCode, } +#[derive(Debug)] +pub struct MintlayerSignature { + pub signature: Vec, + pub multisig_idx: Option, +} + +impl MintlayerSignature { + fn new(signature: Vec, multisig_idx: Option) -> Self { + Self { signature, multisig_idx } + } +} + impl Trezor { // Mintlayer pub fn mintlayer_get_public_key( @@ -49,29 +57,43 @@ impl Trezor { ) } + pub fn mintlayer_sign_message( + &mut self, + path: Vec, + address: String, + message: Vec, + ) -> Result> { + let mut req = protos::MintlayerSignMessage::new(); + req.address_n = path; + req.set_message(message); + req.set_address(address); + let msg = self.call::<_, _, protos::MessageSignature>( + req, + Box::new(|_, m| Ok(m.signature().to_vec())), + )?; + msg.button_request()?.ack()?.button_request()?.ack()?.ok() + } + pub fn mintlayer_sign_tx( &mut self, inputs: Vec, outputs: Vec, utxos: BTreeMap<[u8; 32], BTreeMap>, - ) -> Result>>> { + ) -> Result>> { let mut req = protos::MintlayerSignTx::new(); req.set_version(1); req.set_inputs_count(inputs.len() as u32); req.set_outputs_count(outputs.len() as u32); - eprintln!("sending tx request"); let mut msg = self.call::<_, _, protos::MintlayerTxRequest>(req, Box::new(|_, m| Ok(m)))?; let mut should_ack_button = 0; loop { if should_ack_button > 0 { - eprintln!("waiting for button to sending button ack"); msg = msg.button_request()?.ack()?; should_ack_button -= 1; continue; } - eprintln!("waiting for ok msg"); let response = msg.ok()?; match response.request_type() { MintlayerRequestType::TXINPUT => { @@ -81,7 +103,6 @@ impl Trezor { ); let mut req2 = MintlayerTxAckUtxoInput::new(); req2.tx = MessageField::some(req); - eprintln!("sending tx input ack {req2:?}"); msg = self .call::<_, _, protos::MintlayerTxRequest>(req2, Box::new(|_, m| Ok(m)))?; } @@ -97,15 +118,12 @@ impl Trezor { .get(&tx_id) .and_then(|tx| tx.get(&response.details.request_index())); req.output = MessageField::from_option(out.cloned()); - eprintln!("sending tx input output utxo"); } else { req.output = MessageField::from_option( outputs.get(response.details.request_index() as usize).cloned(), ); - eprintln!("sending tx output {req:?}"); should_ack_button += 2; if response.details.request_index() as usize == outputs.len() - 1 { - eprintln!("last output will wait for one more ack"); should_ack_button += 1; } } @@ -121,7 +139,14 @@ impl Trezor { return Ok(response .serialized .iter() - .map(|s| Some(s.signature().to_vec())) + .map(|s| { + s.signatures + .iter() + .map(|s| { + MintlayerSignature::new(s.signature().to_vec(), s.multisig_idx) + }) + .collect() + }) .collect()) } } diff --git a/rust/trezor-client/src/messages/generated.rs b/rust/trezor-client/src/messages/generated.rs index 83b12bf65..6bc61176f 100644 --- a/rust/trezor-client/src/messages/generated.rs +++ b/rust/trezor-client/src/messages/generated.rs @@ -189,7 +189,7 @@ trezor_message_impl! { MintlayerAddress => MessageType_MintlayerAddress, MintlayerGetPublicKey => MessageType_MintlayerGetPublicKey, MintlayerPublicKey => MessageType_MintlayerPublicKey, - MintlayerVerifySig => MessageType_MintlayerVerifySig, + MintlayerSignMessage => MessageType_MintlayerSignMessage, MintlayerSignTx => MessageType_MintlayerSignTx, MintlayerTxRequest => MessageType_MintlayerTxRequest, MintlayerTxAckUtxoInput => MessageType_MintlayerTxAckUtxoInput, diff --git a/rust/trezor-client/src/protos/generated/messages.rs b/rust/trezor-client/src/protos/generated/messages.rs index 4ce75c2df..f28b357c0 100644 --- a/rust/trezor-client/src/protos/generated/messages.rs +++ b/rust/trezor-client/src/protos/generated/messages.rs @@ -522,8 +522,8 @@ pub enum MessageType { MessageType_MintlayerGetPublicKey = 1002, // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_MintlayerPublicKey) MessageType_MintlayerPublicKey = 1003, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_MintlayerVerifySig) - MessageType_MintlayerVerifySig = 1004, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_MintlayerSignMessage) + MessageType_MintlayerSignMessage = 1004, // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_MintlayerSignTx) MessageType_MintlayerSignTx = 1005, // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_MintlayerTxRequest) @@ -790,7 +790,7 @@ impl ::protobuf::Enum for MessageType { 1001 => ::std::option::Option::Some(MessageType::MessageType_MintlayerAddress), 1002 => ::std::option::Option::Some(MessageType::MessageType_MintlayerGetPublicKey), 1003 => ::std::option::Option::Some(MessageType::MessageType_MintlayerPublicKey), - 1004 => ::std::option::Option::Some(MessageType::MessageType_MintlayerVerifySig), + 1004 => ::std::option::Option::Some(MessageType::MessageType_MintlayerSignMessage), 1005 => ::std::option::Option::Some(MessageType::MessageType_MintlayerSignTx), 1006 => ::std::option::Option::Some(MessageType::MessageType_MintlayerTxRequest), 1007 => ::std::option::Option::Some(MessageType::MessageType_MintlayerTxAckUtxoInput), @@ -1048,7 +1048,7 @@ impl ::protobuf::Enum for MessageType { "MessageType_MintlayerAddress" => ::std::option::Option::Some(MessageType::MessageType_MintlayerAddress), "MessageType_MintlayerGetPublicKey" => ::std::option::Option::Some(MessageType::MessageType_MintlayerGetPublicKey), "MessageType_MintlayerPublicKey" => ::std::option::Option::Some(MessageType::MessageType_MintlayerPublicKey), - "MessageType_MintlayerVerifySig" => ::std::option::Option::Some(MessageType::MessageType_MintlayerVerifySig), + "MessageType_MintlayerSignMessage" => ::std::option::Option::Some(MessageType::MessageType_MintlayerSignMessage), "MessageType_MintlayerSignTx" => ::std::option::Option::Some(MessageType::MessageType_MintlayerSignTx), "MessageType_MintlayerTxRequest" => ::std::option::Option::Some(MessageType::MessageType_MintlayerTxRequest), "MessageType_MintlayerTxAckUtxoInput" => ::std::option::Option::Some(MessageType::MessageType_MintlayerTxAckUtxoInput), @@ -1305,7 +1305,7 @@ impl ::protobuf::Enum for MessageType { MessageType::MessageType_MintlayerAddress, MessageType::MessageType_MintlayerGetPublicKey, MessageType::MessageType_MintlayerPublicKey, - MessageType::MessageType_MintlayerVerifySig, + MessageType::MessageType_MintlayerSignMessage, MessageType::MessageType_MintlayerSignTx, MessageType::MessageType_MintlayerTxRequest, MessageType::MessageType_MintlayerTxAckUtxoInput, @@ -1568,7 +1568,7 @@ impl ::protobuf::EnumFull for MessageType { MessageType::MessageType_MintlayerAddress => 244, MessageType::MessageType_MintlayerGetPublicKey => 245, MessageType::MessageType_MintlayerPublicKey => 246, - MessageType::MessageType_MintlayerVerifySig => 247, + MessageType::MessageType_MintlayerSignMessage => 247, MessageType::MessageType_MintlayerSignTx => 248, MessageType::MessageType_MintlayerTxRequest => 249, MessageType::MessageType_MintlayerTxAckUtxoInput => 250, @@ -1622,7 +1622,7 @@ pub mod exts { static file_descriptor_proto_data: &'static [u8] = b"\ \n\x0emessages.proto\x12\x12hw.trezor.messages\x1a\x20google/protobuf/de\ - scriptor.proto*\xa3W\n\x0bMessageType\x12(\n\x16MessageType_Initialize\ + scriptor.proto*\xa5W\n\x0bMessageType\x12(\n\x16MessageType_Initialize\ \x10\0\x1a\x0c\x80\xa6\x1d\x01\xb0\xb5\x18\x01\x90\xb5\x18\x01\x12\x1e\n\ \x10MessageType_Ping\x10\x01\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12\ %\n\x13MessageType_Success\x10\x02\x1a\x0c\x80\xa6\x1d\x01\xa8\xb5\x18\ @@ -1901,11 +1901,11 @@ static file_descriptor_proto_data: &'static [u8] = b"\ ss\x10\xe8\x07\x1a\x04\x90\xb5\x18\x01\x12'\n\x1cMessageType_MintlayerAd\ dress\x10\xe9\x07\x1a\x04\x98\xb5\x18\x01\x12,\n!MessageType_MintlayerGe\ tPublicKey\x10\xea\x07\x1a\x04\x90\xb5\x18\x01\x12)\n\x1eMessageType_Min\ - tlayerPublicKey\x10\xeb\x07\x1a\x04\x98\xb5\x18\x01\x12)\n\x1eMessageTyp\ - e_MintlayerVerifySig\x10\xec\x07\x1a\x04\x90\xb5\x18\x01\x12&\n\x1bMessa\ - geType_MintlayerSignTx\x10\xed\x07\x1a\x04\x90\xb5\x18\x01\x12)\n\x1eMes\ - sageType_MintlayerTxRequest\x10\xee\x07\x1a\x04\x98\xb5\x18\x01\x12.\n#M\ - essageType_MintlayerTxAckUtxoInput\x10\xef\x07\x1a\x04\x90\xb5\x18\x01\ + tlayerPublicKey\x10\xeb\x07\x1a\x04\x98\xb5\x18\x01\x12+\n\x20MessageTyp\ + e_MintlayerSignMessage\x10\xec\x07\x1a\x04\x90\xb5\x18\x01\x12&\n\x1bMes\ + sageType_MintlayerSignTx\x10\xed\x07\x1a\x04\x90\xb5\x18\x01\x12)\n\x1eM\ + essageType_MintlayerTxRequest\x10\xee\x07\x1a\x04\x98\xb5\x18\x01\x12.\n\ + #MessageType_MintlayerTxAckUtxoInput\x10\xef\x07\x1a\x04\x90\xb5\x18\x01\ \x12+\n\x20MessageType_MintlayerTxAckOutput\x10\xf0\x07\x1a\x04\x90\xb5\ \x18\x01\x1a\x04\xc8\xf3\x18\x01\"\x04\x08Z\x10\\\"\x04\x08r\x10z\"\x06\ \x08\xdb\x01\x10\xdb\x01\"\x06\x08\xe0\x01\x10\xe0\x01\"\x06\x08\xac\x02\ diff --git a/rust/trezor-client/src/protos/generated/messages_bitcoin.rs b/rust/trezor-client/src/protos/generated/messages_bitcoin.rs index 59422c58b..5d99647cc 100644 --- a/rust/trezor-client/src/protos/generated/messages_bitcoin.rs +++ b/rust/trezor-client/src/protos/generated/messages_bitcoin.rs @@ -13289,8 +13289,6 @@ pub enum AmountUnit { MICROBITCOIN = 2, // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.AmountUnit.SATOSHI) SATOSHI = 3, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.bitcoin.AmountUnit.ML) - ML = 4, } impl ::protobuf::Enum for AmountUnit { @@ -13306,7 +13304,6 @@ impl ::protobuf::Enum for AmountUnit { 1 => ::std::option::Option::Some(AmountUnit::MILLIBITCOIN), 2 => ::std::option::Option::Some(AmountUnit::MICROBITCOIN), 3 => ::std::option::Option::Some(AmountUnit::SATOSHI), - 4 => ::std::option::Option::Some(AmountUnit::ML), _ => ::std::option::Option::None } } @@ -13317,7 +13314,6 @@ impl ::protobuf::Enum for AmountUnit { "MILLIBITCOIN" => ::std::option::Option::Some(AmountUnit::MILLIBITCOIN), "MICROBITCOIN" => ::std::option::Option::Some(AmountUnit::MICROBITCOIN), "SATOSHI" => ::std::option::Option::Some(AmountUnit::SATOSHI), - "ML" => ::std::option::Option::Some(AmountUnit::ML), _ => ::std::option::Option::None } } @@ -13327,7 +13323,6 @@ impl ::protobuf::Enum for AmountUnit { AmountUnit::MILLIBITCOIN, AmountUnit::MICROBITCOIN, AmountUnit::SATOSHI, - AmountUnit::ML, ]; } @@ -13595,10 +13590,10 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x01\x12\x11\n\rPAYTOMULTISIG\x10\x02\x12\x11\n\rPAYTOOPRETURN\x10\x03\ \x12\x10\n\x0cPAYTOWITNESS\x10\x04\x12\x14\n\x10PAYTOP2SHWITNESS\x10\x05\ \x12\x10\n\x0cPAYTOTAPROOT\x10\x06*.\n\x16DecredStakingSpendType\x12\t\n\ - \x05SSGen\x10\0\x12\t\n\x05SSRTX\x10\x01*R\n\nAmountUnit\x12\x0b\n\x07BI\ + \x05SSGen\x10\0\x12\t\n\x05SSRTX\x10\x01*J\n\nAmountUnit\x12\x0b\n\x07BI\ TCOIN\x10\0\x12\x10\n\x0cMILLIBITCOIN\x10\x01\x12\x10\n\x0cMICROBITCOIN\ - \x10\x02\x12\x0b\n\x07SATOSHI\x10\x03\x12\x06\n\x02ML\x10\x04B?\n#com.sa\ - toshilabs.trezor.lib.protobufB\x14TrezorMessageBitcoin\x80\xa6\x1d\x01\ + \x10\x02\x12\x0b\n\x07SATOSHI\x10\x03B?\n#com.satoshilabs.trezor.lib.pro\ + tobufB\x14TrezorMessageBitcoin\x80\xa6\x1d\x01\ "; /// `FileDescriptorProto` object which was a source for this generated file diff --git a/rust/trezor-client/src/protos/generated/messages_mintlayer.rs b/rust/trezor-client/src/protos/generated/messages_mintlayer.rs index 956afae94..a69dd08fd 100644 --- a/rust/trezor-client/src/protos/generated/messages_mintlayer.rs +++ b/rust/trezor-client/src/protos/generated/messages_mintlayer.rs @@ -765,66 +765,66 @@ impl ::protobuf::reflect::ProtobufValue for MintlayerPublicKey { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -// @@protoc_insertion_point(message:hw.trezor.messages.mintlayer.MintlayerVerifySig) +// @@protoc_insertion_point(message:hw.trezor.messages.mintlayer.MintlayerSignMessage) #[derive(PartialEq,Clone,Default,Debug)] -pub struct MintlayerVerifySig { +pub struct MintlayerSignMessage { // message fields - // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerVerifySig.address_n) + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerSignMessage.address_n) pub address_n: ::std::vec::Vec, - // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerVerifySig.signature) - pub signature: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerVerifySig.message) + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerSignMessage.address) + pub address: ::std::option::Option<::std::string::String>, + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerSignMessage.message) pub message: ::std::option::Option<::std::vec::Vec>, // special fields - // @@protoc_insertion_point(special_field:hw.trezor.messages.mintlayer.MintlayerVerifySig.special_fields) + // @@protoc_insertion_point(special_field:hw.trezor.messages.mintlayer.MintlayerSignMessage.special_fields) pub special_fields: ::protobuf::SpecialFields, } -impl<'a> ::std::default::Default for &'a MintlayerVerifySig { - fn default() -> &'a MintlayerVerifySig { - ::default_instance() +impl<'a> ::std::default::Default for &'a MintlayerSignMessage { + fn default() -> &'a MintlayerSignMessage { + ::default_instance() } } -impl MintlayerVerifySig { - pub fn new() -> MintlayerVerifySig { +impl MintlayerSignMessage { + pub fn new() -> MintlayerSignMessage { ::std::default::Default::default() } - // required bytes signature = 2; + // required string address = 2; - pub fn signature(&self) -> &[u8] { - match self.signature.as_ref() { + pub fn address(&self) -> &str { + match self.address.as_ref() { Some(v) => v, - None => &[], + None => "", } } - pub fn clear_signature(&mut self) { - self.signature = ::std::option::Option::None; + pub fn clear_address(&mut self) { + self.address = ::std::option::Option::None; } - pub fn has_signature(&self) -> bool { - self.signature.is_some() + pub fn has_address(&self) -> bool { + self.address.is_some() } // Param is passed by value, moved - pub fn set_signature(&mut self, v: ::std::vec::Vec) { - self.signature = ::std::option::Option::Some(v); + pub fn set_address(&mut self, v: ::std::string::String) { + self.address = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. - pub fn mut_signature(&mut self) -> &mut ::std::vec::Vec { - if self.signature.is_none() { - self.signature = ::std::option::Option::Some(::std::vec::Vec::new()); + pub fn mut_address(&mut self) -> &mut ::std::string::String { + if self.address.is_none() { + self.address = ::std::option::Option::Some(::std::string::String::new()); } - self.signature.as_mut().unwrap() + self.address.as_mut().unwrap() } // Take field - pub fn take_signature(&mut self) -> ::std::vec::Vec { - self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) + pub fn take_address(&mut self) -> ::std::string::String { + self.address.take().unwrap_or_else(|| ::std::string::String::new()) } // required bytes message = 3; @@ -868,32 +868,32 @@ impl MintlayerVerifySig { let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "address_n", - |m: &MintlayerVerifySig| { &m.address_n }, - |m: &mut MintlayerVerifySig| { &mut m.address_n }, + |m: &MintlayerSignMessage| { &m.address_n }, + |m: &mut MintlayerSignMessage| { &mut m.address_n }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "signature", - |m: &MintlayerVerifySig| { &m.signature }, - |m: &mut MintlayerVerifySig| { &mut m.signature }, + "address", + |m: &MintlayerSignMessage| { &m.address }, + |m: &mut MintlayerSignMessage| { &mut m.address }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "message", - |m: &MintlayerVerifySig| { &m.message }, - |m: &mut MintlayerVerifySig| { &mut m.message }, + |m: &MintlayerSignMessage| { &m.message }, + |m: &mut MintlayerSignMessage| { &mut m.message }, )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "MintlayerVerifySig", + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MintlayerSignMessage", fields, oneofs, ) } } -impl ::protobuf::Message for MintlayerVerifySig { - const NAME: &'static str = "MintlayerVerifySig"; +impl ::protobuf::Message for MintlayerSignMessage { + const NAME: &'static str = "MintlayerSignMessage"; fn is_initialized(&self) -> bool { - if self.signature.is_none() { + if self.address.is_none() { return false; } if self.message.is_none() { @@ -912,7 +912,7 @@ impl ::protobuf::Message for MintlayerVerifySig { self.address_n.push(is.read_uint32()?); }, 18 => { - self.signature = ::std::option::Option::Some(is.read_bytes()?); + self.address = ::std::option::Option::Some(is.read_string()?); }, 26 => { self.message = ::std::option::Option::Some(is.read_bytes()?); @@ -932,8 +932,8 @@ impl ::protobuf::Message for MintlayerVerifySig { for value in &self.address_n { my_size += ::protobuf::rt::uint32_size(1, *value); }; - if let Some(v) = self.signature.as_ref() { - my_size += ::protobuf::rt::bytes_size(2, &v); + if let Some(v) = self.address.as_ref() { + my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.message.as_ref() { my_size += ::protobuf::rt::bytes_size(3, &v); @@ -947,8 +947,8 @@ impl ::protobuf::Message for MintlayerVerifySig { for v in &self.address_n { os.write_uint32(1, *v)?; }; - if let Some(v) = self.signature.as_ref() { - os.write_bytes(2, v)?; + if let Some(v) = self.address.as_ref() { + os.write_string(2, v)?; } if let Some(v) = self.message.as_ref() { os.write_bytes(3, v)?; @@ -965,21 +965,21 @@ impl ::protobuf::Message for MintlayerVerifySig { &mut self.special_fields } - fn new() -> MintlayerVerifySig { - MintlayerVerifySig::new() + fn new() -> MintlayerSignMessage { + MintlayerSignMessage::new() } fn clear(&mut self) { self.address_n.clear(); - self.signature = ::std::option::Option::None; + self.address = ::std::option::Option::None; self.message = ::std::option::Option::None; self.special_fields.clear(); } - fn default_instance() -> &'static MintlayerVerifySig { - static instance: MintlayerVerifySig = MintlayerVerifySig { + fn default_instance() -> &'static MintlayerSignMessage { + static instance: MintlayerSignMessage = MintlayerSignMessage { address_n: ::std::vec::Vec::new(), - signature: ::std::option::Option::None, + address: ::std::option::Option::None, message: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; @@ -987,20 +987,20 @@ impl ::protobuf::Message for MintlayerVerifySig { } } -impl ::protobuf::MessageFull for MintlayerVerifySig { +impl ::protobuf::MessageFull for MintlayerSignMessage { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("MintlayerVerifySig").unwrap()).clone() + descriptor.get(|| file_descriptor().message_by_package_relative_name("MintlayerSignMessage").unwrap()).clone() } } -impl ::std::fmt::Display for MintlayerVerifySig { +impl ::std::fmt::Display for MintlayerSignMessage { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } -impl ::protobuf::reflect::ProtobufValue for MintlayerVerifySig { +impl ::protobuf::reflect::ProtobufValue for MintlayerSignMessage { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } @@ -1377,6 +1377,16 @@ impl ::protobuf::Message for MintlayerTxRequest { const NAME: &'static str = "MintlayerTxRequest"; fn is_initialized(&self) -> bool { + for v in &self.details { + if !v.is_initialized() { + return false; + } + }; + for v in &self.serialized { + if !v.is_initialized() { + return false; + } + }; true } @@ -1678,52 +1688,31 @@ pub mod mintlayer_tx_request { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } - // @@protoc_insertion_point(message:hw.trezor.messages.mintlayer.MintlayerTxRequest.MintlayerTxRequestSerializedType) + // @@protoc_insertion_point(message:hw.trezor.messages.mintlayer.MintlayerTxRequest.MintlayerSignature) #[derive(PartialEq,Clone,Default,Debug)] - pub struct MintlayerTxRequestSerializedType { + pub struct MintlayerSignature { // message fields - // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerTxRequest.MintlayerTxRequestSerializedType.signature_index) - pub signature_index: ::std::option::Option, - // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerTxRequest.MintlayerTxRequestSerializedType.signature) + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerTxRequest.MintlayerSignature.signature) pub signature: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerTxRequest.MintlayerTxRequestSerializedType.serialized_tx) - pub serialized_tx: ::std::option::Option<::std::vec::Vec>, + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerTxRequest.MintlayerSignature.multisig_idx) + pub multisig_idx: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:hw.trezor.messages.mintlayer.MintlayerTxRequest.MintlayerTxRequestSerializedType.special_fields) + // @@protoc_insertion_point(special_field:hw.trezor.messages.mintlayer.MintlayerTxRequest.MintlayerSignature.special_fields) pub special_fields: ::protobuf::SpecialFields, } - impl<'a> ::std::default::Default for &'a MintlayerTxRequestSerializedType { - fn default() -> &'a MintlayerTxRequestSerializedType { - ::default_instance() + impl<'a> ::std::default::Default for &'a MintlayerSignature { + fn default() -> &'a MintlayerSignature { + ::default_instance() } } - impl MintlayerTxRequestSerializedType { - pub fn new() -> MintlayerTxRequestSerializedType { + impl MintlayerSignature { + pub fn new() -> MintlayerSignature { ::std::default::Default::default() } - // optional uint32 signature_index = 1; - - pub fn signature_index(&self) -> u32 { - self.signature_index.unwrap_or(0) - } - - pub fn clear_signature_index(&mut self) { - self.signature_index = ::std::option::Option::None; - } - - pub fn has_signature_index(&self) -> bool { - self.signature_index.is_some() - } - - // Param is passed by value, moved - pub fn set_signature_index(&mut self, v: u32) { - self.signature_index = ::std::option::Option::Some(v); - } - - // optional bytes signature = 2; + // required bytes signature = 1; pub fn signature(&self) -> &[u8] { match self.signature.as_ref() { @@ -1759,6 +1748,189 @@ pub mod mintlayer_tx_request { self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) } + // optional uint32 multisig_idx = 2; + + pub fn multisig_idx(&self) -> u32 { + self.multisig_idx.unwrap_or(0) + } + + pub fn clear_multisig_idx(&mut self) { + self.multisig_idx = ::std::option::Option::None; + } + + pub fn has_multisig_idx(&self) -> bool { + self.multisig_idx.is_some() + } + + // Param is passed by value, moved + pub fn set_multisig_idx(&mut self, v: u32) { + self.multisig_idx = ::std::option::Option::Some(v); + } + + pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "signature", + |m: &MintlayerSignature| { &m.signature }, + |m: &mut MintlayerSignature| { &mut m.signature }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "multisig_idx", + |m: &MintlayerSignature| { &m.multisig_idx }, + |m: &mut MintlayerSignature| { &mut m.multisig_idx }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MintlayerTxRequest.MintlayerSignature", + fields, + oneofs, + ) + } + } + + impl ::protobuf::Message for MintlayerSignature { + const NAME: &'static str = "MintlayerSignature"; + + fn is_initialized(&self) -> bool { + if self.signature.is_none() { + return false; + } + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.signature = ::std::option::Option::Some(is.read_bytes()?); + }, + 16 => { + self.multisig_idx = ::std::option::Option::Some(is.read_uint32()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.signature.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + if let Some(v) = self.multisig_idx { + my_size += ::protobuf::rt::uint32_size(2, v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.signature.as_ref() { + os.write_bytes(1, v)?; + } + if let Some(v) = self.multisig_idx { + os.write_uint32(2, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> MintlayerSignature { + MintlayerSignature::new() + } + + fn clear(&mut self) { + self.signature = ::std::option::Option::None; + self.multisig_idx = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static MintlayerSignature { + static instance: MintlayerSignature = MintlayerSignature { + signature: ::std::option::Option::None, + multisig_idx: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } + } + + impl ::protobuf::MessageFull for MintlayerSignature { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().message_by_package_relative_name("MintlayerTxRequest.MintlayerSignature").unwrap()).clone() + } + } + + impl ::std::fmt::Display for MintlayerSignature { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } + } + + impl ::protobuf::reflect::ProtobufValue for MintlayerSignature { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; + } + + // @@protoc_insertion_point(message:hw.trezor.messages.mintlayer.MintlayerTxRequest.MintlayerTxRequestSerializedType) + #[derive(PartialEq,Clone,Default,Debug)] + pub struct MintlayerTxRequestSerializedType { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerTxRequest.MintlayerTxRequestSerializedType.signature_index) + pub signature_index: ::std::option::Option, + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerTxRequest.MintlayerTxRequestSerializedType.signatures) + pub signatures: ::std::vec::Vec, + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerTxRequest.MintlayerTxRequestSerializedType.serialized_tx) + pub serialized_tx: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.mintlayer.MintlayerTxRequest.MintlayerTxRequestSerializedType.special_fields) + pub special_fields: ::protobuf::SpecialFields, + } + + impl<'a> ::std::default::Default for &'a MintlayerTxRequestSerializedType { + fn default() -> &'a MintlayerTxRequestSerializedType { + ::default_instance() + } + } + + impl MintlayerTxRequestSerializedType { + pub fn new() -> MintlayerTxRequestSerializedType { + ::std::default::Default::default() + } + + // optional uint32 signature_index = 1; + + pub fn signature_index(&self) -> u32 { + self.signature_index.unwrap_or(0) + } + + pub fn clear_signature_index(&mut self) { + self.signature_index = ::std::option::Option::None; + } + + pub fn has_signature_index(&self) -> bool { + self.signature_index.is_some() + } + + // Param is passed by value, moved + pub fn set_signature_index(&mut self, v: u32) { + self.signature_index = ::std::option::Option::Some(v); + } + // optional bytes serialized_tx = 3; pub fn serialized_tx(&self) -> &[u8] { @@ -1803,10 +1975,10 @@ pub mod mintlayer_tx_request { |m: &MintlayerTxRequestSerializedType| { &m.signature_index }, |m: &mut MintlayerTxRequestSerializedType| { &mut m.signature_index }, )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "signature", - |m: &MintlayerTxRequestSerializedType| { &m.signature }, - |m: &mut MintlayerTxRequestSerializedType| { &mut m.signature }, + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "signatures", + |m: &MintlayerTxRequestSerializedType| { &m.signatures }, + |m: &mut MintlayerTxRequestSerializedType| { &mut m.signatures }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "serialized_tx", @@ -1825,6 +1997,11 @@ pub mod mintlayer_tx_request { const NAME: &'static str = "MintlayerTxRequestSerializedType"; fn is_initialized(&self) -> bool { + for v in &self.signatures { + if !v.is_initialized() { + return false; + } + }; true } @@ -1835,7 +2012,7 @@ pub mod mintlayer_tx_request { self.signature_index = ::std::option::Option::Some(is.read_uint32()?); }, 18 => { - self.signature = ::std::option::Option::Some(is.read_bytes()?); + self.signatures.push(is.read_message()?); }, 26 => { self.serialized_tx = ::std::option::Option::Some(is.read_bytes()?); @@ -1855,9 +2032,10 @@ pub mod mintlayer_tx_request { if let Some(v) = self.signature_index { my_size += ::protobuf::rt::uint32_size(1, v); } - if let Some(v) = self.signature.as_ref() { - my_size += ::protobuf::rt::bytes_size(2, &v); - } + for value in &self.signatures { + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + }; if let Some(v) = self.serialized_tx.as_ref() { my_size += ::protobuf::rt::bytes_size(3, &v); } @@ -1870,9 +2048,9 @@ pub mod mintlayer_tx_request { if let Some(v) = self.signature_index { os.write_uint32(1, v)?; } - if let Some(v) = self.signature.as_ref() { - os.write_bytes(2, v)?; - } + for v in &self.signatures { + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; + }; if let Some(v) = self.serialized_tx.as_ref() { os.write_bytes(3, v)?; } @@ -1894,7 +2072,7 @@ pub mod mintlayer_tx_request { fn clear(&mut self) { self.signature_index = ::std::option::Option::None; - self.signature = ::std::option::Option::None; + self.signatures.clear(); self.serialized_tx = ::std::option::Option::None; self.special_fields.clear(); } @@ -1902,7 +2080,7 @@ pub mod mintlayer_tx_request { fn default_instance() -> &'static MintlayerTxRequestSerializedType { static instance: MintlayerTxRequestSerializedType = MintlayerTxRequestSerializedType { signature_index: ::std::option::Option::None, - signature: ::std::option::Option::None, + signatures: ::std::vec::Vec::new(), serialized_tx: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; @@ -2176,12 +2354,174 @@ impl ::protobuf::reflect::ProtobufValue for MintlayerTxInput { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } +// @@protoc_insertion_point(message:hw.trezor.messages.mintlayer.MintlayerAddressPath) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct MintlayerAddressPath { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerAddressPath.address_n) + pub address_n: ::std::vec::Vec, + // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerAddressPath.multisig_idx) + pub multisig_idx: ::std::option::Option, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.mintlayer.MintlayerAddressPath.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a MintlayerAddressPath { + fn default() -> &'a MintlayerAddressPath { + ::default_instance() + } +} + +impl MintlayerAddressPath { + pub fn new() -> MintlayerAddressPath { + ::std::default::Default::default() + } + + // optional uint32 multisig_idx = 2; + + pub fn multisig_idx(&self) -> u32 { + self.multisig_idx.unwrap_or(0) + } + + pub fn clear_multisig_idx(&mut self) { + self.multisig_idx = ::std::option::Option::None; + } + + pub fn has_multisig_idx(&self) -> bool { + self.multisig_idx.is_some() + } + + // Param is passed by value, moved + pub fn set_multisig_idx(&mut self, v: u32) { + self.multisig_idx = ::std::option::Option::Some(v); + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "address_n", + |m: &MintlayerAddressPath| { &m.address_n }, + |m: &mut MintlayerAddressPath| { &mut m.address_n }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "multisig_idx", + |m: &MintlayerAddressPath| { &m.multisig_idx }, + |m: &mut MintlayerAddressPath| { &mut m.multisig_idx }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MintlayerAddressPath", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for MintlayerAddressPath { + const NAME: &'static str = "MintlayerAddressPath"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + is.read_repeated_packed_uint32_into(&mut self.address_n)?; + }, + 8 => { + self.address_n.push(is.read_uint32()?); + }, + 16 => { + self.multisig_idx = ::std::option::Option::Some(is.read_uint32()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + for value in &self.address_n { + my_size += ::protobuf::rt::uint32_size(1, *value); + }; + if let Some(v) = self.multisig_idx { + my_size += ::protobuf::rt::uint32_size(2, v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + for v in &self.address_n { + os.write_uint32(1, *v)?; + }; + if let Some(v) = self.multisig_idx { + os.write_uint32(2, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> MintlayerAddressPath { + MintlayerAddressPath::new() + } + + fn clear(&mut self) { + self.address_n.clear(); + self.multisig_idx = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static MintlayerAddressPath { + static instance: MintlayerAddressPath = MintlayerAddressPath { + address_n: ::std::vec::Vec::new(), + multisig_idx: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for MintlayerAddressPath { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("MintlayerAddressPath").unwrap()).clone() + } +} + +impl ::std::fmt::Display for MintlayerAddressPath { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for MintlayerAddressPath { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + // @@protoc_insertion_point(message:hw.trezor.messages.mintlayer.MintlayerUtxoTxInput) #[derive(PartialEq,Clone,Default,Debug)] pub struct MintlayerUtxoTxInput { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerUtxoTxInput.address_n) - pub address_n: ::std::vec::Vec, + pub address_n: ::std::vec::Vec, // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerUtxoTxInput.address) pub address: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerUtxoTxInput.prev_hash) @@ -2407,6 +2747,11 @@ impl ::protobuf::Message for MintlayerUtxoTxInput { if self.value.is_none() { return false; } + for v in &self.address_n { + if !v.is_initialized() { + return false; + } + }; for v in &self.value { if !v.is_initialized() { return false; @@ -2419,10 +2764,7 @@ impl ::protobuf::Message for MintlayerUtxoTxInput { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { - is.read_repeated_packed_uint32_into(&mut self.address_n)?; - }, - 8 => { - self.address_n.push(is.read_uint32()?); + self.address_n.push(is.read_message()?); }, 18 => { self.address = ::std::option::Option::Some(is.read_string()?); @@ -2455,7 +2797,8 @@ impl ::protobuf::Message for MintlayerUtxoTxInput { fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.address_n { - my_size += ::protobuf::rt::uint32_size(1, *value); + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; if let Some(v) = self.address.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); @@ -2483,7 +2826,7 @@ impl ::protobuf::Message for MintlayerUtxoTxInput { fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.address_n { - os.write_uint32(1, *v)?; + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }; if let Some(v) = self.address.as_ref() { os.write_string(2, v)?; @@ -2567,7 +2910,7 @@ impl ::protobuf::reflect::ProtobufValue for MintlayerUtxoTxInput { pub struct MintlayerAccountTxInput { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerAccountTxInput.address_n) - pub address_n: ::std::vec::Vec, + pub address_n: ::std::vec::Vec, // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerAccountTxInput.address) pub address: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerAccountTxInput.sequence) @@ -2761,6 +3104,11 @@ impl ::protobuf::Message for MintlayerAccountTxInput { if self.delegation_id.is_none() { return false; } + for v in &self.address_n { + if !v.is_initialized() { + return false; + } + }; for v in &self.value { if !v.is_initialized() { return false; @@ -2773,10 +3121,7 @@ impl ::protobuf::Message for MintlayerAccountTxInput { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { - is.read_repeated_packed_uint32_into(&mut self.address_n)?; - }, - 8 => { - self.address_n.push(is.read_uint32()?); + self.address_n.push(is.read_message()?); }, 18 => { self.address = ::std::option::Option::Some(is.read_string()?); @@ -2806,7 +3151,8 @@ impl ::protobuf::Message for MintlayerAccountTxInput { fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.address_n { - my_size += ::protobuf::rt::uint32_size(1, *value); + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; if let Some(v) = self.address.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); @@ -2831,7 +3177,7 @@ impl ::protobuf::Message for MintlayerAccountTxInput { fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.address_n { - os.write_uint32(1, *v)?; + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }; if let Some(v) = self.address.as_ref() { os.write_string(2, v)?; @@ -2910,7 +3256,7 @@ impl ::protobuf::reflect::ProtobufValue for MintlayerAccountTxInput { pub struct MintlayerAccountCommandTxInput { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerAccountCommandTxInput.address_n) - pub address_n: ::std::vec::Vec, + pub address_n: ::std::vec::Vec, // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerAccountCommandTxInput.address) pub address: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerAccountCommandTxInput.sequence) @@ -3090,6 +3436,11 @@ impl ::protobuf::Message for MintlayerAccountCommandTxInput { if self.nonce.is_none() { return false; } + for v in &self.address_n { + if !v.is_initialized() { + return false; + } + }; for v in &self.mint { if !v.is_initialized() { return false; @@ -3127,10 +3478,7 @@ impl ::protobuf::Message for MintlayerAccountCommandTxInput { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { - is.read_repeated_packed_uint32_into(&mut self.address_n)?; - }, - 8 => { - self.address_n.push(is.read_uint32()?); + self.address_n.push(is.read_message()?); }, 18 => { self.address = ::std::option::Option::Some(is.read_string()?); @@ -3172,7 +3520,8 @@ impl ::protobuf::Message for MintlayerAccountCommandTxInput { fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.address_n { - my_size += ::protobuf::rt::uint32_size(1, *value); + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; if let Some(v) = self.address.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); @@ -3214,7 +3563,7 @@ impl ::protobuf::Message for MintlayerAccountCommandTxInput { fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.address_n { - os.write_uint32(1, *v)?; + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }; if let Some(v) = self.address.as_ref() { os.write_string(2, v)?; @@ -4993,8 +5342,6 @@ pub struct MintlayerTransferTxOutput { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerTransferTxOutput.address) pub address: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerTransferTxOutput.address_n) - pub address_n: ::std::vec::Vec, // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerTransferTxOutput.value) pub value: ::protobuf::MessageField, // special fields @@ -5050,18 +5397,13 @@ impl MintlayerTransferTxOutput { } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); + let mut fields = ::std::vec::Vec::with_capacity(2); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "address", |m: &MintlayerTransferTxOutput| { &m.address }, |m: &mut MintlayerTransferTxOutput| { &mut m.address }, )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "address_n", - |m: &MintlayerTransferTxOutput| { &m.address_n }, - |m: &mut MintlayerTransferTxOutput| { &mut m.address_n }, - )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MintlayerOutputValue>( "value", |m: &MintlayerTransferTxOutput| { &m.value }, @@ -5097,12 +5439,6 @@ impl ::protobuf::Message for MintlayerTransferTxOutput { self.address = ::std::option::Option::Some(is.read_string()?); }, 18 => { - is.read_repeated_packed_uint32_into(&mut self.address_n)?; - }, - 16 => { - self.address_n.push(is.read_uint32()?); - }, - 26 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.value)?; }, tag => { @@ -5120,9 +5456,6 @@ impl ::protobuf::Message for MintlayerTransferTxOutput { if let Some(v) = self.address.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } - for value in &self.address_n { - my_size += ::protobuf::rt::uint32_size(2, *value); - }; if let Some(v) = self.value.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; @@ -5136,11 +5469,8 @@ impl ::protobuf::Message for MintlayerTransferTxOutput { if let Some(v) = self.address.as_ref() { os.write_string(1, v)?; } - for v in &self.address_n { - os.write_uint32(2, *v)?; - }; if let Some(v) = self.value.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) @@ -5160,7 +5490,6 @@ impl ::protobuf::Message for MintlayerTransferTxOutput { fn clear(&mut self) { self.address = ::std::option::Option::None; - self.address_n.clear(); self.value.clear(); self.special_fields.clear(); } @@ -5168,7 +5497,6 @@ impl ::protobuf::Message for MintlayerTransferTxOutput { fn default_instance() -> &'static MintlayerTransferTxOutput { static instance: MintlayerTransferTxOutput = MintlayerTransferTxOutput { address: ::std::option::Option::None, - address_n: ::std::vec::Vec::new(), value: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; @@ -5451,8 +5779,6 @@ pub struct MintlayerLockThenTransferTxOutput { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerLockThenTransferTxOutput.address) pub address: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerLockThenTransferTxOutput.address_n) - pub address_n: ::std::vec::Vec, // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerLockThenTransferTxOutput.value) pub value: ::protobuf::MessageField, // @@protoc_insertion_point(field:hw.trezor.messages.mintlayer.MintlayerLockThenTransferTxOutput.lock) @@ -5510,18 +5836,13 @@ impl MintlayerLockThenTransferTxOutput { } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); + let mut fields = ::std::vec::Vec::with_capacity(3); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "address", |m: &MintlayerLockThenTransferTxOutput| { &m.address }, |m: &mut MintlayerLockThenTransferTxOutput| { &mut m.address }, )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "address_n", - |m: &MintlayerLockThenTransferTxOutput| { &m.address_n }, - |m: &mut MintlayerLockThenTransferTxOutput| { &mut m.address_n }, - )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MintlayerOutputValue>( "value", |m: &MintlayerLockThenTransferTxOutput| { &m.value }, @@ -5570,15 +5891,9 @@ impl ::protobuf::Message for MintlayerLockThenTransferTxOutput { self.address = ::std::option::Option::Some(is.read_string()?); }, 18 => { - is.read_repeated_packed_uint32_into(&mut self.address_n)?; - }, - 16 => { - self.address_n.push(is.read_uint32()?); - }, - 26 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.value)?; }, - 34 => { + 26 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.lock)?; }, tag => { @@ -5596,9 +5911,6 @@ impl ::protobuf::Message for MintlayerLockThenTransferTxOutput { if let Some(v) = self.address.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } - for value in &self.address_n { - my_size += ::protobuf::rt::uint32_size(2, *value); - }; if let Some(v) = self.value.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; @@ -5616,14 +5928,11 @@ impl ::protobuf::Message for MintlayerLockThenTransferTxOutput { if let Some(v) = self.address.as_ref() { os.write_string(1, v)?; } - for v in &self.address_n { - os.write_uint32(2, *v)?; - }; if let Some(v) = self.value.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; } if let Some(v) = self.lock.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; + ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) @@ -5643,7 +5952,6 @@ impl ::protobuf::Message for MintlayerLockThenTransferTxOutput { fn clear(&mut self) { self.address = ::std::option::Option::None; - self.address_n.clear(); self.value.clear(); self.lock.clear(); self.special_fields.clear(); @@ -5652,7 +5960,6 @@ impl ::protobuf::Message for MintlayerLockThenTransferTxOutput { fn default_instance() -> &'static MintlayerLockThenTransferTxOutput { static instance: MintlayerLockThenTransferTxOutput = MintlayerLockThenTransferTxOutput { address: ::std::option::Option::None, - address_n: ::std::vec::Vec::new(), value: ::protobuf::MessageField::none(), lock: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), @@ -9579,14 +9886,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\ etPublicKey\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12!\n\ \x0cshow_display\x18\x02\x20\x01(\x08R\x0bshowDisplay\"R\n\x12MintlayerP\ ublicKey\x12\x1d\n\npublic_key\x18\x01\x20\x02(\x0cR\tpublicKey\x12\x1d\ - \n\nchain_code\x18\x02\x20\x02(\x0cR\tchainCode\"i\n\x12MintlayerVerifyS\ - ig\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x1c\n\tsigna\ - ture\x18\x02\x20\x02(\x0cR\tsignature\x12\x18\n\x07message\x18\x03\x20\ + \n\nchain_code\x18\x02\x20\x02(\x0cR\tchainCode\"g\n\x14MintlayerSignMes\ + sage\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x18\n\x07a\ + ddress\x18\x02\x20\x02(\tR\x07address\x12\x18\n\x07message\x18\x03\x20\ \x02(\x0cR\x07message\"\xb6\x01\n\x0fMintlayerSignTx\x12#\n\routputs_cou\ nt\x18\x01\x20\x02(\rR\x0coutputsCount\x12!\n\x0cinputs_count\x18\x02\ \x20\x02(\rR\x0binputsCount\x12\x1b\n\x07version\x18\x03\x20\x01(\r:\x01\ 1R\x07version\x12\"\n\tserialize\x18\x04\x20\x01(\x08:\x04trueR\tseriali\ - ze\x12\x1a\n\x08chunkify\x18\x05\x20\x01(\x08R\x08chunkify\"\x9a\x05\n\ + ze\x12\x1a\n\x08chunkify\x18\x05\x20\x01(\x08R\x08chunkify\"\xb8\x06\n\ \x12MintlayerTxRequest\x12h\n\x0crequest_type\x18\x01\x20\x01(\x0e2E.hw.\ trezor.messages.mintlayer.MintlayerTxRequest.MintlayerRequestTypeR\x0bre\ questType\x12h\n\x07details\x18\x02\x20\x01(\x0b2N.hw.trezor.messages.mi\ @@ -9595,38 +9902,45 @@ static file_descriptor_proto_data: &'static [u8] = b"\ layerTxRequest.MintlayerTxRequestSerializedTypeR\nserialized\x1a]\n\x1dM\ intlayerTxRequestDetailsType\x12#\n\rrequest_index\x18\x01\x20\x01(\rR\ \x0crequestIndex\x12\x17\n\x07tx_hash\x18\x02\x20\x01(\x0cR\x06txHash\ - \x1a\x8e\x01\n\x20MintlayerTxRequestSerializedType\x12'\n\x0fsignature_i\ - ndex\x18\x01\x20\x01(\rR\x0esignatureIndex\x12\x1c\n\tsignature\x18\x02\ - \x20\x01(\x0cR\tsignature\x12#\n\rserialized_tx\x18\x03\x20\x01(\x0cR\ - \x0cserializedTx\"M\n\x14MintlayerRequestType\x12\x0b\n\x07TXINPUT\x10\0\ - \x12\x0c\n\x08TXOUTPUT\x10\x01\x12\n\n\x06TXMETA\x10\x02\x12\x0e\n\nTXFI\ - NISHED\x10\x03\"\x92\x02\n\x10MintlayerTxInput\x12F\n\x04utxo\x18\x01\ - \x20\x01(\x0b22.hw.trezor.messages.mintlayer.MintlayerUtxoTxInputR\x04ut\ - xo\x12O\n\x07account\x18\x02\x20\x01(\x0b25.hw.trezor.messages.mintlayer\ - .MintlayerAccountTxInputR\x07account\x12e\n\x0faccount_command\x18\x03\ - \x20\x01(\x0b2<.hw.trezor.messages.mintlayer.MintlayerAccountCommandTxIn\ - putR\x0eaccountCommand\"\xc0\x02\n\x14MintlayerUtxoTxInput\x12\x1b\n\tad\ - dress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x18\n\x07address\x18\x02\x20\ - \x02(\tR\x07address\x12\x1b\n\tprev_hash\x18\x03\x20\x02(\x0cR\x08prevHa\ - sh\x12\x1d\n\nprev_index\x18\x04\x20\x02(\rR\tprevIndex\x12C\n\x04type\ - \x18\x05\x20\x02(\x0e2/.hw.trezor.messages.mintlayer.MintlayerUtxoTypeR\ - \x04type\x12&\n\x08sequence\x18\x06\x20\x01(\r:\n4294967295R\x08sequence\ - \x12H\n\x05value\x18\x07\x20\x02(\x0b22.hw.trezor.messages.mintlayer.Min\ - tlayerOutputValueR\x05value\"\xfd\x01\n\x17MintlayerAccountTxInput\x12\ - \x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x18\n\x07address\ - \x18\x02\x20\x02(\tR\x07address\x12&\n\x08sequence\x18\x03\x20\x01(\r:\n\ - 4294967295R\x08sequence\x12H\n\x05value\x18\x04\x20\x02(\x0b22.hw.trezor\ - .messages.mintlayer.MintlayerOutputValueR\x05value\x12\x14\n\x05nonce\ - \x18\x05\x20\x02(\x04R\x05nonce\x12#\n\rdelegation_id\x18\x06\x20\x02(\ - \x0cR\x0cdelegationId\"\xb4\x05\n\x1eMintlayerAccountCommandTxInput\x12\ - \x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x18\n\x07address\ - \x18\x02\x20\x02(\tR\x07address\x12&\n\x08sequence\x18\x03\x20\x01(\r:\n\ - 4294967295R\x08sequence\x12\x14\n\x05nonce\x18\x04\x20\x02(\x04R\x05nonc\ - e\x12E\n\x04mint\x18\x05\x20\x01(\x0b21.hw.trezor.messages.mintlayer.Min\ - tlayerMintTokensR\x04mint\x12K\n\x06unmint\x18\x06\x20\x01(\x0b23.hw.tre\ - zor.messages.mintlayer.MintlayerUnmintTokensR\x06unmint\x12b\n\x11lock_t\ - oken_supply\x18\x07\x20\x01(\x0b26.hw.trezor.messages.mintlayer.Mintlaye\ - rLockTokenSupplyR\x0flockTokenSupply\x12U\n\x0cfreeze_token\x18\x08\x20\ + \x1aU\n\x12MintlayerSignature\x12\x1c\n\tsignature\x18\x01\x20\x02(\x0cR\ + \tsignature\x12!\n\x0cmultisig_idx\x18\x02\x20\x01(\rR\x0bmultisigIdx\ + \x1a\xd5\x01\n\x20MintlayerTxRequestSerializedType\x12'\n\x0fsignature_i\ + ndex\x18\x01\x20\x01(\rR\x0esignatureIndex\x12c\n\nsignatures\x18\x02\ + \x20\x03(\x0b2C.hw.trezor.messages.mintlayer.MintlayerTxRequest.Mintlaye\ + rSignatureR\nsignatures\x12#\n\rserialized_tx\x18\x03\x20\x01(\x0cR\x0cs\ + erializedTx\"M\n\x14MintlayerRequestType\x12\x0b\n\x07TXINPUT\x10\0\x12\ + \x0c\n\x08TXOUTPUT\x10\x01\x12\n\n\x06TXMETA\x10\x02\x12\x0e\n\nTXFINISH\ + ED\x10\x03\"\x92\x02\n\x10MintlayerTxInput\x12F\n\x04utxo\x18\x01\x20\ + \x01(\x0b22.hw.trezor.messages.mintlayer.MintlayerUtxoTxInputR\x04utxo\ + \x12O\n\x07account\x18\x02\x20\x01(\x0b25.hw.trezor.messages.mintlayer.M\ + intlayerAccountTxInputR\x07account\x12e\n\x0faccount_command\x18\x03\x20\ + \x01(\x0b2<.hw.trezor.messages.mintlayer.MintlayerAccountCommandTxInputR\ + \x0eaccountCommand\"V\n\x14MintlayerAddressPath\x12\x1b\n\taddress_n\x18\ + \x01\x20\x03(\rR\x08addressN\x12!\n\x0cmultisig_idx\x18\x02\x20\x01(\rR\ + \x0bmultisigIdx\"\xf4\x02\n\x14MintlayerUtxoTxInput\x12O\n\taddress_n\ + \x18\x01\x20\x03(\x0b22.hw.trezor.messages.mintlayer.MintlayerAddressPat\ + hR\x08addressN\x12\x18\n\x07address\x18\x02\x20\x02(\tR\x07address\x12\ + \x1b\n\tprev_hash\x18\x03\x20\x02(\x0cR\x08prevHash\x12\x1d\n\nprev_inde\ + x\x18\x04\x20\x02(\rR\tprevIndex\x12C\n\x04type\x18\x05\x20\x02(\x0e2/.h\ + w.trezor.messages.mintlayer.MintlayerUtxoTypeR\x04type\x12&\n\x08sequenc\ + e\x18\x06\x20\x01(\r:\n4294967295R\x08sequence\x12H\n\x05value\x18\x07\ + \x20\x02(\x0b22.hw.trezor.messages.mintlayer.MintlayerOutputValueR\x05va\ + lue\"\xb1\x02\n\x17MintlayerAccountTxInput\x12O\n\taddress_n\x18\x01\x20\ + \x03(\x0b22.hw.trezor.messages.mintlayer.MintlayerAddressPathR\x08addres\ + sN\x12\x18\n\x07address\x18\x02\x20\x02(\tR\x07address\x12&\n\x08sequenc\ + e\x18\x03\x20\x01(\r:\n4294967295R\x08sequence\x12H\n\x05value\x18\x04\ + \x20\x02(\x0b22.hw.trezor.messages.mintlayer.MintlayerOutputValueR\x05va\ + lue\x12\x14\n\x05nonce\x18\x05\x20\x02(\x04R\x05nonce\x12#\n\rdelegation\ + _id\x18\x06\x20\x02(\x0cR\x0cdelegationId\"\xe8\x05\n\x1eMintlayerAccoun\ + tCommandTxInput\x12O\n\taddress_n\x18\x01\x20\x03(\x0b22.hw.trezor.messa\ + ges.mintlayer.MintlayerAddressPathR\x08addressN\x12\x18\n\x07address\x18\ + \x02\x20\x02(\tR\x07address\x12&\n\x08sequence\x18\x03\x20\x01(\r:\n4294\ + 967295R\x08sequence\x12\x14\n\x05nonce\x18\x04\x20\x02(\x04R\x05nonce\ + \x12E\n\x04mint\x18\x05\x20\x01(\x0b21.hw.trezor.messages.mintlayer.Mint\ + layerMintTokensR\x04mint\x12K\n\x06unmint\x18\x06\x20\x01(\x0b23.hw.trez\ + or.messages.mintlayer.MintlayerUnmintTokensR\x06unmint\x12b\n\x11lock_to\ + ken_supply\x18\x07\x20\x01(\x0b26.hw.trezor.messages.mintlayer.Mintlayer\ + LockTokenSupplyR\x0flockTokenSupply\x12U\n\x0cfreeze_token\x18\x08\x20\ \x01(\x0b22.hw.trezor.messages.mintlayer.MintlayerFreezeTokenR\x0bfreeze\ Token\x12[\n\x0eunfreeze_token\x18\t\x20\x01(\x0b24.hw.trezor.messages.m\ intlayer.MintlayerUnfreezeTokenR\runfreezeToken\x12q\n\x16change_token_a\ @@ -9661,73 +9975,71 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x12]\n\x0cdata_deposit\x18\n\x20\x01(\x0b2:.hw.trezor.messages.mintlaye\ r.MintlayerDataDepositTxOutputR\x0bdataDeposit\"I\n\x14MintlayerOutputVa\ lue\x12\x16\n\x06amount\x18\x01\x20\x02(\x0cR\x06amount\x12\x19\n\x08tok\ - en_id\x18\x02\x20\x01(\x0cR\x07tokenId\"\x9c\x01\n\x19MintlayerTransferT\ - xOutput\x12\x18\n\x07address\x18\x01\x20\x01(\tR\x07address\x12\x1b\n\ta\ - ddress_n\x18\x02\x20\x03(\rR\x08addressN\x12H\n\x05value\x18\x03\x20\x02\ - (\x0b22.hw.trezor.messages.mintlayer.MintlayerOutputValueR\x05value\"\ - \xa4\x01\n\x17MintlayerOutputTimeLock\x12!\n\x0cuntil_height\x18\x01\x20\ - \x01(\x04R\x0buntilHeight\x12\x1d\n\nuntil_time\x18\x02\x20\x01(\x04R\tu\ - ntilTime\x12&\n\x0ffor_block_count\x18\x03\x20\x01(\x04R\rforBlockCount\ - \x12\x1f\n\x0bfor_seconds\x18\x04\x20\x01(\x04R\nforSeconds\"\xef\x01\n!\ - MintlayerLockThenTransferTxOutput\x12\x18\n\x07address\x18\x01\x20\x01(\ - \tR\x07address\x12\x1b\n\taddress_n\x18\x02\x20\x03(\rR\x08addressN\x12H\ - \n\x05value\x18\x03\x20\x02(\x0b22.hw.trezor.messages.mintlayer.Mintlaye\ - rOutputValueR\x05value\x12I\n\x04lock\x18\x04\x20\x02(\x0b25.hw.trezor.m\ - essages.mintlayer.MintlayerOutputTimeLockR\x04lock\"a\n\x15MintlayerBurn\ - TxOutput\x12H\n\x05value\x18\x01\x20\x02(\x0b22.hw.trezor.messages.mintl\ - ayer.MintlayerOutputValueR\x05value\"\x9d\x02\n\x20MintlayerCreateStakeP\ - oolTxOutput\x12\x17\n\x07pool_id\x18\x01\x20\x02(\x0cR\x06poolId\x12\x16\ - \n\x06pledge\x18\x02\x20\x02(\x0cR\x06pledge\x12\x16\n\x06staker\x18\x03\ - \x20\x02(\tR\x06staker\x12$\n\x0evrf_public_key\x18\x04\x20\x02(\tR\x0cv\ - rfPublicKey\x12)\n\x10decommission_key\x18\x05\x20\x02(\tR\x0fdecommissi\ - onKey\x129\n\x19margin_ratio_per_thousand\x18\x06\x20\x02(\rR\x16marginR\ - atioPerThousand\x12$\n\x0ecost_per_block\x18\x07\x20\x02(\x0cR\x0ccostPe\ - rBlock\"c\n&MintlayerProduceBlockFromStakeTxOutput\x12\x20\n\x0bdestinat\ - ion\x18\x01\x20\x02(\tR\x0bdestination\x12\x17\n\x07pool_id\x18\x02\x20\ - \x02(\x0cR\x06poolId\"`\n#MintlayerCreateDelegationIdTxOutput\x12\x20\n\ - \x0bdestination\x18\x01\x20\x02(\tR\x0bdestination\x12\x17\n\x07pool_id\ - \x18\x02\x20\x02(\x0cR\x06poolId\"_\n\x20MintlayerDelegateStakingTxOutpu\ - t\x12\x16\n\x06amount\x18\x01\x20\x02(\x0cR\x06amount\x12#\n\rdelegation\ - _id\x18\x02\x20\x02(\x0cR\x0cdelegationId\"\x8f\x01\n\x19MintlayerTokenT\ - otalSupply\x12O\n\x04type\x18\x01\x20\x02(\x0e2;.hw.trezor.messages.mint\ - layer.MintlayerTokenTotalSupplyTypeR\x04type\x12!\n\x0cfixed_amount\x18\ - \x02\x20\x01(\x0cR\x0bfixedAmount\"\xb6\x02\n#MintlayerIssueFungibleToke\ - nTxOutput\x12!\n\x0ctoken_ticker\x18\x01\x20\x02(\x0cR\x0btokenTicker\ - \x12,\n\x12number_of_decimals\x18\x02\x20\x02(\rR\x10numberOfDecimals\ - \x12!\n\x0cmetadata_uri\x18\x03\x20\x02(\x0cR\x0bmetadataUri\x12Z\n\x0ct\ - otal_supply\x18\x04\x20\x02(\x0b27.hw.trezor.messages.mintlayer.Mintlaye\ - rTokenTotalSupplyR\x0btotalSupply\x12\x1c\n\tauthority\x18\x05\x20\x02(\ - \tR\tauthority\x12!\n\x0cis_freezable\x18\x06\x20\x02(\x08R\x0bisFreezab\ - le\"\xcf\x02\n\x19MintlayerIssueNftTxOutput\x12\x19\n\x08token_id\x18\ - \x01\x20\x02(\x0cR\x07tokenId\x12\x20\n\x0bdestination\x18\x02\x20\x02(\ - \tR\x0bdestination\x12\x18\n\x07creator\x18\x03\x20\x01(\tR\x07creator\ - \x12\x12\n\x04name\x18\x04\x20\x02(\x0cR\x04name\x12\x20\n\x0bdescriptio\ - n\x18\x05\x20\x02(\x0cR\x0bdescription\x12\x16\n\x06ticker\x18\x06\x20\ - \x02(\x0cR\x06ticker\x12\x19\n\x08icon_uri\x18\x07\x20\x01(\x0cR\x07icon\ - Uri\x126\n\x17additional_metadata_uri\x18\x08\x20\x01(\x0cR\x15additiona\ - lMetadataUri\x12\x1b\n\tmedia_uri\x18\t\x20\x01(\x0cR\x08mediaUri\x12\ - \x1d\n\nmedia_hash\x18\n\x20\x02(\x0cR\tmediaHash\"2\n\x1cMintlayerDataD\ - epositTxOutput\x12\x12\n\x04data\x18\x01\x20\x02(\x0cR\x04data\"s\n\x0fM\ - intlayerPrevTx\x12\x18\n\x07version\x18\x01\x20\x02(\rR\x07version\x12!\ - \n\x0cinputs_count\x18\x06\x20\x02(\rR\x0binputsCount\x12#\n\routputs_co\ - unt\x18\x07\x20\x02(\rR\x0coutputsCount\"b\n\x12MintlayerPrevInput\x12\ - \x1b\n\tprev_hash\x18\x02\x20\x02(\x0cR\x08prevHash\x12\x1d\n\nprev_inde\ - x\x18\x03\x20\x02(\rR\tprevIndexJ\x04\x08\x01\x10\x02J\x04\x08\x04\x10\ - \x05J\x04\x08\x05\x10\x06\"g\n\x1bMintlayerPrevTransferOutput\x12H\n\x05\ - value\x18\x01\x20\x02(\x0b22.hw.trezor.messages.mintlayer.MintlayerOutpu\ - tValueR\x05value\"\xdf\x01\n\x17MintlayerTxAckUtxoInput\x12`\n\x02tx\x18\ - \x01\x20\x02(\x0b2P.hw.trezor.messages.mintlayer.MintlayerTxAckUtxoInput\ - .MintlayerTxAckInputWrapperR\x02tx\x1ab\n\x1aMintlayerTxAckInputWrapper\ - \x12D\n\x05input\x18\x02\x20\x02(\x0b2..hw.trezor.messages.mintlayer.Min\ - tlayerTxInputR\x05input\"\xde\x01\n\x14MintlayerTxAckOutput\x12^\n\x02tx\ - \x18\x01\x20\x02(\x0b2N.hw.trezor.messages.mintlayer.MintlayerTxAckOutpu\ - t.MintlayerTxAckOutputWrapperR\x02tx\x1af\n\x1bMintlayerTxAckOutputWrapp\ - er\x12G\n\x06output\x18\x05\x20\x02(\x0b2/.hw.trezor.messages.mintlayer.\ - MintlayerTxOutputR\x06output*/\n\x11MintlayerUtxoType\x12\x0f\n\x0bTRANS\ - ACTION\x10\0\x12\t\n\x05BLOCK\x10\x01*G\n\x1dMintlayerTokenTotalSupplyTy\ - pe\x12\t\n\x05FIXED\x10\0\x12\x0c\n\x08LOCKABLE\x10\x01\x12\r\n\tUNLIMIT\ - ED\x10\x02B=\n#com.satoshilabs.trezor.lib.protobufB\x16TrezorMessageMint\ - layer\ + en_id\x18\x02\x20\x01(\x0cR\x07tokenId\"\x7f\n\x19MintlayerTransferTxOut\ + put\x12\x18\n\x07address\x18\x01\x20\x01(\tR\x07address\x12H\n\x05value\ + \x18\x02\x20\x02(\x0b22.hw.trezor.messages.mintlayer.MintlayerOutputValu\ + eR\x05value\"\xa4\x01\n\x17MintlayerOutputTimeLock\x12!\n\x0cuntil_heigh\ + t\x18\x01\x20\x01(\x04R\x0buntilHeight\x12\x1d\n\nuntil_time\x18\x02\x20\ + \x01(\x04R\tuntilTime\x12&\n\x0ffor_block_count\x18\x03\x20\x01(\x04R\rf\ + orBlockCount\x12\x1f\n\x0bfor_seconds\x18\x04\x20\x01(\x04R\nforSeconds\ + \"\xd2\x01\n!MintlayerLockThenTransferTxOutput\x12\x18\n\x07address\x18\ + \x01\x20\x01(\tR\x07address\x12H\n\x05value\x18\x02\x20\x02(\x0b22.hw.tr\ + ezor.messages.mintlayer.MintlayerOutputValueR\x05value\x12I\n\x04lock\ + \x18\x03\x20\x02(\x0b25.hw.trezor.messages.mintlayer.MintlayerOutputTime\ + LockR\x04lock\"a\n\x15MintlayerBurnTxOutput\x12H\n\x05value\x18\x01\x20\ + \x02(\x0b22.hw.trezor.messages.mintlayer.MintlayerOutputValueR\x05value\ + \"\x9d\x02\n\x20MintlayerCreateStakePoolTxOutput\x12\x17\n\x07pool_id\ + \x18\x01\x20\x02(\x0cR\x06poolId\x12\x16\n\x06pledge\x18\x02\x20\x02(\ + \x0cR\x06pledge\x12\x16\n\x06staker\x18\x03\x20\x02(\tR\x06staker\x12$\n\ + \x0evrf_public_key\x18\x04\x20\x02(\tR\x0cvrfPublicKey\x12)\n\x10decommi\ + ssion_key\x18\x05\x20\x02(\tR\x0fdecommissionKey\x129\n\x19margin_ratio_\ + per_thousand\x18\x06\x20\x02(\rR\x16marginRatioPerThousand\x12$\n\x0ecos\ + t_per_block\x18\x07\x20\x02(\x0cR\x0ccostPerBlock\"c\n&MintlayerProduceB\ + lockFromStakeTxOutput\x12\x20\n\x0bdestination\x18\x01\x20\x02(\tR\x0bde\ + stination\x12\x17\n\x07pool_id\x18\x02\x20\x02(\x0cR\x06poolId\"`\n#Mint\ + layerCreateDelegationIdTxOutput\x12\x20\n\x0bdestination\x18\x01\x20\x02\ + (\tR\x0bdestination\x12\x17\n\x07pool_id\x18\x02\x20\x02(\x0cR\x06poolId\ + \"_\n\x20MintlayerDelegateStakingTxOutput\x12\x16\n\x06amount\x18\x01\ + \x20\x02(\x0cR\x06amount\x12#\n\rdelegation_id\x18\x02\x20\x02(\x0cR\x0c\ + delegationId\"\x8f\x01\n\x19MintlayerTokenTotalSupply\x12O\n\x04type\x18\ + \x01\x20\x02(\x0e2;.hw.trezor.messages.mintlayer.MintlayerTokenTotalSupp\ + lyTypeR\x04type\x12!\n\x0cfixed_amount\x18\x02\x20\x01(\x0cR\x0bfixedAmo\ + unt\"\xb6\x02\n#MintlayerIssueFungibleTokenTxOutput\x12!\n\x0ctoken_tick\ + er\x18\x01\x20\x02(\x0cR\x0btokenTicker\x12,\n\x12number_of_decimals\x18\ + \x02\x20\x02(\rR\x10numberOfDecimals\x12!\n\x0cmetadata_uri\x18\x03\x20\ + \x02(\x0cR\x0bmetadataUri\x12Z\n\x0ctotal_supply\x18\x04\x20\x02(\x0b27.\ + hw.trezor.messages.mintlayer.MintlayerTokenTotalSupplyR\x0btotalSupply\ + \x12\x1c\n\tauthority\x18\x05\x20\x02(\tR\tauthority\x12!\n\x0cis_freeza\ + ble\x18\x06\x20\x02(\x08R\x0bisFreezable\"\xcf\x02\n\x19MintlayerIssueNf\ + tTxOutput\x12\x19\n\x08token_id\x18\x01\x20\x02(\x0cR\x07tokenId\x12\x20\ + \n\x0bdestination\x18\x02\x20\x02(\tR\x0bdestination\x12\x18\n\x07creato\ + r\x18\x03\x20\x01(\tR\x07creator\x12\x12\n\x04name\x18\x04\x20\x02(\x0cR\ + \x04name\x12\x20\n\x0bdescription\x18\x05\x20\x02(\x0cR\x0bdescription\ + \x12\x16\n\x06ticker\x18\x06\x20\x02(\x0cR\x06ticker\x12\x19\n\x08icon_u\ + ri\x18\x07\x20\x01(\x0cR\x07iconUri\x126\n\x17additional_metadata_uri\ + \x18\x08\x20\x01(\x0cR\x15additionalMetadataUri\x12\x1b\n\tmedia_uri\x18\ + \t\x20\x01(\x0cR\x08mediaUri\x12\x1d\n\nmedia_hash\x18\n\x20\x02(\x0cR\t\ + mediaHash\"2\n\x1cMintlayerDataDepositTxOutput\x12\x12\n\x04data\x18\x01\ + \x20\x02(\x0cR\x04data\"s\n\x0fMintlayerPrevTx\x12\x18\n\x07version\x18\ + \x01\x20\x02(\rR\x07version\x12!\n\x0cinputs_count\x18\x06\x20\x02(\rR\ + \x0binputsCount\x12#\n\routputs_count\x18\x07\x20\x02(\rR\x0coutputsCoun\ + t\"b\n\x12MintlayerPrevInput\x12\x1b\n\tprev_hash\x18\x02\x20\x02(\x0cR\ + \x08prevHash\x12\x1d\n\nprev_index\x18\x03\x20\x02(\rR\tprevIndexJ\x04\ + \x08\x01\x10\x02J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06\"g\n\x1bMintl\ + ayerPrevTransferOutput\x12H\n\x05value\x18\x01\x20\x02(\x0b22.hw.trezor.\ + messages.mintlayer.MintlayerOutputValueR\x05value\"\xdf\x01\n\x17Mintlay\ + erTxAckUtxoInput\x12`\n\x02tx\x18\x01\x20\x02(\x0b2P.hw.trezor.messages.\ + mintlayer.MintlayerTxAckUtxoInput.MintlayerTxAckInputWrapperR\x02tx\x1ab\ + \n\x1aMintlayerTxAckInputWrapper\x12D\n\x05input\x18\x02\x20\x02(\x0b2..\ + hw.trezor.messages.mintlayer.MintlayerTxInputR\x05input\"\xde\x01\n\x14M\ + intlayerTxAckOutput\x12^\n\x02tx\x18\x01\x20\x02(\x0b2N.hw.trezor.messag\ + es.mintlayer.MintlayerTxAckOutput.MintlayerTxAckOutputWrapperR\x02tx\x1a\ + f\n\x1bMintlayerTxAckOutputWrapper\x12G\n\x06output\x18\x05\x20\x02(\x0b\ + 2/.hw.trezor.messages.mintlayer.MintlayerTxOutputR\x06output*/\n\x11Mint\ + layerUtxoType\x12\x0f\n\x0bTRANSACTION\x10\0\x12\t\n\x05BLOCK\x10\x01*G\ + \n\x1dMintlayerTokenTotalSupplyType\x12\t\n\x05FIXED\x10\0\x12\x0c\n\x08\ + LOCKABLE\x10\x01\x12\r\n\tUNLIMITED\x10\x02B=\n#com.satoshilabs.trezor.l\ + ib.protobufB\x16TrezorMessageMintlayer\ "; /// `FileDescriptorProto` object which was a source for this generated file @@ -9745,15 +10057,16 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { file_descriptor.get(|| { let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { let mut deps = ::std::vec::Vec::with_capacity(0); - let mut messages = ::std::vec::Vec::with_capacity(40); + let mut messages = ::std::vec::Vec::with_capacity(42); messages.push(MintlayerGetAddress::generated_message_descriptor_data()); messages.push(MintlayerAddress::generated_message_descriptor_data()); messages.push(MintlayerGetPublicKey::generated_message_descriptor_data()); messages.push(MintlayerPublicKey::generated_message_descriptor_data()); - messages.push(MintlayerVerifySig::generated_message_descriptor_data()); + messages.push(MintlayerSignMessage::generated_message_descriptor_data()); messages.push(MintlayerSignTx::generated_message_descriptor_data()); messages.push(MintlayerTxRequest::generated_message_descriptor_data()); messages.push(MintlayerTxInput::generated_message_descriptor_data()); + messages.push(MintlayerAddressPath::generated_message_descriptor_data()); messages.push(MintlayerUtxoTxInput::generated_message_descriptor_data()); messages.push(MintlayerAccountTxInput::generated_message_descriptor_data()); messages.push(MintlayerAccountCommandTxInput::generated_message_descriptor_data()); @@ -9783,6 +10096,7 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { messages.push(MintlayerTxAckUtxoInput::generated_message_descriptor_data()); messages.push(MintlayerTxAckOutput::generated_message_descriptor_data()); messages.push(mintlayer_tx_request::MintlayerTxRequestDetailsType::generated_message_descriptor_data()); + messages.push(mintlayer_tx_request::MintlayerSignature::generated_message_descriptor_data()); messages.push(mintlayer_tx_request::MintlayerTxRequestSerializedType::generated_message_descriptor_data()); messages.push(mintlayer_tx_ack_utxo_input::MintlayerTxAckInputWrapper::generated_message_descriptor_data()); messages.push(mintlayer_tx_ack_output::MintlayerTxAckOutputWrapper::generated_message_descriptor_data());