#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DenomTrace {
#[prost(string, tag="1")]
pub path: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub base_denom: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Params {
#[prost(bool, tag="1")]
pub send_enabled: bool,
#[prost(bool, tag="2")]
pub receive_enabled: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
#[prost(string, tag="1")]
pub port_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag="2")]
pub denom_traces: ::prost::alloc::vec::Vec<DenomTrace>,
#[prost(message, optional, tag="3")]
pub params: ::core::option::Option<Params>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgTransfer {
#[prost(string, tag="1")]
pub source_port: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub source_channel: ::prost::alloc::string::String,
#[prost(message, optional, tag="3")]
pub token: ::core::option::Option<super::super::super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag="4")]
pub sender: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub receiver: ::prost::alloc::string::String,
#[prost(message, optional, tag="6")]
pub timeout_height: ::core::option::Option<super::super::super::core::client::v1::Height>,
#[prost(uint64, tag="7")]
pub timeout_timestamp: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgTransferResponse {
}
pub mod msg_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[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: std::convert::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_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_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[must_use]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
pub async fn transfer(
&mut self,
request: impl tonic::IntoRequest<super::MsgTransfer>,
) -> Result<tonic::Response<super::MsgTransferResponse>, 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.applications.transfer.v1.Msg/Transfer",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDenomTraceRequest {
#[prost(string, tag="1")]
pub hash: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDenomTraceResponse {
#[prost(message, optional, tag="1")]
pub denom_trace: ::core::option::Option<DenomTrace>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDenomTracesRequest {
#[prost(message, optional, tag="1")]
pub pagination: ::core::option::Option<super::super::super::super::cosmos::base::query::v1beta1::PageRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDenomTracesResponse {
#[prost(message, repeated, tag="1")]
pub denom_traces: ::prost::alloc::vec::Vec<DenomTrace>,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::super::super::cosmos::base::query::v1beta1::PageResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParamsRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParamsResponse {
#[prost(message, optional, tag="1")]
pub params: ::core::option::Option<Params>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDenomHashRequest {
#[prost(string, tag="1")]
pub trace: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDenomHashResponse {
#[prost(string, tag="1")]
pub hash: ::prost::alloc::string::String,
}
pub mod query_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct QueryClient<T> {
inner: tonic::client::Grpc<T>,
}
impl QueryClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::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_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_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[must_use]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
pub async fn denom_trace(
&mut self,
request: impl tonic::IntoRequest<super::QueryDenomTraceRequest>,
) -> Result<tonic::Response<super::QueryDenomTraceResponse>, 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.applications.transfer.v1.Query/DenomTrace",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn denom_traces(
&mut self,
request: impl tonic::IntoRequest<super::QueryDenomTracesRequest>,
) -> Result<tonic::Response<super::QueryDenomTracesResponse>, 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.applications.transfer.v1.Query/DenomTraces",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn params(
&mut self,
request: impl tonic::IntoRequest<super::QueryParamsRequest>,
) -> Result<tonic::Response<super::QueryParamsResponse>, 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.applications.transfer.v1.Query/Params",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn denom_hash(
&mut self,
request: impl tonic::IntoRequest<super::QueryDenomHashRequest>,
) -> Result<tonic::Response<super::QueryDenomHashResponse>, 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.applications.transfer.v1.Query/DenomHash",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}