sonr/proto/did/v1/query.proto

52 lines
1.4 KiB
Protocol Buffer

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;
}
// Document defines a DID document
message Document {
string id = 1;
string controller = 2; // The DID of the controller
repeated string authentication = 3;
repeated string assertion_method = 4;
repeated string capability_delegation = 5;
repeated string capability_invocation = 6;
repeated string service = 7;
}