2024-09-26 18:01:49 -04:00
|
|
|
syntax = "proto3";
|
2024-11-26 22:05:50 -05:00
|
|
|
package svc.v1;
|
2024-09-26 18:01:49 -04:00
|
|
|
|
|
|
|
import "google/api/annotations.proto";
|
2024-11-26 22:05:50 -05:00
|
|
|
import "svc/v1/genesis.proto";
|
2024-09-26 18:01:49 -04:00
|
|
|
|
2024-11-26 22:05:50 -05:00
|
|
|
option go_package = "github.com/onsonr/sonr/x/svc/types";
|
2024-09-26 18:01:49 -04:00
|
|
|
|
|
|
|
// Query provides defines the gRPC querier service.
|
|
|
|
service Query {
|
|
|
|
// Params queries all parameters of the module.
|
|
|
|
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
2024-11-26 22:05:50 -05:00
|
|
|
option (google.api.http).get = "/svc/v1/params";
|
2024-09-26 18:01:49 -04:00
|
|
|
}
|
2024-12-24 10:38:17 -05:00
|
|
|
|
|
|
|
// OriginExists queries if a given origin exists.
|
|
|
|
rpc OriginExists(QueryOriginExistsRequest) returns (QueryOriginExistsResponse) {
|
|
|
|
option (google.api.http).get = "/svc/v1/origins/{origin}";
|
|
|
|
}
|
|
|
|
|
|
|
|
// ResolveOrigin queries the domain of a given service and returns its record with capabilities.
|
|
|
|
rpc ResolveOrigin(QueryResolveOriginRequest) returns (QueryResolveOriginResponse) {
|
|
|
|
option (google.api.http).get = "/svc/v1/origins/{origin}/record";
|
|
|
|
}
|
2024-09-26 18:01:49 -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;
|
|
|
|
}
|
2024-12-24 10:38:17 -05:00
|
|
|
|
|
|
|
// QueryOriginExistsRequest is the request type for the Query/OriginExists RPC method.
|
|
|
|
message QueryOriginExistsRequest {
|
|
|
|
// origin is the origin to query.
|
|
|
|
string origin = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryOriginExistsResponse is the response type for the Query/OriginExists RPC method.
|
|
|
|
message QueryOriginExistsResponse {
|
|
|
|
// exists is the boolean value representing whether the origin exists.
|
|
|
|
bool exists = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryResolveOriginRequest is the request type for the Query/ResolveOrigin RPC method.
|
|
|
|
message QueryResolveOriginRequest {
|
|
|
|
// origin is the origin to query.
|
|
|
|
string origin = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryResolveOriginResponse is the response type for the Query/ResolveOrigin RPC method.
|
|
|
|
message QueryResolveOriginResponse {
|
|
|
|
// record is the record of the origin.
|
|
|
|
Service record = 1;
|
|
|
|
}
|