2018-07-04 14:44:26 +00:00
|
|
|
syntax = "proto2";
|
2018-07-29 14:17:00 +00:00
|
|
|
package hw.trezor.messages.tezos;
|
2018-07-04 14:44:26 +00:00
|
|
|
|
|
|
|
// Sugar for easier handling in Java
|
|
|
|
option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
|
|
|
option java_outer_classname = "TrezorMessageTezos";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Request: Ask device for Tezos address corresponding to address_n path
|
2018-07-16 14:51:03 +00:00
|
|
|
* @start
|
2018-07-04 14:44:26 +00:00
|
|
|
* @next TezosAddress
|
|
|
|
* @next Failure
|
|
|
|
*/
|
|
|
|
message TezosGetAddress {
|
|
|
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
2018-09-05 14:42:24 +00:00
|
|
|
optional bool show_display = 2; // optionally show on display before sending the result
|
2023-09-14 10:19:14 +00:00
|
|
|
optional bool chunkify = 3; // display the address in chunks of 4 characters
|
2018-07-04 14:44:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Response: Contains Tezos address derived from device private seed
|
2018-07-16 14:51:03 +00:00
|
|
|
* @end
|
2018-07-04 14:44:26 +00:00
|
|
|
*/
|
|
|
|
message TezosAddress {
|
2021-01-14 11:05:03 +00:00
|
|
|
required string address = 1; // Coin address in Base58 encoding
|
2018-07-04 14:44:26 +00:00
|
|
|
}
|
|
|
|
|
2018-07-16 14:51:03 +00:00
|
|
|
/**
|
|
|
|
* Request: Ask device for Tezos public key corresponding to address_n path
|
|
|
|
* @start
|
|
|
|
* @next TezosPublicKey
|
|
|
|
*/
|
2018-07-16 16:19:46 +00:00
|
|
|
message TezosGetPublicKey {
|
2018-07-16 14:51:03 +00:00
|
|
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
2018-09-05 14:42:24 +00:00
|
|
|
optional bool show_display = 2; // Optionally show on display before sending the result
|
2023-09-14 10:19:14 +00:00
|
|
|
optional bool chunkify = 3; // display the public key in chunks of 4 characters
|
2018-07-16 14:51:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Response: Contains Tezos public key derived from device private seed
|
|
|
|
* @end
|
|
|
|
*/
|
|
|
|
message TezosPublicKey {
|
2021-01-14 11:05:03 +00:00
|
|
|
required string public_key = 1; // b58 encoded Tezos public key with prefix
|
2018-07-16 14:51:03 +00:00
|
|
|
}
|
|
|
|
|
2018-07-04 14:44:26 +00:00
|
|
|
/**
|
|
|
|
* Request: Ask device to sign Tezos transaction
|
2018-07-16 14:51:03 +00:00
|
|
|
* @start
|
2018-07-04 14:44:26 +00:00
|
|
|
* @next TezosSignedTx
|
|
|
|
*/
|
|
|
|
message TezosSignTx {
|
|
|
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
2021-01-14 11:05:03 +00:00
|
|
|
required bytes branch = 2;
|
2018-08-13 15:45:36 +00:00
|
|
|
|
2018-09-05 14:42:24 +00:00
|
|
|
optional TezosRevealOp reveal = 3; // Tezos reveal operation (may be bundled with other op)
|
|
|
|
optional TezosTransactionOp transaction = 4; // Tezos transaction operation
|
|
|
|
optional TezosOriginationOp origination = 5; // Tezos origination operation
|
|
|
|
optional TezosDelegationOp delegation = 6; // Tezos delegation operation
|
2019-03-15 09:53:25 +00:00
|
|
|
optional TezosProposalOp proposal = 7; // Tezos proposal operation
|
|
|
|
optional TezosBallotOp ballot = 8; // Tezos ballot operation
|
2023-09-14 10:19:14 +00:00
|
|
|
optional bool chunkify = 9; // display the address in chunks of 4 characters
|
|
|
|
|
2018-07-04 14:44:26 +00:00
|
|
|
/*
|
2018-08-13 15:45:36 +00:00
|
|
|
* Tezos contract ID
|
|
|
|
*/
|
2018-07-04 14:44:26 +00:00
|
|
|
message TezosContractID {
|
2021-01-14 11:05:03 +00:00
|
|
|
required TezosContractType tag = 1;
|
|
|
|
required bytes hash = 2; // Implicit = 21B, originated = 20B + 1B padding
|
2018-07-04 14:44:26 +00:00
|
|
|
/*
|
2018-08-13 15:45:36 +00:00
|
|
|
* Type of Tezos Contract type
|
|
|
|
*/
|
2018-07-04 14:44:26 +00:00
|
|
|
enum TezosContractType {
|
|
|
|
Implicit = 0;
|
|
|
|
Originated = 1;
|
|
|
|
}
|
|
|
|
}
|
2018-08-13 15:45:36 +00:00
|
|
|
/**
|
|
|
|
* Structure representing information for reveal
|
2018-07-04 14:44:26 +00:00
|
|
|
*/
|
2018-08-13 15:45:36 +00:00
|
|
|
message TezosRevealOp {
|
2021-01-14 11:05:03 +00:00
|
|
|
required bytes source = 7;
|
|
|
|
required uint64 fee = 2;
|
|
|
|
required uint64 counter = 3;
|
|
|
|
required uint64 gas_limit = 4;
|
|
|
|
required uint64 storage_limit = 5;
|
|
|
|
required bytes public_key = 6;
|
2018-07-04 14:44:26 +00:00
|
|
|
}
|
2018-08-13 15:45:36 +00:00
|
|
|
/**
|
|
|
|
* Structure representing information for transaction
|
2018-07-04 14:44:26 +00:00
|
|
|
*/
|
2018-08-13 15:45:36 +00:00
|
|
|
message TezosTransactionOp {
|
2021-01-14 11:05:03 +00:00
|
|
|
required bytes source = 9;
|
|
|
|
required uint64 fee = 2;
|
|
|
|
required uint64 counter = 3;
|
|
|
|
required uint64 gas_limit = 4;
|
|
|
|
required uint64 storage_limit = 5;
|
|
|
|
required uint64 amount = 6;
|
|
|
|
required TezosContractID destination = 7;
|
2018-08-13 15:45:36 +00:00
|
|
|
optional bytes parameters = 8;
|
2019-09-16 04:35:26 +00:00
|
|
|
optional TezosParametersManager parameters_manager = 10;
|
|
|
|
|
|
|
|
message TezosParametersManager {
|
|
|
|
optional bytes set_delegate = 1;
|
|
|
|
optional bool cancel_delegate = 2;
|
|
|
|
optional TezosManagerTransfer transfer = 3;
|
|
|
|
|
|
|
|
message TezosManagerTransfer {
|
2021-12-08 09:10:58 +00:00
|
|
|
required TezosContractID destination = 1;
|
|
|
|
required uint64 amount = 2;
|
2019-09-16 04:35:26 +00:00
|
|
|
}
|
|
|
|
}
|
2018-07-04 14:44:26 +00:00
|
|
|
}
|
2018-08-13 15:45:36 +00:00
|
|
|
/**
|
|
|
|
* Structure representing information for origination
|
|
|
|
*/
|
|
|
|
message TezosOriginationOp {
|
2021-01-14 11:05:03 +00:00
|
|
|
required bytes source = 12;
|
|
|
|
required uint64 fee = 2;
|
|
|
|
required uint64 counter = 3;
|
|
|
|
required uint64 gas_limit = 4;
|
|
|
|
required uint64 storage_limit = 5;
|
2018-08-13 15:45:36 +00:00
|
|
|
optional bytes manager_pubkey = 6;
|
2021-01-14 11:05:03 +00:00
|
|
|
required uint64 balance = 7;
|
2018-08-13 15:45:36 +00:00
|
|
|
optional bool spendable = 8;
|
|
|
|
optional bool delegatable = 9;
|
|
|
|
optional bytes delegate = 10;
|
2021-01-14 11:05:03 +00:00
|
|
|
required bytes script = 11;
|
2018-07-04 14:44:26 +00:00
|
|
|
}
|
2018-08-13 15:45:36 +00:00
|
|
|
/**
|
|
|
|
* Structure representing information for delegation
|
|
|
|
*/
|
|
|
|
message TezosDelegationOp {
|
2021-01-14 11:05:03 +00:00
|
|
|
required bytes source = 7;
|
|
|
|
required uint64 fee = 2;
|
|
|
|
required uint64 counter = 3;
|
|
|
|
required uint64 gas_limit = 4;
|
|
|
|
required uint64 storage_limit = 5;
|
|
|
|
required bytes delegate = 6;
|
2018-07-04 14:44:26 +00:00
|
|
|
}
|
2019-03-15 09:53:25 +00:00
|
|
|
/**
|
|
|
|
* Structure representing information for proposal
|
|
|
|
*/
|
|
|
|
message TezosProposalOp {
|
2021-12-08 09:10:58 +00:00
|
|
|
required bytes source = 1; //Contains only public_key_hash, not to be confused with TezosContractID
|
|
|
|
required uint64 period = 2;
|
2019-04-16 17:20:40 +00:00
|
|
|
repeated bytes proposals = 4;
|
2019-03-15 09:53:25 +00:00
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Structure representing information for ballot
|
|
|
|
*/
|
|
|
|
message TezosBallotOp {
|
2021-12-08 09:10:58 +00:00
|
|
|
required bytes source = 1; //Contains only public_key_hash, not to be confused with TezosContractID
|
|
|
|
required uint64 period = 2;
|
|
|
|
required bytes proposal = 3;
|
|
|
|
required TezosBallotType ballot = 4;
|
2019-04-16 17:20:40 +00:00
|
|
|
|
|
|
|
enum TezosBallotType {
|
|
|
|
Yay = 0;
|
|
|
|
Nay = 1;
|
|
|
|
Pass = 2;
|
|
|
|
}
|
2019-03-15 09:53:25 +00:00
|
|
|
}
|
2018-07-04 14:44:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2018-07-16 14:51:03 +00:00
|
|
|
* Response: Contains Tezos transaction signature
|
|
|
|
* @end
|
|
|
|
*/
|
2018-07-04 14:44:26 +00:00
|
|
|
message TezosSignedTx {
|
2021-01-14 11:05:03 +00:00
|
|
|
required string signature = 1; // Tezos b58 encoded transaction signature with prefix
|
|
|
|
required bytes sig_op_contents = 2; // operation_bytes + signed operation_bytes
|
|
|
|
required string operation_hash = 3; // b58 encoded hashed operation contents with prefix
|
2018-07-04 14:44:26 +00:00
|
|
|
}
|