syntax = "proto3";
package did.v1;

import "did/v1/genesis.proto";
import "google/api/annotations.proto";

option go_package = "github.com/onsonr/sonr/x/did/types";

// Query provides defines the gRPC querier service.
service Query {
  // Params queries all parameters of the module.
  rpc Params(QueryRequest) returns (QueryParamsResponse) {
    option (google.api.http).get = "/params";
  }

  // Resolve queries the DID document by its id.
  rpc Resolve(QueryRequest) returns (QueryResolveResponse) {
    option (google.api.http).get = "/did/{did}";
  }
}

// Queryequest is the request type for the Query/Params RPC method.
message QueryRequest {
  string did = 1;
  string origin = 2;
  string key = 3;
  string asset = 4;
}

// QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse {
  // params defines the parameters of the module.
  Params params = 1;
}

// QueryResolveResponse is the response type for the Query/Resolve RPC method.
message QueryResolveResponse {
  // document is the DID document
  Document document = 1;
}
