You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.3 KiB

  1. syntax = "proto3";
  2. package types;
  3. // This file is copied from http://github.com/tendermint/tmsp
  4. //----------------------------------------
  5. // Message types
  6. enum MessageType {
  7. NullMessage = 0x00;
  8. Echo = 0x01;
  9. Flush = 0x02;
  10. Info = 0x03;
  11. SetOption = 0x04;
  12. Exception = 0x05;
  13. AppendTx = 0x11;
  14. CheckTx = 0x12;
  15. Commit = 0x13;
  16. Query = 0x14;
  17. }
  18. //----------------------------------------
  19. // Code types
  20. enum CodeType {
  21. OK = 0;
  22. InternalError = 1;
  23. Unauthorized = 2;
  24. InsufficientFees = 3;
  25. UnknownRequest = 4;
  26. EncodingError = 5;
  27. BadNonce = 6;
  28. UnknownAccount = 7;
  29. InsufficientFunds = 8;
  30. }
  31. //----------------------------------------
  32. // Request types
  33. message Request {
  34. MessageType type = 1;
  35. bytes data = 2;
  36. string key = 3;
  37. string value = 4;
  38. }
  39. //----------------------------------------
  40. // Response types
  41. message Response {
  42. MessageType type = 1;
  43. bytes data = 2;
  44. CodeType code = 3;
  45. string error = 4;
  46. string log = 5;
  47. }