mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-25 19:49:02 +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:
|
combine:
|
||||||
echo 'syntax = "proto2";' > combined.proto
|
echo 'syntax = "proto2";' > combined.proto
|
||||||
echo 'import "google/protobuf/descriptor.proto";' >> 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:
|
clean:
|
||||||
rm -f *.pb
|
rm -f *.pb
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.bitcoin;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
@ -29,7 +30,7 @@ message MultisigRedeemScriptType {
|
|||||||
* Structure representing HDNode + Path
|
* Structure representing HDNode + Path
|
||||||
*/
|
*/
|
||||||
message HDNodePathType {
|
message HDNodePathType {
|
||||||
required HDNodeType node = 1; // BIP-32 node in deserialized form
|
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
|
repeated uint32 address_n = 2; // BIP-32 path to derive the key from node
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -53,7 +54,7 @@ message GetPublicKey {
|
|||||||
* @end
|
* @end
|
||||||
*/
|
*/
|
||||||
message PublicKey {
|
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
|
optional string xpub = 2; // serialized form of public node
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.bootloader;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.cardano;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
@ -41,7 +42,7 @@ message CardanoGetPublicKey {
|
|||||||
*/
|
*/
|
||||||
message CardanoPublicKey {
|
message CardanoPublicKey {
|
||||||
optional string xpub = 1; // Xpub key
|
optional string xpub = 1; // Xpub key
|
||||||
optional HDNodeType node = 2; // BIP-32 public node
|
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
|
optional string root_hd_passphrase = 3; // HD passphrase for root in hex format
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.common;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Success of the previous request
|
* Response: Success of the previous request
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.crypto;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.debug;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
@ -34,7 +35,7 @@ message DebugLinkState {
|
|||||||
optional string pin = 2; // current PIN, blank if PIN is not set/enabled
|
optional string pin = 2; // current PIN, blank if PIN is not set/enabled
|
||||||
optional string matrix = 3; // current PIN matrix
|
optional string matrix = 3; // current PIN matrix
|
||||||
optional string mnemonic = 4; // current BIP-39 mnemonic
|
optional string mnemonic = 4; // current BIP-39 mnemonic
|
||||||
optional HDNodeType node = 5; // current BIP-32 node
|
optional hw.trezor.messages.common.HDNodeType node = 5; // current BIP-32 node
|
||||||
optional bool passphrase_protection = 6; // is node/mnemonic encrypted using passphrase?
|
optional bool passphrase_protection = 6; // is node/mnemonic encrypted using passphrase?
|
||||||
optional string reset_word = 7; // word on device display during ResetDevice workflow
|
optional string reset_word = 7; // word on device display during ResetDevice workflow
|
||||||
optional bytes reset_entropy = 8; // current entropy during ResetDevice workflow
|
optional bytes reset_entropy = 8; // current entropy during ResetDevice workflow
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.ethereum;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.lisk;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.management;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
@ -163,7 +164,7 @@ message WipeDevice {
|
|||||||
*/
|
*/
|
||||||
message LoadDevice {
|
message LoadDevice {
|
||||||
optional string mnemonic = 1; // seed encoded as BIP-39 mnemonic (12, 18 or 24 words)
|
optional string mnemonic = 1; // seed encoded as BIP-39 mnemonic (12, 18 or 24 words)
|
||||||
optional HDNodeType node = 2; // BIP-32 node
|
optional hw.trezor.messages.common.HDNodeType node = 2; // BIP-32 node
|
||||||
optional string pin = 3; // set PIN protection
|
optional string pin = 3; // set PIN protection
|
||||||
optional bool passphrase_protection = 4; // enable master node encryption using passphrase
|
optional bool passphrase_protection = 4; // enable master node encryption using passphrase
|
||||||
optional string language = 5 [default='english']; // device language
|
optional string language = 5 [default='english']; // device language
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.monero;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.nem;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.ripple;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.stellar;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages.tezos;
|
||||||
|
|
||||||
// Sugar for easier handling in Java
|
// Sugar for easier handling in Java
|
||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto2";
|
syntax = "proto2";
|
||||||
|
package hw.trezor.messages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Messages for TREZOR communication
|
* Messages for TREZOR communication
|
||||||
|
Loading…
Reference in New Issue
Block a user