diff --git a/common/protob/Makefile b/common/protob/Makefile index 8c26b858d3..db07acd430 100644 --- a/common/protob/Makefile +++ b/common/protob/Makefile @@ -1,4 +1,4 @@ -check: messages.pb messages-binance.pb messages-bitcoin.pb messages-bootloader.pb messages-cardano.pb messages-common.pb messages-crypto.pb messages-debug.pb messages-ethereum.pb messages-management.pb messages-monero.pb messages-nem.pb messages-ripple.pb messages-stellar.pb messages-tezos.pb messages-eos.pb messages-solana.pb messages-definitions.pb +check: messages.pb messages-bitcoin.pb messages-bootloader.pb messages-cardano.pb messages-common.pb messages-crypto.pb messages-debug.pb messages-ethereum.pb messages-management.pb messages-monero.pb messages-nem.pb messages-ripple.pb messages-stellar.pb messages-tezos.pb messages-eos.pb messages-solana.pb messages-definitions.pb %.pb: %.proto protoc -I/usr/include -I. $< -o $@ diff --git a/common/protob/messages-binance.proto b/common/protob/messages-binance.proto deleted file mode 100644 index 6a46c10158..0000000000 --- a/common/protob/messages-binance.proto +++ /dev/null @@ -1,158 +0,0 @@ -syntax = "proto2"; -package hw.trezor.messages.binance; - -// Sugar for easier handling in Java -option java_package = "com.satoshilabs.trezor.lib.protobuf"; -option java_outer_classname = "TrezorMessageBinance"; - -/** XXX - -Most likely, ALL fields in this file should be `required`. We are leaving some optionals -in place, in cases where the field value continues to the JSON as a string -- on the off -chance that somebody is relying on the behavior. - -*/ - -/** - * Request: Ask the device for a Binance address. - * @start - * @next BinanceAddress - * @next Failure - */ -message BinanceGetAddress { - repeated uint32 address_n = 1; // BIP-32-style path to derive the key from master node - optional bool show_display = 2; // optionally prompt for confirmation on trezor display - optional bool chunkify = 3; // display the address in chunks of 4 characters -} - -/** - * Response: A Binance address. - * @end - */ -message BinanceAddress { - required string address = 1; // prefixed bech32 Binance address -} - -/** - * Request: Ask device for a public key corresponding to address_n path. - * @start - * @next BinancePublicKey - */ -message BinanceGetPublicKey { - repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node - optional bool show_display = 2; // optionally show on display before sending the result -} - -/** - * Response: A public key corresponding to address_n path. - * @end - */ -message BinancePublicKey { - required bytes public_key = 1; -} - -/** - * Request: Starts the Binance transaction protocol flow. - * A transaction consists of these common fields and a series of BinanceMsg messages. - * These parts form a JSON structure (a string) in Trezor's memory, which is signed to produce a BinanceSignedTx. - * @start - * @next BinanceTxRequest - * @next Failure -*/ -message BinanceSignTx { - repeated uint32 address_n = 1; // BIP-32-style path to derive the key from master node - required uint32 msg_count = 2; // count of BinanceMsg to be included in this tx - required sint64 account_number = 3; - optional string chain_id = 4; - optional string memo = 5; - required sint64 sequence = 6; - required sint64 source = 7; - optional bool chunkify = 8; // display the address in chunks of 4 characters -} - -/** - * Response: Trezor requests the next message or signals that it is ready to send a BinanceSignedTx. - * @next BinanceTransferMsg - * @next BinanceOrderMsg - * @next BinanceCancelMsg - */ -message BinanceTxRequest { -} - -/** - * Request: Ask the device to include a Binance transfer msg in the tx. - * @next BinanceSignedTx - * @next Failure - */ -message BinanceTransferMsg { - repeated BinanceInputOutput inputs = 1; - repeated BinanceInputOutput outputs = 2; - optional bool chunkify = 3; // display the address in chunks of 4 characters - - message BinanceInputOutput { - required string address = 1; - repeated BinanceCoin coins = 2; - } - - message BinanceCoin { - required sint64 amount = 1; - required string denom = 2; - } -} - -/** - * Request: Ask the device to include a Binance order msg in the tx. - * @next BinanceSignedTx - * @next Failure - */ -message BinanceOrderMsg { - optional string id = 1; - required BinanceOrderType ordertype = 2; - required sint64 price = 3; - required sint64 quantity = 4; - optional string sender = 5; - required BinanceOrderSide side = 6; - optional string symbol = 7; - required BinanceTimeInForce timeinforce = 8; - - enum BinanceOrderType { - OT_UNKNOWN = 0; - MARKET = 1; - LIMIT = 2; - OT_RESERVED = 3; - } - - enum BinanceOrderSide { - SIDE_UNKNOWN = 0; - BUY = 1; - SELL = 2; - } - - enum BinanceTimeInForce { - TIF_UNKNOWN = 0; - GTE = 1; - TIF_RESERVED = 2; - IOC = 3; - } -} - -/** - * Request: Ask the device to include a Binance cancel msg in the tx. - * @next BinanceSignedTx - * @next Failure - */ -message BinanceCancelMsg { - optional string refid = 1; - optional string sender = 2; - optional string symbol = 3; -} - -/** - * Response: A transaction signature and public key corresponding to the address_n path in BinanceSignTx. - * @end - */ -message BinanceSignedTx { - required bytes signature = 1; - required bytes public_key = 2; -} - diff --git a/common/protob/messages-management.proto b/common/protob/messages-management.proto index 1533c9c21c..1f32c20146 100644 --- a/common/protob/messages-management.proto +++ b/common/protob/messages-management.proto @@ -147,7 +147,7 @@ message Features { Capability_Bitcoin = 1 [(bitcoin_only) = true]; Capability_Bitcoin_like = 2; // Altcoins based on the Bitcoin source code - Capability_Binance = 3; + Capability_Binance = 3; // BNB Smart Chain Capability_Cardano = 4; Capability_Crypto = 5 [(bitcoin_only) = true]; // generic crypto operations for GPG, SSH, etc. Capability_EOS = 6; diff --git a/common/protob/messages.proto b/common/protob/messages.proto index 367632be02..6bb00fff87 100644 --- a/common/protob/messages.proto +++ b/common/protob/messages.proto @@ -297,17 +297,8 @@ enum MessageType { MessageType_EosTxActionAck = 604 [(wire_in) = true]; MessageType_EosSignedTx = 605 [(wire_out) = true]; - // Binance - MessageType_BinanceGetAddress = 700 [(wire_in) = true]; - MessageType_BinanceAddress = 701 [(wire_out) = true]; - MessageType_BinanceGetPublicKey = 702 [(wire_in) = true]; - MessageType_BinancePublicKey = 703 [(wire_out) = true]; - MessageType_BinanceSignTx = 704 [(wire_in) = true]; - MessageType_BinanceTxRequest = 705 [(wire_out) = true]; - MessageType_BinanceTransferMsg = 706 [(wire_in) = true]; - MessageType_BinanceOrderMsg = 707 [(wire_in) = true]; - MessageType_BinanceCancelMsg = 708 [(wire_in) = true]; - MessageType_BinanceSignedTx = 709 [(wire_out) = true]; + // BNB Beacon Chain (deprecated) + reserved 700 to 709; // WebAuthn MessageType_WebAuthnListResidentCredentials = 800 [(wire_in) = true]; diff --git a/common/tools/cointool.py b/common/tools/cointool.py index 4a8ee09608..207ed28aea 100755 --- a/common/tools/cointool.py +++ b/common/tools/cointool.py @@ -138,7 +138,6 @@ MAKO_FILTERS = { } ALTCOIN_PREFIXES = ( - "binance", "cardano", "eos", "ethereum", diff --git a/core/.changelog.d/4227.removed b/core/.changelog.d/4227.removed new file mode 100644 index 0000000000..7348bab0aa --- /dev/null +++ b/core/.changelog.d/4227.removed @@ -0,0 +1 @@ +Remove BNB Beacon Chain support. diff --git a/core/SConscript.firmware b/core/SConscript.firmware index ae60793ffb..9118826234 100644 --- a/core/SConscript.firmware +++ b/core/SConscript.firmware @@ -617,7 +617,6 @@ if FROZEN: SOURCE_PY_DEBUG_ENUMS = [SOURCE_PY_DIR + 'trezor/enums/Debug*.py'] SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/*.py', exclude=[ - SOURCE_PY_DIR + 'trezor/enums/Binance*.py', SOURCE_PY_DIR + 'trezor/enums/Cardano*.py', SOURCE_PY_DIR + 'trezor/enums/DebugMonero*.py', SOURCE_PY_DIR + 'trezor/enums/DefinitionType.py', @@ -676,9 +675,6 @@ if FROZEN: SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/common/definitions_constants.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/DefinitionType.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/binance/*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Binance*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/cardano/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/cardano/*/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Cardano*.py')) diff --git a/core/SConscript.unix b/core/SConscript.unix index 22295f1767..58491b9c4b 100644 --- a/core/SConscript.unix +++ b/core/SConscript.unix @@ -671,7 +671,6 @@ if FROZEN: SOURCE_PY_DEBUG_ENUMS = [SOURCE_PY_DIR + 'trezor/enums/Debug*.py'] SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/*.py', exclude=[ - SOURCE_PY_DIR + 'trezor/enums/Binance*.py', SOURCE_PY_DIR + 'trezor/enums/Cardano*.py', SOURCE_PY_DIR + 'trezor/enums/DebugMonero*.py', SOURCE_PY_DIR + 'trezor/enums/DefinitionType.py', @@ -731,9 +730,6 @@ if FROZEN: SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/common/definitions_constants.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/DefinitionType.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/binance/*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Binance*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/cardano/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/cardano/*/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Cardano*.py')) diff --git a/core/embed/rust/librust_qstr.h b/core/embed/rust/librust_qstr.h index 59bb4f2796..a3bb302af7 100644 --- a/core/embed/rust/librust_qstr.h +++ b/core/embed/rust/librust_qstr.h @@ -832,18 +832,6 @@ static void _librust_qstrs(void) { MP_QSTR_wrong_pin; MP_QSTR_xpubs; #if !BITCOIN_ONLY - MP_QSTR_binance__buy; - MP_QSTR_binance__confirm_cancel; - MP_QSTR_binance__confirm_input; - MP_QSTR_binance__confirm_order; - MP_QSTR_binance__confirm_output; - MP_QSTR_binance__order_id; - MP_QSTR_binance__pair; - MP_QSTR_binance__price; - MP_QSTR_binance__quantity; - MP_QSTR_binance__sell; - MP_QSTR_binance__sender_address; - MP_QSTR_binance__side; MP_QSTR_cardano__addr_base; MP_QSTR_cardano__addr_enterprise; MP_QSTR_cardano__addr_legacy; diff --git a/core/embed/rust/src/translations/generated/translated_string.rs b/core/embed/rust/src/translations/generated/translated_string.rs index 824fe1efbc..dbf00b5491 100644 --- a/core/embed/rust/src/translations/generated/translated_string.rs +++ b/core/embed/rust/src/translations/generated/translated_string.rs @@ -37,30 +37,6 @@ pub enum TranslatedString { backup__title_backup_wallet = 23, // "Back up wallet" backup__title_skip = 24, // "Skip backup" backup__want_to_skip = 25, // "Are you sure you want to skip the backup?" - #[cfg(feature = "universal_fw")] - binance__buy = 26, // "Buy" - #[cfg(feature = "universal_fw")] - binance__confirm_cancel = 27, // "Confirm cancel" - #[cfg(feature = "universal_fw")] - binance__confirm_input = 28, // "Confirm input" - #[cfg(feature = "universal_fw")] - binance__confirm_order = 29, // "Confirm order" - #[cfg(feature = "universal_fw")] - binance__confirm_output = 30, // "Confirm output" - #[cfg(feature = "universal_fw")] - binance__order_id = 31, // "Order ID:" - #[cfg(feature = "universal_fw")] - binance__pair = 32, // "Pair:" - #[cfg(feature = "universal_fw")] - binance__price = 33, // "Price:" - #[cfg(feature = "universal_fw")] - binance__quantity = 34, // "Quantity:" - #[cfg(feature = "universal_fw")] - binance__sell = 35, // "Sell" - #[cfg(feature = "universal_fw")] - binance__sender_address = 36, // "Sender address:" - #[cfg(feature = "universal_fw")] - binance__side = 37, // "Side:" bitcoin__commitment_data = 38, // "Commitment data" bitcoin__confirm_locktime = 39, // "Confirm locktime" bitcoin__create_proof_of_ownership = 40, // "Do you want to create a proof of ownership?" @@ -1446,30 +1422,6 @@ impl TranslatedString { (Self::backup__title_backup_wallet, "Back up wallet"), (Self::backup__title_skip, "Skip backup"), (Self::backup__want_to_skip, "Are you sure you want to skip the backup?"), - #[cfg(feature = "universal_fw")] - (Self::binance__buy, "Buy"), - #[cfg(feature = "universal_fw")] - (Self::binance__confirm_cancel, "Confirm cancel"), - #[cfg(feature = "universal_fw")] - (Self::binance__confirm_input, "Confirm input"), - #[cfg(feature = "universal_fw")] - (Self::binance__confirm_order, "Confirm order"), - #[cfg(feature = "universal_fw")] - (Self::binance__confirm_output, "Confirm output"), - #[cfg(feature = "universal_fw")] - (Self::binance__order_id, "Order ID:"), - #[cfg(feature = "universal_fw")] - (Self::binance__pair, "Pair:"), - #[cfg(feature = "universal_fw")] - (Self::binance__price, "Price:"), - #[cfg(feature = "universal_fw")] - (Self::binance__quantity, "Quantity:"), - #[cfg(feature = "universal_fw")] - (Self::binance__sell, "Sell"), - #[cfg(feature = "universal_fw")] - (Self::binance__sender_address, "Sender address:"), - #[cfg(feature = "universal_fw")] - (Self::binance__side, "Side:"), (Self::bitcoin__commitment_data, "Commitment data"), (Self::bitcoin__confirm_locktime, "Confirm locktime"), (Self::bitcoin__create_proof_of_ownership, "Do you want to create a proof of ownership?"), @@ -2868,30 +2820,6 @@ impl TranslatedString { (Qstr::MP_QSTR_backup__title_create_wallet_backup, Self::backup__title_create_wallet_backup), (Qstr::MP_QSTR_backup__title_skip, Self::backup__title_skip), (Qstr::MP_QSTR_backup__want_to_skip, Self::backup__want_to_skip), - #[cfg(feature = "universal_fw")] - (Qstr::MP_QSTR_binance__buy, Self::binance__buy), - #[cfg(feature = "universal_fw")] - (Qstr::MP_QSTR_binance__confirm_cancel, Self::binance__confirm_cancel), - #[cfg(feature = "universal_fw")] - (Qstr::MP_QSTR_binance__confirm_input, Self::binance__confirm_input), - #[cfg(feature = "universal_fw")] - (Qstr::MP_QSTR_binance__confirm_order, Self::binance__confirm_order), - #[cfg(feature = "universal_fw")] - (Qstr::MP_QSTR_binance__confirm_output, Self::binance__confirm_output), - #[cfg(feature = "universal_fw")] - (Qstr::MP_QSTR_binance__order_id, Self::binance__order_id), - #[cfg(feature = "universal_fw")] - (Qstr::MP_QSTR_binance__pair, Self::binance__pair), - #[cfg(feature = "universal_fw")] - (Qstr::MP_QSTR_binance__price, Self::binance__price), - #[cfg(feature = "universal_fw")] - (Qstr::MP_QSTR_binance__quantity, Self::binance__quantity), - #[cfg(feature = "universal_fw")] - (Qstr::MP_QSTR_binance__sell, Self::binance__sell), - #[cfg(feature = "universal_fw")] - (Qstr::MP_QSTR_binance__sender_address, Self::binance__sender_address), - #[cfg(feature = "universal_fw")] - (Qstr::MP_QSTR_binance__side, Self::binance__side), (Qstr::MP_QSTR_bitcoin__commitment_data, Self::bitcoin__commitment_data), (Qstr::MP_QSTR_bitcoin__confirm_locktime, Self::bitcoin__confirm_locktime), (Qstr::MP_QSTR_bitcoin__create_proof_of_ownership, Self::bitcoin__create_proof_of_ownership), diff --git a/core/embed/upymod/qstrdefsport.h b/core/embed/upymod/qstrdefsport.h index 55ff95f900..5ff7909fa0 100644 --- a/core/embed/upymod/qstrdefsport.h +++ b/core/embed/upymod/qstrdefsport.h @@ -378,9 +378,6 @@ Q(thp) #endif #if !BITCOIN_ONLY -Q(BinanceOrderSide) -Q(BinanceOrderType) -Q(BinanceTimeInForce) Q(CardanoAddressType) Q(CardanoCVoteRegistrationFormat) Q(CardanoCertificateType) @@ -408,12 +405,6 @@ Q(account_path_check) Q(actions) Q(add_resident_credential) Q(addresses) -Q(apps.binance) -Q(apps.binance.get_address) -Q(apps.binance.get_public_key) -Q(apps.binance.helpers) -Q(apps.binance.layout) -Q(apps.binance.sign_tx) Q(apps.bitcoin.sign_tx.zcash_v4) Q(apps.cardano) Q(apps.cardano.addresses) @@ -588,7 +579,6 @@ Q(base) Q(base58_ripple) Q(base_types) Q(bech32) -Q(binance) Q(bulletproof) Q(byron_addresses) Q(cardano) @@ -681,9 +671,6 @@ Q(token_account) Q(tokens) Q(transaction) Q(transfer) -Q(trezor.enums.BinanceOrderSide) -Q(trezor.enums.BinanceOrderType) -Q(trezor.enums.BinanceTimeInForce) Q(trezor.enums.CardanoAddressType) Q(trezor.enums.CardanoCVoteRegistrationFormat) Q(trezor.enums.CardanoCertificateType) diff --git a/core/embed/upymod/qstrdefsport.h.mako b/core/embed/upymod/qstrdefsport.h.mako index e12bafa9d6..cac3f9c338 100644 --- a/core/embed/upymod/qstrdefsport.h.mako +++ b/core/embed/upymod/qstrdefsport.h.mako @@ -17,7 +17,6 @@ PATTERNS = ( ) ALTCOINS = ( - "binance", "cardano", "eos", "ethereum", diff --git a/core/mocks/trezortranslate_keys.pyi b/core/mocks/trezortranslate_keys.pyi index 8796db70ad..e8aa0d0431 100644 --- a/core/mocks/trezortranslate_keys.pyi +++ b/core/mocks/trezortranslate_keys.pyi @@ -41,18 +41,6 @@ class TR: backup__title_create_wallet_backup: str = "Create wallet backup" backup__title_skip: str = "Skip backup" backup__want_to_skip: str = "Are you sure you want to skip the backup?" - binance__buy: str = "Buy" - binance__confirm_cancel: str = "Confirm cancel" - binance__confirm_input: str = "Confirm input" - binance__confirm_order: str = "Confirm order" - binance__confirm_output: str = "Confirm output" - binance__order_id: str = "Order ID:" - binance__pair: str = "Pair:" - binance__price: str = "Price:" - binance__quantity: str = "Quantity:" - binance__sell: str = "Sell" - binance__sender_address: str = "Sender address:" - binance__side: str = "Side:" bitcoin__commitment_data: str = "Commitment data" bitcoin__confirm_locktime: str = "Confirm locktime" bitcoin__create_proof_of_ownership: str = "Do you want to create a proof of ownership?" diff --git a/core/src/apps/binance/README.md b/core/src/apps/binance/README.md deleted file mode 100644 index 79cccbeab7..0000000000 --- a/core/src/apps/binance/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Binance - -MAINTAINER = Stanislav Marcinko - -AUTHOR = Stanislav Marcinko - -REVIEWER = Jan Matějek - ------ - -Implementation is based on [binance chain documentation](https://binance-chain.github.io/blockchain.html) and tested against fixtures from [binance javascript sdk](https://github.com/binance-chain/javascript-sdk/). Only a subset of messages needed for sdk integration is implemented. - -## Transactions - -Binance transaction consists of a transaction message wrapped in a standard transaction structure (see documentation). One message per transaction. - -Implemented subset of messages: -Place Order -Cancel Order -Transfer - -## Testing - -Mnemonic for recovering wallet used in binance sdk tests: -offer caution gift cross surge pretty orange during eye soldier popular holiday mention east eight office fashion ill parrot vault rent devote earth cousin diff --git a/core/src/apps/binance/__init__.py b/core/src/apps/binance/__init__.py deleted file mode 100644 index 3947ffdab7..0000000000 --- a/core/src/apps/binance/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -from apps.common.paths import PATTERN_BIP44 - -CURVE = "secp256k1" -SLIP44_ID = 714 -PATTERN = PATTERN_BIP44 diff --git a/core/src/apps/binance/get_address.py b/core/src/apps/binance/get_address.py deleted file mode 100644 index 3e017a7d3d..0000000000 --- a/core/src/apps/binance/get_address.py +++ /dev/null @@ -1,38 +0,0 @@ -from typing import TYPE_CHECKING - -from apps.common.keychain import auto_keychain - -if TYPE_CHECKING: - from trezor.messages import BinanceAddress, BinanceGetAddress - - from apps.common.keychain import Keychain - - -@auto_keychain(__name__) -async def get_address(msg: BinanceGetAddress, keychain: Keychain) -> BinanceAddress: - from trezor.messages import BinanceAddress - from trezor.ui.layouts import show_address - - from apps.common import paths - - from .helpers import address_from_public_key - - HRP = "bnb" - address_n = msg.address_n # local_cache_attribute - - await paths.validate_path(keychain, address_n) - - node = keychain.derive(address_n) - pubkey = node.public_key() - address = address_from_public_key(pubkey, HRP) - if msg.show_display: - from . import PATTERN, SLIP44_ID - - await show_address( - address, - path=paths.address_n_to_str(address_n), - account=paths.get_account_name("BNB", address_n, PATTERN, SLIP44_ID), - chunkify=bool(msg.chunkify), - ) - - return BinanceAddress(address=address) diff --git a/core/src/apps/binance/get_public_key.py b/core/src/apps/binance/get_public_key.py deleted file mode 100644 index 89f3b13dfc..0000000000 --- a/core/src/apps/binance/get_public_key.py +++ /dev/null @@ -1,36 +0,0 @@ -from typing import TYPE_CHECKING - -from apps.common.keychain import auto_keychain - -if TYPE_CHECKING: - from trezor.messages import BinanceGetPublicKey, BinancePublicKey - - from apps.common.keychain import Keychain - - -@auto_keychain(__name__) -async def get_public_key( - msg: BinanceGetPublicKey, keychain: Keychain -) -> BinancePublicKey: - from ubinascii import hexlify - - from trezor.messages import BinancePublicKey - from trezor.ui.layouts import show_pubkey - - from apps.common import paths - - await paths.validate_path(keychain, msg.address_n) - node = keychain.derive(msg.address_n) - pubkey = node.public_key() - - if msg.show_display: - from . import PATTERN, SLIP44_ID - - path = paths.address_n_to_str(msg.address_n) - await show_pubkey( - hexlify(pubkey).decode(), - account=paths.get_account_name("BNB", msg.address_n, PATTERN, SLIP44_ID), - path=path, - ) - - return BinancePublicKey(public_key=pubkey) diff --git a/core/src/apps/binance/helpers.py b/core/src/apps/binance/helpers.py deleted file mode 100644 index 52df2ec8a0..0000000000 --- a/core/src/apps/binance/helpers.py +++ /dev/null @@ -1,79 +0,0 @@ -from micropython import const -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from trezor.messages import BinanceInputOutput, BinanceSignTx - from trezor.protobuf import MessageType - -# 1*10^8 Jagers equal 1 BNB https://www.binance.vision/glossary/jager -DECIMALS = const(8) - - -# NOTE: it is 11 bytes smaller to define it on top level than inside a function -def _make_input_output(input_output: BinanceInputOutput) -> str: - COIN_BLUEPRINT = '{{"amount":{},"denom":"{}"}}' - INPUT_OUTPUT_BLUEPRINT = '{{"address":"{}","coins":[{}]}}' - - coins = ",".join( - COIN_BLUEPRINT.format(c.amount, c.denom) for c in input_output.coins - ) - return INPUT_OUTPUT_BLUEPRINT.format(input_output.address, coins) - - -def produce_json_for_signing(envelope: BinanceSignTx, msg: MessageType) -> str: - from trezor import wire - from trezor.messages import BinanceCancelMsg, BinanceOrderMsg, BinanceTransferMsg - - # NOTE: not defining kwargs in format string saves 7 bytes per each argument - ENVELOPE_BLUEPRINT = '{{"account_number":"{}","chain_id":"{}","data":null,"memo":"{}","msgs":[{}],"sequence":"{}","source":"{}"}}' - MSG_TRANSFER_BLUEPRINT = '{{"inputs":[{}],"outputs":[{}]}}' - MSG_NEWORDER_BLUEPRINT = '{{"id":"{}","ordertype":{},"price":{},"quantity":{},"sender":"{}","side":{},"symbol":"{}","timeinforce":{}}}' - MSG_CANCEL_BLUEPRINT = '{{"refid":"{}","sender":"{}","symbol":"{}"}}' - - if BinanceTransferMsg.is_type_of(msg): - inputs = ",".join(_make_input_output(i) for i in msg.inputs) - outputs = ",".join(_make_input_output(o) for o in msg.outputs) - json_msg = MSG_TRANSFER_BLUEPRINT.format(inputs, outputs) - elif BinanceOrderMsg.is_type_of(msg): - json_msg = MSG_NEWORDER_BLUEPRINT.format( - msg.id, - msg.ordertype, - msg.price, - msg.quantity, - msg.sender, - msg.side, - msg.symbol, - msg.timeinforce, - ) - elif BinanceCancelMsg.is_type_of(msg): - json_msg = MSG_CANCEL_BLUEPRINT.format(msg.refid, msg.sender, msg.symbol) - else: - raise wire.ProcessError("input message unrecognized") - - if envelope.source < 0: - raise wire.DataError("Source is invalid") - - return ENVELOPE_BLUEPRINT.format( - envelope.account_number, - envelope.chain_id, - envelope.memo, - json_msg, - envelope.sequence, - envelope.source, - ) - - -def address_from_public_key(pubkey: bytes, hrp: str) -> str: - """ - Address = RIPEMD160(SHA256(compressed public key)) - Address_Bech32 = HRP + '1' + bech32.encode(convert8BitsTo5Bits(RIPEMD160(SHA256(compressed public key)))) - HRP - bnb for productions, tbnb for tests - """ - from trezor.crypto import bech32 - from trezor.crypto.scripts import sha256_ripemd160 - - h = sha256_ripemd160(pubkey).digest() - - assert (len(h) * 8) % 5 == 0 # no padding will be added by convertbits - convertedbits = bech32.convertbits(h, 8, 5) - return bech32.bech32_encode(hrp, convertedbits, bech32.Encoding.BECH32) diff --git a/core/src/apps/binance/layout.py b/core/src/apps/binance/layout.py deleted file mode 100644 index f4ad400d61..0000000000 --- a/core/src/apps/binance/layout.py +++ /dev/null @@ -1,88 +0,0 @@ -from typing import TYPE_CHECKING, Sequence - -from trezor import TR -from trezor.enums import ButtonRequestType -from trezor.strings import format_amount -from trezor.ui.layouts import confirm_properties - -from .helpers import DECIMALS - -if TYPE_CHECKING: - from trezor.messages import ( - BinanceCancelMsg, - BinanceInputOutput, - BinanceOrderMsg, - BinanceTransferMsg, - ) - - -async def require_confirm_transfer(msg: BinanceTransferMsg) -> None: - items: list[tuple[str, str, str]] = [] - - def make_input_output_pages(msg: BinanceInputOutput, direction: str) -> None: - for coin in msg.coins: - items.append( - ( - direction, - format_amount(coin.amount, DECIMALS) + " " + coin.denom, - msg.address, - ) - ) - - for txinput in msg.inputs: - make_input_output_pages(txinput, TR.binance__confirm_input) - - for txoutput in msg.outputs: - make_input_output_pages(txoutput, TR.binance__confirm_output) - - await _confirm_transfer(items, chunkify=bool(msg.chunkify)) - - -async def _confirm_transfer( - inputs_outputs: Sequence[tuple[str, str, str]], chunkify: bool -) -> None: - from trezor.ui.layouts import confirm_output - - for index, (title, amount, address) in enumerate(inputs_outputs): - # Having hold=True on the last item - hold = index == len(inputs_outputs) - 1 - await confirm_output(address, amount, title, hold=hold, chunkify=chunkify) - - -async def require_confirm_cancel(msg: BinanceCancelMsg) -> None: - await confirm_properties( - "confirm_cancel", - TR.binance__confirm_cancel, - ( - (TR.binance__sender_address, str(msg.sender)), - (TR.binance__pair, str(msg.symbol)), - (TR.binance__order_id, str(msg.refid)), - ), - hold=True, - br_code=ButtonRequestType.SignTx, - ) - - -async def require_confirm_order(msg: BinanceOrderMsg) -> None: - from trezor.enums import BinanceOrderSide - - if msg.side == BinanceOrderSide.BUY: - side = TR.binance__buy - elif msg.side == BinanceOrderSide.SELL: - side = TR.binance__sell - else: - side = TR.words__unknown - - await confirm_properties( - "confirm_order", - TR.binance__confirm_order, - ( - (TR.binance__sender_address, str(msg.sender)), - (TR.binance__pair, str(msg.symbol)), - (TR.binance__side, side), - (TR.binance__quantity, format_amount(msg.quantity, DECIMALS)), - (TR.binance__price, format_amount(msg.price, DECIMALS)), - ), - hold=True, - br_code=ButtonRequestType.SignTx, - ) diff --git a/core/src/apps/binance/sign_tx.py b/core/src/apps/binance/sign_tx.py deleted file mode 100644 index ab5b127a57..0000000000 --- a/core/src/apps/binance/sign_tx.py +++ /dev/null @@ -1,64 +0,0 @@ -from typing import TYPE_CHECKING - -from apps.common.keychain import auto_keychain - -if TYPE_CHECKING: - from trezor.messages import BinanceSignedTx, BinanceSignTx - - from apps.common.keychain import Keychain - - -@auto_keychain(__name__) -async def sign_tx(envelope: BinanceSignTx, keychain: Keychain) -> BinanceSignedTx: - from trezor import wire - from trezor.crypto.curve import secp256k1 - from trezor.crypto.hashlib import sha256 - from trezor.enums import MessageType - from trezor.messages import ( - BinanceCancelMsg, - BinanceOrderMsg, - BinanceSignedTx, - BinanceTransferMsg, - BinanceTxRequest, - ) - from trezor.wire.context import call_any - - from apps.common import paths - - from . import helpers, layout - - # create transaction message -> sign it -> create signature/pubkey message -> serialize all - if envelope.msg_count > 1: - raise wire.DataError("Multiple messages not supported.") - - await paths.validate_path(keychain, envelope.address_n) - node = keychain.derive(envelope.address_n) - - tx_req = BinanceTxRequest() - - msg = await call_any( - tx_req, - MessageType.BinanceCancelMsg, - MessageType.BinanceOrderMsg, - MessageType.BinanceTransferMsg, - ) - - if envelope.source < 0: - raise wire.DataError("Source is invalid.") - - msg_json = helpers.produce_json_for_signing(envelope, msg) - - if BinanceTransferMsg.is_type_of(msg): - await layout.require_confirm_transfer(msg) - elif BinanceOrderMsg.is_type_of(msg): - await layout.require_confirm_order(msg) - elif BinanceCancelMsg.is_type_of(msg): - await layout.require_confirm_cancel(msg) - else: - raise wire.ProcessError("input message unrecognized") - - # generate_content_signature - msghash = sha256(msg_json.encode()).digest() - signature_bytes = secp256k1.sign(node.private_key(), msghash)[1:65] - - return BinanceSignedTx(signature=signature_bytes, public_key=node.public_key()) diff --git a/core/src/apps/workflow_handlers.py b/core/src/apps/workflow_handlers.py index 9c6d4075d3..6456b31669 100644 --- a/core/src/apps/workflow_handlers.py +++ b/core/src/apps/workflow_handlers.py @@ -208,14 +208,6 @@ def _find_message_handler_module(msg_type: int) -> str: if msg_type == MessageType.EosSignTx: return "apps.eos.sign_tx" - # binance - if msg_type == MessageType.BinanceGetAddress: - return "apps.binance.get_address" - if msg_type == MessageType.BinanceGetPublicKey: - return "apps.binance.get_public_key" - if msg_type == MessageType.BinanceSignTx: - return "apps.binance.sign_tx" - # solana if msg_type == MessageType.SolanaGetPublicKey: return "apps.solana.get_public_key" diff --git a/core/src/trezor/enums/BinanceOrderSide.py b/core/src/trezor/enums/BinanceOrderSide.py deleted file mode 100644 index 7cc3fd9c54..0000000000 --- a/core/src/trezor/enums/BinanceOrderSide.py +++ /dev/null @@ -1,7 +0,0 @@ -# Automatically generated by pb2py -# fmt: off -# isort:skip_file - -SIDE_UNKNOWN = 0 -BUY = 1 -SELL = 2 diff --git a/core/src/trezor/enums/BinanceOrderType.py b/core/src/trezor/enums/BinanceOrderType.py deleted file mode 100644 index 1bea99f293..0000000000 --- a/core/src/trezor/enums/BinanceOrderType.py +++ /dev/null @@ -1,8 +0,0 @@ -# Automatically generated by pb2py -# fmt: off -# isort:skip_file - -OT_UNKNOWN = 0 -MARKET = 1 -LIMIT = 2 -OT_RESERVED = 3 diff --git a/core/src/trezor/enums/BinanceTimeInForce.py b/core/src/trezor/enums/BinanceTimeInForce.py deleted file mode 100644 index 2a67d9a849..0000000000 --- a/core/src/trezor/enums/BinanceTimeInForce.py +++ /dev/null @@ -1,8 +0,0 @@ -# Automatically generated by pb2py -# fmt: off -# isort:skip_file - -TIF_UNKNOWN = 0 -GTE = 1 -TIF_RESERVED = 2 -IOC = 3 diff --git a/core/src/trezor/enums/MessageType.py b/core/src/trezor/enums/MessageType.py index c47eb8aa29..7c56e777e1 100644 --- a/core/src/trezor/enums/MessageType.py +++ b/core/src/trezor/enums/MessageType.py @@ -232,16 +232,6 @@ if not utils.BITCOIN_ONLY: EosTxActionRequest = 603 EosTxActionAck = 604 EosSignedTx = 605 - BinanceGetAddress = 700 - BinanceAddress = 701 - BinanceGetPublicKey = 702 - BinancePublicKey = 703 - BinanceSignTx = 704 - BinanceTxRequest = 705 - BinanceTransferMsg = 706 - BinanceOrderMsg = 707 - BinanceCancelMsg = 708 - BinanceSignedTx = 709 WebAuthnListResidentCredentials = 800 WebAuthnCredentials = 801 WebAuthnAddResidentCredential = 802 diff --git a/core/src/trezor/enums/__init__.py b/core/src/trezor/enums/__init__.py index 1fdd487bc6..303f1802b8 100644 --- a/core/src/trezor/enums/__init__.py +++ b/core/src/trezor/enums/__init__.py @@ -7,23 +7,6 @@ from typing import TYPE_CHECKING if TYPE_CHECKING: from enum import IntEnum - class BinanceOrderType(IntEnum): - OT_UNKNOWN = 0 - MARKET = 1 - LIMIT = 2 - OT_RESERVED = 3 - - class BinanceOrderSide(IntEnum): - SIDE_UNKNOWN = 0 - BUY = 1 - SELL = 2 - - class BinanceTimeInForce(IntEnum): - TIF_UNKNOWN = 0 - GTE = 1 - TIF_RESERVED = 2 - IOC = 3 - class FailureType(IntEnum): UnexpectedMessage = 1 ButtonExpected = 2 @@ -574,16 +557,6 @@ if TYPE_CHECKING: EosTxActionRequest = 603 EosTxActionAck = 604 EosSignedTx = 605 - BinanceGetAddress = 700 - BinanceAddress = 701 - BinanceGetPublicKey = 702 - BinancePublicKey = 703 - BinanceSignTx = 704 - BinanceTxRequest = 705 - BinanceTransferMsg = 706 - BinanceOrderMsg = 707 - BinanceCancelMsg = 708 - BinanceSignedTx = 709 WebAuthnListResidentCredentials = 800 WebAuthnCredentials = 801 WebAuthnAddResidentCredential = 802 diff --git a/core/src/trezor/messages.py b/core/src/trezor/messages.py index 832f864811..bac7d3096c 100644 --- a/core/src/trezor/messages.py +++ b/core/src/trezor/messages.py @@ -19,9 +19,6 @@ if TYPE_CHECKING: from trezor.enums import AmountUnit # noqa: F401 from trezor.enums import BackupAvailability # noqa: F401 from trezor.enums import BackupType # noqa: F401 - from trezor.enums import BinanceOrderSide # noqa: F401 - from trezor.enums import BinanceOrderType # noqa: F401 - from trezor.enums import BinanceTimeInForce # noqa: F401 from trezor.enums import BootCommand # noqa: F401 from trezor.enums import ButtonRequestType # noqa: F401 from trezor.enums import Capability # noqa: F401 @@ -120,214 +117,6 @@ if TYPE_CHECKING: def is_type_of(cls, msg: Any) -> TypeGuard["BenchmarkResult"]: return isinstance(msg, cls) - class BinanceGetAddress(protobuf.MessageType): - address_n: "list[int]" - show_display: "bool | None" - chunkify: "bool | None" - - def __init__( - self, - *, - address_n: "list[int] | None" = None, - show_display: "bool | None" = None, - chunkify: "bool | None" = None, - ) -> None: - pass - - @classmethod - def is_type_of(cls, msg: Any) -> TypeGuard["BinanceGetAddress"]: - return isinstance(msg, cls) - - class BinanceAddress(protobuf.MessageType): - address: "str" - - def __init__( - self, - *, - address: "str", - ) -> None: - pass - - @classmethod - def is_type_of(cls, msg: Any) -> TypeGuard["BinanceAddress"]: - return isinstance(msg, cls) - - class BinanceGetPublicKey(protobuf.MessageType): - address_n: "list[int]" - show_display: "bool | None" - - def __init__( - self, - *, - address_n: "list[int] | None" = None, - show_display: "bool | None" = None, - ) -> None: - pass - - @classmethod - def is_type_of(cls, msg: Any) -> TypeGuard["BinanceGetPublicKey"]: - return isinstance(msg, cls) - - class BinancePublicKey(protobuf.MessageType): - public_key: "bytes" - - def __init__( - self, - *, - public_key: "bytes", - ) -> None: - pass - - @classmethod - def is_type_of(cls, msg: Any) -> TypeGuard["BinancePublicKey"]: - return isinstance(msg, cls) - - class BinanceSignTx(protobuf.MessageType): - address_n: "list[int]" - msg_count: "int" - account_number: "int" - chain_id: "str | None" - memo: "str | None" - sequence: "int" - source: "int" - chunkify: "bool | None" - - def __init__( - self, - *, - msg_count: "int", - account_number: "int", - sequence: "int", - source: "int", - address_n: "list[int] | None" = None, - chain_id: "str | None" = None, - memo: "str | None" = None, - chunkify: "bool | None" = None, - ) -> None: - pass - - @classmethod - def is_type_of(cls, msg: Any) -> TypeGuard["BinanceSignTx"]: - return isinstance(msg, cls) - - class BinanceTxRequest(protobuf.MessageType): - - @classmethod - def is_type_of(cls, msg: Any) -> TypeGuard["BinanceTxRequest"]: - return isinstance(msg, cls) - - class BinanceTransferMsg(protobuf.MessageType): - inputs: "list[BinanceInputOutput]" - outputs: "list[BinanceInputOutput]" - chunkify: "bool | None" - - def __init__( - self, - *, - inputs: "list[BinanceInputOutput] | None" = None, - outputs: "list[BinanceInputOutput] | None" = None, - chunkify: "bool | None" = None, - ) -> None: - pass - - @classmethod - def is_type_of(cls, msg: Any) -> TypeGuard["BinanceTransferMsg"]: - return isinstance(msg, cls) - - class BinanceOrderMsg(protobuf.MessageType): - id: "str | None" - ordertype: "BinanceOrderType" - price: "int" - quantity: "int" - sender: "str | None" - side: "BinanceOrderSide" - symbol: "str | None" - timeinforce: "BinanceTimeInForce" - - def __init__( - self, - *, - ordertype: "BinanceOrderType", - price: "int", - quantity: "int", - side: "BinanceOrderSide", - timeinforce: "BinanceTimeInForce", - id: "str | None" = None, - sender: "str | None" = None, - symbol: "str | None" = None, - ) -> None: - pass - - @classmethod - def is_type_of(cls, msg: Any) -> TypeGuard["BinanceOrderMsg"]: - return isinstance(msg, cls) - - class BinanceCancelMsg(protobuf.MessageType): - refid: "str | None" - sender: "str | None" - symbol: "str | None" - - def __init__( - self, - *, - refid: "str | None" = None, - sender: "str | None" = None, - symbol: "str | None" = None, - ) -> None: - pass - - @classmethod - def is_type_of(cls, msg: Any) -> TypeGuard["BinanceCancelMsg"]: - return isinstance(msg, cls) - - class BinanceSignedTx(protobuf.MessageType): - signature: "bytes" - public_key: "bytes" - - def __init__( - self, - *, - signature: "bytes", - public_key: "bytes", - ) -> None: - pass - - @classmethod - def is_type_of(cls, msg: Any) -> TypeGuard["BinanceSignedTx"]: - return isinstance(msg, cls) - - class BinanceInputOutput(protobuf.MessageType): - address: "str" - coins: "list[BinanceCoin]" - - def __init__( - self, - *, - address: "str", - coins: "list[BinanceCoin] | None" = None, - ) -> None: - pass - - @classmethod - def is_type_of(cls, msg: Any) -> TypeGuard["BinanceInputOutput"]: - return isinstance(msg, cls) - - class BinanceCoin(protobuf.MessageType): - amount: "int" - denom: "str" - - def __init__( - self, - *, - amount: "int", - denom: "str", - ) -> None: - pass - - @classmethod - def is_type_of(cls, msg: Any) -> TypeGuard["BinanceCoin"]: - return isinstance(msg, cls) - class Success(protobuf.MessageType): message: "str" diff --git a/core/tests/test_apps.binance.address.py b/core/tests/test_apps.binance.address.py deleted file mode 100644 index 59f364f5ec..0000000000 --- a/core/tests/test_apps.binance.address.py +++ /dev/null @@ -1,24 +0,0 @@ -# flake8: noqa: F403,F405 -from common import * # isort:skip - -from trezor.crypto.curve import secp256k1 - -if not utils.BITCOIN_ONLY: - from apps.binance.helpers import address_from_public_key - - -@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin") -class TestBinanceAddress(unittest.TestCase): - def test_privkey_to_address(self): - # source of test data - binance javascript SDK - privkey = "90335b9d2153ad1a9799a3ccc070bd64b4164e9642ee1dd48053c33f9a3a05e9" - expected_address = "tbnb1hgm0p7khfk85zpz5v0j8wnej3a90w709zzlffd" - - pubkey = secp256k1.publickey(unhexlify(privkey), True) - address = address_from_public_key(pubkey, "tbnb") - - self.assertEqual(address, expected_address) - - -if __name__ == "__main__": - unittest.main() diff --git a/core/tests/test_apps.binance.sign_tx.py b/core/tests/test_apps.binance.sign_tx.py deleted file mode 100644 index 9c1e9c35da..0000000000 --- a/core/tests/test_apps.binance.sign_tx.py +++ /dev/null @@ -1,168 +0,0 @@ -# flake8: noqa: F403,F405 -from common import * # isort:skip - -from trezor.crypto.curve import secp256k1 -from trezor.crypto.hashlib import sha256 - -if not utils.BITCOIN_ONLY: - from trezor.messages import ( - BinanceCancelMsg, - BinanceCoin, - BinanceInputOutput, - BinanceOrderMsg, - BinanceSignTx, - BinanceTransferMsg, - ) - - from apps.binance.helpers import produce_json_for_signing - - -# NOTE: copy-pasted from apps.binance.sign_tx -def generate_content_signature(json: bytes, private_key: bytes) -> bytes: - msghash = sha256(json).digest() - return secp256k1.sign(private_key, msghash)[1:65] - - -@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin") -class TestBinanceSign(unittest.TestCase): - def test_order_signature(self): - # source of testing data - # https://github.com/binance-chain/javascript-sdk/blob/master/__tests__/fixtures/placeOrder.json - json_msg = '{"account_number":"34","chain_id":"Binance-Chain-Nile","data":null,"memo":"","msgs":[{"id":"BA36F0FAD74D8F41045463E4774F328F4AF779E5-33","ordertype":2,"price":100000000,"quantity":100000000,"sender":"tbnb1hgm0p7khfk85zpz5v0j8wnej3a90w709zzlffd","side":1,"symbol":"ADA.B-B63_BNB","timeinforce":1}],"sequence":"32","source":"1"}' - expected_signature = "851fc9542342321af63ecbba7d3ece545f2a42bad01ba32cff5535b18e54b6d3106e10b6a4525993d185a1443d9a125186960e028eabfdd8d76cf70a3a7e3100" - public_key = ( - "029729a52e4e3c2b4a4e52aa74033eedaf8ba1df5ab6d1f518fd69e67bbd309b0e" - ) - private_key = "90335b9d2153ad1a9799a3ccc070bd64b4164e9642ee1dd48053c33f9a3a05e9" - - # Testing data for object creation is decoded from json_msg - envelope = BinanceSignTx( - msg_count=1, - account_number=34, - chain_id="Binance-Chain-Nile", - memo="", - sequence=32, - source=1, - ) - msg = BinanceOrderMsg( - id="BA36F0FAD74D8F41045463E4774F328F4AF779E5-33", - ordertype=2, - price=100000000, - quantity=100000000, - sender="tbnb1hgm0p7khfk85zpz5v0j8wnej3a90w709zzlffd", - side=1, - symbol="ADA.B-B63_BNB", - timeinforce=1, - ) - - msg_json = produce_json_for_signing(envelope, msg) - - # check if our json string produced for signing is the same as test vector - self.assertEqual(msg_json, json_msg) - - # verify signature against public key - signature = generate_content_signature( - msg_json.encode(), unhexlify(private_key) - ) - self.assertTrue( - verify_content_signature(unhexlify(public_key), signature, json_msg) - ) - - # check if the signed data is the same as test vector - self.assertEqual(signature, unhexlify(expected_signature)) - - def test_cancel_signature(self): - # source of testing data - # https://github.com/binance-chain/javascript-sdk/blob/master/__tests__/fixtures/cancelOrder.json - json_msg = '{"account_number":"34","chain_id":"Binance-Chain-Nile","data":null,"memo":"","msgs":[{"refid":"BA36F0FAD74D8F41045463E4774F328F4AF779E5-29","sender":"tbnb1hgm0p7khfk85zpz5v0j8wnej3a90w709zzlffd","symbol":"BCHSV.B-10F_BNB"}],"sequence":"33","source":"1"}' - expected_signature = "d93fb0402b2b30e7ea08e123bb139ad68bf0a1577f38592eb22d11e127f09bbd3380f29b4bf15bdfa973454c5c8ed444f2e256e956fe98cfd21e886a946e21e5" - public_key = ( - "029729a52e4e3c2b4a4e52aa74033eedaf8ba1df5ab6d1f518fd69e67bbd309b0e" - ) - private_key = "90335b9d2153ad1a9799a3ccc070bd64b4164e9642ee1dd48053c33f9a3a05e9" - - # Testing data for object creation is decoded from json_msg - envelope = BinanceSignTx( - msg_count=1, - account_number=34, - chain_id="Binance-Chain-Nile", - memo="", - sequence=33, - source=1, - ) - msg = BinanceCancelMsg( - refid="BA36F0FAD74D8F41045463E4774F328F4AF779E5-29", - sender="tbnb1hgm0p7khfk85zpz5v0j8wnej3a90w709zzlffd", - symbol="BCHSV.B-10F_BNB", - ) - - msg_json = produce_json_for_signing(envelope, msg) - - # check if our json string produced for signing is the same as test vector - self.assertEqual(msg_json, json_msg) - - # verify signature against public key - signature = generate_content_signature( - msg_json.encode(), unhexlify(private_key) - ) - self.assertTrue( - verify_content_signature(unhexlify(public_key), signature, json_msg) - ) - - # check if the signed data is the same as test vector - self.assertEqual(signature, unhexlify(expected_signature)) - - def test_transfer_signature(self): - # source of testing data - # https://github.com/binance-chain/javascript-sdk/blob/master/__tests__/fixtures/transfer.json - json_msg = '{"account_number":"34","chain_id":"Binance-Chain-Nile","data":null,"memo":"test","msgs":[{"inputs":[{"address":"tbnb1hgm0p7khfk85zpz5v0j8wnej3a90w709zzlffd","coins":[{"amount":1000000000,"denom":"BNB"}]}],"outputs":[{"address":"tbnb1ss57e8sa7xnwq030k2ctr775uac9gjzglqhvpy","coins":[{"amount":1000000000,"denom":"BNB"}]}]}],"sequence":"31","source":"1"}' - expected_signature = "faf5b908d6c4ec0c7e2e7d8f7e1b9ca56ac8b1a22b01655813c62ce89bf84a4c7b14f58ce51e85d64c13f47e67d6a9187b8f79f09e0a9b82019f47ae190a4db3" - public_key = ( - "029729a52e4e3c2b4a4e52aa74033eedaf8ba1df5ab6d1f518fd69e67bbd309b0e" - ) - private_key = "90335b9d2153ad1a9799a3ccc070bd64b4164e9642ee1dd48053c33f9a3a05e9" - - # Testing data for object creation is decoded from json_msg - envelope = BinanceSignTx( - msg_count=1, - account_number=34, - chain_id="Binance-Chain-Nile", - memo="test", - sequence=31, - source=1, - ) - coin = BinanceCoin(denom="BNB", amount=1000000000) - first_input = BinanceInputOutput( - address="tbnb1hgm0p7khfk85zpz5v0j8wnej3a90w709zzlffd", coins=[coin] - ) - first_output = BinanceInputOutput( - address="tbnb1ss57e8sa7xnwq030k2ctr775uac9gjzglqhvpy", coins=[coin] - ) - msg = BinanceTransferMsg(inputs=[first_input], outputs=[first_output]) - - msg_json = produce_json_for_signing(envelope, msg) - - # check if our json string produced for signing is the same as test vector - self.assertEqual(msg_json, json_msg) - - # verify signature against public key - signature = generate_content_signature( - msg_json.encode(), unhexlify(private_key) - ) - self.assertTrue( - verify_content_signature(unhexlify(public_key), signature, json_msg) - ) - - # check if the signed data is the same as test vector - self.assertEqual(signature, unhexlify(expected_signature)) - - -def verify_content_signature( - public_key: bytes, signature: bytes, unsigned_data: bytes -) -> bool: - msghash = sha256(unsigned_data).digest() - return secp256k1.verify(public_key, signature, msghash) - - -if __name__ == "__main__": - unittest.main() diff --git a/core/tools/size/groups.py b/core/tools/size/groups.py index 1fa427fd0a..93f1782dce 100755 --- a/core/tools/size/groups.py +++ b/core/tools/size/groups.py @@ -74,7 +74,6 @@ def _categories_func(row: DataRow) -> str | None: "src/apps/tezos/", "src/apps/ripple/", "src/apps/zcash/", - "src/apps/binance/", ) ) ), diff --git a/core/tools/translations/rules.json b/core/tools/translations/rules.json index 8ac171aa2d..03f76e8004 100644 --- a/core/tools/translations/rules.json +++ b/core/tools/translations/rules.json @@ -25,18 +25,6 @@ "backup__title_backup_wallet": "title,1", "backup__title_skip": "title,1", "backup__want_to_skip": "text,3", - "binance__buy": "text,1", - "binance__confirm_cancel": "text,1", - "binance__confirm_input": "text,1", - "binance__confirm_order": "text,1", - "binance__confirm_output": "text,1", - "binance__order_id": "text,1", - "binance__pair": "text,1", - "binance__price": "text,1", - "binance__quantity": "text,1", - "binance__sell": "text,1", - "binance__sender_address": "text,1", - "binance__side": "text,1", "bitcoin__commitment_data": "text,1", "bitcoin__confirm_locktime": "text,1", "bitcoin__create_proof_of_ownership": "text,2", diff --git a/core/translations/cs.json b/core/translations/cs.json index 3f82b780ee..639ef13d37 100644 --- a/core/translations/cs.json +++ b/core/translations/cs.json @@ -74,18 +74,6 @@ "backup__title_create_wallet_backup": "Vytvořit zálohu peněženky", "backup__title_skip": "Přeskočit zálohu", "backup__want_to_skip": "Určitě chcete přeskočit zálohování?", - "binance__buy": "Koupit", - "binance__confirm_cancel": "Potvrdit zrušení", - "binance__confirm_input": "Potvrdit vstup", - "binance__confirm_order": "Potvrdit objednávku", - "binance__confirm_output": "Potvrdit výstup", - "binance__order_id": "ID objednávky:", - "binance__pair": "Pár:", - "binance__price": "Cena:", - "binance__quantity": "Množství:", - "binance__sell": "Prodat", - "binance__sender_address": "Adresa odesílatele:", - "binance__side": "Strana:", "bitcoin__commitment_data": "Data závazku", "bitcoin__confirm_locktime": "Potvrdit Locktime", "bitcoin__create_proof_of_ownership": "Chcete vytvořit prokázání vlastnictví?", diff --git a/core/translations/de.json b/core/translations/de.json index 5ded245286..2c357d9712 100644 --- a/core/translations/de.json +++ b/core/translations/de.json @@ -74,18 +74,6 @@ "backup__title_create_wallet_backup": "Wallet-Backup erstellen", "backup__title_skip": "Backup überspringen", "backup__want_to_skip": "Möchtest du das Backup wirklich überspringen?", - "binance__buy": "Kaufen", - "binance__confirm_cancel": "Abbrechen bestätigen", - "binance__confirm_input": "Eingabe bestätigen", - "binance__confirm_order": "Order bestätigen", - "binance__confirm_output": "Ausgabe bestätigen", - "binance__order_id": "Order-ID:", - "binance__pair": "Paar:", - "binance__price": "Preis:", - "binance__quantity": "Menge:", - "binance__sell": "Verkaufen", - "binance__sender_address": "Senderadresse:", - "binance__side": "Seite:", "bitcoin__commitment_data": "Commitment-Daten", "bitcoin__confirm_locktime": "Sperrzeit bestätigen", "bitcoin__create_proof_of_ownership": "Eigentumsnachweis erstellen?", diff --git a/core/translations/en.json b/core/translations/en.json index 02c42756d3..5d1ee3ad6b 100644 --- a/core/translations/en.json +++ b/core/translations/en.json @@ -43,18 +43,6 @@ "backup__title_create_wallet_backup": "Create wallet backup", "backup__title_skip": "Skip backup", "backup__want_to_skip": "Are you sure you want to skip the backup?", - "binance__buy": "Buy", - "binance__confirm_cancel": "Confirm cancel", - "binance__confirm_input": "Confirm input", - "binance__confirm_order": "Confirm order", - "binance__confirm_output": "Confirm output", - "binance__order_id": "Order ID:", - "binance__pair": "Pair:", - "binance__price": "Price:", - "binance__quantity": "Quantity:", - "binance__sell": "Sell", - "binance__sender_address": "Sender address:", - "binance__side": "Side:", "bitcoin__commitment_data": "Commitment data", "bitcoin__confirm_locktime": "Confirm locktime", "bitcoin__create_proof_of_ownership": "Do you want to create a proof of ownership?", diff --git a/core/translations/es.json b/core/translations/es.json index 052765b13f..3e014b8366 100644 --- a/core/translations/es.json +++ b/core/translations/es.json @@ -74,18 +74,6 @@ "backup__title_create_wallet_backup": "Crear copia de seguridad", "backup__title_skip": "Omitir c. seg.", "backup__want_to_skip": "¿Quieres omitir la copia de seguridad?", - "binance__buy": "Comprar", - "binance__confirm_cancel": "Confirmar cancelación", - "binance__confirm_input": "Confirmar entrada", - "binance__confirm_order": "Confirmar orden", - "binance__confirm_output": "Confirmar salida", - "binance__order_id": "ID de orden:", - "binance__pair": "Par:", - "binance__price": "Precio:", - "binance__quantity": "Cantidad:", - "binance__sell": "Vender", - "binance__sender_address": "Dirección del remitente:", - "binance__side": "Lado:", "bitcoin__commitment_data": "Datos de la asignación", "bitcoin__confirm_locktime": "Valida tiempo bloqueo", "bitcoin__create_proof_of_ownership": "¿Deseas crear una prueba de propiedad?", diff --git a/core/translations/fr.json b/core/translations/fr.json index 5e3fe930cf..b9012ff253 100644 --- a/core/translations/fr.json +++ b/core/translations/fr.json @@ -74,18 +74,6 @@ "backup__title_create_wallet_backup": "Créez une sauvegarde de portefeuille", "backup__title_skip": "Ignorer sauvegarde", "backup__want_to_skip": "Voulez-vous vraiment ignorer la sauvegarde ?", - "binance__buy": "Acheter", - "binance__confirm_cancel": "Conf. annulation", - "binance__confirm_input": "Conf. entrée", - "binance__confirm_order": "Conf. ordre", - "binance__confirm_output": "Conf. sortie", - "binance__order_id": "ID de l'ordre:", - "binance__pair": "Paire:", - "binance__price": "Prix:", - "binance__quantity": "Quantité:", - "binance__sell": "Vendre", - "binance__sender_address": "Adr. de l'expéditeur:", - "binance__side": "Côté:", "bitcoin__commitment_data": "Données d'eng.", "bitcoin__confirm_locktime": "Conf. le temps de verr.", "bitcoin__create_proof_of_ownership": "Voulez-vous créer une preuve de propriété ?", diff --git a/core/translations/it.json b/core/translations/it.json index 03ce1821c9..cf3b058e35 100644 --- a/core/translations/it.json +++ b/core/translations/it.json @@ -74,18 +74,6 @@ "backup__title_create_wallet_backup": "Crea back-up del wallet", "backup__title_skip": "Ignora back-up", "backup__want_to_skip": "Vuoi ignorare il back-up?", - "binance__buy": "Acquista", - "binance__confirm_cancel": "Conferma annull.", - "binance__confirm_input": "Conferma input", - "binance__confirm_order": "Conferma ordine", - "binance__confirm_output": "Conferma output", - "binance__order_id": "ID ordine:", - "binance__pair": "Coppia:", - "binance__price": "Prezzo:", - "binance__quantity": "Quantità:", - "binance__sell": "Vendi", - "binance__sender_address": "Indirizzo mittente:", - "binance__side": "Lato:", "bitcoin__commitment_data": "Dati su impegni", "bitcoin__confirm_locktime": "Conferma tempo blocco", "bitcoin__create_proof_of_ownership": "Vuoi creare una prova di proprietà?", diff --git a/core/translations/pt.json b/core/translations/pt.json index 83a0d7f4f7..6ca9f1fa94 100644 --- a/core/translations/pt.json +++ b/core/translations/pt.json @@ -74,18 +74,6 @@ "backup__title_create_wallet_backup": "Criar backup da carteira", "backup__title_skip": "Pular backup", "backup__want_to_skip": "Deseja ignorar o backup?", - "binance__buy": "Comprar", - "binance__confirm_cancel": "Confirmar cancelamento", - "binance__confirm_input": "Confirmar entrada", - "binance__confirm_order": "Confirmar pedido", - "binance__confirm_output": "Confirmar saída", - "binance__order_id": "ID do pedido:", - "binance__pair": "Par:", - "binance__price": "Preço:", - "binance__quantity": "Quantidade:", - "binance__sell": "Vender", - "binance__sender_address": "Endereço do remetente:", - "binance__side": "Lado:", "bitcoin__commitment_data": "Dados de compromisso", "bitcoin__confirm_locktime": "Confirmar temp. bloq.", "bitcoin__create_proof_of_ownership": "Deseja criar uma prova de propriedade?", diff --git a/core/translations/signatures.json b/core/translations/signatures.json index c4e46a943e..64ee992a99 100644 --- a/core/translations/signatures.json +++ b/core/translations/signatures.json @@ -1,8 +1,8 @@ { "current": { - "merkle_root": "1d9b3160bf60c832b0edbdfa2755e7e2a432b93097ed65ee12b60d3d5d61e302", - "datetime": "2025-04-30T10:39:39.267306", - "commit": "07c16858d4a1fbff41d9c4b28445ce959d316188" + "merkle_root": "27c0e5fb8f144289e4e726678a0dfc3371d344ff5a7cca2233b1a4a009149653", + "datetime": "2025-05-07T13:50:09.500899", + "commit": "10cdd67b3e363d3e002d4736cdcb3e25ce41f186" }, "history": [ { diff --git a/core/translations/tr.json b/core/translations/tr.json index 77cac4daa4..0b39601419 100644 --- a/core/translations/tr.json +++ b/core/translations/tr.json @@ -62,18 +62,6 @@ "backup__title_backup_wallet": "Cüzdani yedekle", "backup__title_skip": "Yedeklemeyi̇ atla", "backup__want_to_skip": "Yedeklemeyi atlamak istediğinizden emin misiniz?", - "binance__buy": "Al", - "binance__confirm_cancel": "İptal işlemini onayla", - "binance__confirm_input": "Girdiyi onayla", - "binance__confirm_order": "Emri onayla", - "binance__confirm_output": "Çıktıyı onayla", - "binance__order_id": "Emir kimliği:", - "binance__pair": "Çift:", - "binance__price": "Fiyat:", - "binance__quantity": "Miktar:", - "binance__sell": "Sat", - "binance__sender_address": "Gönderen adresi:", - "binance__side": "Taraf:", "bitcoin__commitment_data": "Taahhüt verileri", "bitcoin__confirm_locktime": "Kilit süresini onayla", "bitcoin__create_proof_of_ownership": "Sahiplik kanıtı oluşt. istiyor musunuz?", diff --git a/docs/misc/coins-bip44-paths.md b/docs/misc/coins-bip44-paths.md index 0bc2b1c56a..ddf64f6d2f 100644 --- a/docs/misc/coins-bip44-paths.md +++ b/docs/misc/coins-bip44-paths.md @@ -22,7 +22,6 @@ algorithm, extended to work on other curves. | Ethereum | secp256k1 | `44'/c'/0'/a` | yes | [2](#Ethereum) | | Ripple | secp256k1 | `44'/144'/a'/0/0` | | [3](#Ripple) | | EOS | secp256k1 | `44'/194'/a'/0/0` | | [3](#Ripple) | -| Binance | secp256k1 | `44'/714'/a'/0/0` | | [3](#Ripple) | | Tron | secp256k1 | TODO | | TODO | | Ontology | nist256p1 | TODO | | TODO | | Cardano | ed25519 | `44'/1815'/a'/y/i` | yes | [4](#Cardano) | diff --git a/python/.changelog.d/4227.removed b/python/.changelog.d/4227.removed new file mode 100644 index 0000000000..7348bab0aa --- /dev/null +++ b/python/.changelog.d/4227.removed @@ -0,0 +1 @@ +Remove BNB Beacon Chain support. diff --git a/python/docs/OPTIONS.rst b/python/docs/OPTIONS.rst index ead5f1dfe1..035fca1b67 100644 --- a/python/docs/OPTIONS.rst +++ b/python/docs/OPTIONS.rst @@ -38,7 +38,6 @@ on one page here. Commands: benchmark Benchmark commands. - binance Binance Chain commands. btc Bitcoin and Bitcoin-like coins commands. cardano Cardano commands. clear-session Clear session (remove cached PIN, passphrase, etc.). @@ -84,27 +83,6 @@ Benchmark commands. list-names List names of all supported benchmarks run Run benchmark -Binance Chain commands. -~~~~~~~~~~~~~~~~~~~~~~~ - -.. code:: - - trezorctl binance --help - -.. code:: - - Usage: trezorctl binance [OPTIONS] COMMAND [ARGS]... - - Binance Chain commands. - - Options: - --help Show this message and exit. - - Commands: - get-address Get Binance address for specified path. - get-public-key Get Binance public key. - sign-tx Sign Binance transaction. - Bitcoin and Bitcoin-like coins commands. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/python/src/trezorlib/binance.py b/python/src/trezorlib/binance.py deleted file mode 100644 index 938092a2df..0000000000 --- a/python/src/trezorlib/binance.py +++ /dev/null @@ -1,73 +0,0 @@ -# This file is part of the Trezor project. -# -# Copyright (C) 2012-2022 SatoshiLabs and contributors -# -# This library is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# as published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the License along with this library. -# If not, see . - -from typing import TYPE_CHECKING - -from . import messages -from .protobuf import dict_to_proto -from .tools import session - -if TYPE_CHECKING: - from .client import TrezorClient - from .tools import Address - - -def get_address( - client: "TrezorClient", - address_n: "Address", - show_display: bool = False, - chunkify: bool = False, -) -> str: - return client.call( - messages.BinanceGetAddress( - address_n=address_n, show_display=show_display, chunkify=chunkify - ), - expect=messages.BinanceAddress, - ).address - - -def get_public_key( - client: "TrezorClient", address_n: "Address", show_display: bool = False -) -> bytes: - return client.call( - messages.BinanceGetPublicKey(address_n=address_n, show_display=show_display), - expect=messages.BinancePublicKey, - ).public_key - - -@session -def sign_tx( - client: "TrezorClient", address_n: "Address", tx_json: dict, chunkify: bool = False -) -> messages.BinanceSignedTx: - msg = tx_json["msgs"][0] - tx_msg = tx_json.copy() - tx_msg["msg_count"] = 1 - tx_msg["address_n"] = address_n - tx_msg["chunkify"] = chunkify - envelope = dict_to_proto(messages.BinanceSignTx, tx_msg) - - client.call(envelope, expect=messages.BinanceTxRequest) - - if "refid" in msg: - msg = dict_to_proto(messages.BinanceCancelMsg, msg) - elif "inputs" in msg: - msg = dict_to_proto(messages.BinanceTransferMsg, msg) - elif "ordertype" in msg: - msg = dict_to_proto(messages.BinanceOrderMsg, msg) - else: - raise ValueError("can not determine msg type") - - return client.call(msg, expect=messages.BinanceSignedTx) diff --git a/python/src/trezorlib/cli/binance.py b/python/src/trezorlib/cli/binance.py deleted file mode 100644 index a3139fb271..0000000000 --- a/python/src/trezorlib/cli/binance.py +++ /dev/null @@ -1,75 +0,0 @@ -# This file is part of the Trezor project. -# -# Copyright (C) 2012-2022 SatoshiLabs and contributors -# -# This library is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# as published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the License along with this library. -# If not, see . - -import json -from typing import TYPE_CHECKING, TextIO - -import click - -from .. import binance, tools -from . import with_client - -if TYPE_CHECKING: - from .. import messages - from ..client import TrezorClient - - -PATH_HELP = "BIP-32 path to key, e.g. m/44h/714h/0h/0/0" - - -@click.group(name="binance") -def cli() -> None: - """Binance Chain commands.""" - - -@cli.command() -@click.option("-n", "--address", required=True, help=PATH_HELP) -@click.option("-d", "--show-display", is_flag=True) -@click.option("-C", "--chunkify", is_flag=True) -@with_client -def get_address( - client: "TrezorClient", address: str, show_display: bool, chunkify: bool -) -> str: - """Get Binance address for specified path.""" - address_n = tools.parse_path(address) - return binance.get_address(client, address_n, show_display, chunkify) - - -@cli.command() -@click.option("-n", "--address", required=True, help=PATH_HELP) -@click.option("-d", "--show-display", is_flag=True) -@with_client -def get_public_key(client: "TrezorClient", address: str, show_display: bool) -> str: - """Get Binance public key.""" - address_n = tools.parse_path(address) - return binance.get_public_key(client, address_n, show_display).hex() - - -@cli.command() -@click.argument("file", type=click.File("r")) -@click.option("-n", "--address", required=True, help=PATH_HELP) -@click.option("-f", "--file", "_ignore", is_flag=True, hidden=True, expose_value=False) -@click.option("-C", "--chunkify", is_flag=True) -@with_client -def sign_tx( - client: "TrezorClient", address: str, file: TextIO, chunkify: bool -) -> "messages.BinanceSignedTx": - """Sign Binance transaction. - - Transaction must be provided as a JSON file. - """ - address_n = tools.parse_path(address) - return binance.sign_tx(client, address_n, json.load(file), chunkify=chunkify) diff --git a/python/src/trezorlib/cli/trezorctl.py b/python/src/trezorlib/cli/trezorctl.py index 4b2c1eb533..53b611e677 100755 --- a/python/src/trezorlib/cli/trezorctl.py +++ b/python/src/trezorlib/cli/trezorctl.py @@ -32,7 +32,6 @@ from . import ( AliasedGroup, TrezorConnection, benchmark, - binance, ble, btc, cardano, @@ -76,7 +75,6 @@ COMMAND_ALIASES = { "encrypt-keyvalue": crypto.encrypt_keyvalue, "decrypt-keyvalue": crypto.decrypt_keyvalue, # currency name aliases: - "bnb": binance.cli, "eth": ethereum.cli, "ada": cardano.cli, "sol": solana.cli, @@ -97,10 +95,10 @@ class TrezorctlGroup(AliasedGroup): """Command group that handles compatibility for trezorctl. With trezorctl 0.11.5, we started to convert old-style long commands - (such as "binance-sign-tx") to command groups ("binance") with subcommands + (such as "ethereum-sign-tx") to command groups ("ethereum") with subcommands ("sign-tx"). The `TrezorctlGroup` can perform subcommand lookup: if a command - "binance-sign-tx" does not exist in the default group, it tries to find "sign-tx" - subcommand of "binance" group. + "ethereum-sign-tx" does not exist in the default group, it tries to find "sign-tx" + subcommand of "ethereum" group. """ def get_command(self, ctx: click.Context, cmd_name: str) -> Optional[click.Command]: @@ -115,8 +113,8 @@ class TrezorctlGroup(AliasedGroup): if cmd: return cmd - # Old-style top-level commands looked like this: binance-sign-tx. - # We are moving to 'binance' command with 'sign-tx' subcommand. + # Old-style top-level commands looked like this: ethereum-sign-tx. + # We are moving to 'ethereum' command with 'sign-tx' subcommand. try: command, subcommand = cmd_name.split("-", maxsplit=1) # get_command can return None and the following line will fail. @@ -401,7 +399,6 @@ def wait_for_emulator(obj: TrezorConnection, timeout: float) -> None: # Basic coin functions # -cli.add_command(binance.cli) cli.add_command(btc.cli) cli.add_command(cardano.cli) cli.add_command(crypto.cli) diff --git a/python/src/trezorlib/messages.py b/python/src/trezorlib/messages.py index 342199cd06..d88b0b8d41 100644 --- a/python/src/trezorlib/messages.py +++ b/python/src/trezorlib/messages.py @@ -8,26 +8,6 @@ from typing import Sequence, Optional from . import protobuf -class BinanceOrderType(IntEnum): - OT_UNKNOWN = 0 - MARKET = 1 - LIMIT = 2 - OT_RESERVED = 3 - - -class BinanceOrderSide(IntEnum): - SIDE_UNKNOWN = 0 - BUY = 1 - SELL = 2 - - -class BinanceTimeInForce(IntEnum): - TIF_UNKNOWN = 0 - GTE = 1 - TIF_RESERVED = 2 - IOC = 3 - - class FailureType(IntEnum): UnexpectedMessage = 1 ButtonExpected = 2 @@ -627,16 +607,6 @@ class MessageType(IntEnum): EosTxActionRequest = 603 EosTxActionAck = 604 EosSignedTx = 605 - BinanceGetAddress = 700 - BinanceAddress = 701 - BinanceGetPublicKey = 702 - BinancePublicKey = 703 - BinanceSignTx = 704 - BinanceTxRequest = 705 - BinanceTransferMsg = 706 - BinanceOrderMsg = 707 - BinanceCancelMsg = 708 - BinanceSignedTx = 709 WebAuthnListResidentCredentials = 800 WebAuthnCredentials = 801 WebAuthnAddResidentCredential = 802 @@ -706,236 +676,6 @@ class BenchmarkResult(protobuf.MessageType): self.unit = unit -class BinanceGetAddress(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 700 - FIELDS = { - 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None), - 2: protobuf.Field("show_display", "bool", repeated=False, required=False, default=None), - 3: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None), - } - - def __init__( - self, - *, - address_n: Optional[Sequence["int"]] = None, - show_display: Optional["bool"] = None, - chunkify: Optional["bool"] = None, - ) -> None: - self.address_n: Sequence["int"] = address_n if address_n is not None else [] - self.show_display = show_display - self.chunkify = chunkify - - -class BinanceAddress(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 701 - FIELDS = { - 1: protobuf.Field("address", "string", repeated=False, required=True), - } - - def __init__( - self, - *, - address: "str", - ) -> None: - self.address = address - - -class BinanceGetPublicKey(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 702 - FIELDS = { - 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None), - 2: protobuf.Field("show_display", "bool", repeated=False, required=False, default=None), - } - - def __init__( - self, - *, - address_n: Optional[Sequence["int"]] = None, - show_display: Optional["bool"] = None, - ) -> None: - self.address_n: Sequence["int"] = address_n if address_n is not None else [] - self.show_display = show_display - - -class BinancePublicKey(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 703 - FIELDS = { - 1: protobuf.Field("public_key", "bytes", repeated=False, required=True), - } - - def __init__( - self, - *, - public_key: "bytes", - ) -> None: - self.public_key = public_key - - -class BinanceSignTx(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 704 - FIELDS = { - 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None), - 2: protobuf.Field("msg_count", "uint32", repeated=False, required=True), - 3: protobuf.Field("account_number", "sint64", repeated=False, required=True), - 4: protobuf.Field("chain_id", "string", repeated=False, required=False, default=None), - 5: protobuf.Field("memo", "string", repeated=False, required=False, default=None), - 6: protobuf.Field("sequence", "sint64", repeated=False, required=True), - 7: protobuf.Field("source", "sint64", repeated=False, required=True), - 8: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None), - } - - def __init__( - self, - *, - msg_count: "int", - account_number: "int", - sequence: "int", - source: "int", - address_n: Optional[Sequence["int"]] = None, - chain_id: Optional["str"] = None, - memo: Optional["str"] = None, - chunkify: Optional["bool"] = None, - ) -> None: - self.address_n: Sequence["int"] = address_n if address_n is not None else [] - self.msg_count = msg_count - self.account_number = account_number - self.sequence = sequence - self.source = source - self.chain_id = chain_id - self.memo = memo - self.chunkify = chunkify - - -class BinanceTxRequest(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 705 - - -class BinanceTransferMsg(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 706 - FIELDS = { - 1: protobuf.Field("inputs", "BinanceInputOutput", repeated=True, required=False, default=None), - 2: protobuf.Field("outputs", "BinanceInputOutput", repeated=True, required=False, default=None), - 3: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None), - } - - def __init__( - self, - *, - inputs: Optional[Sequence["BinanceInputOutput"]] = None, - outputs: Optional[Sequence["BinanceInputOutput"]] = None, - chunkify: Optional["bool"] = None, - ) -> None: - self.inputs: Sequence["BinanceInputOutput"] = inputs if inputs is not None else [] - self.outputs: Sequence["BinanceInputOutput"] = outputs if outputs is not None else [] - self.chunkify = chunkify - - -class BinanceOrderMsg(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 707 - FIELDS = { - 1: protobuf.Field("id", "string", repeated=False, required=False, default=None), - 2: protobuf.Field("ordertype", "BinanceOrderType", repeated=False, required=True), - 3: protobuf.Field("price", "sint64", repeated=False, required=True), - 4: protobuf.Field("quantity", "sint64", repeated=False, required=True), - 5: protobuf.Field("sender", "string", repeated=False, required=False, default=None), - 6: protobuf.Field("side", "BinanceOrderSide", repeated=False, required=True), - 7: protobuf.Field("symbol", "string", repeated=False, required=False, default=None), - 8: protobuf.Field("timeinforce", "BinanceTimeInForce", repeated=False, required=True), - } - - def __init__( - self, - *, - ordertype: "BinanceOrderType", - price: "int", - quantity: "int", - side: "BinanceOrderSide", - timeinforce: "BinanceTimeInForce", - id: Optional["str"] = None, - sender: Optional["str"] = None, - symbol: Optional["str"] = None, - ) -> None: - self.ordertype = ordertype - self.price = price - self.quantity = quantity - self.side = side - self.timeinforce = timeinforce - self.id = id - self.sender = sender - self.symbol = symbol - - -class BinanceCancelMsg(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 708 - FIELDS = { - 1: protobuf.Field("refid", "string", repeated=False, required=False, default=None), - 2: protobuf.Field("sender", "string", repeated=False, required=False, default=None), - 3: protobuf.Field("symbol", "string", repeated=False, required=False, default=None), - } - - def __init__( - self, - *, - refid: Optional["str"] = None, - sender: Optional["str"] = None, - symbol: Optional["str"] = None, - ) -> None: - self.refid = refid - self.sender = sender - self.symbol = symbol - - -class BinanceSignedTx(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 709 - FIELDS = { - 1: protobuf.Field("signature", "bytes", repeated=False, required=True), - 2: protobuf.Field("public_key", "bytes", repeated=False, required=True), - } - - def __init__( - self, - *, - signature: "bytes", - public_key: "bytes", - ) -> None: - self.signature = signature - self.public_key = public_key - - -class BinanceInputOutput(protobuf.MessageType): - MESSAGE_WIRE_TYPE = None - FIELDS = { - 1: protobuf.Field("address", "string", repeated=False, required=True), - 2: protobuf.Field("coins", "BinanceCoin", repeated=True, required=False, default=None), - } - - def __init__( - self, - *, - address: "str", - coins: Optional[Sequence["BinanceCoin"]] = None, - ) -> None: - self.coins: Sequence["BinanceCoin"] = coins if coins is not None else [] - self.address = address - - -class BinanceCoin(protobuf.MessageType): - MESSAGE_WIRE_TYPE = None - FIELDS = { - 1: protobuf.Field("amount", "sint64", repeated=False, required=True), - 2: protobuf.Field("denom", "string", repeated=False, required=True), - } - - def __init__( - self, - *, - amount: "int", - denom: "str", - ) -> None: - self.amount = amount - self.denom = denom - - class Success(protobuf.MessageType): MESSAGE_WIRE_TYPE = 2 FIELDS = { diff --git a/rust/trezor-client/Cargo.toml b/rust/trezor-client/Cargo.toml index 2be101a361..e37f3b1064 100644 --- a/rust/trezor-client/Cargo.toml +++ b/rust/trezor-client/Cargo.toml @@ -63,7 +63,6 @@ bitcoin = ["dep:bitcoin", "unicode-normalization"] ethereum = [] # Just bindings to the Trezor protobufs -binance = [] cardano = [] eos = [] monero = [] diff --git a/rust/trezor-client/scripts/build_messages b/rust/trezor-client/scripts/build_messages index 9203783c5d..d1c25d0d7e 100755 --- a/rust/trezor-client/scripts/build_messages +++ b/rust/trezor-client/scripts/build_messages @@ -19,7 +19,6 @@ FEATURES = { "Bitcoin": "bitcoin", "Ethereum": "ethereum", # - "Binance": "binance", "Cardano": "cardano", "EOS": "eos", "Monero": "monero", diff --git a/rust/trezor-client/src/messages/generated.rs b/rust/trezor-client/src/messages/generated.rs index 39d734a94a..2462f24d89 100644 --- a/rust/trezor-client/src/messages/generated.rs +++ b/rust/trezor-client/src/messages/generated.rs @@ -89,20 +89,6 @@ trezor_message_impl! { BenchmarkResult => MessageType_BenchmarkResult, } -#[cfg(feature = "binance")] -trezor_message_impl! { - BinanceGetAddress => MessageType_BinanceGetAddress, - BinanceAddress => MessageType_BinanceAddress, - BinanceGetPublicKey => MessageType_BinanceGetPublicKey, - BinancePublicKey => MessageType_BinancePublicKey, - BinanceSignTx => MessageType_BinanceSignTx, - BinanceTxRequest => MessageType_BinanceTxRequest, - BinanceTransferMsg => MessageType_BinanceTransferMsg, - BinanceOrderMsg => MessageType_BinanceOrderMsg, - BinanceCancelMsg => MessageType_BinanceCancelMsg, - BinanceSignedTx => MessageType_BinanceSignedTx, -} - #[cfg(feature = "bitcoin")] trezor_message_impl! { GetPublicKey => MessageType_GetPublicKey, diff --git a/rust/trezor-client/src/protos/generated/messages.rs b/rust/trezor-client/src/protos/generated/messages.rs index 1cbdcadcd2..bcc6ae4e55 100644 --- a/rust/trezor-client/src/protos/generated/messages.rs +++ b/rust/trezor-client/src/protos/generated/messages.rs @@ -475,26 +475,6 @@ pub enum MessageType { MessageType_EosTxActionAck = 604, // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_EosSignedTx) MessageType_EosSignedTx = 605, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_BinanceGetAddress) - MessageType_BinanceGetAddress = 700, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_BinanceAddress) - MessageType_BinanceAddress = 701, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_BinanceGetPublicKey) - MessageType_BinanceGetPublicKey = 702, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_BinancePublicKey) - MessageType_BinancePublicKey = 703, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_BinanceSignTx) - MessageType_BinanceSignTx = 704, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_BinanceTxRequest) - MessageType_BinanceTxRequest = 705, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_BinanceTransferMsg) - MessageType_BinanceTransferMsg = 706, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_BinanceOrderMsg) - MessageType_BinanceOrderMsg = 707, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_BinanceCancelMsg) - MessageType_BinanceCancelMsg = 708, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_BinanceSignedTx) - MessageType_BinanceSignedTx = 709, // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_WebAuthnListResidentCredentials) MessageType_WebAuthnListResidentCredentials = 800, // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_WebAuthnCredentials) @@ -766,16 +746,6 @@ impl ::protobuf::Enum for MessageType { 603 => ::std::option::Option::Some(MessageType::MessageType_EosTxActionRequest), 604 => ::std::option::Option::Some(MessageType::MessageType_EosTxActionAck), 605 => ::std::option::Option::Some(MessageType::MessageType_EosSignedTx), - 700 => ::std::option::Option::Some(MessageType::MessageType_BinanceGetAddress), - 701 => ::std::option::Option::Some(MessageType::MessageType_BinanceAddress), - 702 => ::std::option::Option::Some(MessageType::MessageType_BinanceGetPublicKey), - 703 => ::std::option::Option::Some(MessageType::MessageType_BinancePublicKey), - 704 => ::std::option::Option::Some(MessageType::MessageType_BinanceSignTx), - 705 => ::std::option::Option::Some(MessageType::MessageType_BinanceTxRequest), - 706 => ::std::option::Option::Some(MessageType::MessageType_BinanceTransferMsg), - 707 => ::std::option::Option::Some(MessageType::MessageType_BinanceOrderMsg), - 708 => ::std::option::Option::Some(MessageType::MessageType_BinanceCancelMsg), - 709 => ::std::option::Option::Some(MessageType::MessageType_BinanceSignedTx), 800 => ::std::option::Option::Some(MessageType::MessageType_WebAuthnListResidentCredentials), 801 => ::std::option::Option::Some(MessageType::MessageType_WebAuthnCredentials), 802 => ::std::option::Option::Some(MessageType::MessageType_WebAuthnAddResidentCredential), @@ -1024,16 +994,6 @@ impl ::protobuf::Enum for MessageType { "MessageType_EosTxActionRequest" => ::std::option::Option::Some(MessageType::MessageType_EosTxActionRequest), "MessageType_EosTxActionAck" => ::std::option::Option::Some(MessageType::MessageType_EosTxActionAck), "MessageType_EosSignedTx" => ::std::option::Option::Some(MessageType::MessageType_EosSignedTx), - "MessageType_BinanceGetAddress" => ::std::option::Option::Some(MessageType::MessageType_BinanceGetAddress), - "MessageType_BinanceAddress" => ::std::option::Option::Some(MessageType::MessageType_BinanceAddress), - "MessageType_BinanceGetPublicKey" => ::std::option::Option::Some(MessageType::MessageType_BinanceGetPublicKey), - "MessageType_BinancePublicKey" => ::std::option::Option::Some(MessageType::MessageType_BinancePublicKey), - "MessageType_BinanceSignTx" => ::std::option::Option::Some(MessageType::MessageType_BinanceSignTx), - "MessageType_BinanceTxRequest" => ::std::option::Option::Some(MessageType::MessageType_BinanceTxRequest), - "MessageType_BinanceTransferMsg" => ::std::option::Option::Some(MessageType::MessageType_BinanceTransferMsg), - "MessageType_BinanceOrderMsg" => ::std::option::Option::Some(MessageType::MessageType_BinanceOrderMsg), - "MessageType_BinanceCancelMsg" => ::std::option::Option::Some(MessageType::MessageType_BinanceCancelMsg), - "MessageType_BinanceSignedTx" => ::std::option::Option::Some(MessageType::MessageType_BinanceSignedTx), "MessageType_WebAuthnListResidentCredentials" => ::std::option::Option::Some(MessageType::MessageType_WebAuthnListResidentCredentials), "MessageType_WebAuthnCredentials" => ::std::option::Option::Some(MessageType::MessageType_WebAuthnCredentials), "MessageType_WebAuthnAddResidentCredential" => ::std::option::Option::Some(MessageType::MessageType_WebAuthnAddResidentCredential), @@ -1281,16 +1241,6 @@ impl ::protobuf::Enum for MessageType { MessageType::MessageType_EosTxActionRequest, MessageType::MessageType_EosTxActionAck, MessageType::MessageType_EosSignedTx, - MessageType::MessageType_BinanceGetAddress, - MessageType::MessageType_BinanceAddress, - MessageType::MessageType_BinanceGetPublicKey, - MessageType::MessageType_BinancePublicKey, - MessageType::MessageType_BinanceSignTx, - MessageType::MessageType_BinanceTxRequest, - MessageType::MessageType_BinanceTransferMsg, - MessageType::MessageType_BinanceOrderMsg, - MessageType::MessageType_BinanceCancelMsg, - MessageType::MessageType_BinanceSignedTx, MessageType::MessageType_WebAuthnListResidentCredentials, MessageType::MessageType_WebAuthnCredentials, MessageType::MessageType_WebAuthnAddResidentCredential, @@ -1544,34 +1494,24 @@ impl ::protobuf::EnumFull for MessageType { MessageType::MessageType_EosTxActionRequest => 221, MessageType::MessageType_EosTxActionAck => 222, MessageType::MessageType_EosSignedTx => 223, - MessageType::MessageType_BinanceGetAddress => 224, - MessageType::MessageType_BinanceAddress => 225, - MessageType::MessageType_BinanceGetPublicKey => 226, - MessageType::MessageType_BinancePublicKey => 227, - MessageType::MessageType_BinanceSignTx => 228, - MessageType::MessageType_BinanceTxRequest => 229, - MessageType::MessageType_BinanceTransferMsg => 230, - MessageType::MessageType_BinanceOrderMsg => 231, - MessageType::MessageType_BinanceCancelMsg => 232, - MessageType::MessageType_BinanceSignedTx => 233, - MessageType::MessageType_WebAuthnListResidentCredentials => 234, - MessageType::MessageType_WebAuthnCredentials => 235, - MessageType::MessageType_WebAuthnAddResidentCredential => 236, - MessageType::MessageType_WebAuthnRemoveResidentCredential => 237, - MessageType::MessageType_SolanaGetPublicKey => 238, - MessageType::MessageType_SolanaPublicKey => 239, - MessageType::MessageType_SolanaGetAddress => 240, - MessageType::MessageType_SolanaAddress => 241, - MessageType::MessageType_SolanaSignTx => 242, - MessageType::MessageType_SolanaTxSignature => 243, - MessageType::MessageType_NostrGetPubkey => 244, - MessageType::MessageType_NostrPubkey => 245, - MessageType::MessageType_NostrSignEvent => 246, - MessageType::MessageType_NostrEventSignature => 247, - MessageType::MessageType_BenchmarkListNames => 248, - MessageType::MessageType_BenchmarkNames => 249, - MessageType::MessageType_BenchmarkRun => 250, - MessageType::MessageType_BenchmarkResult => 251, + MessageType::MessageType_WebAuthnListResidentCredentials => 224, + MessageType::MessageType_WebAuthnCredentials => 225, + MessageType::MessageType_WebAuthnAddResidentCredential => 226, + MessageType::MessageType_WebAuthnRemoveResidentCredential => 227, + MessageType::MessageType_SolanaGetPublicKey => 228, + MessageType::MessageType_SolanaPublicKey => 229, + MessageType::MessageType_SolanaGetAddress => 230, + MessageType::MessageType_SolanaAddress => 231, + MessageType::MessageType_SolanaSignTx => 232, + MessageType::MessageType_SolanaTxSignature => 233, + MessageType::MessageType_NostrGetPubkey => 234, + MessageType::MessageType_NostrPubkey => 235, + MessageType::MessageType_NostrSignEvent => 236, + MessageType::MessageType_NostrEventSignature => 237, + MessageType::MessageType_BenchmarkListNames => 238, + MessageType::MessageType_BenchmarkNames => 239, + MessageType::MessageType_BenchmarkRun => 240, + MessageType::MessageType_BenchmarkResult => 241, }; Self::enum_descriptor().value_by_index(index) } @@ -1590,7 +1530,7 @@ impl MessageType { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x0emessages.proto\x12\x12hw.trezor.messages\x1a\roptions.proto*\xacW\ + \n\x0emessages.proto\x12\x12hw.trezor.messages\x1a\roptions.proto*\x9bT\ \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_S\ @@ -1846,41 +1786,31 @@ static file_descriptor_proto_data: &'static [u8] = b"\ ignTx\x10\xda\x04\x1a\x04\x90\xb5\x18\x01\x12)\n\x1eMessageType_EosTxAct\ ionRequest\x10\xdb\x04\x1a\x04\x98\xb5\x18\x01\x12%\n\x1aMessageType_Eos\ TxActionAck\x10\xdc\x04\x1a\x04\x90\xb5\x18\x01\x12\"\n\x17MessageType_E\ - osSignedTx\x10\xdd\x04\x1a\x04\x98\xb5\x18\x01\x12(\n\x1dMessageType_Bin\ - anceGetAddress\x10\xbc\x05\x1a\x04\x90\xb5\x18\x01\x12%\n\x1aMessageType\ - _BinanceAddress\x10\xbd\x05\x1a\x04\x98\xb5\x18\x01\x12*\n\x1fMessageTyp\ - e_BinanceGetPublicKey\x10\xbe\x05\x1a\x04\x90\xb5\x18\x01\x12'\n\x1cMess\ - ageType_BinancePublicKey\x10\xbf\x05\x1a\x04\x98\xb5\x18\x01\x12$\n\x19M\ - essageType_BinanceSignTx\x10\xc0\x05\x1a\x04\x90\xb5\x18\x01\x12'\n\x1cM\ - essageType_BinanceTxRequest\x10\xc1\x05\x1a\x04\x98\xb5\x18\x01\x12)\n\ - \x1eMessageType_BinanceTransferMsg\x10\xc2\x05\x1a\x04\x90\xb5\x18\x01\ - \x12&\n\x1bMessageType_BinanceOrderMsg\x10\xc3\x05\x1a\x04\x90\xb5\x18\ - \x01\x12'\n\x1cMessageType_BinanceCancelMsg\x10\xc4\x05\x1a\x04\x90\xb5\ - \x18\x01\x12&\n\x1bMessageType_BinanceSignedTx\x10\xc5\x05\x1a\x04\x98\ - \xb5\x18\x01\x126\n+MessageType_WebAuthnListResidentCredentials\x10\xa0\ - \x06\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageType_WebAuthnCredentials\ - \x10\xa1\x06\x1a\x04\x98\xb5\x18\x01\x124\n)MessageType_WebAuthnAddResid\ - entCredential\x10\xa2\x06\x1a\x04\x90\xb5\x18\x01\x127\n,MessageType_Web\ - AuthnRemoveResidentCredential\x10\xa3\x06\x1a\x04\x90\xb5\x18\x01\x12)\n\ - \x1eMessageType_SolanaGetPublicKey\x10\x84\x07\x1a\x04\x90\xb5\x18\x01\ - \x12&\n\x1bMessageType_SolanaPublicKey\x10\x85\x07\x1a\x04\x98\xb5\x18\ - \x01\x12'\n\x1cMessageType_SolanaGetAddress\x10\x86\x07\x1a\x04\x90\xb5\ - \x18\x01\x12$\n\x19MessageType_SolanaAddress\x10\x87\x07\x1a\x04\x98\xb5\ - \x18\x01\x12#\n\x18MessageType_SolanaSignTx\x10\x88\x07\x1a\x04\x90\xb5\ - \x18\x01\x12(\n\x1dMessageType_SolanaTxSignature\x10\x89\x07\x1a\x04\x98\ - \xb5\x18\x01\x12%\n\x1aMessageType_NostrGetPubkey\x10\xd1\x0f\x1a\x04\ - \x90\xb5\x18\x01\x12\"\n\x17MessageType_NostrPubkey\x10\xd2\x0f\x1a\x04\ - \x98\xb5\x18\x01\x12%\n\x1aMessageType_NostrSignEvent\x10\xd3\x0f\x1a\ - \x04\x90\xb5\x18\x01\x12*\n\x1fMessageType_NostrEventSignature\x10\xd4\ - \x0f\x1a\x04\x98\xb5\x18\x01\x12)\n\x1eMessageType_BenchmarkListNames\ - \x10\x8cG\x1a\x04\x80\xa6\x1d\x01\x12%\n\x1aMessageType_BenchmarkNames\ - \x10\x8dG\x1a\x04\x80\xa6\x1d\x01\x12#\n\x18MessageType_BenchmarkRun\x10\ - \x8eG\x1a\x04\x80\xa6\x1d\x01\x12&\n\x1bMessageType_BenchmarkResult\x10\ - \x8fG\x1a\x04\x80\xa6\x1d\x01\x1a\x04\xc8\xf3\x18\x01\"\x04\x08Z\x10\\\"\ - \x04\x08G\x10J\"\x04\x08r\x10z\"\x06\x08\xdb\x01\x10\xdb\x01\"\x06\x08\ - \xe0\x01\x10\xe0\x01\"\x06\x08\xac\x02\x10\xb0\x02\"\x06\x08\xb5\x02\x10\ - \xb8\x02\"\x06\x08\xe8\x07\x10\xcb\x08B8\n#com.satoshilabs.trezor.lib.pr\ - otobufB\rTrezorMessage\x80\xa6\x1d\x01\ + osSignedTx\x10\xdd\x04\x1a\x04\x98\xb5\x18\x01\x126\n+MessageType_WebAut\ + hnListResidentCredentials\x10\xa0\x06\x1a\x04\x90\xb5\x18\x01\x12*\n\x1f\ + MessageType_WebAuthnCredentials\x10\xa1\x06\x1a\x04\x98\xb5\x18\x01\x124\ + \n)MessageType_WebAuthnAddResidentCredential\x10\xa2\x06\x1a\x04\x90\xb5\ + \x18\x01\x127\n,MessageType_WebAuthnRemoveResidentCredential\x10\xa3\x06\ + \x1a\x04\x90\xb5\x18\x01\x12)\n\x1eMessageType_SolanaGetPublicKey\x10\ + \x84\x07\x1a\x04\x90\xb5\x18\x01\x12&\n\x1bMessageType_SolanaPublicKey\ + \x10\x85\x07\x1a\x04\x98\xb5\x18\x01\x12'\n\x1cMessageType_SolanaGetAddr\ + ess\x10\x86\x07\x1a\x04\x90\xb5\x18\x01\x12$\n\x19MessageType_SolanaAddr\ + ess\x10\x87\x07\x1a\x04\x98\xb5\x18\x01\x12#\n\x18MessageType_SolanaSign\ + Tx\x10\x88\x07\x1a\x04\x90\xb5\x18\x01\x12(\n\x1dMessageType_SolanaTxSig\ + nature\x10\x89\x07\x1a\x04\x98\xb5\x18\x01\x12%\n\x1aMessageType_NostrGe\ + tPubkey\x10\xd1\x0f\x1a\x04\x90\xb5\x18\x01\x12\"\n\x17MessageType_Nostr\ + Pubkey\x10\xd2\x0f\x1a\x04\x98\xb5\x18\x01\x12%\n\x1aMessageType_NostrSi\ + gnEvent\x10\xd3\x0f\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageType_NostrE\ + ventSignature\x10\xd4\x0f\x1a\x04\x98\xb5\x18\x01\x12)\n\x1eMessageType_\ + BenchmarkListNames\x10\x8cG\x1a\x04\x80\xa6\x1d\x01\x12%\n\x1aMessageTyp\ + e_BenchmarkNames\x10\x8dG\x1a\x04\x80\xa6\x1d\x01\x12#\n\x18MessageType_\ + BenchmarkRun\x10\x8eG\x1a\x04\x80\xa6\x1d\x01\x12&\n\x1bMessageType_Benc\ + hmarkResult\x10\x8fG\x1a\x04\x80\xa6\x1d\x01\x1a\x04\xc8\xf3\x18\x01\"\ + \x04\x08Z\x10\\\"\x04\x08G\x10J\"\x04\x08r\x10z\"\x06\x08\xdb\x01\x10\ + \xdb\x01\"\x06\x08\xe0\x01\x10\xe0\x01\"\x06\x08\xac\x02\x10\xb0\x02\"\ + \x06\x08\xb5\x02\x10\xb8\x02\"\x06\x08\xbc\x05\x10\xc5\x05\"\x06\x08\xe8\ + \x07\x10\xcb\x08B8\n#com.satoshilabs.trezor.lib.protobufB\rTrezorMessage\ + \x80\xa6\x1d\x01\ "; /// `FileDescriptorProto` object which was a source for this generated file diff --git a/rust/trezor-client/src/protos/generated/messages_binance.rs b/rust/trezor-client/src/protos/generated/messages_binance.rs deleted file mode 100644 index bcff2d44f3..0000000000 --- a/rust/trezor-client/src/protos/generated/messages_binance.rs +++ /dev/null @@ -1,3082 +0,0 @@ -// This file is generated by rust-protobuf 3.7.2. Do not edit -// .proto file is parsed by protoc 3.19.6 -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `messages-binance.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; - -// @@protoc_insertion_point(message:hw.trezor.messages.binance.BinanceGetAddress) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BinanceGetAddress { - // message fields - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceGetAddress.address_n) - pub address_n: ::std::vec::Vec, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceGetAddress.show_display) - pub show_display: ::std::option::Option, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceGetAddress.chunkify) - pub chunkify: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:hw.trezor.messages.binance.BinanceGetAddress.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BinanceGetAddress { - fn default() -> &'a BinanceGetAddress { - ::default_instance() - } -} - -impl BinanceGetAddress { - pub fn new() -> BinanceGetAddress { - ::std::default::Default::default() - } - - // optional bool show_display = 2; - - pub fn show_display(&self) -> bool { - self.show_display.unwrap_or(false) - } - - pub fn clear_show_display(&mut self) { - self.show_display = ::std::option::Option::None; - } - - pub fn has_show_display(&self) -> bool { - self.show_display.is_some() - } - - // Param is passed by value, moved - pub fn set_show_display(&mut self, v: bool) { - self.show_display = ::std::option::Option::Some(v); - } - - // optional bool chunkify = 3; - - pub fn chunkify(&self) -> bool { - self.chunkify.unwrap_or(false) - } - - pub fn clear_chunkify(&mut self) { - self.chunkify = ::std::option::Option::None; - } - - pub fn has_chunkify(&self) -> bool { - self.chunkify.is_some() - } - - // Param is passed by value, moved - pub fn set_chunkify(&mut self, v: bool) { - self.chunkify = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - 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_vec_simpler_accessor::<_, _>( - "address_n", - |m: &BinanceGetAddress| { &m.address_n }, - |m: &mut BinanceGetAddress| { &mut m.address_n }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "show_display", - |m: &BinanceGetAddress| { &m.show_display }, - |m: &mut BinanceGetAddress| { &mut m.show_display }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "chunkify", - |m: &BinanceGetAddress| { &m.chunkify }, - |m: &mut BinanceGetAddress| { &mut m.chunkify }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BinanceGetAddress", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BinanceGetAddress { - const NAME: &'static str = "BinanceGetAddress"; - - 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.show_display = ::std::option::Option::Some(is.read_bool()?); - }, - 24 => { - self.chunkify = ::std::option::Option::Some(is.read_bool()?); - }, - 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.show_display { - my_size += 1 + 1; - } - if let Some(v) = self.chunkify { - my_size += 1 + 1; - } - 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.show_display { - os.write_bool(2, v)?; - } - if let Some(v) = self.chunkify { - os.write_bool(3, 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() -> BinanceGetAddress { - BinanceGetAddress::new() - } - - fn clear(&mut self) { - self.address_n.clear(); - self.show_display = ::std::option::Option::None; - self.chunkify = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BinanceGetAddress { - static instance: BinanceGetAddress = BinanceGetAddress { - address_n: ::std::vec::Vec::new(), - show_display: ::std::option::Option::None, - chunkify: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BinanceGetAddress { - 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("BinanceGetAddress").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BinanceGetAddress { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BinanceGetAddress { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:hw.trezor.messages.binance.BinanceAddress) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BinanceAddress { - // message fields - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceAddress.address) - pub address: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:hw.trezor.messages.binance.BinanceAddress.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BinanceAddress { - fn default() -> &'a BinanceAddress { - ::default_instance() - } -} - -impl BinanceAddress { - pub fn new() -> BinanceAddress { - ::std::default::Default::default() - } - - // required string address = 1; - - pub fn address(&self) -> &str { - match self.address.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_address(&mut self) { - self.address = ::std::option::Option::None; - } - - pub fn has_address(&self) -> bool { - self.address.is_some() - } - - // Param is passed by value, moved - 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_address(&mut self) -> &mut ::std::string::String { - if self.address.is_none() { - self.address = ::std::option::Option::Some(::std::string::String::new()); - } - self.address.as_mut().unwrap() - } - - // Take field - pub fn take_address(&mut self) -> ::std::string::String { - self.address.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "address", - |m: &BinanceAddress| { &m.address }, - |m: &mut BinanceAddress| { &mut m.address }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BinanceAddress", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BinanceAddress { - const NAME: &'static str = "BinanceAddress"; - - fn is_initialized(&self) -> bool { - if self.address.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.address = ::std::option::Option::Some(is.read_string()?); - }, - 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.address.as_ref() { - my_size += ::protobuf::rt::string_size(1, &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.address.as_ref() { - os.write_string(1, 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() -> BinanceAddress { - BinanceAddress::new() - } - - fn clear(&mut self) { - self.address = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BinanceAddress { - static instance: BinanceAddress = BinanceAddress { - address: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BinanceAddress { - 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("BinanceAddress").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BinanceAddress { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BinanceAddress { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:hw.trezor.messages.binance.BinanceGetPublicKey) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BinanceGetPublicKey { - // message fields - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceGetPublicKey.address_n) - pub address_n: ::std::vec::Vec, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceGetPublicKey.show_display) - pub show_display: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:hw.trezor.messages.binance.BinanceGetPublicKey.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BinanceGetPublicKey { - fn default() -> &'a BinanceGetPublicKey { - ::default_instance() - } -} - -impl BinanceGetPublicKey { - pub fn new() -> BinanceGetPublicKey { - ::std::default::Default::default() - } - - // optional bool show_display = 2; - - pub fn show_display(&self) -> bool { - self.show_display.unwrap_or(false) - } - - pub fn clear_show_display(&mut self) { - self.show_display = ::std::option::Option::None; - } - - pub fn has_show_display(&self) -> bool { - self.show_display.is_some() - } - - // Param is passed by value, moved - pub fn set_show_display(&mut self, v: bool) { - self.show_display = ::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: &BinanceGetPublicKey| { &m.address_n }, - |m: &mut BinanceGetPublicKey| { &mut m.address_n }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "show_display", - |m: &BinanceGetPublicKey| { &m.show_display }, - |m: &mut BinanceGetPublicKey| { &mut m.show_display }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BinanceGetPublicKey", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BinanceGetPublicKey { - const NAME: &'static str = "BinanceGetPublicKey"; - - 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.show_display = ::std::option::Option::Some(is.read_bool()?); - }, - 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.show_display { - my_size += 1 + 1; - } - 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.show_display { - os.write_bool(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() -> BinanceGetPublicKey { - BinanceGetPublicKey::new() - } - - fn clear(&mut self) { - self.address_n.clear(); - self.show_display = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BinanceGetPublicKey { - static instance: BinanceGetPublicKey = BinanceGetPublicKey { - address_n: ::std::vec::Vec::new(), - show_display: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BinanceGetPublicKey { - 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("BinanceGetPublicKey").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BinanceGetPublicKey { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BinanceGetPublicKey { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:hw.trezor.messages.binance.BinancePublicKey) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BinancePublicKey { - // message fields - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinancePublicKey.public_key) - pub public_key: ::std::option::Option<::std::vec::Vec>, - // special fields - // @@protoc_insertion_point(special_field:hw.trezor.messages.binance.BinancePublicKey.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BinancePublicKey { - fn default() -> &'a BinancePublicKey { - ::default_instance() - } -} - -impl BinancePublicKey { - pub fn new() -> BinancePublicKey { - ::std::default::Default::default() - } - - // required bytes public_key = 1; - - pub fn public_key(&self) -> &[u8] { - match self.public_key.as_ref() { - Some(v) => v, - None => &[], - } - } - - pub fn clear_public_key(&mut self) { - self.public_key = ::std::option::Option::None; - } - - pub fn has_public_key(&self) -> bool { - self.public_key.is_some() - } - - // Param is passed by value, moved - pub fn set_public_key(&mut self, v: ::std::vec::Vec) { - self.public_key = ::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_public_key(&mut self) -> &mut ::std::vec::Vec { - if self.public_key.is_none() { - self.public_key = ::std::option::Option::Some(::std::vec::Vec::new()); - } - self.public_key.as_mut().unwrap() - } - - // Take field - pub fn take_public_key(&mut self) -> ::std::vec::Vec { - self.public_key.take().unwrap_or_else(|| ::std::vec::Vec::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "public_key", - |m: &BinancePublicKey| { &m.public_key }, - |m: &mut BinancePublicKey| { &mut m.public_key }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BinancePublicKey", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BinancePublicKey { - const NAME: &'static str = "BinancePublicKey"; - - fn is_initialized(&self) -> bool { - if self.public_key.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.public_key = ::std::option::Option::Some(is.read_bytes()?); - }, - 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.public_key.as_ref() { - my_size += ::protobuf::rt::bytes_size(1, &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.public_key.as_ref() { - os.write_bytes(1, 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() -> BinancePublicKey { - BinancePublicKey::new() - } - - fn clear(&mut self) { - self.public_key = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BinancePublicKey { - static instance: BinancePublicKey = BinancePublicKey { - public_key: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BinancePublicKey { - 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("BinancePublicKey").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BinancePublicKey { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BinancePublicKey { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:hw.trezor.messages.binance.BinanceSignTx) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BinanceSignTx { - // message fields - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceSignTx.address_n) - pub address_n: ::std::vec::Vec, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceSignTx.msg_count) - pub msg_count: ::std::option::Option, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceSignTx.account_number) - pub account_number: ::std::option::Option, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceSignTx.chain_id) - pub chain_id: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceSignTx.memo) - pub memo: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceSignTx.sequence) - pub sequence: ::std::option::Option, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceSignTx.source) - pub source: ::std::option::Option, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceSignTx.chunkify) - pub chunkify: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:hw.trezor.messages.binance.BinanceSignTx.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BinanceSignTx { - fn default() -> &'a BinanceSignTx { - ::default_instance() - } -} - -impl BinanceSignTx { - pub fn new() -> BinanceSignTx { - ::std::default::Default::default() - } - - // required uint32 msg_count = 2; - - pub fn msg_count(&self) -> u32 { - self.msg_count.unwrap_or(0) - } - - pub fn clear_msg_count(&mut self) { - self.msg_count = ::std::option::Option::None; - } - - pub fn has_msg_count(&self) -> bool { - self.msg_count.is_some() - } - - // Param is passed by value, moved - pub fn set_msg_count(&mut self, v: u32) { - self.msg_count = ::std::option::Option::Some(v); - } - - // required sint64 account_number = 3; - - pub fn account_number(&self) -> i64 { - self.account_number.unwrap_or(0) - } - - pub fn clear_account_number(&mut self) { - self.account_number = ::std::option::Option::None; - } - - pub fn has_account_number(&self) -> bool { - self.account_number.is_some() - } - - // Param is passed by value, moved - pub fn set_account_number(&mut self, v: i64) { - self.account_number = ::std::option::Option::Some(v); - } - - // optional string chain_id = 4; - - pub fn chain_id(&self) -> &str { - match self.chain_id.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_chain_id(&mut self) { - self.chain_id = ::std::option::Option::None; - } - - pub fn has_chain_id(&self) -> bool { - self.chain_id.is_some() - } - - // Param is passed by value, moved - pub fn set_chain_id(&mut self, v: ::std::string::String) { - self.chain_id = ::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_chain_id(&mut self) -> &mut ::std::string::String { - if self.chain_id.is_none() { - self.chain_id = ::std::option::Option::Some(::std::string::String::new()); - } - self.chain_id.as_mut().unwrap() - } - - // Take field - pub fn take_chain_id(&mut self) -> ::std::string::String { - self.chain_id.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string memo = 5; - - pub fn memo(&self) -> &str { - match self.memo.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_memo(&mut self) { - self.memo = ::std::option::Option::None; - } - - pub fn has_memo(&self) -> bool { - self.memo.is_some() - } - - // Param is passed by value, moved - pub fn set_memo(&mut self, v: ::std::string::String) { - self.memo = ::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_memo(&mut self) -> &mut ::std::string::String { - if self.memo.is_none() { - self.memo = ::std::option::Option::Some(::std::string::String::new()); - } - self.memo.as_mut().unwrap() - } - - // Take field - pub fn take_memo(&mut self) -> ::std::string::String { - self.memo.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // required sint64 sequence = 6; - - pub fn sequence(&self) -> i64 { - self.sequence.unwrap_or(0) - } - - pub fn clear_sequence(&mut self) { - self.sequence = ::std::option::Option::None; - } - - pub fn has_sequence(&self) -> bool { - self.sequence.is_some() - } - - // Param is passed by value, moved - pub fn set_sequence(&mut self, v: i64) { - self.sequence = ::std::option::Option::Some(v); - } - - // required sint64 source = 7; - - pub fn source(&self) -> i64 { - self.source.unwrap_or(0) - } - - pub fn clear_source(&mut self) { - self.source = ::std::option::Option::None; - } - - pub fn has_source(&self) -> bool { - self.source.is_some() - } - - // Param is passed by value, moved - pub fn set_source(&mut self, v: i64) { - self.source = ::std::option::Option::Some(v); - } - - // optional bool chunkify = 8; - - pub fn chunkify(&self) -> bool { - self.chunkify.unwrap_or(false) - } - - pub fn clear_chunkify(&mut self) { - self.chunkify = ::std::option::Option::None; - } - - pub fn has_chunkify(&self) -> bool { - self.chunkify.is_some() - } - - // Param is passed by value, moved - pub fn set_chunkify(&mut self, v: bool) { - self.chunkify = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(8); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "address_n", - |m: &BinanceSignTx| { &m.address_n }, - |m: &mut BinanceSignTx| { &mut m.address_n }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "msg_count", - |m: &BinanceSignTx| { &m.msg_count }, - |m: &mut BinanceSignTx| { &mut m.msg_count }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "account_number", - |m: &BinanceSignTx| { &m.account_number }, - |m: &mut BinanceSignTx| { &mut m.account_number }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "chain_id", - |m: &BinanceSignTx| { &m.chain_id }, - |m: &mut BinanceSignTx| { &mut m.chain_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "memo", - |m: &BinanceSignTx| { &m.memo }, - |m: &mut BinanceSignTx| { &mut m.memo }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "sequence", - |m: &BinanceSignTx| { &m.sequence }, - |m: &mut BinanceSignTx| { &mut m.sequence }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "source", - |m: &BinanceSignTx| { &m.source }, - |m: &mut BinanceSignTx| { &mut m.source }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "chunkify", - |m: &BinanceSignTx| { &m.chunkify }, - |m: &mut BinanceSignTx| { &mut m.chunkify }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BinanceSignTx", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BinanceSignTx { - const NAME: &'static str = "BinanceSignTx"; - - fn is_initialized(&self) -> bool { - if self.msg_count.is_none() { - return false; - } - if self.account_number.is_none() { - return false; - } - if self.sequence.is_none() { - return false; - } - if self.source.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 => { - is.read_repeated_packed_uint32_into(&mut self.address_n)?; - }, - 8 => { - self.address_n.push(is.read_uint32()?); - }, - 16 => { - self.msg_count = ::std::option::Option::Some(is.read_uint32()?); - }, - 24 => { - self.account_number = ::std::option::Option::Some(is.read_sint64()?); - }, - 34 => { - self.chain_id = ::std::option::Option::Some(is.read_string()?); - }, - 42 => { - self.memo = ::std::option::Option::Some(is.read_string()?); - }, - 48 => { - self.sequence = ::std::option::Option::Some(is.read_sint64()?); - }, - 56 => { - self.source = ::std::option::Option::Some(is.read_sint64()?); - }, - 64 => { - self.chunkify = ::std::option::Option::Some(is.read_bool()?); - }, - 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.msg_count { - my_size += ::protobuf::rt::uint32_size(2, v); - } - if let Some(v) = self.account_number { - my_size += ::protobuf::rt::sint64_size(3, v); - } - if let Some(v) = self.chain_id.as_ref() { - my_size += ::protobuf::rt::string_size(4, &v); - } - if let Some(v) = self.memo.as_ref() { - my_size += ::protobuf::rt::string_size(5, &v); - } - if let Some(v) = self.sequence { - my_size += ::protobuf::rt::sint64_size(6, v); - } - if let Some(v) = self.source { - my_size += ::protobuf::rt::sint64_size(7, v); - } - if let Some(v) = self.chunkify { - my_size += 1 + 1; - } - 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.msg_count { - os.write_uint32(2, v)?; - } - if let Some(v) = self.account_number { - os.write_sint64(3, v)?; - } - if let Some(v) = self.chain_id.as_ref() { - os.write_string(4, v)?; - } - if let Some(v) = self.memo.as_ref() { - os.write_string(5, v)?; - } - if let Some(v) = self.sequence { - os.write_sint64(6, v)?; - } - if let Some(v) = self.source { - os.write_sint64(7, v)?; - } - if let Some(v) = self.chunkify { - os.write_bool(8, 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() -> BinanceSignTx { - BinanceSignTx::new() - } - - fn clear(&mut self) { - self.address_n.clear(); - self.msg_count = ::std::option::Option::None; - self.account_number = ::std::option::Option::None; - self.chain_id = ::std::option::Option::None; - self.memo = ::std::option::Option::None; - self.sequence = ::std::option::Option::None; - self.source = ::std::option::Option::None; - self.chunkify = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BinanceSignTx { - static instance: BinanceSignTx = BinanceSignTx { - address_n: ::std::vec::Vec::new(), - msg_count: ::std::option::Option::None, - account_number: ::std::option::Option::None, - chain_id: ::std::option::Option::None, - memo: ::std::option::Option::None, - sequence: ::std::option::Option::None, - source: ::std::option::Option::None, - chunkify: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BinanceSignTx { - 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("BinanceSignTx").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BinanceSignTx { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BinanceSignTx { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:hw.trezor.messages.binance.BinanceTxRequest) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BinanceTxRequest { - // special fields - // @@protoc_insertion_point(special_field:hw.trezor.messages.binance.BinanceTxRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BinanceTxRequest { - fn default() -> &'a BinanceTxRequest { - ::default_instance() - } -} - -impl BinanceTxRequest { - pub fn new() -> BinanceTxRequest { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(0); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BinanceTxRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BinanceTxRequest { - const NAME: &'static str = "BinanceTxRequest"; - - 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 { - 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; - 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<()> { - 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() -> BinanceTxRequest { - BinanceTxRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static BinanceTxRequest { - static instance: BinanceTxRequest = BinanceTxRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BinanceTxRequest { - 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("BinanceTxRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BinanceTxRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BinanceTxRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:hw.trezor.messages.binance.BinanceTransferMsg) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BinanceTransferMsg { - // message fields - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceTransferMsg.inputs) - pub inputs: ::std::vec::Vec, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceTransferMsg.outputs) - pub outputs: ::std::vec::Vec, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceTransferMsg.chunkify) - pub chunkify: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:hw.trezor.messages.binance.BinanceTransferMsg.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BinanceTransferMsg { - fn default() -> &'a BinanceTransferMsg { - ::default_instance() - } -} - -impl BinanceTransferMsg { - pub fn new() -> BinanceTransferMsg { - ::std::default::Default::default() - } - - // optional bool chunkify = 3; - - pub fn chunkify(&self) -> bool { - self.chunkify.unwrap_or(false) - } - - pub fn clear_chunkify(&mut self) { - self.chunkify = ::std::option::Option::None; - } - - pub fn has_chunkify(&self) -> bool { - self.chunkify.is_some() - } - - // Param is passed by value, moved - pub fn set_chunkify(&mut self, v: bool) { - self.chunkify = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - 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_vec_simpler_accessor::<_, _>( - "inputs", - |m: &BinanceTransferMsg| { &m.inputs }, - |m: &mut BinanceTransferMsg| { &mut m.inputs }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "outputs", - |m: &BinanceTransferMsg| { &m.outputs }, - |m: &mut BinanceTransferMsg| { &mut m.outputs }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "chunkify", - |m: &BinanceTransferMsg| { &m.chunkify }, - |m: &mut BinanceTransferMsg| { &mut m.chunkify }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BinanceTransferMsg", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BinanceTransferMsg { - const NAME: &'static str = "BinanceTransferMsg"; - - fn is_initialized(&self) -> bool { - for v in &self.inputs { - if !v.is_initialized() { - return false; - } - }; - for v in &self.outputs { - if !v.is_initialized() { - 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.inputs.push(is.read_message()?); - }, - 18 => { - self.outputs.push(is.read_message()?); - }, - 24 => { - self.chunkify = ::std::option::Option::Some(is.read_bool()?); - }, - 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.inputs { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.outputs { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.chunkify { - my_size += 1 + 1; - } - 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.inputs { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - for v in &self.outputs { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }; - if let Some(v) = self.chunkify { - os.write_bool(3, 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() -> BinanceTransferMsg { - BinanceTransferMsg::new() - } - - fn clear(&mut self) { - self.inputs.clear(); - self.outputs.clear(); - self.chunkify = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BinanceTransferMsg { - static instance: BinanceTransferMsg = BinanceTransferMsg { - inputs: ::std::vec::Vec::new(), - outputs: ::std::vec::Vec::new(), - chunkify: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BinanceTransferMsg { - 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("BinanceTransferMsg").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BinanceTransferMsg { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BinanceTransferMsg { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -/// Nested message and enums of message `BinanceTransferMsg` -pub mod binance_transfer_msg { - // @@protoc_insertion_point(message:hw.trezor.messages.binance.BinanceTransferMsg.BinanceInputOutput) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct BinanceInputOutput { - // message fields - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceTransferMsg.BinanceInputOutput.address) - pub address: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceTransferMsg.BinanceInputOutput.coins) - pub coins: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:hw.trezor.messages.binance.BinanceTransferMsg.BinanceInputOutput.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a BinanceInputOutput { - fn default() -> &'a BinanceInputOutput { - ::default_instance() - } - } - - impl BinanceInputOutput { - pub fn new() -> BinanceInputOutput { - ::std::default::Default::default() - } - - // required string address = 1; - - pub fn address(&self) -> &str { - match self.address.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_address(&mut self) { - self.address = ::std::option::Option::None; - } - - pub fn has_address(&self) -> bool { - self.address.is_some() - } - - // Param is passed by value, moved - 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_address(&mut self) -> &mut ::std::string::String { - if self.address.is_none() { - self.address = ::std::option::Option::Some(::std::string::String::new()); - } - self.address.as_mut().unwrap() - } - - // Take field - pub fn take_address(&mut self) -> ::std::string::String { - self.address.take().unwrap_or_else(|| ::std::string::String::new()) - } - - 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::<_, _>( - "address", - |m: &BinanceInputOutput| { &m.address }, - |m: &mut BinanceInputOutput| { &mut m.address }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "coins", - |m: &BinanceInputOutput| { &m.coins }, - |m: &mut BinanceInputOutput| { &mut m.coins }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BinanceTransferMsg.BinanceInputOutput", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for BinanceInputOutput { - const NAME: &'static str = "BinanceInputOutput"; - - fn is_initialized(&self) -> bool { - if self.address.is_none() { - return false; - } - for v in &self.coins { - if !v.is_initialized() { - 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.address = ::std::option::Option::Some(is.read_string()?); - }, - 18 => { - self.coins.push(is.read_message()?); - }, - 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.address.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - for value in &self.coins { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - 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.address.as_ref() { - os.write_string(1, v)?; - } - for v in &self.coins { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }; - 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() -> BinanceInputOutput { - BinanceInputOutput::new() - } - - fn clear(&mut self) { - self.address = ::std::option::Option::None; - self.coins.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static BinanceInputOutput { - static instance: BinanceInputOutput = BinanceInputOutput { - address: ::std::option::Option::None, - coins: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for BinanceInputOutput { - 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("BinanceTransferMsg.BinanceInputOutput").unwrap()).clone() - } - } - - impl ::std::fmt::Display for BinanceInputOutput { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for BinanceInputOutput { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:hw.trezor.messages.binance.BinanceTransferMsg.BinanceCoin) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct BinanceCoin { - // message fields - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceTransferMsg.BinanceCoin.amount) - pub amount: ::std::option::Option, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceTransferMsg.BinanceCoin.denom) - pub denom: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:hw.trezor.messages.binance.BinanceTransferMsg.BinanceCoin.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a BinanceCoin { - fn default() -> &'a BinanceCoin { - ::default_instance() - } - } - - impl BinanceCoin { - pub fn new() -> BinanceCoin { - ::std::default::Default::default() - } - - // required sint64 amount = 1; - - pub fn amount(&self) -> i64 { - self.amount.unwrap_or(0) - } - - pub fn clear_amount(&mut self) { - self.amount = ::std::option::Option::None; - } - - pub fn has_amount(&self) -> bool { - self.amount.is_some() - } - - // Param is passed by value, moved - pub fn set_amount(&mut self, v: i64) { - self.amount = ::std::option::Option::Some(v); - } - - // required string denom = 2; - - pub fn denom(&self) -> &str { - match self.denom.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_denom(&mut self) { - self.denom = ::std::option::Option::None; - } - - pub fn has_denom(&self) -> bool { - self.denom.is_some() - } - - // Param is passed by value, moved - pub fn set_denom(&mut self, v: ::std::string::String) { - self.denom = ::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_denom(&mut self) -> &mut ::std::string::String { - if self.denom.is_none() { - self.denom = ::std::option::Option::Some(::std::string::String::new()); - } - self.denom.as_mut().unwrap() - } - - // Take field - pub fn take_denom(&mut self) -> ::std::string::String { - self.denom.take().unwrap_or_else(|| ::std::string::String::new()) - } - - 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::<_, _>( - "amount", - |m: &BinanceCoin| { &m.amount }, - |m: &mut BinanceCoin| { &mut m.amount }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "denom", - |m: &BinanceCoin| { &m.denom }, - |m: &mut BinanceCoin| { &mut m.denom }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BinanceTransferMsg.BinanceCoin", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for BinanceCoin { - const NAME: &'static str = "BinanceCoin"; - - fn is_initialized(&self) -> bool { - if self.amount.is_none() { - return false; - } - if self.denom.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 { - 8 => { - self.amount = ::std::option::Option::Some(is.read_sint64()?); - }, - 18 => { - self.denom = ::std::option::Option::Some(is.read_string()?); - }, - 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.amount { - my_size += ::protobuf::rt::sint64_size(1, v); - } - if let Some(v) = self.denom.as_ref() { - my_size += ::protobuf::rt::string_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.amount { - os.write_sint64(1, v)?; - } - if let Some(v) = self.denom.as_ref() { - os.write_string(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() -> BinanceCoin { - BinanceCoin::new() - } - - fn clear(&mut self) { - self.amount = ::std::option::Option::None; - self.denom = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BinanceCoin { - static instance: BinanceCoin = BinanceCoin { - amount: ::std::option::Option::None, - denom: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for BinanceCoin { - 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("BinanceTransferMsg.BinanceCoin").unwrap()).clone() - } - } - - impl ::std::fmt::Display for BinanceCoin { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for BinanceCoin { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } -} - -// @@protoc_insertion_point(message:hw.trezor.messages.binance.BinanceOrderMsg) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BinanceOrderMsg { - // message fields - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceOrderMsg.id) - pub id: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceOrderMsg.ordertype) - pub ordertype: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceOrderMsg.price) - pub price: ::std::option::Option, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceOrderMsg.quantity) - pub quantity: ::std::option::Option, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceOrderMsg.sender) - pub sender: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceOrderMsg.side) - pub side: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceOrderMsg.symbol) - pub symbol: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceOrderMsg.timeinforce) - pub timeinforce: ::std::option::Option<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:hw.trezor.messages.binance.BinanceOrderMsg.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BinanceOrderMsg { - fn default() -> &'a BinanceOrderMsg { - ::default_instance() - } -} - -impl BinanceOrderMsg { - pub fn new() -> BinanceOrderMsg { - ::std::default::Default::default() - } - - // optional string id = 1; - - pub fn id(&self) -> &str { - match self.id.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = ::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_id(&mut self) -> &mut ::std::string::String { - if self.id.is_none() { - self.id = ::std::option::Option::Some(::std::string::String::new()); - } - self.id.as_mut().unwrap() - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - self.id.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // required .hw.trezor.messages.binance.BinanceOrderMsg.BinanceOrderType ordertype = 2; - - pub fn ordertype(&self) -> binance_order_msg::BinanceOrderType { - match self.ordertype { - Some(e) => e.enum_value_or(binance_order_msg::BinanceOrderType::OT_UNKNOWN), - None => binance_order_msg::BinanceOrderType::OT_UNKNOWN, - } - } - - pub fn clear_ordertype(&mut self) { - self.ordertype = ::std::option::Option::None; - } - - pub fn has_ordertype(&self) -> bool { - self.ordertype.is_some() - } - - // Param is passed by value, moved - pub fn set_ordertype(&mut self, v: binance_order_msg::BinanceOrderType) { - self.ordertype = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // required sint64 price = 3; - - pub fn price(&self) -> i64 { - self.price.unwrap_or(0) - } - - pub fn clear_price(&mut self) { - self.price = ::std::option::Option::None; - } - - pub fn has_price(&self) -> bool { - self.price.is_some() - } - - // Param is passed by value, moved - pub fn set_price(&mut self, v: i64) { - self.price = ::std::option::Option::Some(v); - } - - // required sint64 quantity = 4; - - pub fn quantity(&self) -> i64 { - self.quantity.unwrap_or(0) - } - - pub fn clear_quantity(&mut self) { - self.quantity = ::std::option::Option::None; - } - - pub fn has_quantity(&self) -> bool { - self.quantity.is_some() - } - - // Param is passed by value, moved - pub fn set_quantity(&mut self, v: i64) { - self.quantity = ::std::option::Option::Some(v); - } - - // optional string sender = 5; - - pub fn sender(&self) -> &str { - match self.sender.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_sender(&mut self) { - self.sender = ::std::option::Option::None; - } - - pub fn has_sender(&self) -> bool { - self.sender.is_some() - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = ::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_sender(&mut self) -> &mut ::std::string::String { - if self.sender.is_none() { - self.sender = ::std::option::Option::Some(::std::string::String::new()); - } - self.sender.as_mut().unwrap() - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - self.sender.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // required .hw.trezor.messages.binance.BinanceOrderMsg.BinanceOrderSide side = 6; - - pub fn side(&self) -> binance_order_msg::BinanceOrderSide { - match self.side { - Some(e) => e.enum_value_or(binance_order_msg::BinanceOrderSide::SIDE_UNKNOWN), - None => binance_order_msg::BinanceOrderSide::SIDE_UNKNOWN, - } - } - - pub fn clear_side(&mut self) { - self.side = ::std::option::Option::None; - } - - pub fn has_side(&self) -> bool { - self.side.is_some() - } - - // Param is passed by value, moved - pub fn set_side(&mut self, v: binance_order_msg::BinanceOrderSide) { - self.side = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional string symbol = 7; - - pub fn symbol(&self) -> &str { - match self.symbol.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_symbol(&mut self) { - self.symbol = ::std::option::Option::None; - } - - pub fn has_symbol(&self) -> bool { - self.symbol.is_some() - } - - // Param is passed by value, moved - pub fn set_symbol(&mut self, v: ::std::string::String) { - self.symbol = ::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_symbol(&mut self) -> &mut ::std::string::String { - if self.symbol.is_none() { - self.symbol = ::std::option::Option::Some(::std::string::String::new()); - } - self.symbol.as_mut().unwrap() - } - - // Take field - pub fn take_symbol(&mut self) -> ::std::string::String { - self.symbol.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // required .hw.trezor.messages.binance.BinanceOrderMsg.BinanceTimeInForce timeinforce = 8; - - pub fn timeinforce(&self) -> binance_order_msg::BinanceTimeInForce { - match self.timeinforce { - Some(e) => e.enum_value_or(binance_order_msg::BinanceTimeInForce::TIF_UNKNOWN), - None => binance_order_msg::BinanceTimeInForce::TIF_UNKNOWN, - } - } - - pub fn clear_timeinforce(&mut self) { - self.timeinforce = ::std::option::Option::None; - } - - pub fn has_timeinforce(&self) -> bool { - self.timeinforce.is_some() - } - - // Param is passed by value, moved - pub fn set_timeinforce(&mut self, v: binance_order_msg::BinanceTimeInForce) { - self.timeinforce = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(8); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &BinanceOrderMsg| { &m.id }, - |m: &mut BinanceOrderMsg| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "ordertype", - |m: &BinanceOrderMsg| { &m.ordertype }, - |m: &mut BinanceOrderMsg| { &mut m.ordertype }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "price", - |m: &BinanceOrderMsg| { &m.price }, - |m: &mut BinanceOrderMsg| { &mut m.price }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "quantity", - |m: &BinanceOrderMsg| { &m.quantity }, - |m: &mut BinanceOrderMsg| { &mut m.quantity }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "sender", - |m: &BinanceOrderMsg| { &m.sender }, - |m: &mut BinanceOrderMsg| { &mut m.sender }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "side", - |m: &BinanceOrderMsg| { &m.side }, - |m: &mut BinanceOrderMsg| { &mut m.side }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "symbol", - |m: &BinanceOrderMsg| { &m.symbol }, - |m: &mut BinanceOrderMsg| { &mut m.symbol }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "timeinforce", - |m: &BinanceOrderMsg| { &m.timeinforce }, - |m: &mut BinanceOrderMsg| { &mut m.timeinforce }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BinanceOrderMsg", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BinanceOrderMsg { - const NAME: &'static str = "BinanceOrderMsg"; - - fn is_initialized(&self) -> bool { - if self.ordertype.is_none() { - return false; - } - if self.price.is_none() { - return false; - } - if self.quantity.is_none() { - return false; - } - if self.side.is_none() { - return false; - } - if self.timeinforce.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.id = ::std::option::Option::Some(is.read_string()?); - }, - 16 => { - self.ordertype = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 24 => { - self.price = ::std::option::Option::Some(is.read_sint64()?); - }, - 32 => { - self.quantity = ::std::option::Option::Some(is.read_sint64()?); - }, - 42 => { - self.sender = ::std::option::Option::Some(is.read_string()?); - }, - 48 => { - self.side = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 58 => { - self.symbol = ::std::option::Option::Some(is.read_string()?); - }, - 64 => { - self.timeinforce = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 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.id.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.ordertype { - my_size += ::protobuf::rt::int32_size(2, v.value()); - } - if let Some(v) = self.price { - my_size += ::protobuf::rt::sint64_size(3, v); - } - if let Some(v) = self.quantity { - my_size += ::protobuf::rt::sint64_size(4, v); - } - if let Some(v) = self.sender.as_ref() { - my_size += ::protobuf::rt::string_size(5, &v); - } - if let Some(v) = self.side { - my_size += ::protobuf::rt::int32_size(6, v.value()); - } - if let Some(v) = self.symbol.as_ref() { - my_size += ::protobuf::rt::string_size(7, &v); - } - if let Some(v) = self.timeinforce { - my_size += ::protobuf::rt::int32_size(8, v.value()); - } - 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.id.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.ordertype { - os.write_enum(2, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.price { - os.write_sint64(3, v)?; - } - if let Some(v) = self.quantity { - os.write_sint64(4, v)?; - } - if let Some(v) = self.sender.as_ref() { - os.write_string(5, v)?; - } - if let Some(v) = self.side { - os.write_enum(6, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.symbol.as_ref() { - os.write_string(7, v)?; - } - if let Some(v) = self.timeinforce { - os.write_enum(8, ::protobuf::EnumOrUnknown::value(&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() -> BinanceOrderMsg { - BinanceOrderMsg::new() - } - - fn clear(&mut self) { - self.id = ::std::option::Option::None; - self.ordertype = ::std::option::Option::None; - self.price = ::std::option::Option::None; - self.quantity = ::std::option::Option::None; - self.sender = ::std::option::Option::None; - self.side = ::std::option::Option::None; - self.symbol = ::std::option::Option::None; - self.timeinforce = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BinanceOrderMsg { - static instance: BinanceOrderMsg = BinanceOrderMsg { - id: ::std::option::Option::None, - ordertype: ::std::option::Option::None, - price: ::std::option::Option::None, - quantity: ::std::option::Option::None, - sender: ::std::option::Option::None, - side: ::std::option::Option::None, - symbol: ::std::option::Option::None, - timeinforce: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BinanceOrderMsg { - 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("BinanceOrderMsg").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BinanceOrderMsg { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BinanceOrderMsg { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -/// Nested message and enums of message `BinanceOrderMsg` -pub mod binance_order_msg { - #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] - // @@protoc_insertion_point(enum:hw.trezor.messages.binance.BinanceOrderMsg.BinanceOrderType) - pub enum BinanceOrderType { - // @@protoc_insertion_point(enum_value:hw.trezor.messages.binance.BinanceOrderMsg.BinanceOrderType.OT_UNKNOWN) - OT_UNKNOWN = 0, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.binance.BinanceOrderMsg.BinanceOrderType.MARKET) - MARKET = 1, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.binance.BinanceOrderMsg.BinanceOrderType.LIMIT) - LIMIT = 2, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.binance.BinanceOrderMsg.BinanceOrderType.OT_RESERVED) - OT_RESERVED = 3, - } - - impl ::protobuf::Enum for BinanceOrderType { - const NAME: &'static str = "BinanceOrderType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(BinanceOrderType::OT_UNKNOWN), - 1 => ::std::option::Option::Some(BinanceOrderType::MARKET), - 2 => ::std::option::Option::Some(BinanceOrderType::LIMIT), - 3 => ::std::option::Option::Some(BinanceOrderType::OT_RESERVED), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "OT_UNKNOWN" => ::std::option::Option::Some(BinanceOrderType::OT_UNKNOWN), - "MARKET" => ::std::option::Option::Some(BinanceOrderType::MARKET), - "LIMIT" => ::std::option::Option::Some(BinanceOrderType::LIMIT), - "OT_RESERVED" => ::std::option::Option::Some(BinanceOrderType::OT_RESERVED), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [BinanceOrderType] = &[ - BinanceOrderType::OT_UNKNOWN, - BinanceOrderType::MARKET, - BinanceOrderType::LIMIT, - BinanceOrderType::OT_RESERVED, - ]; - } - - impl ::protobuf::EnumFull for BinanceOrderType { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("BinanceOrderMsg.BinanceOrderType").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } - } - - impl ::std::default::Default for BinanceOrderType { - fn default() -> Self { - BinanceOrderType::OT_UNKNOWN - } - } - - impl BinanceOrderType { - pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("BinanceOrderMsg.BinanceOrderType") - } - } - - #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] - // @@protoc_insertion_point(enum:hw.trezor.messages.binance.BinanceOrderMsg.BinanceOrderSide) - pub enum BinanceOrderSide { - // @@protoc_insertion_point(enum_value:hw.trezor.messages.binance.BinanceOrderMsg.BinanceOrderSide.SIDE_UNKNOWN) - SIDE_UNKNOWN = 0, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.binance.BinanceOrderMsg.BinanceOrderSide.BUY) - BUY = 1, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.binance.BinanceOrderMsg.BinanceOrderSide.SELL) - SELL = 2, - } - - impl ::protobuf::Enum for BinanceOrderSide { - const NAME: &'static str = "BinanceOrderSide"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(BinanceOrderSide::SIDE_UNKNOWN), - 1 => ::std::option::Option::Some(BinanceOrderSide::BUY), - 2 => ::std::option::Option::Some(BinanceOrderSide::SELL), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "SIDE_UNKNOWN" => ::std::option::Option::Some(BinanceOrderSide::SIDE_UNKNOWN), - "BUY" => ::std::option::Option::Some(BinanceOrderSide::BUY), - "SELL" => ::std::option::Option::Some(BinanceOrderSide::SELL), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [BinanceOrderSide] = &[ - BinanceOrderSide::SIDE_UNKNOWN, - BinanceOrderSide::BUY, - BinanceOrderSide::SELL, - ]; - } - - impl ::protobuf::EnumFull for BinanceOrderSide { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("BinanceOrderMsg.BinanceOrderSide").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } - } - - impl ::std::default::Default for BinanceOrderSide { - fn default() -> Self { - BinanceOrderSide::SIDE_UNKNOWN - } - } - - impl BinanceOrderSide { - pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("BinanceOrderMsg.BinanceOrderSide") - } - } - - #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] - // @@protoc_insertion_point(enum:hw.trezor.messages.binance.BinanceOrderMsg.BinanceTimeInForce) - pub enum BinanceTimeInForce { - // @@protoc_insertion_point(enum_value:hw.trezor.messages.binance.BinanceOrderMsg.BinanceTimeInForce.TIF_UNKNOWN) - TIF_UNKNOWN = 0, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.binance.BinanceOrderMsg.BinanceTimeInForce.GTE) - GTE = 1, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.binance.BinanceOrderMsg.BinanceTimeInForce.TIF_RESERVED) - TIF_RESERVED = 2, - // @@protoc_insertion_point(enum_value:hw.trezor.messages.binance.BinanceOrderMsg.BinanceTimeInForce.IOC) - IOC = 3, - } - - impl ::protobuf::Enum for BinanceTimeInForce { - const NAME: &'static str = "BinanceTimeInForce"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(BinanceTimeInForce::TIF_UNKNOWN), - 1 => ::std::option::Option::Some(BinanceTimeInForce::GTE), - 2 => ::std::option::Option::Some(BinanceTimeInForce::TIF_RESERVED), - 3 => ::std::option::Option::Some(BinanceTimeInForce::IOC), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "TIF_UNKNOWN" => ::std::option::Option::Some(BinanceTimeInForce::TIF_UNKNOWN), - "GTE" => ::std::option::Option::Some(BinanceTimeInForce::GTE), - "TIF_RESERVED" => ::std::option::Option::Some(BinanceTimeInForce::TIF_RESERVED), - "IOC" => ::std::option::Option::Some(BinanceTimeInForce::IOC), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [BinanceTimeInForce] = &[ - BinanceTimeInForce::TIF_UNKNOWN, - BinanceTimeInForce::GTE, - BinanceTimeInForce::TIF_RESERVED, - BinanceTimeInForce::IOC, - ]; - } - - impl ::protobuf::EnumFull for BinanceTimeInForce { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("BinanceOrderMsg.BinanceTimeInForce").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } - } - - impl ::std::default::Default for BinanceTimeInForce { - fn default() -> Self { - BinanceTimeInForce::TIF_UNKNOWN - } - } - - impl BinanceTimeInForce { - pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("BinanceOrderMsg.BinanceTimeInForce") - } - } -} - -// @@protoc_insertion_point(message:hw.trezor.messages.binance.BinanceCancelMsg) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BinanceCancelMsg { - // message fields - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceCancelMsg.refid) - pub refid: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceCancelMsg.sender) - pub sender: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceCancelMsg.symbol) - pub symbol: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:hw.trezor.messages.binance.BinanceCancelMsg.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BinanceCancelMsg { - fn default() -> &'a BinanceCancelMsg { - ::default_instance() - } -} - -impl BinanceCancelMsg { - pub fn new() -> BinanceCancelMsg { - ::std::default::Default::default() - } - - // optional string refid = 1; - - pub fn refid(&self) -> &str { - match self.refid.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_refid(&mut self) { - self.refid = ::std::option::Option::None; - } - - pub fn has_refid(&self) -> bool { - self.refid.is_some() - } - - // Param is passed by value, moved - pub fn set_refid(&mut self, v: ::std::string::String) { - self.refid = ::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_refid(&mut self) -> &mut ::std::string::String { - if self.refid.is_none() { - self.refid = ::std::option::Option::Some(::std::string::String::new()); - } - self.refid.as_mut().unwrap() - } - - // Take field - pub fn take_refid(&mut self) -> ::std::string::String { - self.refid.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string sender = 2; - - pub fn sender(&self) -> &str { - match self.sender.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_sender(&mut self) { - self.sender = ::std::option::Option::None; - } - - pub fn has_sender(&self) -> bool { - self.sender.is_some() - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = ::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_sender(&mut self) -> &mut ::std::string::String { - if self.sender.is_none() { - self.sender = ::std::option::Option::Some(::std::string::String::new()); - } - self.sender.as_mut().unwrap() - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - self.sender.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string symbol = 3; - - pub fn symbol(&self) -> &str { - match self.symbol.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_symbol(&mut self) { - self.symbol = ::std::option::Option::None; - } - - pub fn has_symbol(&self) -> bool { - self.symbol.is_some() - } - - // Param is passed by value, moved - pub fn set_symbol(&mut self, v: ::std::string::String) { - self.symbol = ::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_symbol(&mut self) -> &mut ::std::string::String { - if self.symbol.is_none() { - self.symbol = ::std::option::Option::Some(::std::string::String::new()); - } - self.symbol.as_mut().unwrap() - } - - // Take field - pub fn take_symbol(&mut self) -> ::std::string::String { - self.symbol.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - 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::<_, _>( - "refid", - |m: &BinanceCancelMsg| { &m.refid }, - |m: &mut BinanceCancelMsg| { &mut m.refid }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "sender", - |m: &BinanceCancelMsg| { &m.sender }, - |m: &mut BinanceCancelMsg| { &mut m.sender }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "symbol", - |m: &BinanceCancelMsg| { &m.symbol }, - |m: &mut BinanceCancelMsg| { &mut m.symbol }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BinanceCancelMsg", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BinanceCancelMsg { - const NAME: &'static str = "BinanceCancelMsg"; - - 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 => { - self.refid = ::std::option::Option::Some(is.read_string()?); - }, - 18 => { - self.sender = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.symbol = ::std::option::Option::Some(is.read_string()?); - }, - 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.refid.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.sender.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.symbol.as_ref() { - my_size += ::protobuf::rt::string_size(3, &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.refid.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.sender.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.symbol.as_ref() { - os.write_string(3, 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() -> BinanceCancelMsg { - BinanceCancelMsg::new() - } - - fn clear(&mut self) { - self.refid = ::std::option::Option::None; - self.sender = ::std::option::Option::None; - self.symbol = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BinanceCancelMsg { - static instance: BinanceCancelMsg = BinanceCancelMsg { - refid: ::std::option::Option::None, - sender: ::std::option::Option::None, - symbol: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BinanceCancelMsg { - 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("BinanceCancelMsg").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BinanceCancelMsg { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BinanceCancelMsg { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:hw.trezor.messages.binance.BinanceSignedTx) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BinanceSignedTx { - // message fields - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceSignedTx.signature) - pub signature: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:hw.trezor.messages.binance.BinanceSignedTx.public_key) - pub public_key: ::std::option::Option<::std::vec::Vec>, - // special fields - // @@protoc_insertion_point(special_field:hw.trezor.messages.binance.BinanceSignedTx.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BinanceSignedTx { - fn default() -> &'a BinanceSignedTx { - ::default_instance() - } -} - -impl BinanceSignedTx { - pub fn new() -> BinanceSignedTx { - ::std::default::Default::default() - } - - // required bytes signature = 1; - - pub fn signature(&self) -> &[u8] { - match self.signature.as_ref() { - Some(v) => v, - None => &[], - } - } - - pub fn clear_signature(&mut self) { - self.signature = ::std::option::Option::None; - } - - pub fn has_signature(&self) -> bool { - self.signature.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); - } - - // 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()); - } - self.signature.as_mut().unwrap() - } - - // Take field - pub fn take_signature(&mut self) -> ::std::vec::Vec { - self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) - } - - // required bytes public_key = 2; - - pub fn public_key(&self) -> &[u8] { - match self.public_key.as_ref() { - Some(v) => v, - None => &[], - } - } - - pub fn clear_public_key(&mut self) { - self.public_key = ::std::option::Option::None; - } - - pub fn has_public_key(&self) -> bool { - self.public_key.is_some() - } - - // Param is passed by value, moved - pub fn set_public_key(&mut self, v: ::std::vec::Vec) { - self.public_key = ::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_public_key(&mut self) -> &mut ::std::vec::Vec { - if self.public_key.is_none() { - self.public_key = ::std::option::Option::Some(::std::vec::Vec::new()); - } - self.public_key.as_mut().unwrap() - } - - // Take field - pub fn take_public_key(&mut self) -> ::std::vec::Vec { - self.public_key.take().unwrap_or_else(|| ::std::vec::Vec::new()) - } - - 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: &BinanceSignedTx| { &m.signature }, - |m: &mut BinanceSignedTx| { &mut m.signature }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "public_key", - |m: &BinanceSignedTx| { &m.public_key }, - |m: &mut BinanceSignedTx| { &mut m.public_key }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BinanceSignedTx", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BinanceSignedTx { - const NAME: &'static str = "BinanceSignedTx"; - - fn is_initialized(&self) -> bool { - if self.signature.is_none() { - return false; - } - if self.public_key.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()?); - }, - 18 => { - self.public_key = ::std::option::Option::Some(is.read_bytes()?); - }, - 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.public_key.as_ref() { - my_size += ::protobuf::rt::bytes_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.public_key.as_ref() { - os.write_bytes(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() -> BinanceSignedTx { - BinanceSignedTx::new() - } - - fn clear(&mut self) { - self.signature = ::std::option::Option::None; - self.public_key = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BinanceSignedTx { - static instance: BinanceSignedTx = BinanceSignedTx { - signature: ::std::option::Option::None, - public_key: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BinanceSignedTx { - 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("BinanceSignedTx").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BinanceSignedTx { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BinanceSignedTx { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x16messages-binance.proto\x12\x1ahw.trezor.messages.binance\"o\n\x11B\ - inanceGetAddress\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\ - \x12!\n\x0cshow_display\x18\x02\x20\x01(\x08R\x0bshowDisplay\x12\x1a\n\ - \x08chunkify\x18\x03\x20\x01(\x08R\x08chunkify\"*\n\x0eBinanceAddress\ - \x12\x18\n\x07address\x18\x01\x20\x02(\tR\x07address\"U\n\x13BinanceGetP\ - ublicKey\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12!\n\x0c\ - show_display\x18\x02\x20\x01(\x08R\x0bshowDisplay\"1\n\x10BinancePublicK\ - ey\x12\x1d\n\npublic_key\x18\x01\x20\x02(\x0cR\tpublicKey\"\xef\x01\n\rB\ - inanceSignTx\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\ - \x1b\n\tmsg_count\x18\x02\x20\x02(\rR\x08msgCount\x12%\n\x0eaccount_numb\ - er\x18\x03\x20\x02(\x12R\raccountNumber\x12\x19\n\x08chain_id\x18\x04\ - \x20\x01(\tR\x07chainId\x12\x12\n\x04memo\x18\x05\x20\x01(\tR\x04memo\ - \x12\x1a\n\x08sequence\x18\x06\x20\x02(\x12R\x08sequence\x12\x16\n\x06so\ - urce\x18\x07\x20\x02(\x12R\x06source\x12\x1a\n\x08chunkify\x18\x08\x20\ - \x01(\x08R\x08chunkify\"\x12\n\x10BinanceTxRequest\"\xa8\x03\n\x12Binanc\ - eTransferMsg\x12Y\n\x06inputs\x18\x01\x20\x03(\x0b2A.hw.trezor.messages.\ - binance.BinanceTransferMsg.BinanceInputOutputR\x06inputs\x12[\n\x07outpu\ - ts\x18\x02\x20\x03(\x0b2A.hw.trezor.messages.binance.BinanceTransferMsg.\ - BinanceInputOutputR\x07outputs\x12\x1a\n\x08chunkify\x18\x03\x20\x01(\ - \x08R\x08chunkify\x1a\x80\x01\n\x12BinanceInputOutput\x12\x18\n\x07addre\ - ss\x18\x01\x20\x02(\tR\x07address\x12P\n\x05coins\x18\x02\x20\x03(\x0b2:\ - .hw.trezor.messages.binance.BinanceTransferMsg.BinanceCoinR\x05coins\x1a\ - ;\n\x0bBinanceCoin\x12\x16\n\x06amount\x18\x01\x20\x02(\x12R\x06amount\ - \x12\x14\n\x05denom\x18\x02\x20\x02(\tR\x05denom\"\xe3\x04\n\x0fBinanceO\ - rderMsg\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12Z\n\tordertype\x18\ - \x02\x20\x02(\x0e2<.hw.trezor.messages.binance.BinanceOrderMsg.BinanceOr\ - derTypeR\tordertype\x12\x14\n\x05price\x18\x03\x20\x02(\x12R\x05price\ - \x12\x1a\n\x08quantity\x18\x04\x20\x02(\x12R\x08quantity\x12\x16\n\x06se\ - nder\x18\x05\x20\x01(\tR\x06sender\x12P\n\x04side\x18\x06\x20\x02(\x0e2<\ - .hw.trezor.messages.binance.BinanceOrderMsg.BinanceOrderSideR\x04side\ - \x12\x16\n\x06symbol\x18\x07\x20\x01(\tR\x06symbol\x12`\n\x0btimeinforce\ - \x18\x08\x20\x02(\x0e2>.hw.trezor.messages.binance.BinanceOrderMsg.Binan\ - ceTimeInForceR\x0btimeinforce\"J\n\x10BinanceOrderType\x12\x0e\n\nOT_UNK\ - NOWN\x10\0\x12\n\n\x06MARKET\x10\x01\x12\t\n\x05LIMIT\x10\x02\x12\x0f\n\ - \x0bOT_RESERVED\x10\x03\"7\n\x10BinanceOrderSide\x12\x10\n\x0cSIDE_UNKNO\ - WN\x10\0\x12\x07\n\x03BUY\x10\x01\x12\x08\n\x04SELL\x10\x02\"I\n\x12Bina\ - nceTimeInForce\x12\x0f\n\x0bTIF_UNKNOWN\x10\0\x12\x07\n\x03GTE\x10\x01\ - \x12\x10\n\x0cTIF_RESERVED\x10\x02\x12\x07\n\x03IOC\x10\x03\"X\n\x10Bina\ - nceCancelMsg\x12\x14\n\x05refid\x18\x01\x20\x01(\tR\x05refid\x12\x16\n\ - \x06sender\x18\x02\x20\x01(\tR\x06sender\x12\x16\n\x06symbol\x18\x03\x20\ - \x01(\tR\x06symbol\"N\n\x0fBinanceSignedTx\x12\x1c\n\tsignature\x18\x01\ - \x20\x02(\x0cR\tsignature\x12\x1d\n\npublic_key\x18\x02\x20\x02(\x0cR\tp\ - ublicKeyB;\n#com.satoshilabs.trezor.lib.protobufB\x14TrezorMessageBinanc\ - e\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - 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(12); - messages.push(BinanceGetAddress::generated_message_descriptor_data()); - messages.push(BinanceAddress::generated_message_descriptor_data()); - messages.push(BinanceGetPublicKey::generated_message_descriptor_data()); - messages.push(BinancePublicKey::generated_message_descriptor_data()); - messages.push(BinanceSignTx::generated_message_descriptor_data()); - messages.push(BinanceTxRequest::generated_message_descriptor_data()); - messages.push(BinanceTransferMsg::generated_message_descriptor_data()); - messages.push(BinanceOrderMsg::generated_message_descriptor_data()); - messages.push(BinanceCancelMsg::generated_message_descriptor_data()); - messages.push(BinanceSignedTx::generated_message_descriptor_data()); - messages.push(binance_transfer_msg::BinanceInputOutput::generated_message_descriptor_data()); - messages.push(binance_transfer_msg::BinanceCoin::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(3); - enums.push(binance_order_msg::BinanceOrderType::generated_enum_descriptor_data()); - enums.push(binance_order_msg::BinanceOrderSide::generated_enum_descriptor_data()); - enums.push(binance_order_msg::BinanceTimeInForce::generated_enum_descriptor_data()); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/rust/trezor-client/src/protos/mod.rs b/rust/trezor-client/src/protos/mod.rs index d59e47976a..2d402cc3fd 100644 --- a/rust/trezor-client/src/protos/mod.rs +++ b/rust/trezor-client/src/protos/mod.rs @@ -29,7 +29,6 @@ mod generated { "bitcoin" => messages_bitcoin "ethereum" => messages_ethereum "ethereum" => messages_ethereum_eip712 - "binance" => messages_binance "cardano" => messages_cardano "eos" => messages_eos "monero" => messages_monero diff --git a/tests/REGISTERED_MARKERS b/tests/REGISTERED_MARKERS index fab4ec8b3a..99e85f7e14 100644 --- a/tests/REGISTERED_MARKERS +++ b/tests/REGISTERED_MARKERS @@ -1,6 +1,5 @@ altcoin slow -binance cardano decred eos diff --git a/tests/click_tests/record_layout.py b/tests/click_tests/record_layout.py index 8f2ac79a7e..64be71abbe 100644 --- a/tests/click_tests/record_layout.py +++ b/tests/click_tests/record_layout.py @@ -14,7 +14,6 @@ import time import click from trezorlib import ( - binance, btc, cardano, cosi, @@ -35,7 +34,6 @@ from trezorlib.cli.trezorctl import cli as main from trezorlib import cli, debuglink, protobuf # isort:skip MODULES = ( - binance, btc, cardano, cosi, diff --git a/tests/device_tests/binance/__init__.py b/tests/device_tests/binance/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/device_tests/binance/test_get_address.py b/tests/device_tests/binance/test_get_address.py deleted file mode 100644 index cdb6e72271..0000000000 --- a/tests/device_tests/binance/test_get_address.py +++ /dev/null @@ -1,60 +0,0 @@ -# This file is part of the Trezor project. -# -# Copyright (C) 2012-2019 SatoshiLabs and contributors -# -# This library is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# as published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the License along with this library. -# If not, see . - -import pytest - -from trezorlib.binance import get_address -from trezorlib.debuglink import TrezorClientDebugLink as Client -from trezorlib.tools import parse_path - -from ...input_flows import InputFlowShowAddressQRCode - -pytestmark = [ - pytest.mark.altcoin, - pytest.mark.binance, - pytest.mark.models("core"), - pytest.mark.setup_client( - mnemonic="offer caution gift cross surge pretty orange during eye soldier popular holiday mention east eight office fashion ill parrot vault rent devote earth cousin" - ), -] - -BINANCE_ADDRESS_TEST_VECTORS = [ - ("m/44h/714h/0h/0/0", "bnb1hgm0p7khfk85zpz5v0j8wnej3a90w709vhkdfu"), - ("m/44h/714h/0h/0/1", "bnb1egswqkszzfc2uq78zjslc6u2uky4pw46x4rstd"), -] - - -@pytest.mark.parametrize("path, expected_address", BINANCE_ADDRESS_TEST_VECTORS) -def test_binance_get_address(client: Client, path: str, expected_address: str): - # data from https://github.com/binance-chain/javascript-sdk/blob/master/__tests__/crypto.test.js#L50 - - address = get_address(client, parse_path(path), show_display=True) - assert address == expected_address - - -@pytest.mark.parametrize("path, expected_address", BINANCE_ADDRESS_TEST_VECTORS) -def test_binance_get_address_chunkify_details( - client: Client, path: str, expected_address: str -): - # data from https://github.com/binance-chain/javascript-sdk/blob/master/__tests__/crypto.test.js#L50 - - with client: - IF = InputFlowShowAddressQRCode(client) - client.set_input_flow(IF.get()) - address = get_address( - client, parse_path(path), show_display=True, chunkify=True - ) - assert address == expected_address diff --git a/tests/device_tests/binance/test_get_public_key.py b/tests/device_tests/binance/test_get_public_key.py deleted file mode 100644 index ea04fdbd88..0000000000 --- a/tests/device_tests/binance/test_get_public_key.py +++ /dev/null @@ -1,42 +0,0 @@ -# This file is part of the Trezor project. -# -# Copyright (C) 2012-2019 SatoshiLabs and contributors -# -# This library is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# as published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the License along with this library. -# If not, see . - -import pytest - -from trezorlib import binance -from trezorlib.debuglink import TrezorClientDebugLink as Client -from trezorlib.tools import parse_path - -from ...input_flows import InputFlowShowXpubQRCode - -BINANCE_PATH = parse_path("m/44h/714h/0h/0/0") - - -@pytest.mark.altcoin -@pytest.mark.binance -@pytest.mark.models("core") -@pytest.mark.setup_client( - mnemonic="offer caution gift cross surge pretty orange during eye soldier popular holiday mention east eight office fashion ill parrot vault rent devote earth cousin" -) -def test_binance_get_public_key(client: Client): - with client: - IF = InputFlowShowXpubQRCode(client) - client.set_input_flow(IF.get()) - sig = binance.get_public_key(client, BINANCE_PATH, show_display=True) - assert ( - sig.hex() - == "029729a52e4e3c2b4a4e52aa74033eedaf8ba1df5ab6d1f518fd69e67bbd309b0e" - ) diff --git a/tests/device_tests/binance/test_sign_tx.py b/tests/device_tests/binance/test_sign_tx.py deleted file mode 100644 index ceb0692465..0000000000 --- a/tests/device_tests/binance/test_sign_tx.py +++ /dev/null @@ -1,121 +0,0 @@ -# This file is part of the Trezor project. -# -# Copyright (C) 2012-2019 SatoshiLabs and contributors -# -# This library is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# as published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the License along with this library. -# If not, see . - -import pytest - -from trezorlib import binance -from trezorlib.debuglink import TrezorClientDebugLink as Client -from trezorlib.tools import parse_path - -BINANCE_TEST_VECTORS = [ - ( # CANCEL - { - "account_number": "34", - "chain_id": "Binance-Chain-Nile", - "data": "null", - "memo": "", - "msgs": [ - { - "refid": "BA36F0FAD74D8F41045463E4774F328F4AF779E5-29", - "sender": "tbnb1hgm0p7khfk85zpz5v0j8wnej3a90w709zzlffd", - "symbol": "BCHSV.B-10F_BNB", - } - ], - "sequence": "33", - "source": "1", - }, - { - "public_key": "029729a52e4e3c2b4a4e52aa74033eedaf8ba1df5ab6d1f518fd69e67bbd309b0e", - "signature": "d93fb0402b2b30e7ea08e123bb139ad68bf0a1577f38592eb22d11e127f09bbd3380f29b4bf15bdfa973454c5c8ed444f2e256e956fe98cfd21e886a946e21e5", - }, - ), - ( # ORDER - { - "account_number": "34", - "chain_id": "Binance-Chain-Nile", - "data": "null", - "memo": "", - "msgs": [ - { - "id": "BA36F0FAD74D8F41045463E4774F328F4AF779E5-33", - "ordertype": 2, - "price": 100000000, - "quantity": 100000000, - "sender": "tbnb1hgm0p7khfk85zpz5v0j8wnej3a90w709zzlffd", - "side": 1, - "symbol": "ADA.B-B63_BNB", - "timeinforce": 1, - } - ], - "sequence": "32", - "source": "1", - }, - { - "public_key": "029729a52e4e3c2b4a4e52aa74033eedaf8ba1df5ab6d1f518fd69e67bbd309b0e", - "signature": "851fc9542342321af63ecbba7d3ece545f2a42bad01ba32cff5535b18e54b6d3106e10b6a4525993d185a1443d9a125186960e028eabfdd8d76cf70a3a7e3100", - }, - ), - ( # TRANSFER - { - "account_number": "34", - "chain_id": "Binance-Chain-Nile", - "data": "null", - "memo": "test", - "msgs": [ - { - "inputs": [ - { - "address": "tbnb1hgm0p7khfk85zpz5v0j8wnej3a90w709zzlffd", - "coins": [{"amount": 1000000000, "denom": "BNB"}], - } - ], - "outputs": [ - { - "address": "tbnb1ss57e8sa7xnwq030k2ctr775uac9gjzglqhvpy", - "coins": [{"amount": 1000000000, "denom": "BNB"}], - } - ], - } - ], - "sequence": "31", - "source": "1", - }, - { - "public_key": "029729a52e4e3c2b4a4e52aa74033eedaf8ba1df5ab6d1f518fd69e67bbd309b0e", - "signature": "faf5b908d6c4ec0c7e2e7d8f7e1b9ca56ac8b1a22b01655813c62ce89bf84a4c7b14f58ce51e85d64c13f47e67d6a9187b8f79f09e0a9b82019f47ae190a4db3", - }, - ), -] - - -@pytest.mark.altcoin -@pytest.mark.binance -@pytest.mark.models("core") -@pytest.mark.setup_client( - mnemonic="offer caution gift cross surge pretty orange during eye soldier popular holiday mention east eight office fashion ill parrot vault rent devote earth cousin" -) -@pytest.mark.parametrize("message, expected_response", BINANCE_TEST_VECTORS) -@pytest.mark.parametrize("chunkify", (True, False)) -def test_binance_sign_message( - client: Client, chunkify: bool, message: dict, expected_response: dict -): - response = binance.sign_tx( - client, parse_path("m/44h/714h/0h/0/0"), message, chunkify=chunkify - ) - - assert response.public_key.hex() == expected_response["public_key"] - - assert response.signature.hex() == expected_response["signature"] diff --git a/tests/ui_tests/fixtures.json b/tests/ui_tests/fixtures.json index 7a846a03c5..cc66f23054 100644 --- a/tests/ui_tests/fixtures.json +++ b/tests/ui_tests/fixtures.json @@ -1070,17 +1070,6 @@ "T2T1_pt_test_reset_slip39_basic.py::test_reset_slip39_basic[1of1]": "86f79e8d97d0a45823ab23280476d480f987b990a84a0f4e3da1556c8bbab800" }, "device_tests": { -"T2T1_cs_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "c786b34194a69015c09236133933c06a501029ad7b3451bb1f280def0985706a", -"T2T1_cs_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "81d84321ce04ea8f3f42bf5d3d9f06580f204564ce36b02f969ff60377af119e", -"T2T1_cs_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "cc21ffc2722f5bc13fce2faf5170477a307466ed37009b54bc714bab6822ed07", -"T2T1_cs_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "0f294f74ab934ed6b9f37df4f1dbc0bd49bc0dd4478a875f4d6878b20e55f169", -"T2T1_cs_binance-test_get_public_key.py::test_binance_get_public_key": "e3eb8b78202518ab87a1439811287e3fd43cd48892179d22f7f391454dbadd3e", -"T2T1_cs_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "805f33495fae1d8e270a59a13b02f9d8269635e5d63b33d20c2f2bdc0363fcd9", -"T2T1_cs_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "63754cc15e89031244b4f8ae7346dfdc5e956bf4e76f1728cc173ed0d7edde1a", -"T2T1_cs_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "6898993a3574270ccf57411a92451a781efb7c568cc4ddbab8bb803a765c414a", -"T2T1_cs_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "805f33495fae1d8e270a59a13b02f9d8269635e5d63b33d20c2f2bdc0363fcd9", -"T2T1_cs_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "63754cc15e89031244b4f8ae7346dfdc5e956bf4e76f1728cc173ed0d7edde1a", -"T2T1_cs_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "6898993a3574270ccf57411a92451a781efb7c568cc4ddbab8bb803a765c414a", "T2T1_cs_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "8a219ded764f45a8d1f34b38ddacb9a5a40d605f096bd8a405a444966803a509", "T2T1_cs_bitcoin-test_authorize_coinjoin.py::test_get_address": "f0aea582858fbd866fb0fea0a9e547e9467feb303c2bab8447f1c8e3fee1d2a0", "T2T1_cs_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "93d15588c2e5b0cbf1f0f083d4efd675f083260efd5afaa0d29f12b0e6d190cf", @@ -2541,17 +2530,6 @@ "T2T1_cs_zcash-test_sign_tx.py::test_spend_v5_input": "73dac0e26ec7643d3ce3ac57385a5c1ad758f7de43ded428853cc82cc8c45e09", "T2T1_cs_zcash-test_sign_tx.py::test_unified_address": "58a83dcb04e95dbc700281a7b73bec66b2c41020985d259982b08ba19a12983a", "T2T1_cs_zcash-test_sign_tx.py::test_version_group_id_missing": "32d380b2c0942f8a2ab6a32e0e4c8a2ad2ab6750ee39c6fa4d4f0bacf59a4b7c", -"T2T1_de_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "ac0d003ad47eaf1b73891cfeed4907acacb8a0e79c43e35afd301f61232ee5f5", -"T2T1_de_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "0c1050152c8746cc7bcab64941ccc4da1e1c22cb751027b5bc86ff20cd0c82f8", -"T2T1_de_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "b5f71bf80ab91bcd934519225d3678ef1bdd54fe2b6cc58fa32c8e69e2f9b605", -"T2T1_de_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "72fd4d523b0b2b610efd1ca55c23107894c03054f89dfc151ece55c505986bc8", -"T2T1_de_binance-test_get_public_key.py::test_binance_get_public_key": "9a53a2d910b5985cec6c7839aa0f3afec2b2e8eeb316f60c9489aff59189d3a6", -"T2T1_de_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "37c928fb92898d1f41df26c47c7ca5672e5ab47f7d6939078a191122a10f68ac", -"T2T1_de_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "cd09cfa61f95774b270400682cb9c0c57082a689bcaa83ac265dffe8c29a90e4", -"T2T1_de_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "7ca53c82c4db70ebb86efbef0f0c9a7999af3514a9e8ed7cfd8df1b07547db73", -"T2T1_de_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "37c928fb92898d1f41df26c47c7ca5672e5ab47f7d6939078a191122a10f68ac", -"T2T1_de_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "cd09cfa61f95774b270400682cb9c0c57082a689bcaa83ac265dffe8c29a90e4", -"T2T1_de_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "7ca53c82c4db70ebb86efbef0f0c9a7999af3514a9e8ed7cfd8df1b07547db73", "T2T1_de_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "ad216a0952026825a386d34ff2f4cb0a66f22c0973c86b4e35c83379f74e9911", "T2T1_de_bitcoin-test_authorize_coinjoin.py::test_get_address": "2b9b2122b95aa3395526cb023c48455ee25517d8137e58ad1cd71a17c058159e", "T2T1_de_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "7b29f27a7d2f02b83125cce00bc1dce4df730e3ac7ceacd046029c0ec16a8e6d", @@ -4012,17 +3990,6 @@ "T2T1_de_zcash-test_sign_tx.py::test_spend_v5_input": "5b055c16ffb29554c8d592bea800a6a464ddcdd4b5f18f9cdab05a4c0e5ad5bb", "T2T1_de_zcash-test_sign_tx.py::test_unified_address": "e9c42bdd7449b05e7ef41fcbc71b3dcb2bddf3d5b3f4e9385c7cb286a5c48b6e", "T2T1_de_zcash-test_sign_tx.py::test_version_group_id_missing": "a3edf3ced8fa1fa6b9f67f869a28bc880ce5e214b0adfaf839cd867875845912", -"T2T1_en_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "a4bbc591f4ba833a42285eecd693790ae5a7e916db9d75a76972eb796bd56a68", -"T2T1_en_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "76916192e1156621e50cc27c671b8c539b4e213514f6ca1d2b205c4e1258d728", -"T2T1_en_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "6289462ec7e0284e85da76a05ab68af7d9cd96e71d1f733ea87fce708ed7d794", -"T2T1_en_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "6ae35bdcdfc3850b73641723638ccfe135f4a05e662971421c547cf46832fa40", -"T2T1_en_binance-test_get_public_key.py::test_binance_get_public_key": "f457ec7b9e979c0eaaf9d56be769eac0fab49efbebbe603e0a19b51e68232d6f", -"T2T1_en_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "681d1914d833d4e1e417fba628d159a535db1bb481e3346a7f5a35fd27652c05", -"T2T1_en_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "d4ef8cf6465fab80c88d684aeb1f4bc6509e10b0c349eb968a879a2a95e57d89", -"T2T1_en_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "dc6a3cd507cc52bae1759e76ed2d97a8bf6260f6881632594892a6a88534dfc1", -"T2T1_en_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "681d1914d833d4e1e417fba628d159a535db1bb481e3346a7f5a35fd27652c05", -"T2T1_en_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "d4ef8cf6465fab80c88d684aeb1f4bc6509e10b0c349eb968a879a2a95e57d89", -"T2T1_en_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "dc6a3cd507cc52bae1759e76ed2d97a8bf6260f6881632594892a6a88534dfc1", "T2T1_en_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "a8542f99d1557a42b1808bf3766823db527ee66181ac7a0d3d834c831e3ad0af", "T2T1_en_bitcoin-test_authorize_coinjoin.py::test_get_address": "b4324b15dba7a207a37cba43b20f6ecdbfe34dfbedbd48daa738e013e076f2fe", "T2T1_en_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "88cd73984ce16c4f9875977848d66d0d077bd3cf41b54b8c9785def18d2b27e7", @@ -5501,17 +5468,6 @@ "T2T1_eos-test_signtx.py::test_eos_signtx_updateauth": "ac173799bcd8d981f778e273f3a6ea092677d7b733b8ff97f301e77b8b1eb647", "T2T1_eos-test_signtx.py::test_eos_signtx_vote": "c73e5ac4bdc2fedef12bae697b76b7e2fced28ce9c11d2cb3d98df9488d03bf9", "T2T1_eos-test_signtx.py::test_eos_signtx_vote_proxy": "fa511b4c78e1d926cbebdeb010b3c71ff4c3d3adb8558a4439e1d4506214d418", -"T2T1_es_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "cea19ad7dc6fb052175f72f63208facd79f34b3016c090c38d8093eca311d732", -"T2T1_es_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "eaef9f82c4dc082f9bb37127c7175ffbf14582b17f59e7927918b422e3d6ef22", -"T2T1_es_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "4dc445530318c40f052d1178ef5090b81b9a698a346caf0a133763096c36d1de", -"T2T1_es_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "c001696ba3f93fa77fa4b342f882498a9d967e6c3f86fa5ea30463bc35a2e4f6", -"T2T1_es_binance-test_get_public_key.py::test_binance_get_public_key": "5341caa68de612268b11644e3b601a3fa985f0e98cf818b36d1534f7d243f85d", -"T2T1_es_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "a0d9735e220756b388a73da1ec111166e4dde34323af6db51b33bbf586fad789", -"T2T1_es_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "8005ebf9edc34448c1a793f459957d879baabc2edcb4c48e6e0013a892cece0e", -"T2T1_es_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "2492c981d1a33313faaef56aaa4aa398aa06c65f64ae3edcad67230b9a431a60", -"T2T1_es_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "a0d9735e220756b388a73da1ec111166e4dde34323af6db51b33bbf586fad789", -"T2T1_es_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "8005ebf9edc34448c1a793f459957d879baabc2edcb4c48e6e0013a892cece0e", -"T2T1_es_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "2492c981d1a33313faaef56aaa4aa398aa06c65f64ae3edcad67230b9a431a60", "T2T1_es_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "ef1476adce8282e37ea0152c69dc1e6ae0cc7a7a6ac29589c770cce2c45857fe", "T2T1_es_bitcoin-test_authorize_coinjoin.py::test_get_address": "5df2a6554a2bee55d1a766416db4125f0354b37cc730ca4d74d023e6170a4efa", "T2T1_es_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "dc63a14c147db11ac713123b740c7b4203a584e32854e5838688abe15686a1de", @@ -6972,17 +6928,6 @@ "T2T1_es_zcash-test_sign_tx.py::test_spend_v5_input": "fb08b6e0824c6c0d616d1943d7669aa5323a3a5fa1364dac663884a52adecf9a", "T2T1_es_zcash-test_sign_tx.py::test_unified_address": "62ffec7c2cf7332e1ea77a97121d655ee0017d04c293a5a846896536ff4ef6b8", "T2T1_es_zcash-test_sign_tx.py::test_version_group_id_missing": "1775658fa541fff7933453c1d346449c492079a39341e07135ac9e7662b3bbd3", -"T2T1_fr_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "e1b70255c5736368bf2303961a859e30fda5d21d8e9d56f7c45da8c53ab99e77", -"T2T1_fr_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "9606d91970e72b9332d299d6a04f9332e17c4734effbbcaaf1db0a0e3a0bfa36", -"T2T1_fr_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "c7940f32461a8daf3c9c553d9ceb3e4e82d7a4c811fdec9a652bdbf7a6e66386", -"T2T1_fr_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "d98a15c510cbd58b4e7b87a275d0d8afdbfa7ba394c58e696f197a7b2956106b", -"T2T1_fr_binance-test_get_public_key.py::test_binance_get_public_key": "57fd9e74b37c53c97d7c247e270646cdcf99b3960c4f0182c803d4b3800bce5b", -"T2T1_fr_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "0a8de34ef3ee8c616d7e69b4ff38eb8cd9f1e10bf5e0757f478c75347b7962b8", -"T2T1_fr_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "9c10cd34ee385068f481d3726b3a0c6f6809c4a90201fbcc0b5fa000421f16dd", -"T2T1_fr_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "4b860785169855daa12b3803569e03402d4019e845be7645012f645937ef0b2e", -"T2T1_fr_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "0a8de34ef3ee8c616d7e69b4ff38eb8cd9f1e10bf5e0757f478c75347b7962b8", -"T2T1_fr_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "9c10cd34ee385068f481d3726b3a0c6f6809c4a90201fbcc0b5fa000421f16dd", -"T2T1_fr_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "4b860785169855daa12b3803569e03402d4019e845be7645012f645937ef0b2e", "T2T1_fr_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "a3619f8b272d7f95dd81fafc1c98b2e6eae5d136b911e20998e70189643f2eba", "T2T1_fr_bitcoin-test_authorize_coinjoin.py::test_get_address": "40ff27a19d41ad5e7296abb130467edf12fdb1471d3979302dc1ce7f84640fd0", "T2T1_fr_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "81409ffd693a78357a1194ef92daeb95cf8f532e0737561bb07e4b8b45b680ef", @@ -8443,17 +8388,6 @@ "T2T1_fr_zcash-test_sign_tx.py::test_spend_v5_input": "fbecd957241b36d3b4374bc7f777a0afa9d3c3119b170145a6dee2245bca2c54", "T2T1_fr_zcash-test_sign_tx.py::test_unified_address": "2c2ce075c9c0ebabc113f3b4a002b5ec82b4e33cd27d22e169880f41b5a627a1", "T2T1_fr_zcash-test_sign_tx.py::test_version_group_id_missing": "94d3ba1cba15b836e6ebc48ab307aeea71275ef2d9849aaabc8e883df555ce3f", -"T2T1_pt_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "c87d491f05efbb43ab3e0bae2babbeb20426b0fe2c443cbaa3c2f7848b88a715", -"T2T1_pt_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "1a14830b59d8009bcc89a3dfbe6e5dbe85dfb4cdc7c5213a315b62dd6657480b", -"T2T1_pt_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "95f1cb7daa63f57362bf6307ace592941885b712ba532673eba8101a1fd278a7", -"T2T1_pt_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "ce4012efbef366c21a692db7c947369de26fe08a6af3ace3f784f23b524af9b4", -"T2T1_pt_binance-test_get_public_key.py::test_binance_get_public_key": "b85ed7df44de37a2e83d2dab04f86cd041767f111523dcc427b0e456fd4db9c5", -"T2T1_pt_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "01b4904c74391890b7ea6a9ddffbf6a549dee79767dafa915b75af6af91a4328", -"T2T1_pt_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "827a3152f06e03a5aa88c6baaa743cde1441f5d00f37365814a8f51f506efac0", -"T2T1_pt_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "08057056aa26f9853dc3784746963a7f7de0e300435d0c570c07b4db6af89730", -"T2T1_pt_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "01b4904c74391890b7ea6a9ddffbf6a549dee79767dafa915b75af6af91a4328", -"T2T1_pt_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "827a3152f06e03a5aa88c6baaa743cde1441f5d00f37365814a8f51f506efac0", -"T2T1_pt_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "08057056aa26f9853dc3784746963a7f7de0e300435d0c570c07b4db6af89730", "T2T1_pt_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "0a972e3714650c8d2e91a93649f6c990e179d7d053f25165e51b3fb971bf31dc", "T2T1_pt_bitcoin-test_authorize_coinjoin.py::test_get_address": "3498da5d772189e3941f791cd4def0cbe9fd6ff500a259dac8b6bac22cf16a92", "T2T1_pt_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "aac472cd446c0c153298b5e74e6f0ae47ce4d4e18a8a029da2331cc80a7c0fd0", @@ -10226,17 +10160,6 @@ "T3B1_pt_test_tutorial_caesar.py::test_tutorial_skip": "0399d3c5ea99203085584cc25c814debf50c41474403507ba3a1d01f45b863e1" }, "device_tests": { -"T3B1_cs_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "a06576e7133f41d347bd0de24868093301ecaf73c5f4d4b689ce7fdc694fbd4f", -"T3B1_cs_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "045371520958b451a354dd5a448258c5a356dee9fc4cfe8d37be62c479fbc461", -"T3B1_cs_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "0d5bc9e3c7315fbd55baa2a759bae1691d93296e064126f250f70528e84ef2ba", -"T3B1_cs_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "dbe3dd99edcd5cf4ee899e6d1382391682f1873ba3092d4d55daf729d9c5981c", -"T3B1_cs_binance-test_get_public_key.py::test_binance_get_public_key": "c29eef1e21e63187cdcdc961a54924e6ae07fd8a08340b692218ce2366d65e63", -"T3B1_cs_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "5dbeeb8675d3a698553fa9dd52f7d955add0e9dd24003068b155e7c748278fdd", -"T3B1_cs_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "bd0f162f88ba7f5b59a36f05818ceeee6dea0bdc00bd5b1a1d038261624bfeb1", -"T3B1_cs_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "691485e275850024ea7a64effc495e5603e0021f80702954b13768e1d38e9c3b", -"T3B1_cs_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "5dbeeb8675d3a698553fa9dd52f7d955add0e9dd24003068b155e7c748278fdd", -"T3B1_cs_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "bd0f162f88ba7f5b59a36f05818ceeee6dea0bdc00bd5b1a1d038261624bfeb1", -"T3B1_cs_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "691485e275850024ea7a64effc495e5603e0021f80702954b13768e1d38e9c3b", "T3B1_cs_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "2a562ba7e83d9541862f4bc2a2d6fa697800ff4e92ee5a03eb85d79dfec1ec6a", "T3B1_cs_bitcoin-test_authorize_coinjoin.py::test_get_address": "23b01d36b64aea24a623b8785e590f606ca73e7f566d76ec41ba78fe123d31a5", "T3B1_cs_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "84053478b0f2e8f2f350f852584189e2df4af4f55f716c31e5a7359433a87879", @@ -11616,17 +11539,6 @@ "T3B1_cs_zcash-test_sign_tx.py::test_spend_v5_input": "3980ab56373a5e352b5e05406870d2ca5079f9d86f3ef2ebd041a26c501bd830", "T3B1_cs_zcash-test_sign_tx.py::test_unified_address": "4ef55e09ae4b102c361529ef49e7b96baa85818e05fc5e51c20446b201c04c0b", "T3B1_cs_zcash-test_sign_tx.py::test_version_group_id_missing": "92840d4624bb07440bb1ab5cb4b57251c9950388accbc8334a9a7d609ededb01", -"T3B1_de_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "c1dfa6ad264104f7e0b4fdeac301488b7e8e37e6fc91e8ab172a482fa114d1ea", -"T3B1_de_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "1c120e01ce6139c444c24ddb0cf2cf88be39545c2509f595ea96606331ba6c8d", -"T3B1_de_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "e93d158d22e1914209e34d66ed16dea92bfb071be4db43b838a782890b78a58b", -"T3B1_de_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "5220f1d9c20feb5a334c36f9a881dbf892854bea0c92cd7ca763719cdaa3640b", -"T3B1_de_binance-test_get_public_key.py::test_binance_get_public_key": "fdde02f41986250df82327a883bd48f482f8b7fc3ce28ae19c3efc09c8f60a03", -"T3B1_de_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "9b3f9c8d614974601e15f523602f0dad117faf16613e004ba46df0cf9e11f91a", -"T3B1_de_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "6a65b05dbcf9274f67b38d9227b7049e3bb184b91ac708ac11ffcefc4d26c492", -"T3B1_de_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "dddd7e66e461e88382247b5bf0227ac1b28075781a9e1cfa3b1bdf02d2d437f7", -"T3B1_de_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "9b3f9c8d614974601e15f523602f0dad117faf16613e004ba46df0cf9e11f91a", -"T3B1_de_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "6a65b05dbcf9274f67b38d9227b7049e3bb184b91ac708ac11ffcefc4d26c492", -"T3B1_de_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "dddd7e66e461e88382247b5bf0227ac1b28075781a9e1cfa3b1bdf02d2d437f7", "T3B1_de_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "6243cbe5855e5c2fdfd469a09f799ff2ec21d4fe3747c8e8702382fa16b6dcbd", "T3B1_de_bitcoin-test_authorize_coinjoin.py::test_get_address": "0dfe8cb8fd7c8d40e5f50966c1857377f26835768a629278b17eb94f5c2416dd", "T3B1_de_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "2fc65c9eb08b24dadd0a1acb8209925926c6f357ba1b442aa3a01490ff9be49d", @@ -13006,17 +12918,6 @@ "T3B1_de_zcash-test_sign_tx.py::test_spend_v5_input": "0b6b0ae961e3915b0495da486d877adff97264edd5037ccda8fb18e7d6b1de28", "T3B1_de_zcash-test_sign_tx.py::test_unified_address": "182bed55fad4121d09f61a14297932b182537c60c819b9bf3bb7c50fffaff09c", "T3B1_de_zcash-test_sign_tx.py::test_version_group_id_missing": "c92ee4e050daadcfc7cc95657b00deed76bb463d486eefcc66455bdbe60faa33", -"T3B1_en_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "506372e1e9afb9a81222a7bde003c49ac70772fd381f5bec28fc97ee1451fb8d", -"T3B1_en_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "340b35400579511a9f79c6d5daf83f78e92ba24d59741bfce65cfe660c67a4d4", -"T3B1_en_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "86d787d3fa1db280140569746f8e1a353fd0ae620ae90b4c496f5929f167c421", -"T3B1_en_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "181469395cedf2b84985dd4ea07b02cc7436e42253efc3d37f50bfc4aa08374e", -"T3B1_en_binance-test_get_public_key.py::test_binance_get_public_key": "740b9a51bcbda9f1b42156e5e04331e06a0d58da8e051d5e06dc0aa282a849d6", -"T3B1_en_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "9b6d126d099297236f5a449aa58b1a67c2d757f543bc251fa2f12386eba69bc9", -"T3B1_en_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "033354c7de90def0d6bed5638aabc1581e64fdde3abafedc04fb9264ba040ab8", -"T3B1_en_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "19df3294cc842fdf99646d3da419d003c9bec98dccfa0961552c0712174fe394", -"T3B1_en_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "9b6d126d099297236f5a449aa58b1a67c2d757f543bc251fa2f12386eba69bc9", -"T3B1_en_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "033354c7de90def0d6bed5638aabc1581e64fdde3abafedc04fb9264ba040ab8", -"T3B1_en_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "19df3294cc842fdf99646d3da419d003c9bec98dccfa0961552c0712174fe394", "T3B1_en_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "bf98f757408eebaba162730094ab80f1a634ab30373ce85086d82b09b106f677", "T3B1_en_bitcoin-test_authorize_coinjoin.py::test_get_address": "1821719c665a9de39f24aca5a1408c9f77d8bdb62c259bbf4d7d8ad45b237d35", "T3B1_en_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "5d66424bfbcbeb2710247bd56deb151723770e905b83a29b2dbeafdd9e697b34", @@ -14396,17 +14297,6 @@ "T3B1_en_zcash-test_sign_tx.py::test_spend_v5_input": "ba3b17241d241d9c4109163b9630421819f8ed1bdca4f67441d94c816a46c288", "T3B1_en_zcash-test_sign_tx.py::test_unified_address": "f78e8e2f99f7397b04ed429d665fe419c4d2a47de89d1e61046a0d69f5e2ce56", "T3B1_en_zcash-test_sign_tx.py::test_version_group_id_missing": "1477d62e338f4d7c1bfac2fc5d2fc231218da5768666c11482dc1f83229506f3", -"T3B1_es_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "dcf19c6685c91b2c3c77129ab521925eb8759a81438df7fda379782b7cb3836f", -"T3B1_es_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "7f5523b8ea9d12eb5689fa18ff5ec2abca02d0cd66e773ff0ab163fd7a56f80d", -"T3B1_es_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "9c2a87aa04ffdc95210f75a91321ae6c2d3a05f93a61704b13064a02299b6751", -"T3B1_es_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "b0960fffccef18978bf60caeafa2aa761aea373102ea06a80793d2ed565950e4", -"T3B1_es_binance-test_get_public_key.py::test_binance_get_public_key": "74ecd7f8ae0c2dec0ce3de4a35fb3940e67a5abf8f85436e1fc80fbf83c0b308", -"T3B1_es_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "97653336c83f06eda67964482c5dab02ddf95c2f435e7e4fe7929e892041146e", -"T3B1_es_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "3bee9044ad2ee65c9d7483b947a9cc245403fa53db5306e1ba92fe5e6d7c7d92", -"T3B1_es_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "298433974d5ed9da554b5365bf7687921f35145ff905db577ae0fd2a0c013d25", -"T3B1_es_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "97653336c83f06eda67964482c5dab02ddf95c2f435e7e4fe7929e892041146e", -"T3B1_es_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "3bee9044ad2ee65c9d7483b947a9cc245403fa53db5306e1ba92fe5e6d7c7d92", -"T3B1_es_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "298433974d5ed9da554b5365bf7687921f35145ff905db577ae0fd2a0c013d25", "T3B1_es_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "bcbd88c385da5f2bc31bc15b7d21baf05e9c2eca1163a5892777dacdf24db9d3", "T3B1_es_bitcoin-test_authorize_coinjoin.py::test_get_address": "b4d6edd11a46bbeb8c48d171305bce01dc7e83176c7ceb1fa6632f6c0999bef8", "T3B1_es_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "75bebda1876f0b295c8626dcbb44122930ed13a16a41a7f1016a767e88f64e3c", @@ -15786,17 +15676,6 @@ "T3B1_es_zcash-test_sign_tx.py::test_spend_v5_input": "728d37a459bc66a1cbcae1dbc3fdf91879809b792b2244a11f9f5e6dc2220412", "T3B1_es_zcash-test_sign_tx.py::test_unified_address": "26f4c94737fce7a0f5f1d670613798161fdb9ac99acb34323e01cb33221495f9", "T3B1_es_zcash-test_sign_tx.py::test_version_group_id_missing": "211e7c3419bd48ceefc570971fc522f809b39614563be948fd1e545366506dee", -"T3B1_fr_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "b92774629d95e7f9f30f50e8248023ae1e012a89203a46ea86e27820b9865349", -"T3B1_fr_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "8df27385f6ad8e299fff8ca43ca1194c68ebbef35972af24ca1145079cb8c31e", -"T3B1_fr_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "dff4e5825719f7ea6cd995f836072ec093ee6d55a3e050de58e264cc55f9a86f", -"T3B1_fr_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "a2f21944308464c584823cca0927c1f7b69e02b9913eb68335f084c9a52d8791", -"T3B1_fr_binance-test_get_public_key.py::test_binance_get_public_key": "44bc712d0adf39b6fce49d4319e047ef1cfa1497843b0a4d1db9c40265c3cc18", -"T3B1_fr_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "3311142003357cb57ace14c29e47370b20866ebd8787a829c91579a46eb75838", -"T3B1_fr_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "57a5f9344d353a32bb507a5b4ffb91031cffacc86625b48b1fe257cbbede344a", -"T3B1_fr_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "692fe0874d23affb18c79b4b343fa2072b20dcf354ff4ecdd503cd0fa777850e", -"T3B1_fr_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "3311142003357cb57ace14c29e47370b20866ebd8787a829c91579a46eb75838", -"T3B1_fr_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "57a5f9344d353a32bb507a5b4ffb91031cffacc86625b48b1fe257cbbede344a", -"T3B1_fr_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "692fe0874d23affb18c79b4b343fa2072b20dcf354ff4ecdd503cd0fa777850e", "T3B1_fr_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "3f56b1c5dd8ea96a5d61a1fe8a934267ae7a92b34497551cb199a817182c42ab", "T3B1_fr_bitcoin-test_authorize_coinjoin.py::test_get_address": "f2e670f9cff02caca4f6f57d2fc6e3b516938daf3361a25feb2d994cd8a2d635", "T3B1_fr_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "c8762e61e2ca2d41c11fd67516e8bee590c3209b33b45c85d520b1657b3a7dfd", @@ -17176,17 +17055,6 @@ "T3B1_fr_zcash-test_sign_tx.py::test_spend_v5_input": "91db0c11cf22a9c5d33180e32ab4d481d1b9342f70e1e96a3bc61101409041b0", "T3B1_fr_zcash-test_sign_tx.py::test_unified_address": "d617e216a1ae201205fee5a7d338d0536c6133a8fd4584ea96c44d063c9f2440", "T3B1_fr_zcash-test_sign_tx.py::test_version_group_id_missing": "35c9c9529c59ca5c386ac05856f7452f26cde732203b5b61ec9321230b52df89", -"T3B1_pt_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "33ac7c1070c0c188b296142b3d053bf90bc45d1d1ef58c00241d97dac33ac53c", -"T3B1_pt_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "c4d7317ef6b7f44d31cd28bb8a9a6b7a7584a6b207c2f06bc4cae8bd407a9abd", -"T3B1_pt_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "d5cbe6197d28486b9564665826f2291b91ce65715efbede474645471b6e1c4a1", -"T3B1_pt_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "ebd092042396fa3f9cebfb0f0d19caabf59e0b9702f58bff1ba95182b55823ba", -"T3B1_pt_binance-test_get_public_key.py::test_binance_get_public_key": "3c61e613b2d4926de1f502cc1f1bbb61e74a4d1a29b929a724362abcfd3ca2a7", -"T3B1_pt_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "eecd9318c9e0d998da66b61d05e9a427109721687260f57e5f2ab16bb389154c", -"T3B1_pt_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "f0d5a9d208dcfd4628702282deecc10220ccf281f8ef13216a56f0a6bcf32cdd", -"T3B1_pt_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "75a5f221d653f531b342922d20db01842b556254b775b643a340c91b25604493", -"T3B1_pt_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "eecd9318c9e0d998da66b61d05e9a427109721687260f57e5f2ab16bb389154c", -"T3B1_pt_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "f0d5a9d208dcfd4628702282deecc10220ccf281f8ef13216a56f0a6bcf32cdd", -"T3B1_pt_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "75a5f221d653f531b342922d20db01842b556254b775b643a340c91b25604493", "T3B1_pt_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "ff680856760d3d66a2cebf988029e818923969efd09e1453d9959091cc3cbb7e", "T3B1_pt_bitcoin-test_authorize_coinjoin.py::test_get_address": "368189f24072c5b102eab1f5356419c7ac51d08ab6af509d313799e388a60858", "T3B1_pt_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "e7b817326f66c555df5d702d7e0906b4cd15acecbd6b70bb746fb0e886f86538", @@ -18924,17 +18792,6 @@ "T3T1_pt_test_tutorial_delizia.py::test_tutorial_menu_repeat": "20757d5397de15c63bb784724ca81d8e417856dd300f45a8f05b47522c1c631d" }, "device_tests": { -"T3T1_cs_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "3dd9d298d0ec01612f9bf1b70d519e6d26515d76740ae6f54c4c0d743b384edc", -"T3T1_cs_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "b1f5854434fc7d87638f8894b61f192f07dd342180927e95bd87ffb54163850b", -"T3T1_cs_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "522e943d43e28e375c3969dedd18fcf57d671e3df9460a0920aded78d35af3f9", -"T3T1_cs_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "8b9aa39a246fdf29e8ac0340fa6e136b229d2ede21d8b1dab282ca70dad02213", -"T3T1_cs_binance-test_get_public_key.py::test_binance_get_public_key": "4f0ccc93b6ab59c78112f104731553d517a1e30ca2c22895302ca3d09e730ebe", -"T3T1_cs_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "3a2a4d5430892491991169726120408a52d06856419d5cb673034501594ba49e", -"T3T1_cs_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "eaf35fd5309f611c83372ebd20edd69d44247e580dbf63a08b6a861fe4f35482", -"T3T1_cs_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "48c558a30e7b64dc8537dbc1cb277f8c3a812a10b8252e382e76e99449f2a6fe", -"T3T1_cs_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "3a2a4d5430892491991169726120408a52d06856419d5cb673034501594ba49e", -"T3T1_cs_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "eaf35fd5309f611c83372ebd20edd69d44247e580dbf63a08b6a861fe4f35482", -"T3T1_cs_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "48c558a30e7b64dc8537dbc1cb277f8c3a812a10b8252e382e76e99449f2a6fe", "T3T1_cs_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "b4e6a882100272524aacc766f95fa72002f1ed178464019f5e12119bfc90865c", "T3T1_cs_bitcoin-test_authorize_coinjoin.py::test_get_address": "7ad758170cc463fb7e555b26c7cbcb507c4ae0ce36a841cb862dd98c187562d1", "T3T1_cs_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "7ae5473afe4bc9faa74c4cba1535eb8161f760fbd081b391206063656e55baf0", @@ -20340,17 +20197,6 @@ "T3T1_cs_zcash-test_sign_tx.py::test_spend_v5_input": "5cdb3e173835861c1dd90c9e4edaf840d73b7cdc45038c2c9212df1cc0edb2c5", "T3T1_cs_zcash-test_sign_tx.py::test_unified_address": "34d8f51f94bc5d8aeb3b03a163a3f1694261b4071a8170e8c410d340fc7f77a8", "T3T1_cs_zcash-test_sign_tx.py::test_version_group_id_missing": "592adf9c06f8f39132298b46037dd524fac99e58237a0c023197bf47df67d632", -"T3T1_de_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "7ba52252255aeedbee26862928b936b429ea439b7739e53ea991ed228977f458", -"T3T1_de_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "63e1ffe97fdaa4b0db2ecd1798e32ab44847df218725e145e7623671c98d32fe", -"T3T1_de_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "0634b30ca159550e7b2b4a3e9912e6279ae9fe419478f375f67a66dfac731ffb", -"T3T1_de_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "3ccbc76952d4ed7d1f55e6081f53b2c626b50c27e18c2a3ea6050decec03b104", -"T3T1_de_binance-test_get_public_key.py::test_binance_get_public_key": "f560c2ad899c4e29a41948ec45d8902f344fe4d89fc0574d0a2deab255104cbb", -"T3T1_de_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "223a65c24beeec967387a6bc18ba7bfde3086f030f4fda77a73fc2b57cb71d76", -"T3T1_de_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "e552529402f1ad47a9550c1ab6e58a328803fb600bd13993dc61c2949fc767e5", -"T3T1_de_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "fb7b64c20f60f298d7d0848067b4f54d98b5b7f72aafc9209445190d4ad02457", -"T3T1_de_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "223a65c24beeec967387a6bc18ba7bfde3086f030f4fda77a73fc2b57cb71d76", -"T3T1_de_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "e552529402f1ad47a9550c1ab6e58a328803fb600bd13993dc61c2949fc767e5", -"T3T1_de_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "fb7b64c20f60f298d7d0848067b4f54d98b5b7f72aafc9209445190d4ad02457", "T3T1_de_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "854ed40433cff3af3e1e5c73eb27cf99187ada21648c7065b79c6b894a509388", "T3T1_de_bitcoin-test_authorize_coinjoin.py::test_get_address": "9a499f2e95e9a674256da9961ef17e0dfd8bcb2061ce2ea599d506de7c0cd6f3", "T3T1_de_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "6f41ec20b0b3965f601eb63337f0f30ea5039e1e6236f22b7b35ab2f0971ee53", @@ -21756,17 +21602,6 @@ "T3T1_de_zcash-test_sign_tx.py::test_spend_v5_input": "55d9f028b5fb1483d0bd9a793e8c9a697c5c90488c05431664850a182040fe6c", "T3T1_de_zcash-test_sign_tx.py::test_unified_address": "8b7eb5716ed9d5356480d57465735b7f55c6418ee26d51610ca92d4afcf0ee41", "T3T1_de_zcash-test_sign_tx.py::test_version_group_id_missing": "f2fcbbd7ad83aff9adc0ee97fe98e7272d8bcfcc4a023798e2ab1c9895fda70f", -"T3T1_en_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "d77cd7ee02bd180fa52ca6661c0742cfc32a38f8289d0ce1191ebba27ebabd5d", -"T3T1_en_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "2cc71a71acf2dff7b502bd5a6a6cb2b3924b67a872e87caf259837a0827536ae", -"T3T1_en_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "fbcb2083fa9ac7000df24257a139987b55a22f4508ae9b93181e182593d7318f", -"T3T1_en_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "1e19a3326bbf2c30b0c36373c469fc2d347eb17665be90c8810e5953902dd3ad", -"T3T1_en_binance-test_get_public_key.py::test_binance_get_public_key": "839c11406b0a31a110868b20a5b8dc692e8e279aac698f4349899c15bc27aa0f", -"T3T1_en_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "bff80d49ca23a862b74da57c7a655bce4079fc344d6a380b69a908a44811a1a8", -"T3T1_en_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "92a824a82c81c1023112b48cd1d6402f0d74225ee9e312ce9476e8d1eca4e31c", -"T3T1_en_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "dbf6f6aad4726574cfa84bd96e6fbda77ca736b8da4a7c149f000c0dc74e9ade", -"T3T1_en_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "bff80d49ca23a862b74da57c7a655bce4079fc344d6a380b69a908a44811a1a8", -"T3T1_en_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "92a824a82c81c1023112b48cd1d6402f0d74225ee9e312ce9476e8d1eca4e31c", -"T3T1_en_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "dbf6f6aad4726574cfa84bd96e6fbda77ca736b8da4a7c149f000c0dc74e9ade", "T3T1_en_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "05842fca72a3197baf6f5e358501774f8782f7fb61322bb0e51e841ea6167d12", "T3T1_en_bitcoin-test_authorize_coinjoin.py::test_get_address": "be0d8595a57f61b5820a22653e9b224d4ed1dc58c5a2faf48c880200450f6200", "T3T1_en_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "f4bf980ff5dbc7d439fa23bb6bcd1a5daee03d1c762aee3f5a728fa508f3e89e", @@ -23172,17 +23007,6 @@ "T3T1_en_zcash-test_sign_tx.py::test_spend_v5_input": "f7e39c96889d34c5a0ddc9d4de7e72b368271090413abc4442b0f406dd767047", "T3T1_en_zcash-test_sign_tx.py::test_unified_address": "788ef49d9315a266225da4485a163dd0a67a60d7a7ed664e7a1eb73e2b3ef86b", "T3T1_en_zcash-test_sign_tx.py::test_version_group_id_missing": "cb8641952bec9e793e7d19f281a85a0ca1be2c3397ca5c0cf4ee7ad905429984", -"T3T1_es_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "4f519116bb1226615e44c6fd5a1b7bdd5b77df76d5e43cf75590665b3881ba58", -"T3T1_es_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "30cad82d9dd274ab1311e231d59975264413e6ccafcb11d759b17806891b9e7b", -"T3T1_es_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "9dcedb2df4700d45406099a29bfe6f56e2014832faffdf7d56f0cc994ad33469", -"T3T1_es_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "1e434c61c84765ae4d184d05d505500e90e7f60a12d92fb48ab1011ec1eed2a4", -"T3T1_es_binance-test_get_public_key.py::test_binance_get_public_key": "0393fce1d9c0f2e70fa150c6151d84398609287113b0ca692a4c70fe94386273", -"T3T1_es_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "f137338b0764ae0cbbef2d32453f2a22b9abad6c66d730fe18184ebefeb346cf", -"T3T1_es_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "ddb9c50fd9999771702b114b16a3359e22bb2a8a99b954feb78b5df5c7aabe8b", -"T3T1_es_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "21d12ebbd05819d4e3715d43d347a6defa3168b4254c8d356fa46c6467af209b", -"T3T1_es_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "f137338b0764ae0cbbef2d32453f2a22b9abad6c66d730fe18184ebefeb346cf", -"T3T1_es_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "ddb9c50fd9999771702b114b16a3359e22bb2a8a99b954feb78b5df5c7aabe8b", -"T3T1_es_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "21d12ebbd05819d4e3715d43d347a6defa3168b4254c8d356fa46c6467af209b", "T3T1_es_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "44a943efa7339b11325e29d5638277a2e78b52ac65c1d90904d4838a91ed3616", "T3T1_es_bitcoin-test_authorize_coinjoin.py::test_get_address": "4308d760d4852d61cbe4eb758b69509efa746e5a0869af3011f7993f988bc7e9", "T3T1_es_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "77afb487d1f4362b3f74a4d742cb316acac98d776b40f760edca07b03e605584", @@ -24588,17 +24412,6 @@ "T3T1_es_zcash-test_sign_tx.py::test_spend_v5_input": "14f82bda7b84833d538ab7c49933c1ea23216c4dd7cc924e88161a48030e1e1d", "T3T1_es_zcash-test_sign_tx.py::test_unified_address": "38a1925875ea603c2c0bbea0bbc89c51f1cc1317351b0c6ae8a11e54e42c869c", "T3T1_es_zcash-test_sign_tx.py::test_version_group_id_missing": "c568b82943d9f63ad6b29b7dee6f5ed9dca78fc9610d4fa7f12bb8a061a6882a", -"T3T1_fr_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "ffd2aa189a10e79e9f63b387a0595833f6c4b33bff22ef8a9513948eeacb18ad", -"T3T1_fr_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "77f6dda963db316774334c2113eea319fa1b6f4585f890ea5c2e222eaa4d4dce", -"T3T1_fr_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "bf25d7b2d1946f8bdf271fb97ff0cb0e16a94d3fff86b49c59ee74ba59345c09", -"T3T1_fr_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "ecc2df7e825925f1fdbd4f09e1794048633253cccbd6a906eccd9924ae2c1c8f", -"T3T1_fr_binance-test_get_public_key.py::test_binance_get_public_key": "59026490aa0b677dd14d74c5d817d5bf6774cd2a03ff78b54febfd573f76b8b3", -"T3T1_fr_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "c71efd641e0a0abcc022ea710e9c342d7d858826d0e69e96a1ce8cae77af81c1", -"T3T1_fr_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "9852f36c888fc197d5761b0e11445e2e12eab7e9e29e8e51fd7d6b86ddc8d847", -"T3T1_fr_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "b10cef55bbb840c080983dd4ebdafac30bd6537fbcfaabf623e3a01da346241d", -"T3T1_fr_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "c71efd641e0a0abcc022ea710e9c342d7d858826d0e69e96a1ce8cae77af81c1", -"T3T1_fr_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "9852f36c888fc197d5761b0e11445e2e12eab7e9e29e8e51fd7d6b86ddc8d847", -"T3T1_fr_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "b10cef55bbb840c080983dd4ebdafac30bd6537fbcfaabf623e3a01da346241d", "T3T1_fr_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "b9daf3510db0688890f7ca428898d95633335e4e7d7cf54bd4bf4472855464ed", "T3T1_fr_bitcoin-test_authorize_coinjoin.py::test_get_address": "fe546e64a3ec96ae22f6f7ad28c0113f55ec08f5214e18e0b6829b3895c514d3", "T3T1_fr_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "113cf06aebbe983ff3e83b94c2598b554322a78b96ca09e6aca5e3abbb7b025c", @@ -26004,17 +25817,6 @@ "T3T1_fr_zcash-test_sign_tx.py::test_spend_v5_input": "721b21bf724bcdd91d31689e51048c299a47740d65ee646c27c5c7a970dcdb9d", "T3T1_fr_zcash-test_sign_tx.py::test_unified_address": "1a2c9c72e0ee3b0679eacdb63b9594f75d6b7e68d19a1b3fd900cc2f13e3c92f", "T3T1_fr_zcash-test_sign_tx.py::test_version_group_id_missing": "c4dffa9195d175f9bc4a23e9e0f80b92f7c6687128918a5a70c14b4a6e7e3694", -"T3T1_pt_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "bdd6f92eda5b91d765b5dff01866e71be8ee6cf15b9f162c2ff31ed9f1ef16b4", -"T3T1_pt_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-1-bnb1egswqkszzfc2uq7-1adfb691": "44edf8af673c1f6e76089c3ee45c4935cf141f92f9a8a91c51db944b37a103e9", -"T3T1_pt_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-0-bn-59d4996f": "987ff7ea245ba3f268e8c99153ed8dfe535794f7d148a140d811a797f2d7029f", -"T3T1_pt_binance-test_get_address.py::test_binance_get_address_chunkify_details[m-44h-714h-0h-0-1-bn-c9025900": "4b7ef51d3911536c4eb2105381793cf9b321726b15aae026223b6ab25769c715", -"T3T1_pt_binance-test_get_public_key.py::test_binance_get_public_key": "7730cf2874a88a25b5cc3f1a012095d873a6c7f3dc0713678736a80e9d9ee18c", -"T3T1_pt_binance-test_sign_tx.py::test_binance_sign_message[False-message0-expected_response0]": "ec0a47aa393706396a76b06d2b4b74e15a6142689d2f89ee2aa57e37ab1d16ff", -"T3T1_pt_binance-test_sign_tx.py::test_binance_sign_message[False-message1-expected_response1]": "3c0535b61f546d26deff5b3049ac7dec2a2d27dd2c2e1d1a7bc449333b3f704a", -"T3T1_pt_binance-test_sign_tx.py::test_binance_sign_message[False-message2-expected_response2]": "e54cd263fd4b48c28458cdc0735cbfa24089021336978b6eededdcf00fb3552a", -"T3T1_pt_binance-test_sign_tx.py::test_binance_sign_message[True-message0-expected_response0]": "ec0a47aa393706396a76b06d2b4b74e15a6142689d2f89ee2aa57e37ab1d16ff", -"T3T1_pt_binance-test_sign_tx.py::test_binance_sign_message[True-message1-expected_response1]": "3c0535b61f546d26deff5b3049ac7dec2a2d27dd2c2e1d1a7bc449333b3f704a", -"T3T1_pt_binance-test_sign_tx.py::test_binance_sign_message[True-message2-expected_response2]": "e54cd263fd4b48c28458cdc0735cbfa24089021336978b6eededdcf00fb3552a", "T3T1_pt_bitcoin-test_authorize_coinjoin.py::test_cancel_authorization": "212fb961dfde51cdcb737796d92dc7bc19afa0a1fd96ea8cad38bd19a6138613", "T3T1_pt_bitcoin-test_authorize_coinjoin.py::test_get_address": "1df5579ef8ad6713d2c83474a8ae9ae85f0f22ce49a080bb998640d82226a553", "T3T1_pt_bitcoin-test_authorize_coinjoin.py::test_get_public_key": "0151513244dbc6f044d2039335e25bb95ceb647d78acc14e65d40471bdf98d4a",