github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/protobuf/keys.proto (about)

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