Skip to content

Commit 0c3cd91

Browse files
committed
messages: remove BitBoxBase
BitBox02 libraries will not need BitBoxBase support.
1 parent 5003a78 commit 0c3cd91

File tree

9 files changed

+14
-242
lines changed

9 files changed

+14
-242
lines changed

messages/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ set(PROTO_FILES
44
common.proto
55
backup_commands.proto
66
bitbox02_system.proto
7-
bitboxbase.proto
87
btc.proto
98
eth.proto
109
mnemonic.proto

messages/bitboxbase.options

Lines changed: 0 additions & 19 deletions
This file was deleted.

messages/bitboxbase.proto

Lines changed: 0 additions & 88 deletions
This file was deleted.

messages/hww.proto

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import "common.proto";
1919

2020
import "backup_commands.proto";
2121
import "bitbox02_system.proto";
22-
import "bitboxbase.proto";
2322
import "btc.proto";
2423
import "eth.proto";
2524
import "keystore.proto";
@@ -37,7 +36,7 @@ message Success {
3736
}
3837

3938
message Request {
40-
reserved 1;
39+
reserved 1, 23;
4140
oneof request {
4241
// removed: RandomNumberRequest random_number = 1;
4342
SetDeviceNameRequest device_name = 2;
@@ -61,7 +60,7 @@ message Request {
6160
ETHRequest eth = 20;
6261
ResetRequest reset = 21;
6362
RestoreFromMnemonicRequest restore_from_mnemonic = 22;
64-
BitBoxBaseRequest bitboxbase = 23;
63+
// removed: BitBoxBaseRequest bitboxbase = 23;
6564
RootFingerprintRequest fingerprint = 24;
6665
BTCRequest btc = 25;
6766
ElectrumEncryptionKeyRequest electrum_encryption_key = 26;

py/bitbox02/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
OUT_DIR=bitbox02/communication/generated
1717

18-
PROTO_FILES=hww.proto common.proto backup_commands.proto bitbox02_system.proto bitboxbase.proto btc.proto eth.proto mnemonic.proto system.proto perform_attestation.proto keystore.proto antiklepto.proto
18+
PROTO_FILES=hww.proto common.proto backup_commands.proto bitbox02_system.proto btc.proto eth.proto mnemonic.proto system.proto perform_attestation.proto keystore.proto antiklepto.proto
1919

2020
TARGETS=$(addprefix ${OUT_DIR}/, $(PROTO_FILES:.proto=_pb2.py))
2121

src/commander/commander_states.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ static commander_states_endpoint_id _commands_anytime[] = {
3232
Request_check_sdcard_tag,
3333
Request_insert_remove_sdcard_tag,
3434
Request_list_backups_tag,
35-
Request_bitboxbase_tag,
3635
};
3736

3837
// api commands the host can invoke when the device is uninitialized.

src/rust/bitbox02-rust/src/hww/api.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ fn request_tag(request: &Request) -> u32 {
8989
Eth(_) => bitbox02::Request_eth_tag,
9090
Reset(_) => bitbox02::Request_reset_tag,
9191
RestoreFromMnemonic(_) => bitbox02::Request_restore_from_mnemonic_tag,
92-
Bitboxbase(_) => bitbox02::Request_bitboxbase_tag,
9392
Fingerprint(_) => bitbox02::Request_fingerprint_tag,
9493
Btc(_) => bitbox02::Request_btc_tag,
9594
ElectrumEncryptionKey(_) => bitbox02::Request_electrum_encryption_key_tag,

src/rust/bitbox02-rust/src/shiftcrypto.bitbox02.rs

Lines changed: 2 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -130,122 +130,6 @@ pub struct SetPasswordRequest {
130130
#[prost(bytes="vec", tag="1")]
131131
pub entropy: ::prost::alloc::vec::Vec<u8>,
132132
}
133-
/// Should be sent every X seconds (TBD) unless the firmware already is busy with a command.
134-
#[derive(Clone, PartialEq, ::prost::Message)]
135-
pub struct BitBoxBaseHeartbeatRequest {
136-
#[prost(enumeration="bit_box_base_heartbeat_request::StateCode", tag="1")]
137-
pub state_code: i32,
138-
#[prost(enumeration="bit_box_base_heartbeat_request::DescriptionCode", tag="2")]
139-
pub description_code: i32,
140-
}
141-
/// Nested message and enum types in `BitBoxBaseHeartbeatRequest`.
142-
pub mod bit_box_base_heartbeat_request {
143-
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
144-
#[repr(i32)]
145-
pub enum StateCode {
146-
Idle = 0,
147-
Working = 1,
148-
Warning = 2,
149-
Error = 3,
150-
}
151-
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
152-
#[repr(i32)]
153-
pub enum DescriptionCode {
154-
Empty = 0,
155-
InitialBlockSync = 1,
156-
DownloadUpdate = 2,
157-
OutOfDiskSpace = 3,
158-
RedisError = 4,
159-
Reboot = 5,
160-
Shutdown = 6,
161-
UpdateFailed = 7,
162-
NoNetworkConnection = 8,
163-
}
164-
}
165-
/// This will display the first 20 characters of the base32 encoded version of
166-
/// the provided msg
167-
#[derive(Clone, PartialEq, ::prost::Message)]
168-
pub struct BitBoxBaseConfirmPairingRequest {
169-
#[prost(bytes="vec", tag="1")]
170-
pub msg: ::prost::alloc::vec::Vec<u8>,
171-
}
172-
/// Optional fields can be represented by a "oneof" with only one field in it.
173-
/// All fields are technically optional. But in reality the default value for the type will be set.
174-
/// It is therefore impossible to distinguish between the default value and if the value wasn't set.
175-
/// So any fields that have a default value which also is a valid value can use this method to send
176-
/// an empty value.
177-
#[derive(Clone, PartialEq, ::prost::Message)]
178-
pub struct BitBoxBaseSetConfigRequest {
179-
#[prost(enumeration="bit_box_base_set_config_request::StatusLedMode", tag="1")]
180-
pub status_led_mode: i32,
181-
#[prost(enumeration="bit_box_base_set_config_request::StatusScreenMode", tag="2")]
182-
pub status_screen_mode: i32,
183-
/// Empty string means unsetting the hostname
184-
#[prost(string, tag="4")]
185-
pub hostname: ::prost::alloc::string::String,
186-
/// 0.0.0.0 which is the default value of ip is also a valid IP, use the oneof-trick to determine
187-
/// if IP wasn't set in the message.
188-
#[prost(oneof="bit_box_base_set_config_request::IpOption", tags="3")]
189-
pub ip_option: ::core::option::Option<bit_box_base_set_config_request::IpOption>,
190-
}
191-
/// Nested message and enum types in `BitBoxBaseSetConfigRequest`.
192-
pub mod bit_box_base_set_config_request {
193-
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
194-
#[repr(i32)]
195-
pub enum StatusLedMode {
196-
/// display on led when status is IDLE, WORKING, WARNING and ERROR
197-
LedAlways = 0,
198-
/// display on led when status is WORKING, WARNING and ERROR
199-
LedOnWorking = 1,
200-
/// display on led when status is WARNING and ERROR
201-
LedOnWarning = 2,
202-
/// display on led when status is ERROR
203-
LedOnError = 3,
204-
}
205-
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
206-
#[repr(i32)]
207-
pub enum StatusScreenMode {
208-
/// display on screen when status is IDLE, WORKING, WARNING and ERROR
209-
ScreenAlways = 0,
210-
/// display on screen when status is WORKING, WARNING and ERROR
211-
ScreenOnWorking = 1,
212-
/// display on screen when status is WARNING and ERROR
213-
ScreenOnWarning = 2,
214-
/// display on screen when status is ERROR
215-
ScreenOnError = 3,
216-
}
217-
/// 0.0.0.0 which is the default value of ip is also a valid IP, use the oneof-trick to determine
218-
/// if IP wasn't set in the message.
219-
#[derive(Clone, PartialEq, ::prost::Oneof)]
220-
pub enum IpOption {
221-
#[prost(bytes, tag="3")]
222-
Ip(::prost::alloc::vec::Vec<u8>),
223-
}
224-
}
225-
#[derive(Clone, PartialEq, ::prost::Message)]
226-
pub struct BitBoxBaseDisplayStatusRequest {
227-
#[prost(uint32, tag="1")]
228-
pub duration: u32,
229-
}
230-
#[derive(Clone, PartialEq, ::prost::Message)]
231-
pub struct BitBoxBaseRequest {
232-
#[prost(oneof="bit_box_base_request::Request", tags="1, 2, 3, 4")]
233-
pub request: ::core::option::Option<bit_box_base_request::Request>,
234-
}
235-
/// Nested message and enum types in `BitBoxBaseRequest`.
236-
pub mod bit_box_base_request {
237-
#[derive(Clone, PartialEq, ::prost::Oneof)]
238-
pub enum Request {
239-
#[prost(message, tag="1")]
240-
Heartbeat(super::BitBoxBaseHeartbeatRequest),
241-
#[prost(message, tag="2")]
242-
SetConfig(super::BitBoxBaseSetConfigRequest),
243-
#[prost(message, tag="3")]
244-
ConfirmPairing(super::BitBoxBaseConfirmPairingRequest),
245-
#[prost(message, tag="4")]
246-
DisplayStatus(super::BitBoxBaseDisplayStatusRequest),
247-
}
248-
}
249133
#[derive(Clone, PartialEq, ::prost::Message)]
250134
pub struct AntiKleptoHostNonceCommitment {
251135
#[prost(bytes="vec", tag="1")]
@@ -781,7 +665,7 @@ pub struct Success {
781665
}
782666
#[derive(Clone, PartialEq, ::prost::Message)]
783667
pub struct Request {
784-
#[prost(oneof="request::Request", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26")]
668+
#[prost(oneof="request::Request", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26")]
785669
pub request: ::core::option::Option<request::Request>,
786670
}
787671
/// Nested message and enum types in `Request`.
@@ -831,8 +715,7 @@ pub mod request {
831715
Reset(super::ResetRequest),
832716
#[prost(message, tag="22")]
833717
RestoreFromMnemonic(super::RestoreFromMnemonicRequest),
834-
#[prost(message, tag="23")]
835-
Bitboxbase(super::BitBoxBaseRequest),
718+
/// removed: BitBoxBaseRequest bitboxbase = 23;
836719
#[prost(message, tag="24")]
837720
Fingerprint(super::RootFingerprintRequest),
838721
#[prost(message, tag="25")]

src/rust/bitbox02/src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ pub mod ui;
4848
use core::time::Duration;
4949

5050
pub use bitbox02_sys::{
51-
Request_bitboxbase_tag, Request_btc_pub_tag, Request_btc_sign_init_tag,
52-
Request_btc_sign_input_tag, Request_btc_sign_output_tag, Request_btc_tag,
53-
Request_check_backup_tag, Request_check_sdcard_tag, Request_create_backup_tag,
54-
Request_device_info_tag, Request_device_language_tag, Request_device_name_tag,
55-
Request_electrum_encryption_key_tag, Request_eth_tag, Request_fingerprint_tag,
56-
Request_insert_remove_sdcard_tag, Request_list_backups_tag, Request_perform_attestation_tag,
57-
Request_reboot_tag, Request_reset_tag, Request_restore_backup_tag,
58-
Request_restore_from_mnemonic_tag, Request_set_mnemonic_passphrase_enabled_tag,
59-
Request_set_password_tag, Request_show_mnemonic_tag,
51+
Request_btc_pub_tag, Request_btc_sign_init_tag, Request_btc_sign_input_tag,
52+
Request_btc_sign_output_tag, Request_btc_tag, Request_check_backup_tag,
53+
Request_check_sdcard_tag, Request_create_backup_tag, Request_device_info_tag,
54+
Request_device_language_tag, Request_device_name_tag, Request_electrum_encryption_key_tag,
55+
Request_eth_tag, Request_fingerprint_tag, Request_insert_remove_sdcard_tag,
56+
Request_list_backups_tag, Request_perform_attestation_tag, Request_reboot_tag,
57+
Request_reset_tag, Request_restore_backup_tag, Request_restore_from_mnemonic_tag,
58+
Request_set_mnemonic_passphrase_enabled_tag, Request_set_password_tag,
59+
Request_show_mnemonic_tag,
6060
};
6161

6262
// Use this for functions exported to "C"

0 commit comments

Comments
 (0)