#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Params {
#[prost(message, repeated, tag="1")]
pub send_enabled: ::prost::alloc::vec::Vec<SendEnabled>,
#[prost(bool, tag="2")]
pub default_send_enabled: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendEnabled {
#[prost(string, tag="1")]
pub denom: ::prost::alloc::string::String,
#[prost(bool, tag="2")]
pub enabled: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Input {
#[prost(string, tag="1")]
pub address: ::prost::alloc::string::String,
#[prost(message, repeated, tag="2")]
pub coins: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Output {
#[prost(string, tag="1")]
pub address: ::prost::alloc::string::String,
#[prost(message, repeated, tag="2")]
pub coins: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Supply {
#[prost(message, repeated, tag="1")]
pub total: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DenomUnit {
#[prost(string, tag="1")]
pub denom: ::prost::alloc::string::String,
#[prost(uint32, tag="2")]
pub exponent: u32,
#[prost(string, repeated, tag="3")]
pub aliases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metadata {
#[prost(string, tag="1")]
pub description: ::prost::alloc::string::String,
#[prost(message, repeated, tag="2")]
pub denom_units: ::prost::alloc::vec::Vec<DenomUnit>,
#[prost(string, tag="3")]
pub base: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub display: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag="6")]
pub symbol: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
#[prost(message, optional, tag="1")]
pub params: ::core::option::Option<Params>,
#[prost(message, repeated, tag="2")]
pub balances: ::prost::alloc::vec::Vec<Balance>,
#[prost(message, repeated, tag="3")]
pub supply: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
#[prost(message, repeated, tag="4")]
pub denom_metadata: ::prost::alloc::vec::Vec<Metadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Balance {
#[prost(string, tag="1")]
pub address: ::prost::alloc::string::String,
#[prost(message, repeated, tag="2")]
pub coins: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSend {
#[prost(string, tag="1")]
pub from_address: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub to_address: ::prost::alloc::string::String,
#[prost(message, repeated, tag="3")]
pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSendResponse {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgMultiSend {
#[prost(message, repeated, tag="1")]
pub inputs: ::prost::alloc::vec::Vec<Input>,
#[prost(message, repeated, tag="2")]
pub outputs: ::prost::alloc::vec::Vec<Output>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgMultiSendResponse {
}
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 send(
&mut self,
request: impl tonic::IntoRequest<super::MsgSend>,
) -> Result<tonic::Response<super::MsgSendResponse>, 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(
"/cosmos.bank.v1beta1.Msg/Send",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn multi_send(
&mut self,
request: impl tonic::IntoRequest<super::MsgMultiSend>,
) -> Result<tonic::Response<super::MsgMultiSendResponse>, 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(
"/cosmos.bank.v1beta1.Msg/MultiSend",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendAuthorization {
#[prost(message, repeated, tag="1")]
pub spend_limit: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryBalanceRequest {
#[prost(string, tag="1")]
pub address: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub denom: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryBalanceResponse {
#[prost(message, optional, tag="1")]
pub balance: ::core::option::Option<super::super::base::v1beta1::Coin>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryAllBalancesRequest {
#[prost(string, tag="1")]
pub address: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryAllBalancesResponse {
#[prost(message, repeated, tag="1")]
pub balances: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuerySpendableBalancesRequest {
#[prost(string, tag="1")]
pub address: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuerySpendableBalancesResponse {
#[prost(message, repeated, tag="1")]
pub balances: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryTotalSupplyRequest {
#[prost(message, optional, tag="1")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryTotalSupplyResponse {
#[prost(message, repeated, tag="1")]
pub supply: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuerySupplyOfRequest {
#[prost(string, tag="1")]
pub denom: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuerySupplyOfResponse {
#[prost(message, optional, tag="1")]
pub amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
}
#[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 QueryDenomsMetadataRequest {
#[prost(message, optional, tag="1")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDenomsMetadataResponse {
#[prost(message, repeated, tag="1")]
pub metadatas: ::prost::alloc::vec::Vec<Metadata>,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDenomMetadataRequest {
#[prost(string, tag="1")]
pub denom: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDenomMetadataResponse {
#[prost(message, optional, tag="1")]
pub metadata: ::core::option::Option<Metadata>,
}
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 balance(
&mut self,
request: impl tonic::IntoRequest<super::QueryBalanceRequest>,
) -> Result<tonic::Response<super::QueryBalanceResponse>, 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(
"/cosmos.bank.v1beta1.Query/Balance",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn all_balances(
&mut self,
request: impl tonic::IntoRequest<super::QueryAllBalancesRequest>,
) -> Result<tonic::Response<super::QueryAllBalancesResponse>, 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(
"/cosmos.bank.v1beta1.Query/AllBalances",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn spendable_balances(
&mut self,
request: impl tonic::IntoRequest<super::QuerySpendableBalancesRequest>,
) -> Result<
tonic::Response<super::QuerySpendableBalancesResponse>,
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(
"/cosmos.bank.v1beta1.Query/SpendableBalances",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn total_supply(
&mut self,
request: impl tonic::IntoRequest<super::QueryTotalSupplyRequest>,
) -> Result<tonic::Response<super::QueryTotalSupplyResponse>, 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(
"/cosmos.bank.v1beta1.Query/TotalSupply",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn supply_of(
&mut self,
request: impl tonic::IntoRequest<super::QuerySupplyOfRequest>,
) -> Result<tonic::Response<super::QuerySupplyOfResponse>, 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(
"/cosmos.bank.v1beta1.Query/SupplyOf",
);
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(
"/cosmos.bank.v1beta1.Query/Params",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn denom_metadata(
&mut self,
request: impl tonic::IntoRequest<super::QueryDenomMetadataRequest>,
) -> Result<tonic::Response<super::QueryDenomMetadataResponse>, 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(
"/cosmos.bank.v1beta1.Query/DenomMetadata",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn denoms_metadata(
&mut self,
request: impl tonic::IntoRequest<super::QueryDenomsMetadataRequest>,
) -> Result<tonic::Response<super::QueryDenomsMetadataResponse>, 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(
"/cosmos.bank.v1beta1.Query/DenomsMetadata",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}