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;
|
|
|
|
|
|
|
|
Echo = 0x01;
|
|
|
|
Flush = 0x02;
|
|
|
|
Info = 0x03;
|
|
|
|
SetOption = 0x04;
|
|
|
|
Exception = 0x05;
|
|
|
|
AppendTx = 0x11;
|
|
|
|
CheckTx = 0x12;
|
|
|
|
GetHash = 0x13;
|
|
|
|
Query = 0x14;
|
|
|
|
}
|
2016-01-30 19:36:33 -08:00
|
|
|
|
2016-01-31 20:39:43 -08:00
|
|
|
//----------------------------------------
|
|
|
|
// Code types
|
|
|
|
|
|
|
|
enum CodeType {
|
|
|
|
OK = 0;
|
|
|
|
InternalError = 1;
|
|
|
|
Unauthorized = 2;
|
|
|
|
InsufficientFees = 3;
|
|
|
|
UnknownRequest = 4;
|
|
|
|
EncodingError = 5;
|
|
|
|
BadNonce = 6;
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------
|
|
|
|
// 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;
|
2016-01-31 20:39:43 -08:00
|
|
|
CodeType code = 3;
|
2016-01-30 19:36:33 -08:00
|
|
|
string error = 4;
|
|
|
|
string log = 5;
|
|
|
|
}
|
2016-01-31 19:56:02 -08:00
|
|
|
|