common.proto 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. syntax = "proto3";
  2. option go_package = "./pb";
  3. package pb;
  4. import "google/protobuf/any.proto";
  5. message Request {
  6. // 请求信息
  7. google.protobuf.Any body = 1;
  8. // 认证信息
  9. AuthInfo auth_info = 2;
  10. // 签名结果
  11. repeated string signatures = 3;
  12. }
  13. // 交易体
  14. message TxBody {
  15. repeated google.protobuf.Any messages = 1; // 具体交易类型
  16. }
  17. // 认证信息
  18. message AuthInfo {
  19. string memo = 1;
  20. string uuid = 2; // 用户交易唯一标识
  21. string chain_id = 3; // 子链 ID
  22. repeated SignerInfos signer_infos = 4; // 签名者信息
  23. }
  24. message SignerInfos {
  25. // 签名者公钥
  26. PublicKey public_key = 1;
  27. // 用户交易唯一标识
  28. string uuid = 2;
  29. // 指定子链
  30. string chain_id = 3;
  31. }
  32. message PublicKey {
  33. // 签名方法
  34. string type = 1;
  35. // 公钥
  36. string key = 2;
  37. }
  38. message Response {
  39. // 结果码
  40. string code = 1;
  41. // 结果消息
  42. string msg = 2;
  43. // 结果详情
  44. google.protobuf.Any data = 3;
  45. }
  46. enum OrderType {
  47. // 升序
  48. ASC = 0;
  49. // 降序
  50. DESC = 1;
  51. }
  52. // 用户状态
  53. enum Status {
  54. DISABLED = 0;
  55. ENABLED = 1;
  56. }