#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdentifiedClientState {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub client_state: ::core::option::Option<::prost_types::Any>,
}
impl ::prost::Name for IdentifiedClientState {
const NAME: &'static str = "IdentifiedClientState";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsensusStateWithHeight {
#[prost(message, optional, tag = "1")]
pub height: ::core::option::Option<Height>,
#[prost(message, optional, tag = "2")]
pub consensus_state: ::core::option::Option<::prost_types::Any>,
}
impl ::prost::Name for ConsensusStateWithHeight {
const NAME: &'static str = "ConsensusStateWithHeight";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientConsensusStates {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub consensus_states: ::prost::alloc::vec::Vec<ConsensusStateWithHeight>,
}
impl ::prost::Name for ClientConsensusStates {
const NAME: &'static str = "ClientConsensusStates";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientUpdateProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub subject_client_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub substitute_client_id: ::prost::alloc::string::String,
}
impl ::prost::Name for ClientUpdateProposal {
const NAME: &'static str = "ClientUpdateProposal";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpgradeProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub plan: ::core::option::Option<super::super::super::super::cosmos::upgrade::v1beta1::Plan>,
#[prost(message, optional, tag = "4")]
pub upgraded_client_state: ::core::option::Option<::prost_types::Any>,
}
impl ::prost::Name for UpgradeProposal {
const NAME: &'static str = "UpgradeProposal";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Height {
#[prost(uint64, tag = "1")]
pub revision_number: u64,
#[prost(uint64, tag = "2")]
pub revision_height: u64,
}
impl ::prost::Name for Height {
const NAME: &'static str = "Height";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Params {
#[prost(string, repeated, tag = "1")]
pub allowed_clients: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for Params {
const NAME: &'static str = "Params";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgCreateClient {
#[prost(message, optional, tag = "1")]
pub client_state: ::core::option::Option<::prost_types::Any>,
#[prost(message, optional, tag = "2")]
pub consensus_state: ::core::option::Option<::prost_types::Any>,
#[prost(string, tag = "3")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgCreateClient {
const NAME: &'static str = "MsgCreateClient";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgCreateClientResponse {}
impl ::prost::Name for MsgCreateClientResponse {
const NAME: &'static str = "MsgCreateClientResponse";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpdateClient {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub header: ::core::option::Option<::prost_types::Any>,
#[prost(string, tag = "3")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgUpdateClient {
const NAME: &'static str = "MsgUpdateClient";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpdateClientResponse {}
impl ::prost::Name for MsgUpdateClientResponse {
const NAME: &'static str = "MsgUpdateClientResponse";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpgradeClient {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub client_state: ::core::option::Option<::prost_types::Any>,
#[prost(message, optional, tag = "3")]
pub consensus_state: ::core::option::Option<::prost_types::Any>,
#[prost(bytes = "vec", tag = "4")]
pub proof_upgrade_client: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "5")]
pub proof_upgrade_consensus_state: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "6")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgUpgradeClient {
const NAME: &'static str = "MsgUpgradeClient";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpgradeClientResponse {}
impl ::prost::Name for MsgUpgradeClientResponse {
const NAME: &'static str = "MsgUpgradeClientResponse";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSubmitMisbehaviour {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub misbehaviour: ::core::option::Option<::prost_types::Any>,
#[prost(string, tag = "3")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgSubmitMisbehaviour {
const NAME: &'static str = "MsgSubmitMisbehaviour";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSubmitMisbehaviourResponse {}
impl ::prost::Name for MsgSubmitMisbehaviourResponse {
const NAME: &'static str = "MsgSubmitMisbehaviourResponse";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[cfg(feature = "grpc")]
pub mod msg_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct MsgClient<T> {
inner: tonic::client::Grpc<T>,
}
#[cfg(feature = "grpc-transport")]
impl MsgClient<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> MsgClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + 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) -> MsgClient<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> + Send + Sync,
{
MsgClient::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 create_client(
&mut self,
request: impl tonic::IntoRequest<super::MsgCreateClient>,
) -> std::result::Result<tonic::Response<super::MsgCreateClientResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/CreateClient");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.client.v1.Msg", "CreateClient"));
self.inner.unary(req, path, codec).await
}
pub async fn update_client(
&mut self,
request: impl tonic::IntoRequest<super::MsgUpdateClient>,
) -> std::result::Result<tonic::Response<super::MsgUpdateClientResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/UpdateClient");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpdateClient"));
self.inner.unary(req, path, codec).await
}
pub async fn upgrade_client(
&mut self,
request: impl tonic::IntoRequest<super::MsgUpgradeClient>,
) -> std::result::Result<tonic::Response<super::MsgUpgradeClientResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/UpgradeClient");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpgradeClient"));
self.inner.unary(req, path, codec).await
}
pub async fn submit_misbehaviour(
&mut self,
request: impl tonic::IntoRequest<super::MsgSubmitMisbehaviour>,
) -> std::result::Result<tonic::Response<super::MsgSubmitMisbehaviourResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Msg/SubmitMisbehaviour");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.client.v1.Msg",
"SubmitMisbehaviour",
));
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientStateRequest {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryClientStateRequest {
const NAME: &'static str = "QueryClientStateRequest";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientStateResponse {
#[prost(message, optional, tag = "1")]
pub client_state: ::core::option::Option<::prost_types::Any>,
#[prost(bytes = "vec", tag = "2")]
pub proof: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub proof_height: ::core::option::Option<Height>,
}
impl ::prost::Name for QueryClientStateResponse {
const NAME: &'static str = "QueryClientStateResponse";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientStatesRequest {
#[prost(message, optional, tag = "1")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
>,
}
impl ::prost::Name for QueryClientStatesRequest {
const NAME: &'static str = "QueryClientStatesRequest";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientStatesResponse {
#[prost(message, repeated, tag = "1")]
pub client_states: ::prost::alloc::vec::Vec<IdentifiedClientState>,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageResponse,
>,
}
impl ::prost::Name for QueryClientStatesResponse {
const NAME: &'static str = "QueryClientStatesResponse";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsensusStateRequest {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub revision_number: u64,
#[prost(uint64, tag = "3")]
pub revision_height: u64,
#[prost(bool, tag = "4")]
pub latest_height: bool,
}
impl ::prost::Name for QueryConsensusStateRequest {
const NAME: &'static str = "QueryConsensusStateRequest";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsensusStateResponse {
#[prost(message, optional, tag = "1")]
pub consensus_state: ::core::option::Option<::prost_types::Any>,
#[prost(bytes = "vec", tag = "2")]
pub proof: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub proof_height: ::core::option::Option<Height>,
}
impl ::prost::Name for QueryConsensusStateResponse {
const NAME: &'static str = "QueryConsensusStateResponse";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsensusStatesRequest {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
>,
}
impl ::prost::Name for QueryConsensusStatesRequest {
const NAME: &'static str = "QueryConsensusStatesRequest";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsensusStatesResponse {
#[prost(message, repeated, tag = "1")]
pub consensus_states: ::prost::alloc::vec::Vec<ConsensusStateWithHeight>,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageResponse,
>,
}
impl ::prost::Name for QueryConsensusStatesResponse {
const NAME: &'static str = "QueryConsensusStatesResponse";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientStatusRequest {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryClientStatusRequest {
const NAME: &'static str = "QueryClientStatusRequest";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientStatusResponse {
#[prost(string, tag = "1")]
pub status: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryClientStatusResponse {
const NAME: &'static str = "QueryClientStatusResponse";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientParamsRequest {}
impl ::prost::Name for QueryClientParamsRequest {
const NAME: &'static str = "QueryClientParamsRequest";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientParamsResponse {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
}
impl ::prost::Name for QueryClientParamsResponse {
const NAME: &'static str = "QueryClientParamsResponse";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryUpgradedClientStateRequest {}
impl ::prost::Name for QueryUpgradedClientStateRequest {
const NAME: &'static str = "QueryUpgradedClientStateRequest";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryUpgradedClientStateResponse {
#[prost(message, optional, tag = "1")]
pub upgraded_client_state: ::core::option::Option<::prost_types::Any>,
}
impl ::prost::Name for QueryUpgradedClientStateResponse {
const NAME: &'static str = "QueryUpgradedClientStateResponse";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryUpgradedConsensusStateRequest {}
impl ::prost::Name for QueryUpgradedConsensusStateRequest {
const NAME: &'static str = "QueryUpgradedConsensusStateRequest";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryUpgradedConsensusStateResponse {
#[prost(message, optional, tag = "1")]
pub upgraded_consensus_state: ::core::option::Option<::prost_types::Any>,
}
impl ::prost::Name for QueryUpgradedConsensusStateResponse {
const NAME: &'static str = "QueryUpgradedConsensusStateResponse";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[cfg(feature = "grpc")]
pub mod query_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct QueryClient<T> {
inner: tonic::client::Grpc<T>,
}
#[cfg(feature = "grpc-transport")]
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> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + 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> + Send + 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 client_state(
&mut self,
request: impl tonic::IntoRequest<super::QueryClientStateRequest>,
) -> std::result::Result<tonic::Response<super::QueryClientStateResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ClientState");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientState"));
self.inner.unary(req, path, codec).await
}
pub async fn client_states(
&mut self,
request: impl tonic::IntoRequest<super::QueryClientStatesRequest>,
) -> std::result::Result<tonic::Response<super::QueryClientStatesResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ClientStates");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientStates"));
self.inner.unary(req, path, codec).await
}
pub async fn consensus_state(
&mut self,
request: impl tonic::IntoRequest<super::QueryConsensusStateRequest>,
) -> std::result::Result<tonic::Response<super::QueryConsensusStateResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ConsensusState");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.client.v1.Query",
"ConsensusState",
));
self.inner.unary(req, path, codec).await
}
pub async fn consensus_states(
&mut self,
request: impl tonic::IntoRequest<super::QueryConsensusStatesRequest>,
) -> std::result::Result<tonic::Response<super::QueryConsensusStatesResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ConsensusStates");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.client.v1.Query",
"ConsensusStates",
));
self.inner.unary(req, path, codec).await
}
pub async fn client_status(
&mut self,
request: impl tonic::IntoRequest<super::QueryClientStatusRequest>,
) -> std::result::Result<tonic::Response<super::QueryClientStatusResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ClientStatus");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientStatus"));
self.inner.unary(req, path, codec).await
}
pub async fn client_params(
&mut self,
request: impl tonic::IntoRequest<super::QueryClientParamsRequest>,
) -> std::result::Result<tonic::Response<super::QueryClientParamsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ibc.core.client.v1.Query/ClientParams");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientParams"));
self.inner.unary(req, path, codec).await
}
pub async fn upgraded_client_state(
&mut self,
request: impl tonic::IntoRequest<super::QueryUpgradedClientStateRequest>,
) -> std::result::Result<
tonic::Response<super::QueryUpgradedClientStateResponse>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.core.client.v1.Query/UpgradedClientState",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.client.v1.Query",
"UpgradedClientState",
));
self.inner.unary(req, path, codec).await
}
pub async fn upgraded_consensus_state(
&mut self,
request: impl tonic::IntoRequest<super::QueryUpgradedConsensusStateRequest>,
) -> std::result::Result<
tonic::Response<super::QueryUpgradedConsensusStateResponse>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.core.client.v1.Query/UpgradedConsensusState",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.client.v1.Query",
"UpgradedConsensusState",
));
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
#[prost(message, repeated, tag = "1")]
pub clients: ::prost::alloc::vec::Vec<IdentifiedClientState>,
#[prost(message, repeated, tag = "2")]
pub clients_consensus: ::prost::alloc::vec::Vec<ClientConsensusStates>,
#[prost(message, repeated, tag = "3")]
pub clients_metadata: ::prost::alloc::vec::Vec<IdentifiedGenesisMetadata>,
#[prost(message, optional, tag = "4")]
pub params: ::core::option::Option<Params>,
#[prost(bool, tag = "5")]
pub create_localhost: bool,
#[prost(uint64, tag = "6")]
pub next_client_sequence: u64,
}
impl ::prost::Name for GenesisState {
const NAME: &'static str = "GenesisState";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisMetadata {
#[prost(bytes = "vec", tag = "1")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub value: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for GenesisMetadata {
const NAME: &'static str = "GenesisMetadata";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdentifiedGenesisMetadata {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub client_metadata: ::prost::alloc::vec::Vec<GenesisMetadata>,
}
impl ::prost::Name for IdentifiedGenesisMetadata {
const NAME: &'static str = "IdentifiedGenesisMetadata";
const PACKAGE: &'static str = "ibc.core.client.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME)
}
}