1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-26 16:18:22 +00:00

rework storage, session, features

This commit is contained in:
Pavol Rusnak 2013-11-26 16:10:55 +01:00
parent bb7cdd2166
commit bbfefb677c
5 changed files with 24 additions and 16 deletions

1
protob/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.pb

7
protob/Makefile Normal file
View File

@ -0,0 +1,7 @@
all: messages.pb storage.pb types.pb
%.pb: %.proto
protoc -I/usr/include -I. $< -o $@
clean:
rm -f *.pb

View File

@ -72,17 +72,19 @@ message Features {
optional uint32 minor_version = 3; // Minor version of the device, e.g. 0
optional uint32 bugfix_version = 4;
optional bool bootloader_mode = 5;
optional SettingsType settings = 6; // User-level settings of the device
optional bytes device_id = 7 [(binary) = true]; // Device's unique identifier
optional bool pin_protection = 8; // True if Trezor is covered by PIN
optional bool passphrase_protection = 9; // True if Trezor seed is covered by passphrase
optional bytes device_id = 6 [(binary) = true]; // Device's unique identifier
optional bool pin_protection = 7; // True if Trezor is covered by PIN
optional bool passphrase_protection = 8; // True if Trezor seed is covered by passphrase
optional bytes language = 9;
optional bytes label = 10 [(binary) = true];
repeated CoinType coins = 11;
}
// Overwrites only filled fields of the structure
message ApplySettings {
optional bytes language = 1;
optional bytes coin_shortcut = 2;
optional bytes label = 3;
optional bytes label = 3 [(binary) = true];
}
// Starts workflow for setting/changing the PIN

View File

@ -10,13 +10,17 @@ import "types.proto";
message Storage {
required uint32 version = 1;
optional HDNodeType seed = 2;
optional bool seed_encrypted = 3;
optional uint32 pin_failed_attempts = 4;
optional bytes pin = 5;
optional SettingsType settings = 6;
optional bytes node_serialized = 2 [(binary) = true];
optional bytes mnemonic = 3 [(binary) = true];
optional bool encrypted = 4; // whether node_serialized or mnemonic are encrypted (protected by passphrase)
optional uint32 pin_failed_attempts = 5;
optional bytes pin = 6;
optional bytes language = 7;
optional bytes label = 8 [(binary) = true];
}
message Session {
optional bytes passphrase = 1 [(binary) = true];
optional CoinType coin = 2;
optional HDNodeType node = 3;
}

View File

@ -63,12 +63,6 @@ message CoinType {
optional uint64 maxfee_kb = 4;
}
message SettingsType {
optional bytes language = 1; // Trezor uses 'english' as default
optional CoinType coin = 2;
optional bytes label = 3; // Human readable wallet name
}
message TxInputType {
// required uint32 index = 1; // Position of input in proposed transaction
// required uint64 amount = 3; // Amount to spend in satoshis. The rest will be used for transaction fees