2024-07-05 22:20:13 -04:00
|
|
|
syntax = "proto3";
|
|
|
|
|
package did.v1;
|
|
|
|
|
|
|
|
|
|
import "did/v1/genesis.proto";
|
2024-08-31 12:49:44 -04:00
|
|
|
import "did/v1/models.proto";
|
2024-09-05 01:24:57 -04:00
|
|
|
import "google/api/annotations.proto";
|
2024-09-07 18:12:58 -04:00
|
|
|
import "google/api/httpbody.proto";
|
2024-07-05 22:20:13 -04:00
|
|
|
|
2024-09-05 01:24:57 -04:00
|
|
|
option go_package = "github.com/onsonr/sonr/x/did/types";
|
2024-07-05 22:20:13 -04:00
|
|
|
|
|
|
|
|
// Query provides defines the gRPC querier service.
|
|
|
|
|
service Query {
|
2024-09-05 01:24:57 -04:00
|
|
|
// Params queries all parameters of the module.
|
|
|
|
|
rpc Params(QueryRequest) returns (QueryParamsResponse) {
|
|
|
|
|
option (google.api.http).get = "/did/params";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Resolve queries the DID document by its id.
|
|
|
|
|
rpc Resolve(QueryRequest) returns (QueryResolveResponse) {
|
|
|
|
|
option (google.api.http).get = "/did/{did}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Service returns associated ServiceInfo for a given Origin
|
|
|
|
|
rpc Service(QueryRequest) returns (QueryServiceResponse) {
|
|
|
|
|
option (google.api.http).get = "/service/{origin}";
|
|
|
|
|
}
|
2024-07-05 22:20:13 -04:00
|
|
|
}
|
|
|
|
|
|
2024-09-05 01:24:57 -04:00
|
|
|
// Queryequest is the request type for the Query/Params RPC method.
|
|
|
|
|
message QueryRequest {
|
|
|
|
|
string did = 1;
|
|
|
|
|
string origin = 2;
|
|
|
|
|
string subject = 3;
|
2024-09-07 18:12:58 -04:00
|
|
|
string endpoint = 4;
|
2024-09-05 01:24:57 -04:00
|
|
|
}
|
2024-07-05 22:20:13 -04:00
|
|
|
|
|
|
|
|
// QueryParamsResponse is the response type for the Query/Params RPC method.
|
|
|
|
|
message QueryParamsResponse {
|
|
|
|
|
// params defines the parameters of the module.
|
|
|
|
|
Params params = 1;
|
2024-08-10 17:01:14 -04:00
|
|
|
}
|
|
|
|
|
|
2024-09-07 18:12:58 -04:00
|
|
|
// QueryResponse is the response type for the Query/Exists RPC method.
|
|
|
|
|
message QueryResponse {
|
2024-09-05 01:24:57 -04:00
|
|
|
bool success = 1;
|
|
|
|
|
string subject = 2;
|
|
|
|
|
string origin = 3;
|
2024-09-07 18:12:58 -04:00
|
|
|
bool ipfs_active = 4;
|
|
|
|
|
Params params = 5;
|
|
|
|
|
Document document = 6;
|
|
|
|
|
Service service = 7;
|
|
|
|
|
repeated Credential credentials = 8;
|
|
|
|
|
Token token = 9;
|
|
|
|
|
string error = 10;
|
2024-07-05 22:20:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// QueryResolveResponse is the response type for the Query/Resolve RPC method.
|
|
|
|
|
message QueryResolveResponse {
|
2024-09-07 18:12:58 -04:00
|
|
|
bool success = 1;
|
|
|
|
|
string subject = 2;
|
|
|
|
|
string origin = 3;
|
|
|
|
|
bool ipfs_active = 4;
|
|
|
|
|
Params params = 5;
|
|
|
|
|
Document document = 6;
|
|
|
|
|
repeated Credential credentials = 7;
|
|
|
|
|
Token token = 8;
|
2024-07-05 22:20:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method.
|
2024-08-10 17:01:14 -04:00
|
|
|
message QueryServiceResponse {
|
2024-09-05 01:24:57 -04:00
|
|
|
bool success = 1;
|
2024-09-07 18:12:58 -04:00
|
|
|
string subject = 2;
|
|
|
|
|
string origin = 3;
|
|
|
|
|
bool ipfs_active = 4;
|
|
|
|
|
Params params = 5;
|
|
|
|
|
Service service = 6;
|
2024-09-05 01:24:57 -04:00
|
|
|
}
|