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 (QueryParamsResponse) { option (google.api.http).get = "/params"; } // ParamsAssets queries all parameters of the module. rpc ParamsAssets(QueryRequest) returns (QueryParamsAssetsResponse) { option (google.api.http).get = "/params/assets"; } // Params queries all parameters of the module. rpc ParamsByAsset(QueryRequest) returns (QueryParamsByAssetResponse) { option (google.api.http).get = "/params/assets/{asset}"; } // ParamsKeys queries all parameters of the module. rpc ParamsKeys(QueryRequest) returns (QueryParamsKeysResponse) { option (google.api.http).get = "/params/keys"; } // Params queries all parameters of the module. rpc ParamsByKey(QueryRequest) returns (QueryParamsByKeyResponse) { option (google.api.http).get = "/params/keys/{key}"; } // 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 // 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 (QueryServiceResponse) { 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; string key = 3; string asset = 4; } // QueryResolveResponse is the response type for the Query/Resolve RPC method. message QueryResponse { bool success = 1; string query = 2; Document document = 3; Params params = 5; } // QueryParamsResponse is the response type for the Query/Params RPC method. message QueryParamsResponse { // params defines the parameters of the module. Params params = 1; } message QueryParamsAssetsResponse { repeated AssetInfo assets = 1; } message QueryParamsByAssetResponse { AssetInfo asset = 1; } message QueryParamsKeysResponse { map keys = 1; } message QueryParamsByKeyResponse { KeyInfo key = 1; } // QueryResolveResponse is the response type for the Query/Resolve RPC method. message QueryResolveResponse { // document is the DID document Document document = 1; } // QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. message QueryServiceResponse { // options is the PublicKeyCredentialAttestationOptions bool existing = 1; ServiceInfo service = 2; string txt_record = 3; }