From ff90b3954cc31d7af1115096b86cc99a330a503a Mon Sep 17 00:00:00 2001 From: Tomas Krnak Date: Thu, 17 Nov 2022 13:50:38 +0700 Subject: [PATCH] fixup! feat(core): add Zcash shielded transactions --- common/protob/messages.proto | 12 ++++++------ core/src/trezor/enums/MessageType.py | 12 ++++++------ core/src/trezor/enums/__init__.py | 12 ++++++------ python/src/trezorlib/messages.py | 24 ++++++++++++------------ 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/common/protob/messages.proto b/common/protob/messages.proto index e5f91cead..3afab5486 100644 --- a/common/protob/messages.proto +++ b/common/protob/messages.proto @@ -359,10 +359,10 @@ enum MessageType { MessageType_WebAuthnRemoveResidentCredential = 803 [(wire_in) = true]; // Zcash - MessageType_ZcashGetAddress = 900 [(wire_in) = true]; - MessageType_ZcashAddress = 901 [(wire_out) = true]; - MessageType_ZcashGetViewingKey = 902 [(wire_in) = true]; - MessageType_ZcashViewingKey = 903 [(wire_out) = true]; - MessageType_ZcashOrchardInput = 906 [(wire_in) = true]; - MessageType_ZcashOrchardOutput = 907 [(wire_in) = true]; + MessageType_ZcashOrchardInput = 900 [(wire_in) = true]; + MessageType_ZcashOrchardOutput = 901 [(wire_in) = true]; + MessageType_ZcashGetAddress = 902 [(wire_in) = true]; + MessageType_ZcashAddress = 903 [(wire_out) = true]; + MessageType_ZcashGetViewingKey = 904 [(wire_in) = true]; + MessageType_ZcashViewingKey = 905 [(wire_out) = true]; } diff --git a/core/src/trezor/enums/MessageType.py b/core/src/trezor/enums/MessageType.py index eb1fa8ff5..17efaac77 100644 --- a/core/src/trezor/enums/MessageType.py +++ b/core/src/trezor/enums/MessageType.py @@ -231,9 +231,9 @@ if not utils.BITCOIN_ONLY: WebAuthnCredentials = 801 WebAuthnAddResidentCredential = 802 WebAuthnRemoveResidentCredential = 803 - ZcashGetAddress = 900 - ZcashAddress = 901 - ZcashGetViewingKey = 902 - ZcashViewingKey = 903 - ZcashOrchardInput = 906 - ZcashOrchardOutput = 907 + ZcashOrchardInput = 900 + ZcashOrchardOutput = 901 + ZcashGetAddress = 902 + ZcashAddress = 903 + ZcashGetViewingKey = 904 + ZcashViewingKey = 905 diff --git a/core/src/trezor/enums/__init__.py b/core/src/trezor/enums/__init__.py index b93f3d7f9..068894617 100644 --- a/core/src/trezor/enums/__init__.py +++ b/core/src/trezor/enums/__init__.py @@ -249,12 +249,12 @@ if TYPE_CHECKING: WebAuthnCredentials = 801 WebAuthnAddResidentCredential = 802 WebAuthnRemoveResidentCredential = 803 - ZcashGetAddress = 900 - ZcashAddress = 901 - ZcashGetViewingKey = 902 - ZcashViewingKey = 903 - ZcashOrchardInput = 906 - ZcashOrchardOutput = 907 + ZcashOrchardInput = 900 + ZcashOrchardOutput = 901 + ZcashGetAddress = 902 + ZcashAddress = 903 + ZcashGetViewingKey = 904 + ZcashViewingKey = 905 class FailureType(IntEnum): UnexpectedMessage = 1 diff --git a/python/src/trezorlib/messages.py b/python/src/trezorlib/messages.py index 2378be4b8..2da066c6d 100644 --- a/python/src/trezorlib/messages.py +++ b/python/src/trezorlib/messages.py @@ -257,12 +257,12 @@ class MessageType(IntEnum): WebAuthnCredentials = 801 WebAuthnAddResidentCredential = 802 WebAuthnRemoveResidentCredential = 803 - ZcashGetAddress = 900 - ZcashAddress = 901 - ZcashGetViewingKey = 902 - ZcashViewingKey = 903 - ZcashOrchardInput = 906 - ZcashOrchardOutput = 907 + ZcashOrchardInput = 900 + ZcashOrchardOutput = 901 + ZcashGetAddress = 902 + ZcashAddress = 903 + ZcashGetViewingKey = 904 + ZcashViewingKey = 905 class FailureType(IntEnum): @@ -948,7 +948,7 @@ class HDNodeType(protobuf.MessageType): class ZcashGetViewingKey(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 902 + MESSAGE_WIRE_TYPE = 904 FIELDS = { 1: protobuf.Field("coin_name", "string", repeated=False, required=False), 2: protobuf.Field("z_address_n", "uint32", repeated=True, required=False), @@ -968,7 +968,7 @@ class ZcashGetViewingKey(protobuf.MessageType): class ZcashViewingKey(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 903 + MESSAGE_WIRE_TYPE = 905 FIELDS = { 1: protobuf.Field("key", "string", repeated=False, required=True), } @@ -982,7 +982,7 @@ class ZcashViewingKey(protobuf.MessageType): class ZcashGetAddress(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 900 + MESSAGE_WIRE_TYPE = 902 FIELDS = { 1: protobuf.Field("coin_name", "string", repeated=False, required=False), 2: protobuf.Field("t_address_n", "uint32", repeated=True, required=False), @@ -1008,7 +1008,7 @@ class ZcashGetAddress(protobuf.MessageType): class ZcashAddress(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 901 + MESSAGE_WIRE_TYPE = 903 FIELDS = { 1: protobuf.Field("address", "string", repeated=False, required=False), } @@ -1045,7 +1045,7 @@ class ZcashOrchardParams(protobuf.MessageType): class ZcashOrchardInput(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 906 + MESSAGE_WIRE_TYPE = 900 FIELDS = { 1: protobuf.Field("recipient", "bytes", repeated=False, required=True), 2: protobuf.Field("value", "uint64", repeated=False, required=True), @@ -1068,7 +1068,7 @@ class ZcashOrchardInput(protobuf.MessageType): class ZcashOrchardOutput(protobuf.MessageType): - MESSAGE_WIRE_TYPE = 907 + MESSAGE_WIRE_TYPE = 901 FIELDS = { 1: protobuf.Field("address", "string", repeated=False, required=False), 2: protobuf.Field("amount", "uint64", repeated=False, required=True),