github.com/Tri-stone/burrow@v0.25.0/protobuf/keys.proto (about)

     1  syntax = "proto3";
     2  
     3  option go_package = "github.com/hyperledger/burrow/keys";
     4  
     5  package keys;
     6  
     7  import "github.com/gogo/protobuf/gogoproto/gogo.proto";
     8  import "crypto.proto";
     9  
    10  option (gogoproto.marshaler_all) = true;
    11  option (gogoproto.unmarshaler_all) = true;
    12  option (gogoproto.sizer_all) = true;
    13  option (gogoproto.goproto_registration) = true;
    14  option (gogoproto.messagename_all) = true;
    15  
    16  service Keys {
    17      rpc GenerateKey(GenRequest) returns (GenResponse);
    18      rpc PublicKey(PubRequest) returns (PubResponse);
    19      rpc Sign(SignRequest) returns (SignResponse);
    20      rpc Verify(VerifyRequest) returns (VerifyResponse);
    21      rpc Import(ImportRequest) returns (ImportResponse);
    22      rpc ImportJSON(ImportJSONRequest) returns (ImportResponse);
    23      rpc Export(ExportRequest) returns (ExportResponse);
    24      rpc Hash(HashRequest) returns (HashResponse);
    25      rpc RemoveName(RemoveNameRequest) returns (RemoveNameResponse);
    26      rpc List(ListRequest) returns (ListResponse);
    27      rpc AddName(AddNameRequest) returns (AddNameResponse);
    28  }
    29  
    30  // Some empty types we may define later
    31  
    32  message ListRequest {
    33      string KeyName = 1;
    34  }
    35  
    36  message VerifyResponse {
    37  
    38  }
    39  
    40  message RemoveNameResponse {
    41  
    42  }
    43  
    44  message AddNameResponse {
    45  
    46  }
    47  
    48  message RemoveNameRequest {
    49      string KeyName = 1;
    50  }
    51  
    52  
    53  message GenRequest {
    54      string Passphrase = 1;
    55      string CurveType = 2;
    56      string KeyName = 3;
    57  }
    58  
    59  message GenResponse {
    60      string Address = 1;
    61  }
    62  
    63  message PubRequest {
    64      string Address = 1;
    65      string Name = 2;
    66  } 
    67  
    68  message PubResponse {
    69      bytes PublicKey = 1;
    70      string CurveType = 2;
    71  }
    72  
    73  message ImportJSONRequest {
    74      string Passphrase = 1;
    75      string JSON = 2;
    76  }
    77  
    78  message ImportResponse {
    79      string Address = 1;
    80  }
    81  
    82  message ImportRequest {
    83      string Passphrase = 1;
    84      string Name = 2;
    85      string CurveType = 3;
    86      bytes KeyBytes = 4;
    87  }
    88  
    89  message ExportRequest {
    90      string Passphrase = 1;
    91      string Name = 2;
    92      string Address = 3;
    93  }
    94  
    95  message ExportResponse {
    96      bytes Publickey = 1;
    97      bytes Privatekey = 2;
    98      bytes Address = 3;
    99      string CurveType = 4;
   100  }
   101  
   102  message SignRequest {
   103      string Passphrase = 1;
   104      string Address = 2;
   105      string Name = 3;
   106      bytes Message = 4;
   107  }
   108  
   109  message SignResponse {
   110      crypto.Signature Signature = 3;
   111  }
   112  
   113  message VerifyRequest {
   114      bytes PublicKey = 2;
   115      bytes Message = 3;
   116      crypto.Signature Signature = 5;
   117  }
   118  
   119  message HashRequest {
   120      string Hashtype = 1;
   121      bytes Message = 2;
   122  }
   123  
   124  message HashResponse {
   125      string Hash = 1;
   126  }
   127  
   128  message KeyID {
   129      string Address = 1;
   130      repeated string KeyName = 2;
   131  }
   132  
   133  message ListResponse {
   134      repeated KeyID key = 1;
   135  }
   136  
   137  message AddNameRequest {
   138      string Keyname = 1;
   139      string Address = 2;
   140  }