mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
protob: add packages to proto files
This commit is contained in:
parent
4c77015ed9
commit
279bc1f220
@ -6,7 +6,7 @@ check: messages.pb messages-bitcoin.pb messages-bootloader.pb messages-cardano.p
|
||||
combine:
|
||||
echo 'syntax = "proto2";' > combined.proto
|
||||
echo 'import "google/protobuf/descriptor.proto";' >> combined.proto
|
||||
grep -hv -e '^import ' -e '^syntax' -e 'option java_' messages*.proto >> combined.proto
|
||||
grep -hv -e '^import ' -e '^syntax' -e '^package' -e 'option java_' messages*.proto | sed 's/hw\.trezor\.messages\.common\.//' >> combined.proto
|
||||
|
||||
clean:
|
||||
rm -f *.pb
|
||||
|
@ -1,4 +1,5 @@
|
||||
syntax = "proto2";
|
||||
package hw.trezor.messages.bitcoin;
|
||||
|
||||
// Sugar for easier handling in Java
|
||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||
@ -29,8 +30,8 @@ message MultisigRedeemScriptType {
|
||||
* Structure representing HDNode + Path
|
||||
*/
|
||||
message HDNodePathType {
|
||||
required HDNodeType node = 1; // BIP-32 node in deserialized form
|
||||
repeated uint32 address_n = 2; // BIP-32 path to derive the key from node
|
||||
required hw.trezor.messages.common.HDNodeType node = 1; // BIP-32 node in deserialized form
|
||||
repeated uint32 address_n = 2; // BIP-32 path to derive the key from node
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,7 +54,7 @@ message GetPublicKey {
|
||||
* @end
|
||||
*/
|
||||
message PublicKey {
|
||||
required HDNodeType node = 1; // BIP32 public node
|
||||
required hw.trezor.messages.common.HDNodeType node = 1; // BIP32 public node
|
||||
optional string xpub = 2; // serialized form of public node
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
syntax = "proto2";
|
||||
package hw.trezor.messages.bootloader;
|
||||
|
||||
// Sugar for easier handling in Java
|
||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||
|
@ -1,4 +1,5 @@
|
||||
syntax = "proto2";
|
||||
package hw.trezor.messages.cardano;
|
||||
|
||||
// Sugar for easier handling in Java
|
||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||
@ -40,9 +41,9 @@ message CardanoGetPublicKey {
|
||||
* @end
|
||||
*/
|
||||
message CardanoPublicKey {
|
||||
optional string xpub = 1; // Xpub key
|
||||
optional HDNodeType node = 2; // BIP-32 public node
|
||||
optional string root_hd_passphrase = 3; // HD passphrase for root in hex format
|
||||
optional string xpub = 1; // Xpub key
|
||||
optional hw.trezor.messages.common.HDNodeType node = 2; // BIP-32 public node
|
||||
optional string root_hd_passphrase = 3; // HD passphrase for root in hex format
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,4 +1,5 @@
|
||||
syntax = "proto2";
|
||||
package hw.trezor.messages.common;
|
||||
|
||||
/**
|
||||
* Response: Success of the previous request
|
||||
|
@ -1,4 +1,5 @@
|
||||
syntax = "proto2";
|
||||
package hw.trezor.messages.crypto;
|
||||
|
||||
// Sugar for easier handling in Java
|
||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||
|
@ -1,4 +1,5 @@
|
||||
syntax = "proto2";
|
||||
package hw.trezor.messages.debug;
|
||||
|
||||
// Sugar for easier handling in Java
|
||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||
@ -30,17 +31,17 @@ message DebugLinkGetState {
|
||||
* @end
|
||||
*/
|
||||
message DebugLinkState {
|
||||
optional bytes layout = 1; // raw buffer of display
|
||||
optional string pin = 2; // current PIN, blank if PIN is not set/enabled
|
||||
optional string matrix = 3; // current PIN matrix
|
||||
optional string mnemonic = 4; // current BIP-39 mnemonic
|
||||
optional HDNodeType node = 5; // current BIP-32 node
|
||||
optional bool passphrase_protection = 6; // is node/mnemonic encrypted using passphrase?
|
||||
optional string reset_word = 7; // word on device display during ResetDevice workflow
|
||||
optional bytes reset_entropy = 8; // current entropy during ResetDevice workflow
|
||||
optional string recovery_fake_word = 9; // (fake) word on display during RecoveryDevice workflow
|
||||
optional uint32 recovery_word_pos = 10; // index of mnemonic word the device is expecting during RecoveryDevice workflow
|
||||
optional uint32 reset_word_pos = 11; // index of mnemonic word the device is expecting during ResetDevice workflow
|
||||
optional bytes layout = 1; // raw buffer of display
|
||||
optional string pin = 2; // current PIN, blank if PIN is not set/enabled
|
||||
optional string matrix = 3; // current PIN matrix
|
||||
optional string mnemonic = 4; // current BIP-39 mnemonic
|
||||
optional hw.trezor.messages.common.HDNodeType node = 5; // current BIP-32 node
|
||||
optional bool passphrase_protection = 6; // is node/mnemonic encrypted using passphrase?
|
||||
optional string reset_word = 7; // word on device display during ResetDevice workflow
|
||||
optional bytes reset_entropy = 8; // current entropy during ResetDevice workflow
|
||||
optional string recovery_fake_word = 9; // (fake) word on display during RecoveryDevice workflow
|
||||
optional uint32 recovery_word_pos = 10; // index of mnemonic word the device is expecting during RecoveryDevice workflow
|
||||
optional uint32 reset_word_pos = 11; // index of mnemonic word the device is expecting during ResetDevice workflow
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,4 +1,5 @@
|
||||
syntax = "proto2";
|
||||
package hw.trezor.messages.ethereum;
|
||||
|
||||
// Sugar for easier handling in Java
|
||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||
|
@ -1,4 +1,5 @@
|
||||
syntax = "proto2";
|
||||
package hw.trezor.messages.lisk;
|
||||
|
||||
// Sugar for easier handling in Java
|
||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||
|
@ -1,4 +1,5 @@
|
||||
syntax = "proto2";
|
||||
package hw.trezor.messages.management;
|
||||
|
||||
// Sugar for easier handling in Java
|
||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||
@ -162,14 +163,14 @@ message WipeDevice {
|
||||
* @next Failure
|
||||
*/
|
||||
message LoadDevice {
|
||||
optional string mnemonic = 1; // seed encoded as BIP-39 mnemonic (12, 18 or 24 words)
|
||||
optional HDNodeType node = 2; // BIP-32 node
|
||||
optional string pin = 3; // set PIN protection
|
||||
optional bool passphrase_protection = 4; // enable master node encryption using passphrase
|
||||
optional string language = 5 [default='english']; // device language
|
||||
optional string label = 6; // device label
|
||||
optional bool skip_checksum = 7; // do not test mnemonic for valid BIP-39 checksum
|
||||
optional uint32 u2f_counter = 8; // U2F counter
|
||||
optional string mnemonic = 1; // seed encoded as BIP-39 mnemonic (12, 18 or 24 words)
|
||||
optional hw.trezor.messages.common.HDNodeType node = 2; // BIP-32 node
|
||||
optional string pin = 3; // set PIN protection
|
||||
optional bool passphrase_protection = 4; // enable master node encryption using passphrase
|
||||
optional string language = 5 [default='english']; // device language
|
||||
optional string label = 6; // device label
|
||||
optional bool skip_checksum = 7; // do not test mnemonic for valid BIP-39 checksum
|
||||
optional uint32 u2f_counter = 8; // U2F counter
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,4 +1,5 @@
|
||||
syntax = "proto2";
|
||||
package hw.trezor.messages.monero;
|
||||
|
||||
// Sugar for easier handling in Java
|
||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||
|
@ -1,4 +1,5 @@
|
||||
syntax = "proto2";
|
||||
package hw.trezor.messages.nem;
|
||||
|
||||
// Sugar for easier handling in Java
|
||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||
|
@ -1,4 +1,5 @@
|
||||
syntax = "proto2";
|
||||
package hw.trezor.messages.ripple;
|
||||
|
||||
// Sugar for easier handling in Java
|
||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||
|
@ -1,4 +1,5 @@
|
||||
syntax = "proto2";
|
||||
package hw.trezor.messages.stellar;
|
||||
|
||||
// Sugar for easier handling in Java
|
||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||
|
@ -1,4 +1,5 @@
|
||||
syntax = "proto2";
|
||||
package hw.trezor.messages.tezos;
|
||||
|
||||
// Sugar for easier handling in Java
|
||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||
|
@ -1,4 +1,5 @@
|
||||
syntax = "proto2";
|
||||
package hw.trezor.messages;
|
||||
|
||||
/**
|
||||
* Messages for TREZOR communication
|
||||
|
Loading…
Reference in New Issue
Block a user