mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-16 11:28:14 +00:00
Tezos integration (#139)
This commit is contained in:
parent
6eb330345e
commit
7b13d2e886
@ -126,6 +126,14 @@ enum MessageType {
|
|||||||
MessageType_LiskGetPublicKey = 121 [(wire_in) = true];
|
MessageType_LiskGetPublicKey = 121 [(wire_in) = true];
|
||||||
MessageType_LiskPublicKey = 122 [(wire_out) = true];
|
MessageType_LiskPublicKey = 122 [(wire_out) = true];
|
||||||
|
|
||||||
|
// Tezos
|
||||||
|
MessageType_TezosGetAddress = 150 [(wire_in) = true];
|
||||||
|
MessageType_TezosAddress = 151 [(wire_out) = true];
|
||||||
|
MessageType_TezosSignTx = 152 [(wire_in) = true];
|
||||||
|
MessageType_TezosSignedTx = 153 [(wire_out) = true];
|
||||||
|
MessageType_TezosGetPublicKey = 154 [(wire_in) = true];
|
||||||
|
MessageType_TezosPublicKey = 155 [(wire_out) = true];
|
||||||
|
|
||||||
// Stellar
|
// Stellar
|
||||||
MessageType_StellarGetPublicKey = 200 [(wire_in) = true];
|
MessageType_StellarGetPublicKey = 200 [(wire_in) = true];
|
||||||
MessageType_StellarPublicKey = 201 [(wire_out) = true];
|
MessageType_StellarPublicKey = 201 [(wire_out) = true];
|
||||||
@ -1364,6 +1372,65 @@ message LiskVerifyMessage {
|
|||||||
optional bytes message = 3;
|
optional bytes message = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Ask device for Tezos address corresponding to address_n path
|
||||||
|
* @next PassphraseRequest
|
||||||
|
* @next TezosAddress
|
||||||
|
* @next Failure
|
||||||
|
*/
|
||||||
|
message TezosGetAddress {
|
||||||
|
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 address derived from device private seed
|
||||||
|
* @prev TezosGetAddress
|
||||||
|
*/
|
||||||
|
message TezosAddress {
|
||||||
|
optional string address = 1; // Coin address in Base58 encoding
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Ask device to sign Tezos transaction
|
||||||
|
* @next TezosSignedTx
|
||||||
|
*/
|
||||||
|
message TezosSignTx {
|
||||||
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
|
optional TezosOperationCommon operation = 2; // Tezos operation structure
|
||||||
|
optional TezosTransactionType transaction = 3; // Tezos transaction part
|
||||||
|
optional TezosOriginationType origination = 4; // Tezos origination part
|
||||||
|
optional TezosDelegationType delegation = 5; // Tezos delegation part
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response: Contains Tezos transaction signature
|
||||||
|
* @prev TezosSignTx
|
||||||
|
*/
|
||||||
|
message TezosSignedTx {
|
||||||
|
optional bytes signature = 1; // Tezos transaction signature
|
||||||
|
optional bytes sig_op_contents = 2; // Signed 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
|
||||||
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////
|
||||||
// Debug messages (only available if DebugLink is enabled) //
|
// Debug messages (only available if DebugLink is enabled) //
|
||||||
/////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////
|
||||||
|
@ -512,6 +512,79 @@ message LiskMultisignatureType {
|
|||||||
repeated string keys_group = 3;
|
repeated string keys_group = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type of Tezos operation
|
||||||
|
* @used_in TezosOperationCommon
|
||||||
|
*/
|
||||||
|
enum TezosOperationType {
|
||||||
|
Transaction = 8;
|
||||||
|
Origination = 9;
|
||||||
|
Delegation = 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type of Tezos Contract type
|
||||||
|
* @used_in TezosContractID
|
||||||
|
*/
|
||||||
|
enum TezosContractType {
|
||||||
|
Implicit = 0;
|
||||||
|
Originated = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Tezos contract ID
|
||||||
|
* @used_in TezosOperationCommon
|
||||||
|
* @used_in TezosTransactionType
|
||||||
|
*/
|
||||||
|
message TezosContractID {
|
||||||
|
optional TezosContractType tag = 1;
|
||||||
|
optional bytes hash = 2; // Implicit = 21B, originated = 20B + 1B padding
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Structure representing the common part for Tezos operations
|
||||||
|
* @used_in TezosSignTx
|
||||||
|
*/
|
||||||
|
message TezosOperationCommon {
|
||||||
|
optional bytes branch = 1;
|
||||||
|
optional TezosOperationType tag = 2;
|
||||||
|
optional TezosContractID source = 3;
|
||||||
|
optional uint64 fee = 4;
|
||||||
|
optional uint64 counter = 5;
|
||||||
|
optional uint64 gas_limit = 6;
|
||||||
|
optional uint64 storage_limit = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Structure representing additional information for transaction
|
||||||
|
* @used_in TezosSignTx
|
||||||
|
*/
|
||||||
|
message TezosTransactionType {
|
||||||
|
optional uint64 amount = 1;
|
||||||
|
optional TezosContractID destination = 2;
|
||||||
|
optional bytes parameters = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Structure representing additional information for origination
|
||||||
|
* @used_in TezosSignTx
|
||||||
|
*/
|
||||||
|
message TezosOriginationType {
|
||||||
|
optional bytes manager_pubkey = 1;
|
||||||
|
optional uint64 balance = 2;
|
||||||
|
optional bool spendable = 3;
|
||||||
|
optional bool delegatable = 4;
|
||||||
|
optional bytes delegate = 5; // 1B tag + 20B public key hash
|
||||||
|
optional bytes script = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Structure representing additional information for delegation
|
||||||
|
* @used_in TezosSignTx
|
||||||
|
*/
|
||||||
|
message TezosDelegationType {
|
||||||
|
optional bytes delegate = 1; // 1B tag + 20B public key hash
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Structure representing cardano transaction input
|
* Structure representing cardano transaction input
|
||||||
* @used_in CardanoSignTransacion
|
* @used_in CardanoSignTransacion
|
||||||
@ -531,4 +604,5 @@ message CardanoTxOutputType {
|
|||||||
optional string address = 1; // target coin address in Base58 encoding
|
optional string address = 1; // target coin address in Base58 encoding
|
||||||
repeated uint32 address_n = 2; // BIP-32 path to derive the key from master node; has higher priority than "address"
|
repeated uint32 address_n = 2; // BIP-32 path to derive the key from master node; has higher priority than "address"
|
||||||
optional uint64 amount = 3; // amount to spend
|
optional uint64 amount = 3; // amount to spend
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user