mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 21:09:11 +00:00
69 lines
2.1 KiB
Protocol Buffer
69 lines
2.1 KiB
Protocol Buffer
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";
|
|
}
|
|
|
|
// Resolve queries the DID document by its id.
|
|
rpc ResolveIdentifier(QueryResolveRequest) returns (QueryResolveResponse) {
|
|
option (google.api.http).get = "/did/resolve/{id}";
|
|
}
|
|
|
|
// LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow.
|
|
rpc WitnessCredential(QueryWitnessCredentialRequest) returns (QueryWitnessCredentialResponse) {
|
|
option (google.api.http).get = "/did/assertion/{id}/witness";
|
|
}
|
|
}
|
|
|
|
// 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.
|
|
message QueryWitnessCredentialRequest {
|
|
string id = 1;
|
|
}
|
|
|
|
// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method.
|
|
message QueryWitnessCredentialResponse {
|
|
// options is the PublicKeyCredentialAttestationOptions
|
|
string options = 1;
|
|
}
|
|
|