Skip to content

Commit bc9c8f4

Browse files
committed
Merge remote-tracking branch 'ata/address_case'
2 parents 73ec580 + cf20bf5 commit bc9c8f4

File tree

11 files changed

+187
-55
lines changed

11 files changed

+187
-55
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ customers cannot upgrade their bootloader, its changes are recorded separately.
1414
- Bitcoin: allow multisig accounts at arbitrary keypaths
1515
- Bitcoin: allow spendung UTXOs at very high BIP-44 address indices
1616
- Ethereum: allow signing EIP-712 messages containing multi-line strings
17+
- Ethereum: display the addresses on device in the same case as the user input
1718
- Allow exiting the screen asking to insert the microSD card
1819
- HWW: add initialized status byte to _api_info response
1920

messages/eth.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ enum ETHCoin {
2727
RinkebyETH = 2;
2828
}
2929

30+
enum ETHAddressCase {
31+
ETH_ADDRESS_CASE_MIXED = 0;
32+
ETH_ADDRESS_CASE_UPPER = 1;
33+
ETH_ADDRESS_CASE_LOWER = 2;
34+
}
35+
3036
message ETHPubRequest {
3137
repeated uint32 keypath = 1;
3238
// Deprecated: use chain_id instead.
@@ -56,6 +62,7 @@ message ETHSignRequest {
5662
AntiKleptoHostNonceCommitment host_nonce_commitment = 9;
5763
// If non-zero, `coin` is ignored and `chain_id` is used to identify the network.
5864
uint64 chain_id = 10;
65+
ETHAddressCase address_case = 11;
5966
}
6067

6168
// TX payload for an EIP-1559 (type 2) transaction: https://eips.ethereum.org/EIPS/eip-1559
@@ -70,6 +77,7 @@ message ETHSignEIP1559Request {
7077
bytes value = 8; // smallest big endian serialization, max. 32 bytes
7178
bytes data = 9;
7279
AntiKleptoHostNonceCommitment host_nonce_commitment = 10;
80+
ETHAddressCase address_case = 11;
7381
}
7482

7583
message ETHSignMessageRequest {

py/bitbox02/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
# 7.0.0
66
- get_info: add optional device initialized boolean to returned tuple
7+
- eth_sign: add address_case field, which should be initialized by the client
78

89
# 6.3.0
910
- Allow infering product and version via API call instead of via USB descriptor

py/bitbox02/bitbox02/bitbox02/bitbox02.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,13 @@ def eth_pub(
788788
)
789789
return self._eth_msg_query(request, expected_response="pub").pub.pub
790790

791-
def eth_sign(self, transaction: bytes, keypath: Sequence[int], chain_id: int = 1) -> bytes:
791+
def eth_sign(
792+
self,
793+
transaction: bytes,
794+
keypath: Sequence[int],
795+
address_case: eth.ETHAddressCase.ValueType = eth.ETH_ADDRESS_CASE_MIXED,
796+
chain_id: int = 1,
797+
) -> bytes:
792798
"""
793799
transaction should be given as a full rlp encoded eth transaction.
794800
"""
@@ -853,6 +859,7 @@ def handle_antiklepto(request: eth.ETHRequest) -> bytes:
853859
recipient=recipient,
854860
value=value,
855861
data=data,
862+
address_case=address_case,
856863
)
857864
)
858865
return handle_antiklepto(request)
@@ -871,6 +878,7 @@ def handle_antiklepto(request: eth.ETHRequest) -> bytes:
871878
recipient=recipient,
872879
value=value,
873880
data=data,
881+
address_case=address_case,
874882
)
875883
)
876884

py/bitbox02/bitbox02/communication/generated/eth_pb2.py

Lines changed: 32 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)