syntax = "proto3"; package did.v1; import "did/v1/genesis.proto"; import "did/v1/models.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 (QueryResponse) { option (google.api.http).get = "/did/params"; } // Resolve queries the DID document by its id. rpc Resolve(QueryRequest) returns (QueryResponse) { option (google.api.http).get = "/did/{did}"; } // Service returns associated ServiceInfo for a given Origin // if the servie is not found, a fingerprint is generated to be used // as a TXT record in DNS. v=sonr, o=origin, p=protocol rpc Service(QueryRequest) returns (QueryResponse) { option (google.api.http).get = "/service/{origin}"; } } // Queryequest is the request type for the Query/Params RPC method. message QueryRequest { string did = 1; string origin = 2; } // QueryResolveResponse is the response type for the Query/Resolve RPC method. message QueryResponse { bool success = 1; string query = 2; Document document = 3; ServiceInfo service = 4; Params params = 5; }