#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DidDoc {
#[prost(string, repeated, tag = "1")]
pub context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub controller: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "4")]
pub verification_method: ::prost::alloc::vec::Vec<VerificationMethod>,
#[prost(string, repeated, tag = "5")]
pub authentication: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "6")]
pub assertion_method: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "7")]
pub capability_invocation: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "8")]
pub capability_delegation: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "9")]
pub key_agreement: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "10")]
pub service: ::prost::alloc::vec::Vec<Service>,
#[prost(string, repeated, tag = "11")]
pub also_known_as: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerificationMethod {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub verification_method_type: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub controller: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub verification_material: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Service {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub service_type: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub service_endpoint: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub recipient_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "5")]
pub routing_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "6")]
pub accept: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint32, tag = "7")]
pub priority: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DidDocWithMetadata {
#[prost(message, optional, tag = "1")]
pub did_doc: ::core::option::Option<DidDoc>,
#[prost(message, optional, tag = "2")]
pub metadata: ::core::option::Option<Metadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metadata {
#[prost(message, optional, tag = "1")]
pub created: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub updated: ::core::option::Option<::prost_types::Timestamp>,
#[prost(bool, tag = "3")]
pub deactivated: bool,
#[prost(string, tag = "4")]
pub version_id: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub next_version_id: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub previous_version_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDidDocRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDidDocResponse {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<DidDocWithMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDidDocVersionRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDidDocVersionResponse {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<DidDocWithMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryAllDidDocVersionsMetadataRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryAllDidDocVersionsMetadataResponse {
#[prost(message, repeated, tag = "1")]
pub versions: ::prost::alloc::vec::Vec<Metadata>,
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
}
pub mod query_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value
)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct QueryClient<T> {
inner: tonic::client::Grpc<T>,
}
impl QueryClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> QueryClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> QueryClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + std::marker::Send + std::marker::Sync,
{
QueryClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn did_doc(
&mut self,
request: impl tonic::IntoRequest<super::QueryDidDocRequest>,
) -> std::result::Result<tonic::Response<super::QueryDidDocResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/cheqd.did.v2.Query/DidDoc");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cheqd.did.v2.Query", "DidDoc"));
self.inner.unary(req, path, codec).await
}
pub async fn did_doc_version(
&mut self,
request: impl tonic::IntoRequest<super::QueryDidDocVersionRequest>,
) -> std::result::Result<tonic::Response<super::QueryDidDocVersionResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/cheqd.did.v2.Query/DidDocVersion");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cheqd.did.v2.Query", "DidDocVersion"));
self.inner.unary(req, path, codec).await
}
pub async fn all_did_doc_versions_metadata(
&mut self,
request: impl tonic::IntoRequest<super::QueryAllDidDocVersionsMetadataRequest>,
) -> std::result::Result<
tonic::Response<super::QueryAllDidDocVersionsMetadataResponse>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cheqd.did.v2.Query/AllDidDocVersionsMetadata",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"cheqd.did.v2.Query",
"AllDidDocVersionsMetadata",
));
self.inner.unary(req, path, codec).await
}
}
}