#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Channel {
#[prost(enumeration = "State", tag = "1")]
pub state: i32,
#[prost(enumeration = "Order", tag = "2")]
pub ordering: i32,
#[prost(message, optional, tag = "3")]
pub counterparty: ::core::option::Option<Counterparty>,
#[prost(string, repeated, tag = "4")]
pub connection_hops: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "5")]
pub version: ::prost::alloc::string::String,
}
impl ::prost::Name for Channel {
const NAME: &'static str = "Channel";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdentifiedChannel {
#[prost(enumeration = "State", tag = "1")]
pub state: i32,
#[prost(enumeration = "Order", tag = "2")]
pub ordering: i32,
#[prost(message, optional, tag = "3")]
pub counterparty: ::core::option::Option<Counterparty>,
#[prost(string, repeated, tag = "4")]
pub connection_hops: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "5")]
pub version: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub channel_id: ::prost::alloc::string::String,
}
impl ::prost::Name for IdentifiedChannel {
const NAME: &'static str = "IdentifiedChannel";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Counterparty {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
}
impl ::prost::Name for Counterparty {
const NAME: &'static str = "Counterparty";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Packet {
#[prost(uint64, tag = "1")]
pub sequence: u64,
#[prost(string, tag = "2")]
pub source_port: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub source_channel: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub destination_port: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub destination_channel: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "6")]
pub data: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "7")]
pub timeout_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(uint64, tag = "8")]
pub timeout_timestamp: u64,
}
impl ::prost::Name for Packet {
const NAME: &'static str = "Packet";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PacketState {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub sequence: u64,
#[prost(bytes = "vec", tag = "4")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for PacketState {
const NAME: &'static str = "PacketState";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Acknowledgement {
#[prost(oneof = "acknowledgement::Response", tags = "21, 22")]
pub response: ::core::option::Option<acknowledgement::Response>,
}
pub mod acknowledgement {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(bytes, tag = "21")]
Result(::prost::alloc::vec::Vec<u8>),
#[prost(string, tag = "22")]
Error(::prost::alloc::string::String),
}
}
impl ::prost::Name for Acknowledgement {
const NAME: &'static str = "Acknowledgement";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.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,
Closed = 4,
}
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",
State::Closed => "STATE_CLOSED",
}
}
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),
"STATE_CLOSED" => Some(Self::Closed),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Order {
NoneUnspecified = 0,
Unordered = 1,
Ordered = 2,
}
impl Order {
pub fn as_str_name(&self) -> &'static str {
match self {
Order::NoneUnspecified => "ORDER_NONE_UNSPECIFIED",
Order::Unordered => "ORDER_UNORDERED",
Order::Ordered => "ORDER_ORDERED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ORDER_NONE_UNSPECIFIED" => Some(Self::NoneUnspecified),
"ORDER_UNORDERED" => Some(Self::Unordered),
"ORDER_ORDERED" => Some(Self::Ordered),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgChannelOpenInit {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub channel: ::core::option::Option<Channel>,
#[prost(string, tag = "3")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgChannelOpenInit {
const NAME: &'static str = "MsgChannelOpenInit";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgChannelOpenInitResponse {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgChannelOpenInitResponse {
const NAME: &'static str = "MsgChannelOpenInitResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgChannelOpenTry {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub previous_channel_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub channel: ::core::option::Option<Channel>,
#[prost(string, tag = "4")]
pub counterparty_version: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "5")]
pub proof_init: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "6")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(string, tag = "7")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgChannelOpenTry {
const NAME: &'static str = "MsgChannelOpenTry";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgChannelOpenTryResponse {}
impl ::prost::Name for MsgChannelOpenTryResponse {
const NAME: &'static str = "MsgChannelOpenTryResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgChannelOpenAck {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub counterparty_channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub counterparty_version: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "5")]
pub proof_try: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "6")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(string, tag = "7")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgChannelOpenAck {
const NAME: &'static str = "MsgChannelOpenAck";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgChannelOpenAckResponse {}
impl ::prost::Name for MsgChannelOpenAckResponse {
const NAME: &'static str = "MsgChannelOpenAckResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgChannelOpenConfirm {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "3")]
pub proof_ack: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "4")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(string, tag = "5")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgChannelOpenConfirm {
const NAME: &'static str = "MsgChannelOpenConfirm";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgChannelOpenConfirmResponse {}
impl ::prost::Name for MsgChannelOpenConfirmResponse {
const NAME: &'static str = "MsgChannelOpenConfirmResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgChannelCloseInit {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgChannelCloseInit {
const NAME: &'static str = "MsgChannelCloseInit";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgChannelCloseInitResponse {}
impl ::prost::Name for MsgChannelCloseInitResponse {
const NAME: &'static str = "MsgChannelCloseInitResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgChannelCloseConfirm {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "3")]
pub proof_init: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "4")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(string, tag = "5")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgChannelCloseConfirm {
const NAME: &'static str = "MsgChannelCloseConfirm";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgChannelCloseConfirmResponse {}
impl ::prost::Name for MsgChannelCloseConfirmResponse {
const NAME: &'static str = "MsgChannelCloseConfirmResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgRecvPacket {
#[prost(message, optional, tag = "1")]
pub packet: ::core::option::Option<Packet>,
#[prost(bytes = "vec", tag = "2")]
pub proof_commitment: ::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 MsgRecvPacket {
const NAME: &'static str = "MsgRecvPacket";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgRecvPacketResponse {
#[prost(enumeration = "ResponseResultType", tag = "1")]
pub result: i32,
}
impl ::prost::Name for MsgRecvPacketResponse {
const NAME: &'static str = "MsgRecvPacketResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgTimeout {
#[prost(message, optional, tag = "1")]
pub packet: ::core::option::Option<Packet>,
#[prost(bytes = "vec", tag = "2")]
pub proof_unreceived: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(uint64, tag = "4")]
pub next_sequence_recv: u64,
#[prost(string, tag = "5")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgTimeout {
const NAME: &'static str = "MsgTimeout";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgTimeoutResponse {
#[prost(enumeration = "ResponseResultType", tag = "1")]
pub result: i32,
}
impl ::prost::Name for MsgTimeoutResponse {
const NAME: &'static str = "MsgTimeoutResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgTimeoutOnClose {
#[prost(message, optional, tag = "1")]
pub packet: ::core::option::Option<Packet>,
#[prost(bytes = "vec", tag = "2")]
pub proof_unreceived: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub proof_close: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "4")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(uint64, tag = "5")]
pub next_sequence_recv: u64,
#[prost(string, tag = "6")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgTimeoutOnClose {
const NAME: &'static str = "MsgTimeoutOnClose";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgTimeoutOnCloseResponse {
#[prost(enumeration = "ResponseResultType", tag = "1")]
pub result: i32,
}
impl ::prost::Name for MsgTimeoutOnCloseResponse {
const NAME: &'static str = "MsgTimeoutOnCloseResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgAcknowledgement {
#[prost(message, optional, tag = "1")]
pub packet: ::core::option::Option<Packet>,
#[prost(bytes = "vec", tag = "2")]
pub acknowledgement: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub proof_acked: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "4")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(string, tag = "5")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgAcknowledgement {
const NAME: &'static str = "MsgAcknowledgement";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgAcknowledgementResponse {
#[prost(enumeration = "ResponseResultType", tag = "1")]
pub result: i32,
}
impl ::prost::Name for MsgAcknowledgementResponse {
const NAME: &'static str = "MsgAcknowledgementResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ResponseResultType {
ResponseResultUnspecified = 0,
ResponseResultNoop = 1,
ResponseResultSuccess = 2,
}
impl ResponseResultType {
pub fn as_str_name(&self) -> &'static str {
match self {
ResponseResultType::ResponseResultUnspecified => "RESPONSE_RESULT_UNSPECIFIED",
ResponseResultType::ResponseResultNoop => "RESPONSE_RESULT_NOOP",
ResponseResultType::ResponseResultSuccess => "RESPONSE_RESULT_SUCCESS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESPONSE_RESULT_UNSPECIFIED" => Some(Self::ResponseResultUnspecified),
"RESPONSE_RESULT_NOOP" => Some(Self::ResponseResultNoop),
"RESPONSE_RESULT_SUCCESS" => Some(Self::ResponseResultSuccess),
_ => None,
}
}
}
#[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 channel_open_init(
&mut self,
request: impl tonic::IntoRequest<super::MsgChannelOpenInit>,
) -> std::result::Result<tonic::Response<super::MsgChannelOpenInitResponse>, 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.channel.v1.Msg/ChannelOpenInit");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Msg",
"ChannelOpenInit",
));
self.inner.unary(req, path, codec).await
}
pub async fn channel_open_try(
&mut self,
request: impl tonic::IntoRequest<super::MsgChannelOpenTry>,
) -> std::result::Result<tonic::Response<super::MsgChannelOpenTryResponse>, 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.channel.v1.Msg/ChannelOpenTry");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenTry"));
self.inner.unary(req, path, codec).await
}
pub async fn channel_open_ack(
&mut self,
request: impl tonic::IntoRequest<super::MsgChannelOpenAck>,
) -> std::result::Result<tonic::Response<super::MsgChannelOpenAckResponse>, 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.channel.v1.Msg/ChannelOpenAck");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenAck"));
self.inner.unary(req, path, codec).await
}
pub async fn channel_open_confirm(
&mut self,
request: impl tonic::IntoRequest<super::MsgChannelOpenConfirm>,
) -> std::result::Result<tonic::Response<super::MsgChannelOpenConfirmResponse>, 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.channel.v1.Msg/ChannelOpenConfirm");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Msg",
"ChannelOpenConfirm",
));
self.inner.unary(req, path, codec).await
}
pub async fn channel_close_init(
&mut self,
request: impl tonic::IntoRequest<super::MsgChannelCloseInit>,
) -> std::result::Result<tonic::Response<super::MsgChannelCloseInitResponse>, 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.channel.v1.Msg/ChannelCloseInit");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Msg",
"ChannelCloseInit",
));
self.inner.unary(req, path, codec).await
}
pub async fn channel_close_confirm(
&mut self,
request: impl tonic::IntoRequest<super::MsgChannelCloseConfirm>,
) -> std::result::Result<
tonic::Response<super::MsgChannelCloseConfirmResponse>,
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.channel.v1.Msg/ChannelCloseConfirm",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Msg",
"ChannelCloseConfirm",
));
self.inner.unary(req, path, codec).await
}
pub async fn recv_packet(
&mut self,
request: impl tonic::IntoRequest<super::MsgRecvPacket>,
) -> std::result::Result<tonic::Response<super::MsgRecvPacketResponse>, 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.channel.v1.Msg/RecvPacket");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "RecvPacket"));
self.inner.unary(req, path, codec).await
}
pub async fn timeout(
&mut self,
request: impl tonic::IntoRequest<super::MsgTimeout>,
) -> std::result::Result<tonic::Response<super::MsgTimeoutResponse>, 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.channel.v1.Msg/Timeout");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "Timeout"));
self.inner.unary(req, path, codec).await
}
pub async fn timeout_on_close(
&mut self,
request: impl tonic::IntoRequest<super::MsgTimeoutOnClose>,
) -> std::result::Result<tonic::Response<super::MsgTimeoutOnCloseResponse>, 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.channel.v1.Msg/TimeoutOnClose");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "TimeoutOnClose"));
self.inner.unary(req, path, codec).await
}
pub async fn acknowledgement(
&mut self,
request: impl tonic::IntoRequest<super::MsgAcknowledgement>,
) -> std::result::Result<tonic::Response<super::MsgAcknowledgementResponse>, 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.channel.v1.Msg/Acknowledgement");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Msg",
"Acknowledgement",
));
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryChannelRequest {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryChannelRequest {
const NAME: &'static str = "QueryChannelRequest";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryChannelResponse {
#[prost(message, optional, tag = "1")]
pub channel: ::core::option::Option<Channel>,
#[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 QueryChannelResponse {
const NAME: &'static str = "QueryChannelResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryChannelsRequest {
#[prost(message, optional, tag = "1")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
>,
}
impl ::prost::Name for QueryChannelsRequest {
const NAME: &'static str = "QueryChannelsRequest";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryChannelsResponse {
#[prost(message, repeated, tag = "1")]
pub channels: ::prost::alloc::vec::Vec<IdentifiedChannel>,
#[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 QueryChannelsResponse {
const NAME: &'static str = "QueryChannelsResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConnectionChannelsRequest {
#[prost(string, tag = "1")]
pub connection: ::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 QueryConnectionChannelsRequest {
const NAME: &'static str = "QueryConnectionChannelsRequest";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConnectionChannelsResponse {
#[prost(message, repeated, tag = "1")]
pub channels: ::prost::alloc::vec::Vec<IdentifiedChannel>,
#[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 QueryConnectionChannelsResponse {
const NAME: &'static str = "QueryConnectionChannelsResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryChannelClientStateRequest {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryChannelClientStateRequest {
const NAME: &'static str = "QueryChannelClientStateRequest";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryChannelClientStateResponse {
#[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 QueryChannelClientStateResponse {
const NAME: &'static str = "QueryChannelClientStateResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryChannelConsensusStateRequest {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub revision_number: u64,
#[prost(uint64, tag = "4")]
pub revision_height: u64,
}
impl ::prost::Name for QueryChannelConsensusStateRequest {
const NAME: &'static str = "QueryChannelConsensusStateRequest";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryChannelConsensusStateResponse {
#[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 QueryChannelConsensusStateResponse {
const NAME: &'static str = "QueryChannelConsensusStateResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPacketCommitmentRequest {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub sequence: u64,
}
impl ::prost::Name for QueryPacketCommitmentRequest {
const NAME: &'static str = "QueryPacketCommitmentRequest";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPacketCommitmentResponse {
#[prost(bytes = "vec", tag = "1")]
pub commitment: ::prost::alloc::vec::Vec<u8>,
#[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 QueryPacketCommitmentResponse {
const NAME: &'static str = "QueryPacketCommitmentResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPacketCommitmentsRequest {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
>,
}
impl ::prost::Name for QueryPacketCommitmentsRequest {
const NAME: &'static str = "QueryPacketCommitmentsRequest";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPacketCommitmentsResponse {
#[prost(message, repeated, tag = "1")]
pub commitments: ::prost::alloc::vec::Vec<PacketState>,
#[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 QueryPacketCommitmentsResponse {
const NAME: &'static str = "QueryPacketCommitmentsResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPacketReceiptRequest {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub sequence: u64,
}
impl ::prost::Name for QueryPacketReceiptRequest {
const NAME: &'static str = "QueryPacketReceiptRequest";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPacketReceiptResponse {
#[prost(bool, tag = "2")]
pub received: bool,
#[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 QueryPacketReceiptResponse {
const NAME: &'static str = "QueryPacketReceiptResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPacketAcknowledgementRequest {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub sequence: u64,
}
impl ::prost::Name for QueryPacketAcknowledgementRequest {
const NAME: &'static str = "QueryPacketAcknowledgementRequest";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPacketAcknowledgementResponse {
#[prost(bytes = "vec", tag = "1")]
pub acknowledgement: ::prost::alloc::vec::Vec<u8>,
#[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 QueryPacketAcknowledgementResponse {
const NAME: &'static str = "QueryPacketAcknowledgementResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPacketAcknowledgementsRequest {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
>,
#[prost(uint64, repeated, tag = "4")]
pub packet_commitment_sequences: ::prost::alloc::vec::Vec<u64>,
}
impl ::prost::Name for QueryPacketAcknowledgementsRequest {
const NAME: &'static str = "QueryPacketAcknowledgementsRequest";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPacketAcknowledgementsResponse {
#[prost(message, repeated, tag = "1")]
pub acknowledgements: ::prost::alloc::vec::Vec<PacketState>,
#[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 QueryPacketAcknowledgementsResponse {
const NAME: &'static str = "QueryPacketAcknowledgementsResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryUnreceivedPacketsRequest {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(uint64, repeated, tag = "3")]
pub packet_commitment_sequences: ::prost::alloc::vec::Vec<u64>,
}
impl ::prost::Name for QueryUnreceivedPacketsRequest {
const NAME: &'static str = "QueryUnreceivedPacketsRequest";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryUnreceivedPacketsResponse {
#[prost(uint64, repeated, tag = "1")]
pub sequences: ::prost::alloc::vec::Vec<u64>,
#[prost(message, optional, tag = "2")]
pub height: ::core::option::Option<super::super::client::v1::Height>,
}
impl ::prost::Name for QueryUnreceivedPacketsResponse {
const NAME: &'static str = "QueryUnreceivedPacketsResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryUnreceivedAcksRequest {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(uint64, repeated, tag = "3")]
pub packet_ack_sequences: ::prost::alloc::vec::Vec<u64>,
}
impl ::prost::Name for QueryUnreceivedAcksRequest {
const NAME: &'static str = "QueryUnreceivedAcksRequest";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryUnreceivedAcksResponse {
#[prost(uint64, repeated, tag = "1")]
pub sequences: ::prost::alloc::vec::Vec<u64>,
#[prost(message, optional, tag = "2")]
pub height: ::core::option::Option<super::super::client::v1::Height>,
}
impl ::prost::Name for QueryUnreceivedAcksResponse {
const NAME: &'static str = "QueryUnreceivedAcksResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryNextSequenceReceiveRequest {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryNextSequenceReceiveRequest {
const NAME: &'static str = "QueryNextSequenceReceiveRequest";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryNextSequenceReceiveResponse {
#[prost(uint64, tag = "1")]
pub next_sequence_receive: u64,
#[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 QueryNextSequenceReceiveResponse {
const NAME: &'static str = "QueryNextSequenceReceiveResponse";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.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 channel(
&mut self,
request: impl tonic::IntoRequest<super::QueryChannelRequest>,
) -> std::result::Result<tonic::Response<super::QueryChannelResponse>, 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.channel.v1.Query/Channel");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.channel.v1.Query", "Channel"));
self.inner.unary(req, path, codec).await
}
pub async fn channels(
&mut self,
request: impl tonic::IntoRequest<super::QueryChannelsRequest>,
) -> std::result::Result<tonic::Response<super::QueryChannelsResponse>, 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.channel.v1.Query/Channels");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.channel.v1.Query", "Channels"));
self.inner.unary(req, path, codec).await
}
pub async fn connection_channels(
&mut self,
request: impl tonic::IntoRequest<super::QueryConnectionChannelsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryConnectionChannelsResponse>,
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.channel.v1.Query/ConnectionChannels",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Query",
"ConnectionChannels",
));
self.inner.unary(req, path, codec).await
}
pub async fn channel_client_state(
&mut self,
request: impl tonic::IntoRequest<super::QueryChannelClientStateRequest>,
) -> std::result::Result<
tonic::Response<super::QueryChannelClientStateResponse>,
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.channel.v1.Query/ChannelClientState",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Query",
"ChannelClientState",
));
self.inner.unary(req, path, codec).await
}
pub async fn channel_consensus_state(
&mut self,
request: impl tonic::IntoRequest<super::QueryChannelConsensusStateRequest>,
) -> std::result::Result<
tonic::Response<super::QueryChannelConsensusStateResponse>,
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.channel.v1.Query/ChannelConsensusState",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Query",
"ChannelConsensusState",
));
self.inner.unary(req, path, codec).await
}
pub async fn packet_commitment(
&mut self,
request: impl tonic::IntoRequest<super::QueryPacketCommitmentRequest>,
) -> std::result::Result<tonic::Response<super::QueryPacketCommitmentResponse>, 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.channel.v1.Query/PacketCommitment");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Query",
"PacketCommitment",
));
self.inner.unary(req, path, codec).await
}
pub async fn packet_commitments(
&mut self,
request: impl tonic::IntoRequest<super::QueryPacketCommitmentsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryPacketCommitmentsResponse>,
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.channel.v1.Query/PacketCommitments",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Query",
"PacketCommitments",
));
self.inner.unary(req, path, codec).await
}
pub async fn packet_receipt(
&mut self,
request: impl tonic::IntoRequest<super::QueryPacketReceiptRequest>,
) -> std::result::Result<tonic::Response<super::QueryPacketReceiptResponse>, 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.channel.v1.Query/PacketReceipt");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Query",
"PacketReceipt",
));
self.inner.unary(req, path, codec).await
}
pub async fn packet_acknowledgement(
&mut self,
request: impl tonic::IntoRequest<super::QueryPacketAcknowledgementRequest>,
) -> std::result::Result<
tonic::Response<super::QueryPacketAcknowledgementResponse>,
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.channel.v1.Query/PacketAcknowledgement",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Query",
"PacketAcknowledgement",
));
self.inner.unary(req, path, codec).await
}
pub async fn packet_acknowledgements(
&mut self,
request: impl tonic::IntoRequest<super::QueryPacketAcknowledgementsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryPacketAcknowledgementsResponse>,
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.channel.v1.Query/PacketAcknowledgements",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Query",
"PacketAcknowledgements",
));
self.inner.unary(req, path, codec).await
}
pub async fn unreceived_packets(
&mut self,
request: impl tonic::IntoRequest<super::QueryUnreceivedPacketsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryUnreceivedPacketsResponse>,
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.channel.v1.Query/UnreceivedPackets",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Query",
"UnreceivedPackets",
));
self.inner.unary(req, path, codec).await
}
pub async fn unreceived_acks(
&mut self,
request: impl tonic::IntoRequest<super::QueryUnreceivedAcksRequest>,
) -> std::result::Result<tonic::Response<super::QueryUnreceivedAcksResponse>, 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.channel.v1.Query/UnreceivedAcks");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Query",
"UnreceivedAcks",
));
self.inner.unary(req, path, codec).await
}
pub async fn next_sequence_receive(
&mut self,
request: impl tonic::IntoRequest<super::QueryNextSequenceReceiveRequest>,
) -> std::result::Result<
tonic::Response<super::QueryNextSequenceReceiveResponse>,
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.channel.v1.Query/NextSequenceReceive",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ibc.core.channel.v1.Query",
"NextSequenceReceive",
));
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 channels: ::prost::alloc::vec::Vec<IdentifiedChannel>,
#[prost(message, repeated, tag = "2")]
pub acknowledgements: ::prost::alloc::vec::Vec<PacketState>,
#[prost(message, repeated, tag = "3")]
pub commitments: ::prost::alloc::vec::Vec<PacketState>,
#[prost(message, repeated, tag = "4")]
pub receipts: ::prost::alloc::vec::Vec<PacketState>,
#[prost(message, repeated, tag = "5")]
pub send_sequences: ::prost::alloc::vec::Vec<PacketSequence>,
#[prost(message, repeated, tag = "6")]
pub recv_sequences: ::prost::alloc::vec::Vec<PacketSequence>,
#[prost(message, repeated, tag = "7")]
pub ack_sequences: ::prost::alloc::vec::Vec<PacketSequence>,
#[prost(uint64, tag = "8")]
pub next_channel_sequence: u64,
}
impl ::prost::Name for GenesisState {
const NAME: &'static str = "GenesisState";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PacketSequence {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub sequence: u64,
}
impl ::prost::Name for PacketSequence {
const NAME: &'static str = "PacketSequence";
const PACKAGE: &'static str = "ibc.core.channel.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME)
}
}