Skip to content

Commit c8bf646

Browse files
committed
Merge branch 'xpubs'
2 parents bc83a6f + a1b992d commit c8bf646

18 files changed

+440
-10
lines changed

CHANGELOG-npm.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 0.11.0
4+
- Add `btcXpubs()`
5+
36
## 0.10.1
47
- package.json: use "main" instead of "module" to fix compatiblity with vitest
58

CHANGELOG-rust.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 0.10.0
4+
- Add `btc_xpubs()`
5+
36
## 0.9.0
47
- Add support for BitBox02 Nova
58

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "bitbox-api"
33
authors = ["Marko Bencun <[email protected]>"]
4-
version = "0.9.0"
4+
version = "0.10.0"
55
homepage = "https://bitbox.swiss/"
66
repository = "https://github.com/BitBoxSwiss/bitbox-api-rs/"
77
readme = "README-rust.md"

NPM_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.10.1
1+
0.11.0

README-rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Use `--nocapture` to also see some useful simulator output.
2727
If you want to test against a custom simulator build (e.g. when developing new firmware features),
2828
you can run:
2929

30-
SIMULATOR=/path/to/simulator cargo test --features=simulator,tokio
30+
SIMULATOR=/path/to/simulator cargo test --features=simulator,tokio -- --test-threads 1
3131

3232
In this case, only the given simulator will be used, and the ones defined in simulators.json will be
3333
ignored.

messages/bitbox02_system.proto

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,23 @@ message DeviceInfoRequest {
2626
}
2727

2828
message DeviceInfoResponse {
29+
message Bluetooth {
30+
// Hash of the currently active Bluetooth firmware on the device.
31+
bytes firmware_hash = 1;
32+
// Firmware version, formated as an unsigned integer "1", "2", etc.
33+
string firmware_version = 2;
34+
// True if Bluetooth is enabled
35+
bool enabled = 3;
36+
}
2937
string name = 1;
3038
bool initialized = 2;
3139
string version = 3;
3240
bool mnemonic_passphrase_enabled = 4;
3341
uint32 monotonic_increments_remaining = 5;
3442
// From v9.6.0: "ATECC608A" or "ATECC608B".
3543
string securechip_model = 6;
44+
// Only present in Bluetooth-enabled devices.
45+
optional Bluetooth bluetooth = 7;
3646
}
3747

3848
message InsertRemoveSDCardRequest {

messages/bluetooth.proto

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// Copyright 2025 Shift Crypto AG
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
package shiftcrypto.bitbox02;
17+
18+
message BluetoothToggleEnabledRequest {
19+
}
20+
21+
message BluetoothUpgradeInitRequest {
22+
uint32 firmware_length = 1;
23+
}
24+
25+
message BluetoothChunkRequest {
26+
bytes data = 1;
27+
}
28+
29+
message BluetoothSuccess {
30+
}
31+
32+
message BluetoothRequestChunkResponse {
33+
uint32 offset = 1;
34+
uint32 length = 2;
35+
}
36+
37+
message BluetoothRequest {
38+
oneof request {
39+
BluetoothUpgradeInitRequest upgrade_init = 1;
40+
BluetoothChunkRequest chunk = 2;
41+
BluetoothToggleEnabledRequest toggle_enabled = 3;
42+
}
43+
}
44+
45+
message BluetoothResponse {
46+
oneof response {
47+
BluetoothSuccess success = 1;
48+
BluetoothRequestChunkResponse request_chunk = 2;
49+
}
50+
}

messages/btc.proto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,17 @@ message BTCPubRequest {
9393
bool display = 5;
9494
}
9595

96+
message BTCXpubsRequest{
97+
enum XPubType {
98+
UNKNOWN = 0;
99+
XPUB = 1;
100+
TPUB = 2;
101+
}
102+
BTCCoin coin = 1;
103+
XPubType xpub_type = 2;
104+
repeated Keypath keypaths = 3;
105+
}
106+
96107
message BTCScriptConfigWithKeypath {
97108
BTCScriptConfig script_config = 2;
98109
repeated uint32 keypath = 3;
@@ -281,6 +292,7 @@ message BTCRequest {
281292
BTCSignMessageRequest sign_message = 6;
282293
AntiKleptoSignatureRequest antiklepto_signature = 7;
283294
BTCPaymentRequestRequest payment_request = 8;
295+
BTCXpubsRequest xpubs = 9;
284296
}
285297
}
286298

@@ -291,5 +303,6 @@ message BTCResponse {
291303
BTCSignNextResponse sign_next = 3;
292304
BTCSignMessageResponse sign_message = 4;
293305
AntiKleptoSignerCommitment antiklepto_signer_commitment = 5;
306+
PubsResponse pubs = 6;
294307
}
295308
}

messages/common.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ message PubResponse {
1919
string pub = 1;
2020
}
2121

22+
message PubsResponse {
23+
repeated string pubs = 1;
24+
}
25+
2226
message RootFingerprintRequest {
2327
}
2428

0 commit comments

Comments
 (0)