#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectionEnd {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub versions: ::prost::alloc::vec::Vec<Version>,
#[prost(enumeration = "State", tag = "3")]
pub state: i32,
#[prost(message, optional, tag = "4")]
pub counterparty: ::core::option::Option<Counterparty>,
#[prost(uint64, tag = "5")]
pub delay_period: u64,
}
impl ::prost::Name for ConnectionEnd {
const NAME: &'static str = "ConnectionEnd";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdentifiedConnection {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub versions: ::prost::alloc::vec::Vec<Version>,
#[prost(enumeration = "State", tag = "4")]
pub state: i32,
#[prost(message, optional, tag = "5")]
pub counterparty: ::core::option::Option<Counterparty>,
#[prost(uint64, tag = "6")]
pub delay_period: u64,
}
impl ::prost::Name for IdentifiedConnection {
const NAME: &'static str = "IdentifiedConnection";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Counterparty {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub connection_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub prefix: ::core::option::Option<super::super::commitment::v1::MerklePrefix>,
}
impl ::prost::Name for Counterparty {
const NAME: &'static str = "Counterparty";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientPaths {
#[prost(string, repeated, tag = "1")]
pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for ClientPaths {
const NAME: &'static str = "ClientPaths";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectionPaths {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for ConnectionPaths {
const NAME: &'static str = "ConnectionPaths";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Version {
#[prost(string, tag = "1")]
pub identifier: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub features: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for Version {
const NAME: &'static str = "Version";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Params {
#[prost(uint64, tag = "1")]
pub max_expected_time_per_block: u64,
}
impl ::prost::Name for Params {
const NAME: &'static str = "Params";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum State {
UninitializedUnspecified = 0,
Init = 1,
Tryopen = 2,
Open = 3,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::UninitializedUnspecified => "STATE_UNINITIALIZED_UNSPECIFIED",
State::Init => "STATE_INIT",
State::Tryopen => "STATE_TRYOPEN",
State::Open => "STATE_OPEN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNINITIALIZED_UNSPECIFIED" => Some(Self::UninitializedUnspecified),
"STATE_INIT" => Some(Self::Init),
"STATE_TRYOPEN" => Some(Self::Tryopen),
"STATE_OPEN" => Some(Self::Open),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgConnectionOpenInit {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub counterparty: ::core::option::Option<Counterparty>,
#[prost(message, optional, tag = "3")]
pub version: ::core::option::Option<Version>,
#[prost(uint64, tag = "4")]
pub delay_period: u64,
#[prost(string, tag = "5")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgConnectionOpenInit {
const NAME: &'static str = "MsgConnectionOpenInit";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgConnectionOpenInitResponse {}
impl ::prost::Name for MsgConnectionOpenInitResponse {
const NAME: &'static str = "MsgConnectionOpenInitResponse";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgConnectionOpenTry {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub previous_connection_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub client_state: ::core::option::Option<::prost_types::Any>,
#[prost(message, optional, tag = "4")]
pub counterparty: ::core::option::Option<Counterparty>,
#[prost(uint64, tag = "5")]
pub delay_period: u64,
#[prost(message, repeated, tag = "6")]
pub counterparty_versions: ::prost::alloc::vec::Vec<Version>,
#[prost(message, optional, tag = "7")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(bytes = "vec", tag = "8")]
pub proof_init: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "9")]
pub proof_client: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "10")]
pub proof_consensus: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "11")]
pub consensus_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(string, tag = "12")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgConnectionOpenTry {
const NAME: &'static str = "MsgConnectionOpenTry";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgConnectionOpenTryResponse {}
impl ::prost::Name for MsgConnectionOpenTryResponse {
const NAME: &'static str = "MsgConnectionOpenTryResponse";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgConnectionOpenAck {
#[prost(string, tag = "1")]
pub connection_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub counterparty_connection_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub version: ::core::option::Option<Version>,
#[prost(message, optional, tag = "4")]
pub client_state: ::core::option::Option<::prost_types::Any>,
#[prost(message, optional, tag = "5")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(bytes = "vec", tag = "6")]
pub proof_try: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "7")]
pub proof_client: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "8")]
pub proof_consensus: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "9")]
pub consensus_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(string, tag = "10")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgConnectionOpenAck {
const NAME: &'static str = "MsgConnectionOpenAck";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgConnectionOpenAckResponse {}
impl ::prost::Name for MsgConnectionOpenAckResponse {
const NAME: &'static str = "MsgConnectionOpenAckResponse";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgConnectionOpenConfirm {
#[prost(string, tag = "1")]
pub connection_id: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub proof_ack: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(string, tag = "4")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgConnectionOpenConfirm {
const NAME: &'static str = "MsgConnectionOpenConfirm";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgConnectionOpenConfirmResponse {}
impl ::prost::Name for MsgConnectionOpenConfirmResponse {
const NAME: &'static str = "MsgConnectionOpenConfirmResponse";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.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 connection_open_init(
&mut self,
request: impl tonic::IntoRequest<super::MsgConnectionOpenInit>,
) -> std::result::Result<tonic::Response<super::MsgConnectionOpenInitResponse>, 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.connection.v1.Msg/ConnectionOpenInit",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.connection.v1.Msg",
"ConnectionOpenInit",
));
self.inner.unary(req, path, codec).await
}
pub async fn connection_open_try(
&mut self,
request: impl tonic::IntoRequest<super::MsgConnectionOpenTry>,
) -> std::result::Result<tonic::Response<super::MsgConnectionOpenTryResponse>, 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.connection.v1.Msg/ConnectionOpenTry",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.connection.v1.Msg",
"ConnectionOpenTry",
));
self.inner.unary(req, path, codec).await
}
pub async fn connection_open_ack(
&mut self,
request: impl tonic::IntoRequest<super::MsgConnectionOpenAck>,
) -> std::result::Result<tonic::Response<super::MsgConnectionOpenAckResponse>, 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.connection.v1.Msg/ConnectionOpenAck",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.connection.v1.Msg",
"ConnectionOpenAck",
));
self.inner.unary(req, path, codec).await
}
pub async fn connection_open_confirm(
&mut self,
request: impl tonic::IntoRequest<super::MsgConnectionOpenConfirm>,
) -> std::result::Result<
tonic::Response<super::MsgConnectionOpenConfirmResponse>,
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.connection.v1.Msg/ConnectionOpenConfirm",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.connection.v1.Msg",
"ConnectionOpenConfirm",
));
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConnectionRequest {
#[prost(string, tag = "1")]
pub connection_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryConnectionRequest {
const NAME: &'static str = "QueryConnectionRequest";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConnectionResponse {
#[prost(message, optional, tag = "1")]
pub connection: ::core::option::Option<ConnectionEnd>,
#[prost(bytes = "vec", tag = "2")]
pub proof: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
}
impl ::prost::Name for QueryConnectionResponse {
const NAME: &'static str = "QueryConnectionResponse";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConnectionsRequest {
#[prost(message, optional, tag = "1")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
>,
}
impl ::prost::Name for QueryConnectionsRequest {
const NAME: &'static str = "QueryConnectionsRequest";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConnectionsResponse {
#[prost(message, repeated, tag = "1")]
pub connections: ::prost::alloc::vec::Vec<IdentifiedConnection>,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageResponse,
>,
#[prost(message, optional, tag = "3")]
pub height: ::core::option::Option<super::super::client::v1::Height>,
}
impl ::prost::Name for QueryConnectionsResponse {
const NAME: &'static str = "QueryConnectionsResponse";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientConnectionsRequest {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryClientConnectionsRequest {
const NAME: &'static str = "QueryClientConnectionsRequest";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientConnectionsResponse {
#[prost(string, repeated, tag = "1")]
pub connection_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bytes = "vec", tag = "2")]
pub proof: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
}
impl ::prost::Name for QueryClientConnectionsResponse {
const NAME: &'static str = "QueryClientConnectionsResponse";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConnectionClientStateRequest {
#[prost(string, tag = "1")]
pub connection_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryConnectionClientStateRequest {
const NAME: &'static str = "QueryConnectionClientStateRequest";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConnectionClientStateResponse {
#[prost(message, optional, tag = "1")]
pub identified_client_state:
::core::option::Option<super::super::client::v1::IdentifiedClientState>,
#[prost(bytes = "vec", tag = "2")]
pub proof: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
}
impl ::prost::Name for QueryConnectionClientStateResponse {
const NAME: &'static str = "QueryConnectionClientStateResponse";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConnectionConsensusStateRequest {
#[prost(string, tag = "1")]
pub connection_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub revision_number: u64,
#[prost(uint64, tag = "3")]
pub revision_height: u64,
}
impl ::prost::Name for QueryConnectionConsensusStateRequest {
const NAME: &'static str = "QueryConnectionConsensusStateRequest";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConnectionConsensusStateResponse {
#[prost(message, optional, tag = "1")]
pub consensus_state: ::core::option::Option<::prost_types::Any>,
#[prost(string, tag = "2")]
pub client_id: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "3")]
pub proof: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "4")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
}
impl ::prost::Name for QueryConnectionConsensusStateResponse {
const NAME: &'static str = "QueryConnectionConsensusStateResponse";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.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 connection(
&mut self,
request: impl tonic::IntoRequest<super::QueryConnectionRequest>,
) -> std::result::Result<tonic::Response<super::QueryConnectionResponse>, 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.connection.v1.Query/Connection");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.connection.v1.Query",
"Connection",
));
self.inner.unary(req, path, codec).await
}
pub async fn connections(
&mut self,
request: impl tonic::IntoRequest<super::QueryConnectionsRequest>,
) -> std::result::Result<tonic::Response<super::QueryConnectionsResponse>, 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.connection.v1.Query/Connections");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.connection.v1.Query",
"Connections",
));
self.inner.unary(req, path, codec).await
}
pub async fn client_connections(
&mut self,
request: impl tonic::IntoRequest<super::QueryClientConnectionsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryClientConnectionsResponse>,
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.connection.v1.Query/ClientConnections",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.connection.v1.Query",
"ClientConnections",
));
self.inner.unary(req, path, codec).await
}
pub async fn connection_client_state(
&mut self,
request: impl tonic::IntoRequest<super::QueryConnectionClientStateRequest>,
) -> std::result::Result<
tonic::Response<super::QueryConnectionClientStateResponse>,
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.connection.v1.Query/ConnectionClientState",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.connection.v1.Query",
"ConnectionClientState",
));
self.inner.unary(req, path, codec).await
}
pub async fn connection_consensus_state(
&mut self,
request: impl tonic::IntoRequest<super::QueryConnectionConsensusStateRequest>,
) -> std::result::Result<
tonic::Response<super::QueryConnectionConsensusStateResponse>,
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.connection.v1.Query/ConnectionConsensusState",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.connection.v1.Query",
"ConnectionConsensusState",
));
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 connections: ::prost::alloc::vec::Vec<IdentifiedConnection>,
#[prost(message, repeated, tag = "2")]
pub client_connection_paths: ::prost::alloc::vec::Vec<ConnectionPaths>,
#[prost(uint64, tag = "3")]
pub next_connection_sequence: u64,
#[prost(message, optional, tag = "4")]
pub params: ::core::option::Option<Params>,
}
impl ::prost::Name for GenesisState {
const NAME: &'static str = "GenesisState";
const PACKAGE: &'static str = "ibc.core.connection.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME)
}
}