tendermint/types/types.proto

70 lines
1.6 KiB
Protocol Buffer
Raw Normal View History

2016-01-30 19:36:33 -08:00
syntax = "proto3";
package types;
2016-01-31 19:56:02 -08:00
// This file is copied from http://github.com/tendermint/tmsp
2016-01-30 19:36:33 -08:00
//----------------------------------------
// Message types
2016-01-31 19:56:02 -08:00
enum MessageType {
NullMessage = 0x00;
2016-02-28 18:53:24 -08:00
Echo = 0x01;
Flush = 0x02;
Info = 0x03;
SetOption = 0x04;
Exception = 0x05;
AppendTx = 0x11;
CheckTx = 0x12;
Commit = 0x13;
Query = 0x14;
2016-02-28 19:19:29 -08:00
InitValidators = 0x15;
SyncValidators = 0x16;
2016-01-31 19:56:02 -08:00
}
2016-01-30 19:36:33 -08:00
//----------------------------------------
// Code types
enum CodeType {
OK = 0;
InternalError = 1;
Unauthorized = 2;
InsufficientFees = 3;
UnknownRequest = 4;
EncodingError = 5;
BadNonce = 6;
2016-02-03 01:58:23 -08:00
UnknownAccount = 7;
InsufficientFunds = 8;
}
2016-01-30 19:36:33 -08:00
//----------------------------------------
// Request types
message Request {
2016-01-31 19:56:02 -08:00
MessageType type = 1;
2016-01-30 19:36:33 -08:00
bytes data = 2;
string key = 3;
string value = 4;
2016-02-28 18:53:24 -08:00
repeated Validator validators = 5;
2016-01-30 19:36:33 -08:00
}
//----------------------------------------
// Response types
message Response {
2016-01-31 19:56:02 -08:00
MessageType type = 1;
2016-01-30 19:36:33 -08:00
bytes data = 2;
CodeType code = 3;
2016-01-30 19:36:33 -08:00
string error = 4;
string log = 5;
2016-02-28 18:53:24 -08:00
repeated Validator validators = 6;
2016-01-30 19:36:33 -08:00
}
2016-01-31 19:56:02 -08:00
2016-02-28 18:53:24 -08:00
//----------------------------------------
// Misc types
message Validator {
bytes pubKey = 1;
uint64 power = 2;
}