syntax = "proto3";
package secret.registration.v1beta1;

import "gogoproto/gogo.proto";
import "google/protobuf/empty.proto";
import "google/api/annotations.proto";
import "secret/registration/v1beta1/msg.proto";
import "secret/registration/v1beta1/genesis.proto";

option go_package                       = "github.com/enigmampc/SecretNetwork/x/registration/internal/types";
option (gogoproto.goproto_getters_all)  = false;
option (gogoproto.equal_all)            = true;

// Query provides defines the gRPC querier service
service Query {
  // Returns the key used for transactions
  rpc TxKey (google.protobuf.Empty) returns (Key) {
    option (google.api.http).get = "/registration/v1beta1/tx-key";
  }
  // Returns the key used for registration
  rpc RegistrationKey (google.protobuf.Empty) returns (Key) {
    option (google.api.http).get = "/registration/v1beta1/registration-key";
  }

  // Returns the encrypted seed for a registered node by public key
  rpc EncryptedSeed (QueryEncryptedSeedRequest) returns (QueryEncryptedSeedResponse) {
    option (google.api.http).get = "/registration/v1beta1/encrypted-seed/{pub_key}";
  }
}

message QueryEncryptedSeedRequest {
  bytes pub_key = 1;
}

message QueryEncryptedSeedResponse {
  bytes encrypted_seed = 1; // [(gogoproto.nullable) = false];
}


