Skip to content

Commit 047d09d

Browse files
committed
Merge branch 'tag-cbor-sets'
2 parents 57f6795 + a6bbbc5 commit 047d09d

File tree

9 files changed

+130
-77
lines changed

9 files changed

+130
-77
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ customers cannot upgrade their bootloader, its changes are recorded separately.
1010
- Update manufacturer HID descriptor to bitbox.swiss
1111
- Ethereum: remove deprecated Goerli network
1212
- SD card: solve backup bug when sd card is re-inserted
13+
- Cardano: allow serialization using 258-tagged sets
1314

1415
### 9.21.0
1516
- Bitcoin: add support for sending to silent payment (BIP-352) addresses

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ endif()
9191
#
9292
# Versions MUST contain three parts and start with lowercase 'v'.
9393
# Example 'v1.0.0'. They MUST not contain a pre-release label such as '-beta'.
94-
set(FIRMWARE_VERSION "v9.21.0")
95-
set(FIRMWARE_BTC_ONLY_VERSION "v9.21.0")
94+
set(FIRMWARE_VERSION "v9.22.0")
95+
set(FIRMWARE_BTC_ONLY_VERSION "v9.22.0")
9696
set(BOOTLOADER_VERSION "v1.0.7")
9797

9898
find_package(PythonInterp 3.6 REQUIRED)

messages/cardano.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ message CardanoSignTransactionRequest {
126126
repeated Withdrawal withdrawals = 7;
127127
uint64 validity_interval_start = 8;
128128
bool allow_zero_ttl = 9; // include ttl even if it is zero
129+
// Tag arrays in the transaction serialization with the 258 tag.
130+
// See https://github.com/IntersectMBO/cardano-ledger/blob/6e2d37cc0f47bd02e89b4ce9f78b59c35c958e96/eras/conway/impl/cddl-files/extra.cddl#L5
131+
bool tag_cbor_sets = 10;
129132
}
130133

131134
message CardanoSignTransactionResponse {

py/bitbox02/bitbox02/bitbox02/bitbox02.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,8 @@ def cardano_address(self, address: cardano.CardanoAddressRequest) -> str:
11741174
def cardano_sign_transaction(
11751175
self, transaction: cardano.CardanoSignTransactionRequest
11761176
) -> cardano.CardanoSignTransactionResponse:
1177+
if transaction.tag_cbor_sets:
1178+
self._require_atleast(semver.VersionInfo(9, 22, 0))
11771179
request = cardano.CardanoRequest(sign_transaction=transaction)
11781180
return self._cardano_msg_query(
11791181
request, expected_response="sign_transaction"

py/bitbox02/bitbox02/communication/generated/cardano_pb2.py

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

py/bitbox02/bitbox02/communication/generated/cardano_pb2.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ class CardanoSignTransactionRequest(google.protobuf.message.Message):
282282
WITHDRAWALS_FIELD_NUMBER: builtins.int
283283
VALIDITY_INTERVAL_START_FIELD_NUMBER: builtins.int
284284
ALLOW_ZERO_TTL_FIELD_NUMBER: builtins.int
285+
TAG_CBOR_SETS_FIELD_NUMBER: builtins.int
285286
network: global___CardanoNetwork.ValueType
286287
@property
287288
def inputs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___CardanoSignTransactionRequest.Input]: ...
@@ -297,6 +298,7 @@ class CardanoSignTransactionRequest(google.protobuf.message.Message):
297298
allow_zero_ttl: builtins.bool
298299
"""include ttl even if it is zero"""
299300

301+
tag_cbor_sets: builtins.bool
300302
def __init__(self,
301303
*,
302304
network: global___CardanoNetwork.ValueType = ...,
@@ -308,8 +310,9 @@ class CardanoSignTransactionRequest(google.protobuf.message.Message):
308310
withdrawals: typing.Optional[typing.Iterable[global___CardanoSignTransactionRequest.Withdrawal]] = ...,
309311
validity_interval_start: builtins.int = ...,
310312
allow_zero_ttl: builtins.bool = ...,
313+
tag_cbor_sets: builtins.bool = ...,
311314
) -> None: ...
312-
def ClearField(self, field_name: typing_extensions.Literal["allow_zero_ttl",b"allow_zero_ttl","certificates",b"certificates","fee",b"fee","inputs",b"inputs","network",b"network","outputs",b"outputs","ttl",b"ttl","validity_interval_start",b"validity_interval_start","withdrawals",b"withdrawals"]) -> None: ...
315+
def ClearField(self, field_name: typing_extensions.Literal["allow_zero_ttl",b"allow_zero_ttl","certificates",b"certificates","fee",b"fee","inputs",b"inputs","network",b"network","outputs",b"outputs","tag_cbor_sets",b"tag_cbor_sets","ttl",b"ttl","validity_interval_start",b"validity_interval_start","withdrawals",b"withdrawals"]) -> None: ...
313316
global___CardanoSignTransactionRequest = CardanoSignTransactionRequest
314317

315318
class CardanoSignTransactionResponse(google.protobuf.message.Message):

0 commit comments

Comments
 (0)