mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-04 13:52:35 +00:00
protob: update message workflow comments
This commit is contained in:
parent
a5563af0fa
commit
25bc3b4570
@ -1,4 +1,4 @@
|
|||||||
check: messages.pb messages-bitcoin.pb messages-bootloader.pb messages-cardano.pb messages-crypto.pb messages-debug.pb messages-ethereum.pb messages-lisk.pb messages-management.pb messages-nem.pb messages-stellar.pb messages-tezos.pb
|
check: messages.pb messages-bitcoin.pb messages-bootloader.pb messages-cardano.pb messages-common.pb messages-crypto.pb messages-debug.pb messages-ethereum.pb messages-lisk.pb messages-management.pb messages-nem.pb messages-ripple.pb messages-stellar.pb messages-tezos.pb
|
||||||
|
|
||||||
%.pb: %.proto
|
%.pb: %.proto
|
||||||
protoc -I/usr/include -I. $< -o $@
|
protoc -I/usr/include -I. $< -o $@
|
||||||
|
@ -19,6 +19,7 @@ enum InputScriptType {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of redeem script used in input
|
* Type of redeem script used in input
|
||||||
|
* @embed
|
||||||
*/
|
*/
|
||||||
message MultisigRedeemScriptType {
|
message MultisigRedeemScriptType {
|
||||||
repeated HDNodePathType pubkeys = 1; // pubkeys from multisig address (sorted lexicographically)
|
repeated HDNodePathType pubkeys = 1; // pubkeys from multisig address (sorted lexicographically)
|
||||||
@ -35,7 +36,7 @@ message MultisigRedeemScriptType {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device for public key corresponding to address_n path
|
* Request: Ask device for public key corresponding to address_n path
|
||||||
* @next PassphraseRequest
|
* @start
|
||||||
* @next PublicKey
|
* @next PublicKey
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -48,7 +49,7 @@ message GetPublicKey {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Contains public key derived from device private seed
|
* Response: Contains public key derived from device private seed
|
||||||
* @prev GetPublicKey
|
* @end
|
||||||
*/
|
*/
|
||||||
message PublicKey {
|
message PublicKey {
|
||||||
required HDNodeType node = 1; // BIP32 public node
|
required HDNodeType node = 1; // BIP32 public node
|
||||||
@ -57,7 +58,6 @@ message PublicKey {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device for address corresponding to address_n path
|
* Request: Ask device for address corresponding to address_n path
|
||||||
* @next PassphraseRequest
|
|
||||||
* @next Address
|
* @next Address
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -71,7 +71,7 @@ message GetAddress {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Contains address derived from device private seed
|
* Response: Contains address derived from device private seed
|
||||||
* @prev GetAddress
|
* @end
|
||||||
*/
|
*/
|
||||||
message Address {
|
message Address {
|
||||||
required string address = 1; // Coin address in Base58 encoding
|
required string address = 1; // Coin address in Base58 encoding
|
||||||
@ -79,6 +79,7 @@ message Address {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to sign message
|
* Request: Ask device to sign message
|
||||||
|
* @start
|
||||||
* @next MessageSignature
|
* @next MessageSignature
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -89,8 +90,18 @@ message SignMessage {
|
|||||||
optional InputScriptType script_type = 4 [default=SPENDADDRESS]; // used to distinguish between various address formats (non-segwit, segwit, etc.)
|
optional InputScriptType script_type = 4 [default=SPENDADDRESS]; // used to distinguish between various address formats (non-segwit, segwit, etc.)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response: Signed message
|
||||||
|
* @end
|
||||||
|
*/
|
||||||
|
message MessageSignature {
|
||||||
|
optional string address = 1; // address used to sign the message
|
||||||
|
optional bytes signature = 2; // signature of the message
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to verify message
|
* Request: Ask device to verify message
|
||||||
|
* @start
|
||||||
* @next Success
|
* @next Success
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -101,19 +112,9 @@ message VerifyMessage {
|
|||||||
optional string coin_name = 4 [default='Bitcoin']; // coin to use for verifying
|
optional string coin_name = 4 [default='Bitcoin']; // coin to use for verifying
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Response: Signed message
|
|
||||||
* @prev SignMessage
|
|
||||||
*/
|
|
||||||
message MessageSignature {
|
|
||||||
optional string address = 1; // address used to sign the message
|
|
||||||
optional bytes signature = 2; // signature of the message
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to sign transaction
|
* Request: Ask device to sign transaction
|
||||||
* @next PassphraseRequest
|
* @start
|
||||||
* @next PinMatrixRequest
|
|
||||||
* @next TxRequest
|
* @next TxRequest
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -131,8 +132,8 @@ message SignTx {
|
|||||||
* Response: Device asks for information for signing transaction or returns the last result
|
* Response: Device asks for information for signing transaction or returns the last result
|
||||||
* If request_index is set, device awaits TxAck message (with fields filled in according to request_type)
|
* If request_index is set, device awaits TxAck message (with fields filled in according to request_type)
|
||||||
* If signature_index is set, 'signature' contains signed input of signature_index's input
|
* If signature_index is set, 'signature' contains signed input of signature_index's input
|
||||||
* @prev SignTx
|
* @end
|
||||||
* @prev TxAck
|
* @next TxAck
|
||||||
*/
|
*/
|
||||||
message TxRequest {
|
message TxRequest {
|
||||||
optional RequestType request_type = 1; // what should be filled in TxAck message?
|
optional RequestType request_type = 1; // what should be filled in TxAck message?
|
||||||
@ -169,7 +170,6 @@ message TxRequest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Reported transaction data
|
* Request: Reported transaction data
|
||||||
* @prev TxRequest
|
|
||||||
* @next TxRequest
|
* @next TxRequest
|
||||||
*/
|
*/
|
||||||
message TxAck {
|
message TxAck {
|
||||||
|
@ -6,9 +6,8 @@ option java_outer_classname = "TrezorMessageBootloader";
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to erase its firmware (so it can be replaced via FirmwareUpload)
|
* Request: Ask device to erase its firmware (so it can be replaced via FirmwareUpload)
|
||||||
* @next Success
|
* @start
|
||||||
* @next FirmwareRequest
|
* @next FirmwareRequest
|
||||||
* @next Failure
|
|
||||||
*/
|
*/
|
||||||
message FirmwareErase {
|
message FirmwareErase {
|
||||||
optional uint32 length = 1; // length of new firmware
|
optional uint32 length = 1; // length of new firmware
|
||||||
@ -25,6 +24,7 @@ message FirmwareRequest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Send firmware in binary form to the device
|
* Request: Send firmware in binary form to the device
|
||||||
|
* @next FirmwareRequest
|
||||||
* @next Success
|
* @next Success
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
|
@ -8,6 +8,7 @@ import "messages-common.proto";
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device for Cardano address
|
* Request: Ask device for Cardano address
|
||||||
|
* @start
|
||||||
* @next CardanoAddress
|
* @next CardanoAddress
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -18,15 +19,35 @@ message CardanoGetAddress {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device for Cardano address
|
* Request: Ask device for Cardano address
|
||||||
* @next CardanoAddress
|
* @end
|
||||||
* @next Failure
|
|
||||||
*/
|
*/
|
||||||
message CardanoAddress {
|
message CardanoAddress {
|
||||||
optional string address = 1; // Base58 cardano address
|
optional string address = 1; // Base58 cardano address
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Ask device for public key corresponding to address_n path
|
||||||
|
* @start
|
||||||
|
* @next CardanoPublicKey
|
||||||
|
* @next Failure
|
||||||
|
*/
|
||||||
|
message CardanoGetPublicKey {
|
||||||
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response: Contains public key derived from device private seed
|
||||||
|
* @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
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to sign Cardano message
|
* Request: Ask device to sign Cardano message
|
||||||
|
* @start
|
||||||
* @next CardanoMessageSignature
|
* @next CardanoMessageSignature
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -35,47 +56,30 @@ message CardanoSignMessage {
|
|||||||
optional bytes message = 2; // message to be signed
|
optional bytes message = 2; // message to be signed
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Request: Ask device for public key corresponding to address_n path
|
|
||||||
* @next CardanoPublicKey
|
|
||||||
* @next Failure
|
|
||||||
*/
|
|
||||||
message CardanoGetPublicKey {
|
|
||||||
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Response: Contains public key derived from device private seed
|
|
||||||
* @prev CardanoGetPublicKey
|
|
||||||
*/
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Request: Ask device to verify Cardano message
|
|
||||||
* @next Success
|
|
||||||
* @next Failure
|
|
||||||
*/
|
|
||||||
message CardanoVerifyMessage {
|
|
||||||
optional bytes public_key = 1; // Public key which was used to sign message
|
|
||||||
optional bytes signature = 2; // signature to verify
|
|
||||||
optional bytes message = 3; // message to verify
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Signed Cardano message
|
* Response: Signed Cardano message
|
||||||
* @prev CardanoSignMessage
|
* @end
|
||||||
*/
|
*/
|
||||||
message CardanoMessageSignature {
|
message CardanoMessageSignature {
|
||||||
optional bytes public_key = 1; // public key which was used to sign mesage
|
optional bytes public_key = 1; // public key which was used to sign mesage
|
||||||
optional bytes signature = 2; // signature of the message
|
optional bytes signature = 2; // signature of the message
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Ask device to verify Cardano message
|
||||||
|
* @start
|
||||||
|
* @next Success
|
||||||
|
* @next Failure
|
||||||
|
*/
|
||||||
|
message CardanoVerifyMessage {
|
||||||
|
optional bytes public_key = 1; // Public key which was used to sign message
|
||||||
|
optional bytes signature = 2; // signature to verify
|
||||||
|
optional bytes message = 3; // message to verify
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to sign Cardano transaction
|
* Request: Ask device to sign Cardano transaction
|
||||||
|
* @start
|
||||||
* @next CardanoSignedTransaction
|
* @next CardanoSignedTransaction
|
||||||
* @next CardanoTxRequest
|
* @next CardanoTxRequest
|
||||||
* @next Failure
|
* @next Failure
|
||||||
@ -106,7 +110,6 @@ message CardanoSignTransaction {
|
|||||||
/**
|
/**
|
||||||
* Response: Serialised signed cardano transaction if tx_index is not specified.
|
* Response: Serialised signed cardano transaction if tx_index is not specified.
|
||||||
* If tx_index is specified, trezor will wait for transaction
|
* If tx_index is specified, trezor will wait for transaction
|
||||||
* @prev CardanoSignTransaction
|
|
||||||
* @next CardanoTxAck
|
* @next CardanoTxAck
|
||||||
*/
|
*/
|
||||||
message CardanoTxRequest {
|
message CardanoTxRequest {
|
||||||
@ -117,7 +120,7 @@ message CardanoTxRequest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Serialised signed cardano transaction
|
* Response: Serialised signed cardano transaction
|
||||||
* @prev CardanoSignTransaction
|
* @end
|
||||||
*/
|
*/
|
||||||
message CardanoSignedTransaction {
|
message CardanoSignedTransaction {
|
||||||
optional bytes tx_hash = 1; // hash of the signed transaction
|
optional bytes tx_hash = 1; // hash of the signed transaction
|
||||||
@ -126,7 +129,6 @@ message CardanoSignedTransaction {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Reported transaction data
|
* Request: Reported transaction data
|
||||||
* @prev CardanoTxRequest
|
|
||||||
* @next CardanoTxRequest
|
* @next CardanoTxRequest
|
||||||
*/
|
*/
|
||||||
message CardanoTxAck {
|
message CardanoTxAck {
|
||||||
|
@ -2,14 +2,16 @@ syntax = "proto2";
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Success of the previous request
|
* Response: Success of the previous request
|
||||||
|
* @end
|
||||||
*/
|
*/
|
||||||
message Success {
|
message Success {
|
||||||
optional string message = 1; // human readable description of action or request-specific payload
|
optional string message = 1; // human readable description of action or request-specific payload
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Failure of the previous request
|
* Response: Failure of the previous request
|
||||||
*/
|
* @end
|
||||||
|
*/
|
||||||
message Failure {
|
message Failure {
|
||||||
optional FailureType code = 1; // computer-readable definition of the error state
|
optional FailureType code = 1; // computer-readable definition of the error state
|
||||||
optional string message = 2; // human-readable message of the error state
|
optional string message = 2; // human-readable message of the error state
|
||||||
@ -32,8 +34,8 @@ message Failure {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Device is waiting for HW button press.
|
* Response: Device is waiting for HW button press.
|
||||||
|
* @auxstart
|
||||||
* @next ButtonAck
|
* @next ButtonAck
|
||||||
* @next Cancel
|
|
||||||
*/
|
*/
|
||||||
message ButtonRequest {
|
message ButtonRequest {
|
||||||
optional ButtonRequestType code = 1;
|
optional ButtonRequestType code = 1;
|
||||||
@ -61,15 +63,15 @@ message ButtonRequest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Computer agrees to wait for HW button press
|
* Request: Computer agrees to wait for HW button press
|
||||||
* @prev ButtonRequest
|
* @auxend
|
||||||
*/
|
*/
|
||||||
message ButtonAck {
|
message ButtonAck {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Device is asking computer to show PIN matrix and awaits PIN encoded using this matrix scheme
|
* Response: Device is asking computer to show PIN matrix and awaits PIN encoded using this matrix scheme
|
||||||
|
* @auxstart
|
||||||
* @next PinMatrixAck
|
* @next PinMatrixAck
|
||||||
* @next Cancel
|
|
||||||
*/
|
*/
|
||||||
message PinMatrixRequest {
|
message PinMatrixRequest {
|
||||||
optional PinMatrixRequestType type = 1;
|
optional PinMatrixRequestType type = 1;
|
||||||
@ -85,7 +87,7 @@ message PinMatrixRequest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Computer responds with encoded PIN
|
* Request: Computer responds with encoded PIN
|
||||||
* @prev PinMatrixRequest
|
* @auxend
|
||||||
*/
|
*/
|
||||||
message PinMatrixAck {
|
message PinMatrixAck {
|
||||||
required string pin = 1; // matrix encoded PIN entered by user
|
required string pin = 1; // matrix encoded PIN entered by user
|
||||||
@ -93,8 +95,8 @@ message PinMatrixAck {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Device awaits encryption passphrase
|
* Response: Device awaits encryption passphrase
|
||||||
|
* @auxstart
|
||||||
* @next PassphraseAck
|
* @next PassphraseAck
|
||||||
* @next Cancel
|
|
||||||
*/
|
*/
|
||||||
message PassphraseRequest {
|
message PassphraseRequest {
|
||||||
optional bool on_device = 1; // passphrase is being entered on the device
|
optional bool on_device = 1; // passphrase is being entered on the device
|
||||||
@ -102,7 +104,6 @@ message PinMatrixAck {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Send passphrase back
|
* Request: Send passphrase back
|
||||||
* @prev PassphraseRequest
|
|
||||||
* @next PassphraseStateRequest
|
* @next PassphraseStateRequest
|
||||||
*/
|
*/
|
||||||
message PassphraseAck {
|
message PassphraseAck {
|
||||||
@ -111,7 +112,7 @@ message PassphraseAck {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @prev PassphraseAck
|
* Response: Device awaits passphrase state
|
||||||
* @next PassphraseStateAck
|
* @next PassphraseStateAck
|
||||||
*/
|
*/
|
||||||
message PassphraseStateRequest {
|
message PassphraseStateRequest {
|
||||||
@ -119,14 +120,16 @@ message PassphraseStateRequest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @prev PassphraseStateRequest
|
* Request: Send passphrase state back
|
||||||
|
* @auxend
|
||||||
*/
|
*/
|
||||||
message PassphraseStateAck {
|
message PassphraseStateAck {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Structure representing BIP32 (hierarchical deterministic) node
|
* Structure representing BIP32 (hierarchical deterministic) node
|
||||||
* Used for imports of private key into the device and exporting public key out of device
|
* Used for imports of private key into the device and exporting public key out of device
|
||||||
|
* @embed
|
||||||
*/
|
*/
|
||||||
message HDNodeType {
|
message HDNodeType {
|
||||||
required uint32 depth = 1;
|
required uint32 depth = 1;
|
||||||
|
@ -6,6 +6,7 @@ option java_outer_classname = "TrezorMessageCrypto";
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to encrypt or decrypt value of given key
|
* Request: Ask device to encrypt or decrypt value of given key
|
||||||
|
* @start
|
||||||
* @next CipheredKeyValue
|
* @next CipheredKeyValue
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -21,15 +22,16 @@ message CipherKeyValue {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Return ciphered/deciphered value
|
* Response: Return ciphered/deciphered value
|
||||||
* @prev CipherKeyValue
|
* @end
|
||||||
*/
|
*/
|
||||||
message CipheredKeyValue {
|
message CipheredKeyValue {
|
||||||
optional bytes value = 1; // ciphered/deciphered value
|
optional bytes value = 1; // ciphered/deciphered value
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Structure representing identity data
|
* Structure representing identity data
|
||||||
*/
|
* @embed
|
||||||
|
*/
|
||||||
message IdentityType {
|
message IdentityType {
|
||||||
optional string proto = 1; // proto part of URI
|
optional string proto = 1; // proto part of URI
|
||||||
optional string user = 2; // user part of URI
|
optional string user = 2; // user part of URI
|
||||||
@ -41,6 +43,7 @@ message IdentityType {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to sign identity
|
* Request: Ask device to sign identity
|
||||||
|
* @start
|
||||||
* @next SignedIdentity
|
* @next SignedIdentity
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -53,7 +56,7 @@ message SignIdentity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Device provides signed identity
|
* Response: Device provides signed identity
|
||||||
* @prev SignIdentity
|
* @end
|
||||||
*/
|
*/
|
||||||
message SignedIdentity {
|
message SignedIdentity {
|
||||||
optional string address = 1; // identity address
|
optional string address = 1; // identity address
|
||||||
@ -63,6 +66,7 @@ message SignedIdentity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to generate ECDH session key
|
* Request: Ask device to generate ECDH session key
|
||||||
|
* @start
|
||||||
* @next ECDHSessionKey
|
* @next ECDHSessionKey
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -74,7 +78,7 @@ message GetECDHSessionKey {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Device provides ECDH session key
|
* Response: Device provides ECDH session key
|
||||||
* @prev GetECDHSessionKey
|
* @end
|
||||||
*/
|
*/
|
||||||
message ECDHSessionKey {
|
message ECDHSessionKey {
|
||||||
optional bytes session_key = 1; // ECDH session key
|
optional bytes session_key = 1; // ECDH session key
|
||||||
@ -82,6 +86,7 @@ message ECDHSessionKey {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to commit to CoSi signing
|
* Request: Ask device to commit to CoSi signing
|
||||||
|
* @start
|
||||||
* @next CosiCommitment
|
* @next CosiCommitment
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -92,7 +97,7 @@ message CosiCommit {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Contains a CoSi commitment
|
* Response: Contains a CoSi commitment
|
||||||
* @prev CosiCommit
|
* @end
|
||||||
*/
|
*/
|
||||||
message CosiCommitment {
|
message CosiCommitment {
|
||||||
optional bytes commitment = 1; // Commitment
|
optional bytes commitment = 1; // Commitment
|
||||||
@ -101,6 +106,7 @@ message CosiCommitment {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to sign using CoSi
|
* Request: Ask device to sign using CoSi
|
||||||
|
* @start
|
||||||
* @next CosiSignature
|
* @next CosiSignature
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -113,7 +119,7 @@ message CosiSign {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Contains a CoSi signature
|
* Response: Contains a CoSi signature
|
||||||
* @prev CosiSign
|
* @end
|
||||||
*/
|
*/
|
||||||
message CosiSignature {
|
message CosiSignature {
|
||||||
optional bytes signature = 1; // Signature
|
optional bytes signature = 1; // Signature
|
||||||
|
@ -8,6 +8,7 @@ import "messages-common.proto";
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: "Press" the button on the device
|
* Request: "Press" the button on the device
|
||||||
|
* @start
|
||||||
* @next Success
|
* @next Success
|
||||||
*/
|
*/
|
||||||
message DebugLinkDecision {
|
message DebugLinkDecision {
|
||||||
@ -18,6 +19,7 @@ message DebugLinkDecision {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Computer asks for device state
|
* Request: Computer asks for device state
|
||||||
|
* @start
|
||||||
* @next DebugLinkState
|
* @next DebugLinkState
|
||||||
*/
|
*/
|
||||||
message DebugLinkGetState {
|
message DebugLinkGetState {
|
||||||
@ -25,7 +27,7 @@ message DebugLinkGetState {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Device current state
|
* Response: Device current state
|
||||||
* @prev DebugLinkGetState
|
* @end
|
||||||
*/
|
*/
|
||||||
message DebugLinkState {
|
message DebugLinkState {
|
||||||
optional bytes layout = 1; // raw buffer of display
|
optional bytes layout = 1; // raw buffer of display
|
||||||
@ -43,6 +45,7 @@ message DebugLinkState {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to restart
|
* Request: Ask device to restart
|
||||||
|
* @start
|
||||||
*/
|
*/
|
||||||
message DebugLinkStop {
|
message DebugLinkStop {
|
||||||
}
|
}
|
||||||
@ -58,6 +61,7 @@ message DebugLinkLog {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Read memory from device
|
* Request: Read memory from device
|
||||||
|
* @start
|
||||||
* @next DebugLinkMemory
|
* @next DebugLinkMemory
|
||||||
*/
|
*/
|
||||||
message DebugLinkMemoryRead {
|
message DebugLinkMemoryRead {
|
||||||
@ -67,7 +71,7 @@ message DebugLinkMemoryRead {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Device sends memory back
|
* Response: Device sends memory back
|
||||||
* @prev DebugLinkMemoryRead
|
* @end
|
||||||
*/
|
*/
|
||||||
message DebugLinkMemory {
|
message DebugLinkMemory {
|
||||||
optional bytes memory = 1;
|
optional bytes memory = 1;
|
||||||
@ -76,6 +80,9 @@ message DebugLinkMemory {
|
|||||||
/**
|
/**
|
||||||
* Request: Write memory to device.
|
* Request: Write memory to device.
|
||||||
* WARNING: Writing to the wrong location can irreparably break the device.
|
* WARNING: Writing to the wrong location can irreparably break the device.
|
||||||
|
* @start
|
||||||
|
* @next Success
|
||||||
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
message DebugLinkMemoryWrite {
|
message DebugLinkMemoryWrite {
|
||||||
optional uint32 address = 1;
|
optional uint32 address = 1;
|
||||||
@ -86,6 +93,9 @@ message DebugLinkMemoryWrite {
|
|||||||
/**
|
/**
|
||||||
* Request: Erase block of flash on device
|
* Request: Erase block of flash on device
|
||||||
* WARNING: Writing to the wrong location can irreparably break the device.
|
* WARNING: Writing to the wrong location can irreparably break the device.
|
||||||
|
* @start
|
||||||
|
* @next Success
|
||||||
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
message DebugLinkFlashErase {
|
message DebugLinkFlashErase {
|
||||||
optional uint32 sector = 1;
|
optional uint32 sector = 1;
|
||||||
|
@ -6,7 +6,7 @@ option java_outer_classname = "TrezorMessageEthereum";
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device for Ethereum address corresponding to address_n path
|
* Request: Ask device for Ethereum address corresponding to address_n path
|
||||||
* @next PassphraseRequest
|
* @start
|
||||||
* @next EthereumAddress
|
* @next EthereumAddress
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -17,7 +17,7 @@ message EthereumGetAddress {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Contains an Ethereum address derived from device private seed
|
* Response: Contains an Ethereum address derived from device private seed
|
||||||
* @prev EthereumGetAddress
|
* @end
|
||||||
*/
|
*/
|
||||||
message EthereumAddress {
|
message EthereumAddress {
|
||||||
required bytes address = 1; // Coin address as an Ethereum 160 bit hash
|
required bytes address = 1; // Coin address as an Ethereum 160 bit hash
|
||||||
@ -27,8 +27,7 @@ message EthereumAddress {
|
|||||||
* Request: Ask device to sign transaction
|
* Request: Ask device to sign transaction
|
||||||
* All fields are optional from the protocol's point of view. Each field defaults to value `0` if missing.
|
* All fields are optional from the protocol's point of view. Each field defaults to value `0` if missing.
|
||||||
* Note: the first at most 1024 bytes of data MUST be transmitted as part of this message.
|
* Note: the first at most 1024 bytes of data MUST be transmitted as part of this message.
|
||||||
* @next PassphraseRequest
|
* @start
|
||||||
* @next PinMatrixRequest
|
|
||||||
* @next EthereumTxRequest
|
* @next EthereumTxRequest
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -49,7 +48,7 @@ message EthereumSignTx {
|
|||||||
* Response: Device asks for more data from transaction payload, or returns the signature.
|
* Response: Device asks for more data from transaction payload, or returns the signature.
|
||||||
* If data_length is set, device awaits that many more bytes of payload.
|
* If data_length is set, device awaits that many more bytes of payload.
|
||||||
* Otherwise, the signature_* fields contain the computed transaction signature. All three fields will be present.
|
* Otherwise, the signature_* fields contain the computed transaction signature. All three fields will be present.
|
||||||
* @prev EthereumSignTx
|
* @end
|
||||||
* @next EthereumTxAck
|
* @next EthereumTxAck
|
||||||
*/
|
*/
|
||||||
message EthereumTxRequest {
|
message EthereumTxRequest {
|
||||||
@ -61,7 +60,6 @@ message EthereumTxRequest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Transaction payload data.
|
* Request: Transaction payload data.
|
||||||
* @prev EthereumTxRequest
|
|
||||||
* @next EthereumTxRequest
|
* @next EthereumTxRequest
|
||||||
*/
|
*/
|
||||||
message EthereumTxAck {
|
message EthereumTxAck {
|
||||||
@ -70,6 +68,7 @@ message EthereumTxAck {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to sign message
|
* Request: Ask device to sign message
|
||||||
|
* @start
|
||||||
* @next EthereumMessageSignature
|
* @next EthereumMessageSignature
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -78,22 +77,23 @@ message EthereumSignMessage {
|
|||||||
required bytes message = 2; // message to be signed
|
required bytes message = 2; // message to be signed
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Request: Ask device to verify message
|
|
||||||
* @next Success
|
|
||||||
* @next Failure
|
|
||||||
*/
|
|
||||||
message EthereumVerifyMessage {
|
|
||||||
optional bytes address = 1; // address to verify
|
|
||||||
optional bytes signature = 2; // signature to verify
|
|
||||||
optional bytes message = 3; // message to verify
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Signed message
|
* Response: Signed message
|
||||||
* @prev EthereumSignMessage
|
* @end
|
||||||
*/
|
*/
|
||||||
message EthereumMessageSignature {
|
message EthereumMessageSignature {
|
||||||
optional bytes address = 1; // address used to sign the message
|
optional bytes address = 1; // address used to sign the message
|
||||||
optional bytes signature = 2; // signature of the message
|
optional bytes signature = 2; // signature of the message
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Ask device to verify message
|
||||||
|
* @start
|
||||||
|
* @next Success
|
||||||
|
* @next Failure
|
||||||
|
*/
|
||||||
|
message EthereumVerifyMessage {
|
||||||
|
optional bytes address = 1; // address to verify
|
||||||
|
optional bytes signature = 2; // signature to verify
|
||||||
|
optional bytes message = 3; // message to verify
|
||||||
|
}
|
||||||
|
@ -4,10 +4,30 @@ syntax = "proto2";
|
|||||||
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
||||||
option java_outer_classname = "TrezorMessageLisk";
|
option java_outer_classname = "TrezorMessageLisk";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Ask device for Lisk address corresponding to address_n path
|
||||||
|
* @start
|
||||||
|
* @next LiskAddress
|
||||||
|
* @next Failure
|
||||||
|
*/
|
||||||
|
message LiskGetAddress {
|
||||||
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
|
optional bool show_display = 2; // Optionally show on display before sending the result
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response: Contains Lisk address derived from device private seed
|
||||||
|
* @end
|
||||||
|
*/
|
||||||
|
message LiskAddress {
|
||||||
|
optional string address = 1; // Lisk address
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device for Lisk public key corresponding to address_n path
|
* Request: Ask device for Lisk public key corresponding to address_n path
|
||||||
|
* @start
|
||||||
* @next LiskPublicKey
|
* @next LiskPublicKey
|
||||||
*/
|
*/
|
||||||
message LiskGetPublicKey {
|
message LiskGetPublicKey {
|
||||||
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
optional bool show_display = 2; // Optionally show on display before sending the result
|
optional bool show_display = 2; // Optionally show on display before sending the result
|
||||||
@ -15,34 +35,17 @@ message LiskGetPublicKey {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Contains Lisk public key derived from device private seed
|
* Response: Contains Lisk public key derived from device private seed
|
||||||
* @prev LiskGetPublicKey
|
* @end
|
||||||
*/
|
*/
|
||||||
message LiskPublicKey {
|
message LiskPublicKey {
|
||||||
optional bytes public_key = 1; // Lisk public key
|
optional bytes public_key = 1; // Lisk public key
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Request: Ask device for Lisk address corresponding to address_n path
|
|
||||||
* @next PassphraseRequest
|
|
||||||
* @next LiskAddress
|
|
||||||
* @next Failure
|
|
||||||
*/
|
|
||||||
message LiskGetAddress {
|
|
||||||
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
|
||||||
optional bool show_display = 2; // Optionally show on display before sending the result
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Response: Contains Lisk address derived from device private seed
|
|
||||||
* @prev LiskGetAddress
|
|
||||||
*/
|
|
||||||
message LiskAddress {
|
|
||||||
optional string address = 1; // Lisk address
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to sign Lisk transaction
|
* Request: Ask device to sign Lisk transaction
|
||||||
|
* @start
|
||||||
* @next LiskSignedTx
|
* @next LiskSignedTx
|
||||||
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
message LiskSignTx {
|
message LiskSignTx {
|
||||||
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
@ -107,37 +110,39 @@ message LiskSignTx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Contains Lisk transaction signature
|
* Response: Contains Lisk transaction signature
|
||||||
* @prev LiskSignTx
|
* @end
|
||||||
*/
|
*/
|
||||||
message LiskSignedTx {
|
message LiskSignedTx {
|
||||||
optional bytes signature = 1;
|
optional bytes signature = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to sign message
|
* Request: Ask device to sign message
|
||||||
* @next LiskMessageSignature
|
* @start
|
||||||
* @next Failure
|
* @next LiskMessageSignature
|
||||||
*/
|
* @next Failure
|
||||||
|
*/
|
||||||
message LiskSignMessage {
|
message LiskSignMessage {
|
||||||
repeated uint32 address_n = 1;
|
repeated uint32 address_n = 1;
|
||||||
optional bytes message = 2;
|
optional bytes message = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Signed message
|
* Response: Signed message
|
||||||
* @prev LiskSignMessage
|
* @end
|
||||||
*/
|
*/
|
||||||
message LiskMessageSignature {
|
message LiskMessageSignature {
|
||||||
optional bytes public_key = 1;
|
optional bytes public_key = 1;
|
||||||
optional bytes signature = 2;
|
optional bytes signature = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to verify message
|
* Request: Ask device to verify message
|
||||||
* @next Success
|
* @start
|
||||||
* @next Failure
|
* @next Success
|
||||||
*/
|
* @next Failure
|
||||||
|
*/
|
||||||
message LiskVerifyMessage {
|
message LiskVerifyMessage {
|
||||||
optional bytes public_key = 1;
|
optional bytes public_key = 1;
|
||||||
optional bytes signature = 2;
|
optional bytes signature = 2;
|
||||||
|
@ -8,6 +8,7 @@ import "messages-common.proto";
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Reset device to default state and ask for device details
|
* Request: Reset device to default state and ask for device details
|
||||||
|
* @start
|
||||||
* @next Features
|
* @next Features
|
||||||
*/
|
*/
|
||||||
message Initialize {
|
message Initialize {
|
||||||
@ -17,6 +18,7 @@ message Initialize {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask for device details (no device reset)
|
* Request: Ask for device details (no device reset)
|
||||||
|
* @start
|
||||||
* @next Features
|
* @next Features
|
||||||
*/
|
*/
|
||||||
message GetFeatures {
|
message GetFeatures {
|
||||||
@ -24,8 +26,7 @@ message GetFeatures {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Reports various information about the device
|
* Response: Reports various information about the device
|
||||||
* @prev Initialize
|
* @end
|
||||||
* @prev GetFeatures
|
|
||||||
*/
|
*/
|
||||||
message Features {
|
message Features {
|
||||||
optional string vendor = 1; // name of the manufacturer, e.g. "trezor.io"
|
optional string vendor = 1; // name of the manufacturer, e.g. "trezor.io"
|
||||||
@ -58,6 +59,7 @@ message Features {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: clear session (removes cached PIN, passphrase, etc).
|
* Request: clear session (removes cached PIN, passphrase, etc).
|
||||||
|
* @start
|
||||||
* @next Success
|
* @next Success
|
||||||
*/
|
*/
|
||||||
message ClearSession {
|
message ClearSession {
|
||||||
@ -65,10 +67,9 @@ message ClearSession {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: change language and/or label of the device
|
* Request: change language and/or label of the device
|
||||||
|
* @start
|
||||||
* @next Success
|
* @next Success
|
||||||
* @next Failure
|
* @next Failure
|
||||||
* @next ButtonRequest
|
|
||||||
* @next PinMatrixRequest
|
|
||||||
*/
|
*/
|
||||||
message ApplySettings {
|
message ApplySettings {
|
||||||
optional string language = 1;
|
optional string language = 1;
|
||||||
@ -89,6 +90,7 @@ message ApplySettings {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: set flags of the device
|
* Request: set flags of the device
|
||||||
|
* @start
|
||||||
* @next Success
|
* @next Success
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -98,8 +100,9 @@ message ApplyFlags {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Starts workflow for setting/changing/removing the PIN
|
* Request: Starts workflow for setting/changing/removing the PIN
|
||||||
* @next ButtonRequest
|
* @start
|
||||||
* @next PinMatrixRequest
|
* @next Success
|
||||||
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
message ChangePin {
|
message ChangePin {
|
||||||
optional bool remove = 1; // is PIN removal requested?
|
optional bool remove = 1; // is PIN removal requested?
|
||||||
@ -107,6 +110,7 @@ message ChangePin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Test if the device is alive, device sends back the message in Success response
|
* Request: Test if the device is alive, device sends back the message in Success response
|
||||||
|
* @start
|
||||||
* @next Success
|
* @next Success
|
||||||
*/
|
*/
|
||||||
message Ping {
|
message Ping {
|
||||||
@ -118,16 +122,14 @@ message Ping {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Abort last operation that required user interaction
|
* Request: Abort last operation that required user interaction
|
||||||
* @prev ButtonRequest
|
* @start
|
||||||
* @prev PinMatrixRequest
|
|
||||||
* @prev PassphraseRequest
|
|
||||||
*/
|
*/
|
||||||
message Cancel {
|
message Cancel {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Request a sample of random data generated by hardware RNG. May be used for testing.
|
* Request: Request a sample of random data generated by hardware RNG. May be used for testing.
|
||||||
* @next ButtonRequest
|
* @start
|
||||||
* @next Entropy
|
* @next Entropy
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -137,7 +139,7 @@ message GetEntropy {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Reply with random data generated by internal RNG
|
* Response: Reply with random data generated by internal RNG
|
||||||
* @prev GetEntropy
|
* @end
|
||||||
*/
|
*/
|
||||||
message Entropy {
|
message Entropy {
|
||||||
required bytes entropy = 1; // chunk of random generated bytes
|
required bytes entropy = 1; // chunk of random generated bytes
|
||||||
@ -145,14 +147,16 @@ message Entropy {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Request device to wipe all sensitive data and settings
|
* Request: Request device to wipe all sensitive data and settings
|
||||||
* @next ButtonRequest
|
* @start
|
||||||
|
* @next Success
|
||||||
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
message WipeDevice {
|
message WipeDevice {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Load seed and related internal settings from the computer
|
* Request: Load seed and related internal settings from the computer
|
||||||
* @next ButtonRequest
|
* @start
|
||||||
* @next Success
|
* @next Success
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -169,6 +173,7 @@ message LoadDevice {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to do initialization involving user interaction
|
* Request: Ask device to do initialization involving user interaction
|
||||||
|
* @start
|
||||||
* @next EntropyRequest
|
* @next EntropyRequest
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -185,14 +190,14 @@ message ResetDevice {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Perform backup of the device seed if not backed up using ResetDevice
|
* Request: Perform backup of the device seed if not backed up using ResetDevice
|
||||||
* @next ButtonRequest
|
* @start
|
||||||
|
* @next Success
|
||||||
*/
|
*/
|
||||||
message BackupDevice {
|
message BackupDevice {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Ask for additional entropy from host computer
|
* Response: Ask for additional entropy from host computer
|
||||||
* @prev ResetDevice
|
|
||||||
* @next EntropyAck
|
* @next EntropyAck
|
||||||
*/
|
*/
|
||||||
message EntropyRequest {
|
message EntropyRequest {
|
||||||
@ -200,8 +205,7 @@ message EntropyRequest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Provide additional entropy for seed generation function
|
* Request: Provide additional entropy for seed generation function
|
||||||
* @prev EntropyRequest
|
* @next Success
|
||||||
* @next ButtonRequest
|
|
||||||
*/
|
*/
|
||||||
message EntropyAck {
|
message EntropyAck {
|
||||||
optional bytes entropy = 1; // 256 bits (32 bytes) of random data
|
optional bytes entropy = 1; // 256 bits (32 bytes) of random data
|
||||||
@ -210,6 +214,7 @@ message EntropyAck {
|
|||||||
/**
|
/**
|
||||||
* Request: Start recovery workflow asking user for specific words of mnemonic
|
* Request: Start recovery workflow asking user for specific words of mnemonic
|
||||||
* Used to recovery device safely even on untrusted computer.
|
* Used to recovery device safely even on untrusted computer.
|
||||||
|
* @start
|
||||||
* @next WordRequest
|
* @next WordRequest
|
||||||
*/
|
*/
|
||||||
message RecoveryDevice {
|
message RecoveryDevice {
|
||||||
@ -241,8 +246,7 @@ message RecoveryDevice {
|
|||||||
/**
|
/**
|
||||||
* Response: Device is waiting for user to enter word of the mnemonic
|
* Response: Device is waiting for user to enter word of the mnemonic
|
||||||
* Its position is shown only on device's internal display.
|
* Its position is shown only on device's internal display.
|
||||||
* @prev RecoveryDevice
|
* @next WordAck
|
||||||
* @prev WordAck
|
|
||||||
*/
|
*/
|
||||||
message WordRequest {
|
message WordRequest {
|
||||||
optional WordRequestType type = 1;
|
optional WordRequestType type = 1;
|
||||||
@ -258,7 +262,6 @@ message WordRequest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Computer replies with word from the mnemonic
|
* Request: Computer replies with word from the mnemonic
|
||||||
* @prev WordRequest
|
|
||||||
* @next WordRequest
|
* @next WordRequest
|
||||||
* @next Success
|
* @next Success
|
||||||
* @next Failure
|
* @next Failure
|
||||||
@ -269,6 +272,7 @@ message WordAck {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Set U2F counter
|
* Request: Set U2F counter
|
||||||
|
* @start
|
||||||
* @next Success
|
* @next Success
|
||||||
*/
|
*/
|
||||||
message SetU2FCounter {
|
message SetU2FCounter {
|
||||||
|
@ -6,7 +6,7 @@ option java_outer_classname = "TrezorMessageNem";
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device for NEM address corresponding to address_n path
|
* Request: Ask device for NEM address corresponding to address_n path
|
||||||
* @next PassphraseRequest
|
* @start
|
||||||
* @next NEMAddress
|
* @next NEMAddress
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -18,7 +18,7 @@ message NEMGetAddress {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Contains NEM address derived from device private seed
|
* Response: Contains NEM address derived from device private seed
|
||||||
* @prev NEMGetAddress
|
* @end
|
||||||
*/
|
*/
|
||||||
message NEMAddress {
|
message NEMAddress {
|
||||||
required string address = 1; // NEM address in Base32 encoding
|
required string address = 1; // NEM address in Base32 encoding
|
||||||
@ -26,6 +26,7 @@ message NEMAddress {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to sign transaction
|
* Request: Ask device to sign transaction
|
||||||
|
* @start
|
||||||
* @next NEMSignedTx
|
* @next NEMSignedTx
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -167,7 +168,7 @@ message NEMSignTx {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Contains NEM transaction data and signature
|
* Response: Contains NEM transaction data and signature
|
||||||
* @prev NEMSignTx
|
* @end
|
||||||
*/
|
*/
|
||||||
message NEMSignedTx {
|
message NEMSignedTx {
|
||||||
optional bytes data = 1; // Transaction data
|
optional bytes data = 1; // Transaction data
|
||||||
@ -176,6 +177,7 @@ message NEMSignedTx {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to decrypt NEM transaction payload
|
* Request: Ask device to decrypt NEM transaction payload
|
||||||
|
* @start
|
||||||
* @next NEMDecryptedMessage
|
* @next NEMDecryptedMessage
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -188,7 +190,7 @@ message NEMDecryptMessage {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Contains decrypted NEM transaction payload
|
* Response: Contains decrypted NEM transaction payload
|
||||||
* @prev NEMDecryptMessage
|
* @end
|
||||||
*/
|
*/
|
||||||
message NEMDecryptedMessage {
|
message NEMDecryptedMessage {
|
||||||
optional bytes payload = 1; // Actual message data (unencrypted)
|
optional bytes payload = 1; // Actual message data (unencrypted)
|
||||||
|
@ -6,6 +6,7 @@ option java_outer_classname = "TrezorMessageRipple";
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Address at the specified index
|
* Request: Address at the specified index
|
||||||
|
* @start
|
||||||
* @next RippleAddress
|
* @next RippleAddress
|
||||||
*/
|
*/
|
||||||
message RippleGetAddress {
|
message RippleGetAddress {
|
||||||
@ -15,7 +16,7 @@ message RippleGetAddress {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Address for the given index
|
* Response: Address for the given index
|
||||||
* @prev RippleGetAddress
|
* @end
|
||||||
*/
|
*/
|
||||||
message RippleAddress {
|
message RippleAddress {
|
||||||
optional string address = 1; // Address in Ripple format (base58 of a pubkey with checksum)
|
optional string address = 1; // Address in Ripple format (base58 of a pubkey with checksum)
|
||||||
@ -23,6 +24,7 @@ message RippleAddress {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: ask device to sign Ripple transaction
|
* Request: ask device to sign Ripple transaction
|
||||||
|
* @start
|
||||||
* @next RippleSignedTx
|
* @next RippleSignedTx
|
||||||
*/
|
*/
|
||||||
message RippleSignTx {
|
message RippleSignTx {
|
||||||
@ -47,7 +49,7 @@ message RippleSignTx {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: signature for transaction
|
* Response: signature for transaction
|
||||||
* @prev RippleSignTx
|
* @end
|
||||||
*/
|
*/
|
||||||
message RippleSignedTx {
|
message RippleSignedTx {
|
||||||
optional bytes signature = 1;
|
optional bytes signature = 1;
|
||||||
|
@ -6,6 +6,7 @@ option java_outer_classname = "TrezorMessageStellar";
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes a Stellar asset
|
* Describes a Stellar asset
|
||||||
|
* @embed
|
||||||
*/
|
*/
|
||||||
message StellarAssetType {
|
message StellarAssetType {
|
||||||
optional uint32 type = 1; // 0 = native asset (XLM), 1 = alphanum 4, 2 = alphanum 12
|
optional uint32 type = 1; // 0 = native asset (XLM), 1 = alphanum 4, 2 = alphanum 12
|
||||||
@ -13,25 +14,9 @@ message StellarAssetType {
|
|||||||
optional string issuer = 3; // issuing address
|
optional string issuer = 3; // issuing address
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Request: Public key at the specified index
|
|
||||||
* @next StellarPublicKey
|
|
||||||
*/
|
|
||||||
message StellarGetPublicKey {
|
|
||||||
repeated uint32 address_n = 1; // BIP-32 path. For compatibility with other wallets, must be m/44'/148'/index'
|
|
||||||
optional bool show_display = 2; // optionally show on display before sending the result
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Response: Public key for the given index
|
|
||||||
* @prev StellarGetPublicKey
|
|
||||||
*/
|
|
||||||
message StellarPublicKey {
|
|
||||||
optional bytes public_key = 1; // Raw bytes of the public key (no version or checksum)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Address at the specified index
|
* Request: Address at the specified index
|
||||||
|
* @start
|
||||||
* @next StellarAddress
|
* @next StellarAddress
|
||||||
*/
|
*/
|
||||||
message StellarGetAddress {
|
message StellarGetAddress {
|
||||||
@ -41,12 +26,30 @@ message StellarGetAddress {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Address for the given index
|
* Response: Address for the given index
|
||||||
* @prev StellarGetAddress
|
* @end
|
||||||
*/
|
*/
|
||||||
message StellarAddress {
|
message StellarAddress {
|
||||||
optional string address = 1; // Address in Stellar format (base32 of a pubkey with checksum)
|
optional string address = 1; // Address in Stellar format (base32 of a pubkey with checksum)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Public key at the specified index
|
||||||
|
* @start
|
||||||
|
* @next StellarPublicKey
|
||||||
|
*/
|
||||||
|
message StellarGetPublicKey {
|
||||||
|
repeated uint32 address_n = 1; // BIP-32 path. For compatibility with other wallets, must be m/44'/148'/index'
|
||||||
|
optional bool show_display = 2; // optionally show on display before sending the result
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response: Public key for the given index
|
||||||
|
* @end
|
||||||
|
*/
|
||||||
|
message StellarPublicKey {
|
||||||
|
optional bytes public_key = 1; // Raw bytes of the public key (no version or checksum)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: ask device to sign Stellar transaction
|
* Request: ask device to sign Stellar transaction
|
||||||
* @next StellarTxOpRequest
|
* @next StellarTxOpRequest
|
||||||
@ -68,7 +71,6 @@ message StellarSignTx {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: device is ready for client to send the next operation
|
* Response: device is ready for client to send the next operation
|
||||||
* @prev StellarSignTx
|
|
||||||
* @next StellarPaymentOp
|
* @next StellarPaymentOp
|
||||||
* @next StellarCreateAccountOp
|
* @next StellarCreateAccountOp
|
||||||
* @next StellarPathPaymentOp
|
* @next StellarPathPaymentOp
|
||||||
@ -86,7 +88,6 @@ message StellarTxOpRequest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: ask device to confirm this operation type
|
* Request: ask device to confirm this operation type
|
||||||
* @prev StellarTxOpRequest
|
|
||||||
* @next StellarTxOpRequest
|
* @next StellarTxOpRequest
|
||||||
* @next StellarSignedTx
|
* @next StellarSignedTx
|
||||||
*/
|
*/
|
||||||
@ -99,7 +100,6 @@ message StellarPaymentOp {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: ask device to confirm this operation type
|
* Request: ask device to confirm this operation type
|
||||||
* @prev StellarTxOpRequest
|
|
||||||
* @next StellarTxOpRequest
|
* @next StellarTxOpRequest
|
||||||
* @next StellarSignedTx
|
* @next StellarSignedTx
|
||||||
*/
|
*/
|
||||||
@ -111,7 +111,6 @@ message StellarCreateAccountOp {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: ask device to confirm this operation type
|
* Request: ask device to confirm this operation type
|
||||||
* @prev StellarTxOpRequest
|
|
||||||
* @next StellarTxOpRequest
|
* @next StellarTxOpRequest
|
||||||
* @next StellarSignedTx
|
* @next StellarSignedTx
|
||||||
*/
|
*/
|
||||||
@ -127,7 +126,6 @@ message StellarPathPaymentOp {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: ask device to confirm this operation type
|
* Request: ask device to confirm this operation type
|
||||||
* @prev StellarTxOpRequest
|
|
||||||
* @next StellarTxOpRequest
|
* @next StellarTxOpRequest
|
||||||
* @next StellarSignedTx
|
* @next StellarSignedTx
|
||||||
*/
|
*/
|
||||||
@ -143,7 +141,6 @@ message StellarManageOfferOp {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: ask device to confirm this operation type
|
* Request: ask device to confirm this operation type
|
||||||
* @prev StellarTxOpRequest
|
|
||||||
* @next StellarTxOpRequest
|
* @next StellarTxOpRequest
|
||||||
* @next StellarSignedTx
|
* @next StellarSignedTx
|
||||||
*/
|
*/
|
||||||
@ -158,7 +155,6 @@ message StellarCreatePassiveOfferOp {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: ask device to confirm this operation type
|
* Request: ask device to confirm this operation type
|
||||||
* @prev StellarTxOpRequest
|
|
||||||
* @next StellarTxOpRequest
|
* @next StellarTxOpRequest
|
||||||
* @next StellarSignedTx
|
* @next StellarSignedTx
|
||||||
*/
|
*/
|
||||||
@ -179,7 +175,6 @@ message StellarSetOptionsOp {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: ask device to confirm this operation type
|
* Request: ask device to confirm this operation type
|
||||||
* @prev StellarTxOpRequest
|
|
||||||
* @next StellarTxOpRequest
|
* @next StellarTxOpRequest
|
||||||
* @next StellarSignedTx
|
* @next StellarSignedTx
|
||||||
*/
|
*/
|
||||||
@ -191,7 +186,6 @@ message StellarChangeTrustOp {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: ask device to confirm this operation type
|
* Request: ask device to confirm this operation type
|
||||||
* @prev StellarTxOpRequest
|
|
||||||
* @next StellarTxOpRequest
|
* @next StellarTxOpRequest
|
||||||
* @next StellarSignedTx
|
* @next StellarSignedTx
|
||||||
*/
|
*/
|
||||||
@ -205,7 +199,6 @@ message StellarAllowTrustOp {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: ask device to confirm this operation type
|
* Request: ask device to confirm this operation type
|
||||||
* @prev StellarTxOpRequest
|
|
||||||
* @next StellarTxOpRequest
|
* @next StellarTxOpRequest
|
||||||
* @next StellarSignedTx
|
* @next StellarSignedTx
|
||||||
*/
|
*/
|
||||||
@ -216,7 +209,6 @@ message StellarAccountMergeOp {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: ask device to confirm this operation type
|
* Request: ask device to confirm this operation type
|
||||||
* @prev StellarTxOpRequest
|
|
||||||
* @next StellarTxOpRequest
|
* @next StellarTxOpRequest
|
||||||
* @next StellarSignedTx
|
* @next StellarSignedTx
|
||||||
*/
|
*/
|
||||||
@ -228,7 +220,6 @@ message StellarManageDataOp {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: ask device to confirm this operation type
|
* Request: ask device to confirm this operation type
|
||||||
* @prev StellarTxOpRequest
|
|
||||||
* @next StellarTxOpRequest
|
* @next StellarTxOpRequest
|
||||||
* @next StellarSignedTx
|
* @next StellarSignedTx
|
||||||
*/
|
*/
|
||||||
@ -239,17 +230,7 @@ message StellarBumpSequenceOp {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: signature for transaction
|
* Response: signature for transaction
|
||||||
* @prev StellarPaymentOp
|
* @end
|
||||||
* @prev StellarCreateAccountOp
|
|
||||||
* @prev StellarPathPaymentOp
|
|
||||||
* @prev StellarManageOfferOp
|
|
||||||
* @prev StellarCreatePassiveOfferOp
|
|
||||||
* @prev StellarSetOptionsOp
|
|
||||||
* @prev StellarChangeTrustOp
|
|
||||||
* @prev StellarAllowTrustOp
|
|
||||||
* @prev StellarAccountMergeOp
|
|
||||||
* @prev StellarManageDataOp
|
|
||||||
* @prev StellarBumpSequenceOp
|
|
||||||
*/
|
*/
|
||||||
message StellarSignedTx {
|
message StellarSignedTx {
|
||||||
optional bytes public_key = 1; // public key for the private key used to sign data
|
optional bytes public_key = 1; // public key for the private key used to sign data
|
||||||
|
@ -6,7 +6,7 @@ option java_outer_classname = "TrezorMessageTezos";
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device for Tezos address corresponding to address_n path
|
* Request: Ask device for Tezos address corresponding to address_n path
|
||||||
* @next PassphraseRequest
|
* @start
|
||||||
* @next TezosAddress
|
* @next TezosAddress
|
||||||
* @next Failure
|
* @next Failure
|
||||||
*/
|
*/
|
||||||
@ -17,14 +17,33 @@ message TezosGetAddress {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Contains Tezos address derived from device private seed
|
* Response: Contains Tezos address derived from device private seed
|
||||||
* @prev TezosGetAddress
|
* @end
|
||||||
*/
|
*/
|
||||||
message TezosAddress {
|
message TezosAddress {
|
||||||
optional string address = 1; // Coin address in Base58 encoding
|
optional string address = 1; // Coin address in Base58 encoding
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Ask device for Tezos public key corresponding to address_n path
|
||||||
|
* @start
|
||||||
|
* @next TezosPublicKey
|
||||||
|
*/
|
||||||
|
message TezosGetPublicKey {
|
||||||
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
|
optional bool show_display = 2; // Optionally show on display before sending the result
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response: Contains Tezos public key derived from device private seed
|
||||||
|
* @end
|
||||||
|
*/
|
||||||
|
message TezosPublicKey {
|
||||||
|
optional bytes public_key = 1; // Tezos public key
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device to sign Tezos transaction
|
* Request: Ask device to sign Tezos transaction
|
||||||
|
* @start
|
||||||
* @next TezosSignedTx
|
* @next TezosSignedTx
|
||||||
*/
|
*/
|
||||||
message TezosSignTx {
|
message TezosSignTx {
|
||||||
@ -95,28 +114,11 @@ message TezosSignTx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response: Contains Tezos transaction signature
|
* Response: Contains Tezos transaction signature
|
||||||
* @prev TezosSignTx
|
* @end
|
||||||
*/
|
*/
|
||||||
message TezosSignedTx {
|
message TezosSignedTx {
|
||||||
optional bytes signature = 1; // Tezos transaction signature
|
optional bytes signature = 1; // Tezos transaction signature
|
||||||
optional bytes sig_op_contents = 2; // Signed operation contents
|
optional bytes sig_op_contents = 2; // Signed operation contents
|
||||||
optional string operation_hash = 3; // b58 check encoded blake2b hashed operation contents
|
optional string operation_hash = 3; // b58 check encoded blake2b hashed operation contents
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Request: Ask device for Tezos public key corresponding to address_n path
|
|
||||||
* @next TezosPublicKey
|
|
||||||
*/
|
|
||||||
message TezosGetPublicKey {
|
|
||||||
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
|
||||||
optional bool show_display = 2; // Optionally show on display before sending the result
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Response: Contains Tezos public key derived from device private seed
|
|
||||||
* @prev TezosGetPublicKey
|
|
||||||
*/
|
|
||||||
message TezosPublicKey {
|
|
||||||
optional bytes public_key = 1; // Tezos public key
|
|
||||||
}
|
|
||||||
|
@ -155,7 +155,7 @@ enum MessageType {
|
|||||||
MessageType_StellarChangeTrustOp = 216 [(wire_in) = true];
|
MessageType_StellarChangeTrustOp = 216 [(wire_in) = true];
|
||||||
MessageType_StellarAllowTrustOp = 217 [(wire_in) = true];
|
MessageType_StellarAllowTrustOp = 217 [(wire_in) = true];
|
||||||
MessageType_StellarAccountMergeOp = 218 [(wire_in) = true];
|
MessageType_StellarAccountMergeOp = 218 [(wire_in) = true];
|
||||||
// Omitted: inflation is not a supported operation, would be 219
|
// omitted: StellarInflationOp is not a supported operation, would be 219
|
||||||
MessageType_StellarManageDataOp = 220 [(wire_in) = true];
|
MessageType_StellarManageDataOp = 220 [(wire_in) = true];
|
||||||
MessageType_StellarBumpSequenceOp = 221 [(wire_in) = true];
|
MessageType_StellarBumpSequenceOp = 221 [(wire_in) = true];
|
||||||
MessageType_StellarSignedTx = 230 [(wire_out) = true];
|
MessageType_StellarSignedTx = 230 [(wire_out) = true];
|
||||||
|
Loading…
Reference in New Issue
Block a user