sonr/proto/did/v1/query.proto

69 lines
2.1 KiB
Protocol Buffer
Raw Normal View History

2024-07-05 22:20:13 -04:00
syntax = "proto3";
package did.v1;
import "google/api/annotations.proto";
import "did/v1/genesis.proto";
option go_package = "github.com/onsonr/hway/x/did/types";
// Query provides defines the gRPC querier service.
service Query {
// Params queries all parameters of the module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/did/params";
}
2024-07-08 22:57:53 -04:00
// Resolve queries the DID document by its id.
2024-07-05 22:20:13 -04:00
rpc ResolveIdentifier(QueryResolveRequest) returns (QueryResolveResponse) {
option (google.api.http).get = "/did/resolve/{id}";
}
// LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow.
2024-07-08 22:57:53 -04:00
rpc WitnessCredential(QueryWitnessCredentialRequest) returns (QueryWitnessCredentialResponse) {
option (google.api.http).get = "/did/assertion/{id}/witness";
2024-07-05 22:20:13 -04:00
}
}
// QueryParamsRequest is the request type for the Query/Params RPC method.
message QueryParamsRequest {}
// QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse {
// params defines the parameters of the module.
Params params = 1;
}
// QueryExistsRequest is the request type for the Query/Exists RPC method.
message QueryExistsRequest {
string kind = 1;
string value = 2;
}
// QueryExistsResponse is the response type for the Query/Exists RPC method.
message QueryExistsResponse {
bool exists = 1;
}
// QueryResolveRequest is the request type for the Query/Resolve RPC method.
message QueryResolveRequest {
string id = 1;
}
// QueryResolveResponse is the response type for the Query/Resolve RPC method.
message QueryResolveResponse {
// document is the DID document
string document = 1;
}
// QueryLoginOptionsRequest is the request type for the Query/LoginOptions RPC method.
2024-07-23 14:18:15 -04:00
message QueryWitnessCredentialRequest {
string id = 1;
2024-07-05 22:20:13 -04:00
}
// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method.
2024-07-23 14:18:15 -04:00
message QueryWitnessCredentialResponse {
2024-07-05 22:20:13 -04:00
// options is the PublicKeyCredentialAttestationOptions
string options = 1;
}