#[cfg_attr(
all(feature = "json-schema", feature = "serde"),
derive(::schemars::JsonSchema)
)]
#[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,
#[prost(uint64, tag = "6")]
pub upgrade_sequence: u64,
}
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,
#[prost(uint64, tag = "8")]
pub upgrade_sequence: u64,
}
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)
}
}
#[cfg_attr(
all(feature = "json-schema", feature = "serde"),
derive(::schemars::JsonSchema)
)]
#[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 PacketId {
#[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 PacketId {
const NAME: &'static str = "PacketId";
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)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Timeout {
#[prost(message, optional, tag = "1")]
pub height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(uint64, tag = "2")]
pub timestamp: u64,
}
impl ::prost::Name for Timeout {
const NAME: &'static str = "Timeout";
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 Params {
#[prost(message, optional, tag = "1")]
pub upgrade_timeout: ::core::option::Option<Timeout>,
}
impl ::prost::Name for Params {
const NAME: &'static str = "Params";
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,
Flushing = 5,
Flushcomplete = 6,
}
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",
State::Flushing => "STATE_FLUSHING",
State::Flushcomplete => "STATE_FLUSHCOMPLETE",
}
}
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),
"STATE_FLUSHING" => Some(Self::Flushing),
"STATE_FLUSHCOMPLETE" => Some(Self::Flushcomplete),
_ => 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 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,
#[prost(message, optional, tag = "9")]
pub params: ::core::option::Option<Params>,
}
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)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Upgrade {
#[prost(message, optional, tag = "1")]
pub fields: ::core::option::Option<UpgradeFields>,
#[prost(message, optional, tag = "2")]
pub timeout: ::core::option::Option<Timeout>,
#[prost(uint64, tag = "3")]
pub next_sequence_send: u64,
}
impl ::prost::Name for Upgrade {
const NAME: &'static str = "Upgrade";
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 UpgradeFields {
#[prost(enumeration = "Order", tag = "1")]
pub ordering: i32,
#[prost(string, repeated, tag = "2")]
pub connection_hops: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "3")]
pub version: ::prost::alloc::string::String,
}
impl ::prost::Name for UpgradeFields {
const NAME: &'static str = "UpgradeFields";
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 ErrorReceipt {
#[prost(uint64, tag = "1")]
pub sequence: u64,
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
}
impl ::prost::Name for ErrorReceipt {
const NAME: &'static str = "ErrorReceipt";
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 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,
#[prost(string, tag = "2")]
pub version: ::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,
#[deprecated]
#[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 {
#[prost(string, tag = "1")]
pub version: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
}
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,
#[prost(uint64, tag = "6")]
pub counterparty_upgrade_sequence: u64,
}
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,
#[prost(uint64, tag = "7")]
pub counterparty_upgrade_sequence: u64,
}
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)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgChannelUpgradeInit {
#[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 fields: ::core::option::Option<UpgradeFields>,
#[prost(string, tag = "4")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgChannelUpgradeInit {
const NAME: &'static str = "MsgChannelUpgradeInit";
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 MsgChannelUpgradeInitResponse {
#[prost(message, optional, tag = "1")]
pub upgrade: ::core::option::Option<Upgrade>,
#[prost(uint64, tag = "2")]
pub upgrade_sequence: u64,
}
impl ::prost::Name for MsgChannelUpgradeInitResponse {
const NAME: &'static str = "MsgChannelUpgradeInitResponse";
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 MsgChannelUpgradeTry {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub proposed_upgrade_connection_hops: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "4")]
pub counterparty_upgrade_fields: ::core::option::Option<UpgradeFields>,
#[prost(uint64, tag = "5")]
pub counterparty_upgrade_sequence: u64,
#[prost(bytes = "vec", tag = "6")]
pub proof_channel: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "7")]
pub proof_upgrade: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "8")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(string, tag = "9")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgChannelUpgradeTry {
const NAME: &'static str = "MsgChannelUpgradeTry";
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 MsgChannelUpgradeTryResponse {
#[prost(message, optional, tag = "1")]
pub upgrade: ::core::option::Option<Upgrade>,
#[prost(uint64, tag = "2")]
pub upgrade_sequence: u64,
#[prost(enumeration = "ResponseResultType", tag = "3")]
pub result: i32,
}
impl ::prost::Name for MsgChannelUpgradeTryResponse {
const NAME: &'static str = "MsgChannelUpgradeTryResponse";
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 MsgChannelUpgradeAck {
#[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 counterparty_upgrade: ::core::option::Option<Upgrade>,
#[prost(bytes = "vec", tag = "4")]
pub proof_channel: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "5")]
pub proof_upgrade: ::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 MsgChannelUpgradeAck {
const NAME: &'static str = "MsgChannelUpgradeAck";
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 MsgChannelUpgradeAckResponse {
#[prost(enumeration = "ResponseResultType", tag = "1")]
pub result: i32,
}
impl ::prost::Name for MsgChannelUpgradeAckResponse {
const NAME: &'static str = "MsgChannelUpgradeAckResponse";
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 MsgChannelUpgradeConfirm {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(enumeration = "State", tag = "3")]
pub counterparty_channel_state: i32,
#[prost(message, optional, tag = "4")]
pub counterparty_upgrade: ::core::option::Option<Upgrade>,
#[prost(bytes = "vec", tag = "5")]
pub proof_channel: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "6")]
pub proof_upgrade: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "7")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(string, tag = "8")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgChannelUpgradeConfirm {
const NAME: &'static str = "MsgChannelUpgradeConfirm";
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 MsgChannelUpgradeConfirmResponse {
#[prost(enumeration = "ResponseResultType", tag = "1")]
pub result: i32,
}
impl ::prost::Name for MsgChannelUpgradeConfirmResponse {
const NAME: &'static str = "MsgChannelUpgradeConfirmResponse";
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 MsgChannelUpgradeOpen {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(enumeration = "State", tag = "3")]
pub counterparty_channel_state: i32,
#[prost(uint64, tag = "4")]
pub counterparty_upgrade_sequence: u64,
#[prost(bytes = "vec", tag = "5")]
pub proof_channel: ::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 MsgChannelUpgradeOpen {
const NAME: &'static str = "MsgChannelUpgradeOpen";
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 MsgChannelUpgradeOpenResponse {}
impl ::prost::Name for MsgChannelUpgradeOpenResponse {
const NAME: &'static str = "MsgChannelUpgradeOpenResponse";
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 MsgChannelUpgradeTimeout {
#[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 counterparty_channel: ::core::option::Option<Channel>,
#[prost(bytes = "vec", tag = "4")]
pub proof_channel: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "5")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(string, tag = "6")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgChannelUpgradeTimeout {
const NAME: &'static str = "MsgChannelUpgradeTimeout";
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 MsgChannelUpgradeTimeoutResponse {}
impl ::prost::Name for MsgChannelUpgradeTimeoutResponse {
const NAME: &'static str = "MsgChannelUpgradeTimeoutResponse";
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 MsgChannelUpgradeCancel {
#[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 error_receipt: ::core::option::Option<ErrorReceipt>,
#[prost(bytes = "vec", tag = "4")]
pub proof_error_receipt: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "5")]
pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
#[prost(string, tag = "6")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgChannelUpgradeCancel {
const NAME: &'static str = "MsgChannelUpgradeCancel";
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 MsgChannelUpgradeCancelResponse {}
impl ::prost::Name for MsgChannelUpgradeCancelResponse {
const NAME: &'static str = "MsgChannelUpgradeCancelResponse";
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 MsgUpdateParams {
#[prost(string, tag = "1")]
pub authority: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub params: ::core::option::Option<Params>,
}
impl ::prost::Name for MsgUpdateParams {
const NAME: &'static str = "MsgUpdateParams";
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 MsgUpdateParamsResponse {}
impl ::prost::Name for MsgUpdateParamsResponse {
const NAME: &'static str = "MsgUpdateParamsResponse";
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 MsgPruneAcknowledgements {
#[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 limit: u64,
#[prost(string, tag = "4")]
pub signer: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgPruneAcknowledgements {
const NAME: &'static str = "MsgPruneAcknowledgements";
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 MsgPruneAcknowledgementsResponse {
#[prost(uint64, tag = "1")]
pub total_pruned_sequences: u64,
#[prost(uint64, tag = "2")]
pub total_remaining_sequences: u64,
}
impl ::prost::Name for MsgPruneAcknowledgementsResponse {
const NAME: &'static str = "MsgPruneAcknowledgementsResponse";
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 {
Unspecified = 0,
Noop = 1,
Success = 2,
Failure = 3,
}
impl ResponseResultType {
pub fn as_str_name(&self) -> &'static str {
match self {
ResponseResultType::Unspecified => "RESPONSE_RESULT_TYPE_UNSPECIFIED",
ResponseResultType::Noop => "RESPONSE_RESULT_TYPE_NOOP",
ResponseResultType::Success => "RESPONSE_RESULT_TYPE_SUCCESS",
ResponseResultType::Failure => "RESPONSE_RESULT_TYPE_FAILURE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESPONSE_RESULT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"RESPONSE_RESULT_TYPE_NOOP" => Some(Self::Noop),
"RESPONSE_RESULT_TYPE_SUCCESS" => Some(Self::Success),
"RESPONSE_RESULT_TYPE_FAILURE" => Some(Self::Failure),
_ => None,
}
}
}
#[cfg(feature = "client")]
pub mod msg_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct MsgClient<T> {
inner: tonic::client::Grpc<T>,
}
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
}
pub async fn channel_upgrade_init(
&mut self,
request: impl tonic::IntoRequest<super::MsgChannelUpgradeInit>,
) -> std::result::Result<
tonic::Response<super::MsgChannelUpgradeInitResponse>,
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/ChannelUpgradeInit",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelUpgradeInit"),
);
self.inner.unary(req, path, codec).await
}
pub async fn channel_upgrade_try(
&mut self,
request: impl tonic::IntoRequest<super::MsgChannelUpgradeTry>,
) -> std::result::Result<
tonic::Response<super::MsgChannelUpgradeTryResponse>,
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/ChannelUpgradeTry",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelUpgradeTry"));
self.inner.unary(req, path, codec).await
}
pub async fn channel_upgrade_ack(
&mut self,
request: impl tonic::IntoRequest<super::MsgChannelUpgradeAck>,
) -> std::result::Result<
tonic::Response<super::MsgChannelUpgradeAckResponse>,
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/ChannelUpgradeAck",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelUpgradeAck"));
self.inner.unary(req, path, codec).await
}
pub async fn channel_upgrade_confirm(
&mut self,
request: impl tonic::IntoRequest<super::MsgChannelUpgradeConfirm>,
) -> std::result::Result<
tonic::Response<super::MsgChannelUpgradeConfirmResponse>,
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/ChannelUpgradeConfirm",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelUpgradeConfirm"),
);
self.inner.unary(req, path, codec).await
}
pub async fn channel_upgrade_open(
&mut self,
request: impl tonic::IntoRequest<super::MsgChannelUpgradeOpen>,
) -> std::result::Result<
tonic::Response<super::MsgChannelUpgradeOpenResponse>,
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/ChannelUpgradeOpen",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelUpgradeOpen"),
);
self.inner.unary(req, path, codec).await
}
pub async fn channel_upgrade_timeout(
&mut self,
request: impl tonic::IntoRequest<super::MsgChannelUpgradeTimeout>,
) -> std::result::Result<
tonic::Response<super::MsgChannelUpgradeTimeoutResponse>,
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/ChannelUpgradeTimeout",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelUpgradeTimeout"),
);
self.inner.unary(req, path, codec).await
}
pub async fn channel_upgrade_cancel(
&mut self,
request: impl tonic::IntoRequest<super::MsgChannelUpgradeCancel>,
) -> std::result::Result<
tonic::Response<super::MsgChannelUpgradeCancelResponse>,
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/ChannelUpgradeCancel",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelUpgradeCancel"),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_channel_params(
&mut self,
request: impl tonic::IntoRequest<super::MsgUpdateParams>,
) -> std::result::Result<
tonic::Response<super::MsgUpdateParamsResponse>,
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/UpdateChannelParams",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ibc.core.channel.v1.Msg", "UpdateChannelParams"),
);
self.inner.unary(req, path, codec).await
}
pub async fn prune_acknowledgements(
&mut self,
request: impl tonic::IntoRequest<super::MsgPruneAcknowledgements>,
) -> std::result::Result<
tonic::Response<super::MsgPruneAcknowledgementsResponse>,
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/PruneAcknowledgements",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ibc.core.channel.v1.Msg", "PruneAcknowledgements"),
);
self.inner.unary(req, path, codec).await
}
}
}
#[cfg(feature = "server")]
pub mod msg_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait Msg: Send + Sync + 'static {
async fn channel_open_init(
&self,
request: tonic::Request<super::MsgChannelOpenInit>,
) -> std::result::Result<
tonic::Response<super::MsgChannelOpenInitResponse>,
tonic::Status,
>;
async fn channel_open_try(
&self,
request: tonic::Request<super::MsgChannelOpenTry>,
) -> std::result::Result<
tonic::Response<super::MsgChannelOpenTryResponse>,
tonic::Status,
>;
async fn channel_open_ack(
&self,
request: tonic::Request<super::MsgChannelOpenAck>,
) -> std::result::Result<
tonic::Response<super::MsgChannelOpenAckResponse>,
tonic::Status,
>;
async fn channel_open_confirm(
&self,
request: tonic::Request<super::MsgChannelOpenConfirm>,
) -> std::result::Result<
tonic::Response<super::MsgChannelOpenConfirmResponse>,
tonic::Status,
>;
async fn channel_close_init(
&self,
request: tonic::Request<super::MsgChannelCloseInit>,
) -> std::result::Result<
tonic::Response<super::MsgChannelCloseInitResponse>,
tonic::Status,
>;
async fn channel_close_confirm(
&self,
request: tonic::Request<super::MsgChannelCloseConfirm>,
) -> std::result::Result<
tonic::Response<super::MsgChannelCloseConfirmResponse>,
tonic::Status,
>;
async fn recv_packet(
&self,
request: tonic::Request<super::MsgRecvPacket>,
) -> std::result::Result<
tonic::Response<super::MsgRecvPacketResponse>,
tonic::Status,
>;
async fn timeout(
&self,
request: tonic::Request<super::MsgTimeout>,
) -> std::result::Result<
tonic::Response<super::MsgTimeoutResponse>,
tonic::Status,
>;
async fn timeout_on_close(
&self,
request: tonic::Request<super::MsgTimeoutOnClose>,
) -> std::result::Result<
tonic::Response<super::MsgTimeoutOnCloseResponse>,
tonic::Status,
>;
async fn acknowledgement(
&self,
request: tonic::Request<super::MsgAcknowledgement>,
) -> std::result::Result<
tonic::Response<super::MsgAcknowledgementResponse>,
tonic::Status,
>;
async fn channel_upgrade_init(
&self,
request: tonic::Request<super::MsgChannelUpgradeInit>,
) -> std::result::Result<
tonic::Response<super::MsgChannelUpgradeInitResponse>,
tonic::Status,
>;
async fn channel_upgrade_try(
&self,
request: tonic::Request<super::MsgChannelUpgradeTry>,
) -> std::result::Result<
tonic::Response<super::MsgChannelUpgradeTryResponse>,
tonic::Status,
>;
async fn channel_upgrade_ack(
&self,
request: tonic::Request<super::MsgChannelUpgradeAck>,
) -> std::result::Result<
tonic::Response<super::MsgChannelUpgradeAckResponse>,
tonic::Status,
>;
async fn channel_upgrade_confirm(
&self,
request: tonic::Request<super::MsgChannelUpgradeConfirm>,
) -> std::result::Result<
tonic::Response<super::MsgChannelUpgradeConfirmResponse>,
tonic::Status,
>;
async fn channel_upgrade_open(
&self,
request: tonic::Request<super::MsgChannelUpgradeOpen>,
) -> std::result::Result<
tonic::Response<super::MsgChannelUpgradeOpenResponse>,
tonic::Status,
>;
async fn channel_upgrade_timeout(
&self,
request: tonic::Request<super::MsgChannelUpgradeTimeout>,
) -> std::result::Result<
tonic::Response<super::MsgChannelUpgradeTimeoutResponse>,
tonic::Status,
>;
async fn channel_upgrade_cancel(
&self,
request: tonic::Request<super::MsgChannelUpgradeCancel>,
) -> std::result::Result<
tonic::Response<super::MsgChannelUpgradeCancelResponse>,
tonic::Status,
>;
async fn update_channel_params(
&self,
request: tonic::Request<super::MsgUpdateParams>,
) -> std::result::Result<
tonic::Response<super::MsgUpdateParamsResponse>,
tonic::Status,
>;
async fn prune_acknowledgements(
&self,
request: tonic::Request<super::MsgPruneAcknowledgements>,
) -> std::result::Result<
tonic::Response<super::MsgPruneAcknowledgementsResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct MsgServer<T: Msg> {
inner: _Inner<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
struct _Inner<T>(Arc<T>);
impl<T: Msg> MsgServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for MsgServer<T>
where
T: Msg,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/ibc.core.channel.v1.Msg/ChannelOpenInit" => {
#[allow(non_camel_case_types)]
struct ChannelOpenInitSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgChannelOpenInit>
for ChannelOpenInitSvc<T> {
type Response = super::MsgChannelOpenInitResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgChannelOpenInit>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::channel_open_init(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelOpenInitSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/ChannelOpenTry" => {
#[allow(non_camel_case_types)]
struct ChannelOpenTrySvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgChannelOpenTry>
for ChannelOpenTrySvc<T> {
type Response = super::MsgChannelOpenTryResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgChannelOpenTry>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::channel_open_try(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelOpenTrySvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/ChannelOpenAck" => {
#[allow(non_camel_case_types)]
struct ChannelOpenAckSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgChannelOpenAck>
for ChannelOpenAckSvc<T> {
type Response = super::MsgChannelOpenAckResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgChannelOpenAck>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::channel_open_ack(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelOpenAckSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/ChannelOpenConfirm" => {
#[allow(non_camel_case_types)]
struct ChannelOpenConfirmSvc<T: Msg>(pub Arc<T>);
impl<
T: Msg,
> tonic::server::UnaryService<super::MsgChannelOpenConfirm>
for ChannelOpenConfirmSvc<T> {
type Response = super::MsgChannelOpenConfirmResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgChannelOpenConfirm>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::channel_open_confirm(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelOpenConfirmSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/ChannelCloseInit" => {
#[allow(non_camel_case_types)]
struct ChannelCloseInitSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgChannelCloseInit>
for ChannelCloseInitSvc<T> {
type Response = super::MsgChannelCloseInitResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgChannelCloseInit>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::channel_close_init(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelCloseInitSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/ChannelCloseConfirm" => {
#[allow(non_camel_case_types)]
struct ChannelCloseConfirmSvc<T: Msg>(pub Arc<T>);
impl<
T: Msg,
> tonic::server::UnaryService<super::MsgChannelCloseConfirm>
for ChannelCloseConfirmSvc<T> {
type Response = super::MsgChannelCloseConfirmResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgChannelCloseConfirm>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::channel_close_confirm(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelCloseConfirmSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/RecvPacket" => {
#[allow(non_camel_case_types)]
struct RecvPacketSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgRecvPacket>
for RecvPacketSvc<T> {
type Response = super::MsgRecvPacketResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgRecvPacket>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::recv_packet(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = RecvPacketSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/Timeout" => {
#[allow(non_camel_case_types)]
struct TimeoutSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgTimeout>
for TimeoutSvc<T> {
type Response = super::MsgTimeoutResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgTimeout>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::timeout(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = TimeoutSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/TimeoutOnClose" => {
#[allow(non_camel_case_types)]
struct TimeoutOnCloseSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgTimeoutOnClose>
for TimeoutOnCloseSvc<T> {
type Response = super::MsgTimeoutOnCloseResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgTimeoutOnClose>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::timeout_on_close(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = TimeoutOnCloseSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/Acknowledgement" => {
#[allow(non_camel_case_types)]
struct AcknowledgementSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgAcknowledgement>
for AcknowledgementSvc<T> {
type Response = super::MsgAcknowledgementResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgAcknowledgement>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::acknowledgement(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = AcknowledgementSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/ChannelUpgradeInit" => {
#[allow(non_camel_case_types)]
struct ChannelUpgradeInitSvc<T: Msg>(pub Arc<T>);
impl<
T: Msg,
> tonic::server::UnaryService<super::MsgChannelUpgradeInit>
for ChannelUpgradeInitSvc<T> {
type Response = super::MsgChannelUpgradeInitResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgChannelUpgradeInit>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::channel_upgrade_init(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelUpgradeInitSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/ChannelUpgradeTry" => {
#[allow(non_camel_case_types)]
struct ChannelUpgradeTrySvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgChannelUpgradeTry>
for ChannelUpgradeTrySvc<T> {
type Response = super::MsgChannelUpgradeTryResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgChannelUpgradeTry>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::channel_upgrade_try(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelUpgradeTrySvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/ChannelUpgradeAck" => {
#[allow(non_camel_case_types)]
struct ChannelUpgradeAckSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgChannelUpgradeAck>
for ChannelUpgradeAckSvc<T> {
type Response = super::MsgChannelUpgradeAckResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgChannelUpgradeAck>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::channel_upgrade_ack(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelUpgradeAckSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/ChannelUpgradeConfirm" => {
#[allow(non_camel_case_types)]
struct ChannelUpgradeConfirmSvc<T: Msg>(pub Arc<T>);
impl<
T: Msg,
> tonic::server::UnaryService<super::MsgChannelUpgradeConfirm>
for ChannelUpgradeConfirmSvc<T> {
type Response = super::MsgChannelUpgradeConfirmResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgChannelUpgradeConfirm>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::channel_upgrade_confirm(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelUpgradeConfirmSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/ChannelUpgradeOpen" => {
#[allow(non_camel_case_types)]
struct ChannelUpgradeOpenSvc<T: Msg>(pub Arc<T>);
impl<
T: Msg,
> tonic::server::UnaryService<super::MsgChannelUpgradeOpen>
for ChannelUpgradeOpenSvc<T> {
type Response = super::MsgChannelUpgradeOpenResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgChannelUpgradeOpen>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::channel_upgrade_open(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelUpgradeOpenSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/ChannelUpgradeTimeout" => {
#[allow(non_camel_case_types)]
struct ChannelUpgradeTimeoutSvc<T: Msg>(pub Arc<T>);
impl<
T: Msg,
> tonic::server::UnaryService<super::MsgChannelUpgradeTimeout>
for ChannelUpgradeTimeoutSvc<T> {
type Response = super::MsgChannelUpgradeTimeoutResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgChannelUpgradeTimeout>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::channel_upgrade_timeout(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelUpgradeTimeoutSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/ChannelUpgradeCancel" => {
#[allow(non_camel_case_types)]
struct ChannelUpgradeCancelSvc<T: Msg>(pub Arc<T>);
impl<
T: Msg,
> tonic::server::UnaryService<super::MsgChannelUpgradeCancel>
for ChannelUpgradeCancelSvc<T> {
type Response = super::MsgChannelUpgradeCancelResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgChannelUpgradeCancel>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::channel_upgrade_cancel(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelUpgradeCancelSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/UpdateChannelParams" => {
#[allow(non_camel_case_types)]
struct UpdateChannelParamsSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgUpdateParams>
for UpdateChannelParamsSvc<T> {
type Response = super::MsgUpdateParamsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgUpdateParams>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::update_channel_params(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = UpdateChannelParamsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Msg/PruneAcknowledgements" => {
#[allow(non_camel_case_types)]
struct PruneAcknowledgementsSvc<T: Msg>(pub Arc<T>);
impl<
T: Msg,
> tonic::server::UnaryService<super::MsgPruneAcknowledgements>
for PruneAcknowledgementsSvc<T> {
type Response = super::MsgPruneAcknowledgementsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgPruneAcknowledgements>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::prune_acknowledgements(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = PruneAcknowledgementsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
Ok(
http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap(),
)
})
}
}
}
}
impl<T: Msg> Clone for MsgServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
impl<T: Msg> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(Arc::clone(&self.0))
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: Msg> tonic::server::NamedService for MsgServer<T> {
const NAME: &'static str = "ibc.core.channel.v1.Msg";
}
}
#[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<
super::super::super::super::google::protobuf::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)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryNextSequenceSendRequest {
#[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 QueryNextSequenceSendRequest {
const NAME: &'static str = "QueryNextSequenceSendRequest";
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 QueryNextSequenceSendResponse {
#[prost(uint64, tag = "1")]
pub next_sequence_send: 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 QueryNextSequenceSendResponse {
const NAME: &'static str = "QueryNextSequenceSendResponse";
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 QueryUpgradeErrorRequest {
#[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 QueryUpgradeErrorRequest {
const NAME: &'static str = "QueryUpgradeErrorRequest";
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 QueryUpgradeErrorResponse {
#[prost(message, optional, tag = "1")]
pub error_receipt: ::core::option::Option<ErrorReceipt>,
#[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 QueryUpgradeErrorResponse {
const NAME: &'static str = "QueryUpgradeErrorResponse";
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 QueryUpgradeRequest {
#[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 QueryUpgradeRequest {
const NAME: &'static str = "QueryUpgradeRequest";
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 QueryUpgradeResponse {
#[prost(message, optional, tag = "1")]
pub upgrade: ::core::option::Option<Upgrade>,
#[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 QueryUpgradeResponse {
const NAME: &'static str = "QueryUpgradeResponse";
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 QueryChannelParamsRequest {}
impl ::prost::Name for QueryChannelParamsRequest {
const NAME: &'static str = "QueryChannelParamsRequest";
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 QueryChannelParamsResponse {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
}
impl ::prost::Name for QueryChannelParamsResponse {
const NAME: &'static str = "QueryChannelParamsResponse";
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 = "client")]
pub mod query_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct QueryClient<T> {
inner: tonic::client::Grpc<T>,
}
impl QueryClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> QueryClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + 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
}
pub async fn next_sequence_send(
&mut self,
request: impl tonic::IntoRequest<super::QueryNextSequenceSendRequest>,
) -> std::result::Result<
tonic::Response<super::QueryNextSequenceSendResponse>,
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/NextSequenceSend",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ibc.core.channel.v1.Query", "NextSequenceSend"),
);
self.inner.unary(req, path, codec).await
}
pub async fn upgrade_error(
&mut self,
request: impl tonic::IntoRequest<super::QueryUpgradeErrorRequest>,
) -> std::result::Result<
tonic::Response<super::QueryUpgradeErrorResponse>,
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/UpgradeError",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.channel.v1.Query", "UpgradeError"));
self.inner.unary(req, path, codec).await
}
pub async fn upgrade(
&mut self,
request: impl tonic::IntoRequest<super::QueryUpgradeRequest>,
) -> std::result::Result<
tonic::Response<super::QueryUpgradeResponse>,
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/Upgrade",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.channel.v1.Query", "Upgrade"));
self.inner.unary(req, path, codec).await
}
pub async fn channel_params(
&mut self,
request: impl tonic::IntoRequest<super::QueryChannelParamsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryChannelParamsResponse>,
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/ChannelParams",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.core.channel.v1.Query", "ChannelParams"));
self.inner.unary(req, path, codec).await
}
}
}
#[cfg(feature = "server")]
pub mod query_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait Query: Send + Sync + 'static {
async fn channel(
&self,
request: tonic::Request<super::QueryChannelRequest>,
) -> std::result::Result<
tonic::Response<super::QueryChannelResponse>,
tonic::Status,
>;
async fn channels(
&self,
request: tonic::Request<super::QueryChannelsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryChannelsResponse>,
tonic::Status,
>;
async fn connection_channels(
&self,
request: tonic::Request<super::QueryConnectionChannelsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryConnectionChannelsResponse>,
tonic::Status,
>;
async fn channel_client_state(
&self,
request: tonic::Request<super::QueryChannelClientStateRequest>,
) -> std::result::Result<
tonic::Response<super::QueryChannelClientStateResponse>,
tonic::Status,
>;
async fn channel_consensus_state(
&self,
request: tonic::Request<super::QueryChannelConsensusStateRequest>,
) -> std::result::Result<
tonic::Response<super::QueryChannelConsensusStateResponse>,
tonic::Status,
>;
async fn packet_commitment(
&self,
request: tonic::Request<super::QueryPacketCommitmentRequest>,
) -> std::result::Result<
tonic::Response<super::QueryPacketCommitmentResponse>,
tonic::Status,
>;
async fn packet_commitments(
&self,
request: tonic::Request<super::QueryPacketCommitmentsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryPacketCommitmentsResponse>,
tonic::Status,
>;
async fn packet_receipt(
&self,
request: tonic::Request<super::QueryPacketReceiptRequest>,
) -> std::result::Result<
tonic::Response<super::QueryPacketReceiptResponse>,
tonic::Status,
>;
async fn packet_acknowledgement(
&self,
request: tonic::Request<super::QueryPacketAcknowledgementRequest>,
) -> std::result::Result<
tonic::Response<super::QueryPacketAcknowledgementResponse>,
tonic::Status,
>;
async fn packet_acknowledgements(
&self,
request: tonic::Request<super::QueryPacketAcknowledgementsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryPacketAcknowledgementsResponse>,
tonic::Status,
>;
async fn unreceived_packets(
&self,
request: tonic::Request<super::QueryUnreceivedPacketsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryUnreceivedPacketsResponse>,
tonic::Status,
>;
async fn unreceived_acks(
&self,
request: tonic::Request<super::QueryUnreceivedAcksRequest>,
) -> std::result::Result<
tonic::Response<super::QueryUnreceivedAcksResponse>,
tonic::Status,
>;
async fn next_sequence_receive(
&self,
request: tonic::Request<super::QueryNextSequenceReceiveRequest>,
) -> std::result::Result<
tonic::Response<super::QueryNextSequenceReceiveResponse>,
tonic::Status,
>;
async fn next_sequence_send(
&self,
request: tonic::Request<super::QueryNextSequenceSendRequest>,
) -> std::result::Result<
tonic::Response<super::QueryNextSequenceSendResponse>,
tonic::Status,
>;
async fn upgrade_error(
&self,
request: tonic::Request<super::QueryUpgradeErrorRequest>,
) -> std::result::Result<
tonic::Response<super::QueryUpgradeErrorResponse>,
tonic::Status,
>;
async fn upgrade(
&self,
request: tonic::Request<super::QueryUpgradeRequest>,
) -> std::result::Result<
tonic::Response<super::QueryUpgradeResponse>,
tonic::Status,
>;
async fn channel_params(
&self,
request: tonic::Request<super::QueryChannelParamsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryChannelParamsResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct QueryServer<T: Query> {
inner: _Inner<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
struct _Inner<T>(Arc<T>);
impl<T: Query> QueryServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServer<T>
where
T: Query,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/ibc.core.channel.v1.Query/Channel" => {
#[allow(non_camel_case_types)]
struct ChannelSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryChannelRequest>
for ChannelSvc<T> {
type Response = super::QueryChannelResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryChannelRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::channel(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/Channels" => {
#[allow(non_camel_case_types)]
struct ChannelsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryChannelsRequest>
for ChannelsSvc<T> {
type Response = super::QueryChannelsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryChannelsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::channels(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/ConnectionChannels" => {
#[allow(non_camel_case_types)]
struct ConnectionChannelsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryConnectionChannelsRequest>
for ConnectionChannelsSvc<T> {
type Response = super::QueryConnectionChannelsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryConnectionChannelsRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::connection_channels(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ConnectionChannelsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/ChannelClientState" => {
#[allow(non_camel_case_types)]
struct ChannelClientStateSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryChannelClientStateRequest>
for ChannelClientStateSvc<T> {
type Response = super::QueryChannelClientStateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryChannelClientStateRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::channel_client_state(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelClientStateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/ChannelConsensusState" => {
#[allow(non_camel_case_types)]
struct ChannelConsensusStateSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryChannelConsensusStateRequest,
> for ChannelConsensusStateSvc<T> {
type Response = super::QueryChannelConsensusStateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryChannelConsensusStateRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::channel_consensus_state(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelConsensusStateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/PacketCommitment" => {
#[allow(non_camel_case_types)]
struct PacketCommitmentSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryPacketCommitmentRequest>
for PacketCommitmentSvc<T> {
type Response = super::QueryPacketCommitmentResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryPacketCommitmentRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::packet_commitment(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = PacketCommitmentSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/PacketCommitments" => {
#[allow(non_camel_case_types)]
struct PacketCommitmentsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryPacketCommitmentsRequest>
for PacketCommitmentsSvc<T> {
type Response = super::QueryPacketCommitmentsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryPacketCommitmentsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::packet_commitments(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = PacketCommitmentsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/PacketReceipt" => {
#[allow(non_camel_case_types)]
struct PacketReceiptSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryPacketReceiptRequest>
for PacketReceiptSvc<T> {
type Response = super::QueryPacketReceiptResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryPacketReceiptRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::packet_receipt(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = PacketReceiptSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/PacketAcknowledgement" => {
#[allow(non_camel_case_types)]
struct PacketAcknowledgementSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryPacketAcknowledgementRequest,
> for PacketAcknowledgementSvc<T> {
type Response = super::QueryPacketAcknowledgementResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryPacketAcknowledgementRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::packet_acknowledgement(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = PacketAcknowledgementSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/PacketAcknowledgements" => {
#[allow(non_camel_case_types)]
struct PacketAcknowledgementsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryPacketAcknowledgementsRequest,
> for PacketAcknowledgementsSvc<T> {
type Response = super::QueryPacketAcknowledgementsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryPacketAcknowledgementsRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::packet_acknowledgements(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = PacketAcknowledgementsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/UnreceivedPackets" => {
#[allow(non_camel_case_types)]
struct UnreceivedPacketsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryUnreceivedPacketsRequest>
for UnreceivedPacketsSvc<T> {
type Response = super::QueryUnreceivedPacketsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryUnreceivedPacketsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::unreceived_packets(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = UnreceivedPacketsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/UnreceivedAcks" => {
#[allow(non_camel_case_types)]
struct UnreceivedAcksSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryUnreceivedAcksRequest>
for UnreceivedAcksSvc<T> {
type Response = super::QueryUnreceivedAcksResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryUnreceivedAcksRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::unreceived_acks(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = UnreceivedAcksSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/NextSequenceReceive" => {
#[allow(non_camel_case_types)]
struct NextSequenceReceiveSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryNextSequenceReceiveRequest>
for NextSequenceReceiveSvc<T> {
type Response = super::QueryNextSequenceReceiveResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryNextSequenceReceiveRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::next_sequence_receive(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = NextSequenceReceiveSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/NextSequenceSend" => {
#[allow(non_camel_case_types)]
struct NextSequenceSendSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryNextSequenceSendRequest>
for NextSequenceSendSvc<T> {
type Response = super::QueryNextSequenceSendResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryNextSequenceSendRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::next_sequence_send(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = NextSequenceSendSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/UpgradeError" => {
#[allow(non_camel_case_types)]
struct UpgradeErrorSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryUpgradeErrorRequest>
for UpgradeErrorSvc<T> {
type Response = super::QueryUpgradeErrorResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryUpgradeErrorRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::upgrade_error(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = UpgradeErrorSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/Upgrade" => {
#[allow(non_camel_case_types)]
struct UpgradeSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryUpgradeRequest>
for UpgradeSvc<T> {
type Response = super::QueryUpgradeResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryUpgradeRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::upgrade(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = UpgradeSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.core.channel.v1.Query/ChannelParams" => {
#[allow(non_camel_case_types)]
struct ChannelParamsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryChannelParamsRequest>
for ChannelParamsSvc<T> {
type Response = super::QueryChannelParamsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryChannelParamsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::channel_params(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ChannelParamsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
Ok(
http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap(),
)
})
}
}
}
}
impl<T: Query> Clone for QueryServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
impl<T: Query> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(Arc::clone(&self.0))
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: Query> tonic::server::NamedService for QueryServer<T> {
const NAME: &'static str = "ibc.core.channel.v1.Query";
}
}