#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Tx {
#[prost(message, optional, tag = "1")]
pub body: ::core::option::Option<TxBody>,
#[prost(message, optional, tag = "2")]
pub auth_info: ::core::option::Option<AuthInfo>,
#[prost(bytes = "vec", repeated, tag = "3")]
pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
impl ::prost::Name for Tx {
const NAME: &'static str = "Tx";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxRaw {
#[prost(bytes = "vec", tag = "1")]
pub body_bytes: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub auth_info_bytes: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", repeated, tag = "3")]
pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
impl ::prost::Name for TxRaw {
const NAME: &'static str = "TxRaw";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignDoc {
#[prost(bytes = "vec", tag = "1")]
pub body_bytes: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub auth_info_bytes: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "3")]
pub chain_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "4")]
pub account_number: u64,
}
impl ::prost::Name for SignDoc {
const NAME: &'static str = "SignDoc";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignDocDirectAux {
#[prost(bytes = "vec", tag = "1")]
pub body_bytes: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "2")]
pub public_key: ::core::option::Option<::pbjson_types::Any>,
#[prost(string, tag = "3")]
pub chain_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "4")]
pub account_number: u64,
#[prost(uint64, tag = "5")]
pub sequence: u64,
#[prost(message, optional, tag = "6")]
pub tip: ::core::option::Option<Tip>,
}
impl ::prost::Name for SignDocDirectAux {
const NAME: &'static str = "SignDocDirectAux";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxBody {
#[prost(message, repeated, tag = "1")]
pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>,
#[prost(string, tag = "2")]
pub memo: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub timeout_height: u64,
#[prost(message, repeated, tag = "1023")]
pub extension_options: ::prost::alloc::vec::Vec<::pbjson_types::Any>,
#[prost(message, repeated, tag = "2047")]
pub non_critical_extension_options: ::prost::alloc::vec::Vec<::pbjson_types::Any>,
}
impl ::prost::Name for TxBody {
const NAME: &'static str = "TxBody";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthInfo {
#[prost(message, repeated, tag = "1")]
pub signer_infos: ::prost::alloc::vec::Vec<SignerInfo>,
#[prost(message, optional, tag = "2")]
pub fee: ::core::option::Option<Fee>,
#[prost(message, optional, tag = "3")]
pub tip: ::core::option::Option<Tip>,
}
impl ::prost::Name for AuthInfo {
const NAME: &'static str = "AuthInfo";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignerInfo {
#[prost(message, optional, tag = "1")]
pub public_key: ::core::option::Option<::pbjson_types::Any>,
#[prost(message, optional, tag = "2")]
pub mode_info: ::core::option::Option<ModeInfo>,
#[prost(uint64, tag = "3")]
pub sequence: u64,
}
impl ::prost::Name for SignerInfo {
const NAME: &'static str = "SignerInfo";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModeInfo {
#[prost(oneof = "mode_info::Sum", tags = "1, 2")]
pub sum: ::core::option::Option<mode_info::Sum>,
}
pub mod mode_info {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Single {
#[prost(enumeration = "super::super::signing::v1beta1::SignMode", tag = "1")]
pub mode: i32,
}
impl ::prost::Name for Single {
const NAME: &'static str = "Single";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.ModeInfo.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Multi {
#[prost(message, optional, tag = "1")]
pub bitarray: ::core::option::Option<
super::super::super::crypto::multisig::v1beta1::CompactBitArray,
>,
#[prost(message, repeated, tag = "2")]
pub mode_infos: ::prost::alloc::vec::Vec<super::ModeInfo>,
}
impl ::prost::Name for Multi {
const NAME: &'static str = "Multi";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.ModeInfo.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Sum {
#[prost(message, tag = "1")]
Single(Single),
#[prost(message, tag = "2")]
Multi(Multi),
}
}
impl ::prost::Name for ModeInfo {
const NAME: &'static str = "ModeInfo";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Fee {
#[prost(message, repeated, tag = "1")]
pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
#[prost(uint64, tag = "2")]
pub gas_limit: u64,
#[prost(string, tag = "3")]
pub payer: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub granter: ::prost::alloc::string::String,
}
impl ::prost::Name for Fee {
const NAME: &'static str = "Fee";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Tip {
#[prost(message, repeated, tag = "1")]
pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
#[prost(string, tag = "2")]
pub tipper: ::prost::alloc::string::String,
}
impl ::prost::Name for Tip {
const NAME: &'static str = "Tip";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuxSignerData {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub sign_doc: ::core::option::Option<SignDocDirectAux>,
#[prost(enumeration = "super::signing::v1beta1::SignMode", tag = "3")]
pub mode: i32,
#[prost(bytes = "vec", tag = "4")]
pub sig: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for AuxSignerData {
const NAME: &'static str = "AuxSignerData";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTxsEventRequest {
#[deprecated]
#[prost(string, repeated, tag = "1")]
pub events: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[deprecated]
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageRequest,
>,
#[prost(enumeration = "OrderBy", tag = "3")]
pub order_by: i32,
#[prost(uint64, tag = "4")]
pub page: u64,
#[prost(uint64, tag = "5")]
pub limit: u64,
#[prost(string, tag = "6")]
pub query: ::prost::alloc::string::String,
}
impl ::prost::Name for GetTxsEventRequest {
const NAME: &'static str = "GetTxsEventRequest";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTxsEventResponse {
#[prost(message, repeated, tag = "1")]
pub txs: ::prost::alloc::vec::Vec<Tx>,
#[prost(message, repeated, tag = "2")]
pub tx_responses: ::prost::alloc::vec::Vec<
super::super::base::abci::v1beta1::TxResponse,
>,
#[deprecated]
#[prost(message, optional, tag = "3")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageResponse,
>,
#[prost(uint64, tag = "4")]
pub total: u64,
}
impl ::prost::Name for GetTxsEventResponse {
const NAME: &'static str = "GetTxsEventResponse";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BroadcastTxRequest {
#[prost(bytes = "vec", tag = "1")]
pub tx_bytes: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration = "BroadcastMode", tag = "2")]
pub mode: i32,
}
impl ::prost::Name for BroadcastTxRequest {
const NAME: &'static str = "BroadcastTxRequest";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BroadcastTxResponse {
#[prost(message, optional, tag = "1")]
pub tx_response: ::core::option::Option<
super::super::base::abci::v1beta1::TxResponse,
>,
}
impl ::prost::Name for BroadcastTxResponse {
const NAME: &'static str = "BroadcastTxResponse";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SimulateRequest {
#[deprecated]
#[prost(message, optional, tag = "1")]
pub tx: ::core::option::Option<Tx>,
#[prost(bytes = "vec", tag = "2")]
pub tx_bytes: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for SimulateRequest {
const NAME: &'static str = "SimulateRequest";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SimulateResponse {
#[prost(message, optional, tag = "1")]
pub gas_info: ::core::option::Option<super::super::base::abci::v1beta1::GasInfo>,
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<super::super::base::abci::v1beta1::Result>,
}
impl ::prost::Name for SimulateResponse {
const NAME: &'static str = "SimulateResponse";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTxRequest {
#[prost(string, tag = "1")]
pub hash: ::prost::alloc::string::String,
}
impl ::prost::Name for GetTxRequest {
const NAME: &'static str = "GetTxRequest";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTxResponse {
#[prost(message, optional, tag = "1")]
pub tx: ::core::option::Option<Tx>,
#[prost(message, optional, tag = "2")]
pub tx_response: ::core::option::Option<
super::super::base::abci::v1beta1::TxResponse,
>,
}
impl ::prost::Name for GetTxResponse {
const NAME: &'static str = "GetTxResponse";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBlockWithTxsRequest {
#[prost(int64, tag = "1")]
pub height: i64,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageRequest,
>,
}
impl ::prost::Name for GetBlockWithTxsRequest {
const NAME: &'static str = "GetBlockWithTxsRequest";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBlockWithTxsResponse {
#[prost(message, repeated, tag = "1")]
pub txs: ::prost::alloc::vec::Vec<Tx>,
#[prost(message, optional, tag = "2")]
pub block_id: ::core::option::Option<
super::super::super::tendermint::types::BlockId,
>,
#[prost(message, optional, tag = "3")]
pub block: ::core::option::Option<super::super::super::tendermint::types::Block>,
#[prost(message, optional, tag = "4")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageResponse,
>,
}
impl ::prost::Name for GetBlockWithTxsResponse {
const NAME: &'static str = "GetBlockWithTxsResponse";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxDecodeRequest {
#[prost(bytes = "vec", tag = "1")]
pub tx_bytes: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for TxDecodeRequest {
const NAME: &'static str = "TxDecodeRequest";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxDecodeResponse {
#[prost(message, optional, tag = "1")]
pub tx: ::core::option::Option<Tx>,
}
impl ::prost::Name for TxDecodeResponse {
const NAME: &'static str = "TxDecodeResponse";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxEncodeRequest {
#[prost(message, optional, tag = "1")]
pub tx: ::core::option::Option<Tx>,
}
impl ::prost::Name for TxEncodeRequest {
const NAME: &'static str = "TxEncodeRequest";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxEncodeResponse {
#[prost(bytes = "vec", tag = "1")]
pub tx_bytes: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for TxEncodeResponse {
const NAME: &'static str = "TxEncodeResponse";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxEncodeAminoRequest {
#[prost(string, tag = "1")]
pub amino_json: ::prost::alloc::string::String,
}
impl ::prost::Name for TxEncodeAminoRequest {
const NAME: &'static str = "TxEncodeAminoRequest";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxEncodeAminoResponse {
#[prost(bytes = "vec", tag = "1")]
pub amino_binary: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for TxEncodeAminoResponse {
const NAME: &'static str = "TxEncodeAminoResponse";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxDecodeAminoRequest {
#[prost(bytes = "vec", tag = "1")]
pub amino_binary: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for TxDecodeAminoRequest {
const NAME: &'static str = "TxDecodeAminoRequest";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxDecodeAminoResponse {
#[prost(string, tag = "1")]
pub amino_json: ::prost::alloc::string::String,
}
impl ::prost::Name for TxDecodeAminoResponse {
const NAME: &'static str = "TxDecodeAminoResponse";
const PACKAGE: &'static str = "cosmos.tx.v1beta1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME)
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderBy {
Unspecified = 0,
Asc = 1,
Desc = 2,
}
impl OrderBy {
pub fn as_str_name(&self) -> &'static str {
match self {
OrderBy::Unspecified => "ORDER_BY_UNSPECIFIED",
OrderBy::Asc => "ORDER_BY_ASC",
OrderBy::Desc => "ORDER_BY_DESC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ORDER_BY_UNSPECIFIED" => Some(Self::Unspecified),
"ORDER_BY_ASC" => Some(Self::Asc),
"ORDER_BY_DESC" => Some(Self::Desc),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BroadcastMode {
Unspecified = 0,
Block = 1,
Sync = 2,
Async = 3,
}
impl BroadcastMode {
pub fn as_str_name(&self) -> &'static str {
match self {
BroadcastMode::Unspecified => "BROADCAST_MODE_UNSPECIFIED",
BroadcastMode::Block => "BROADCAST_MODE_BLOCK",
BroadcastMode::Sync => "BROADCAST_MODE_SYNC",
BroadcastMode::Async => "BROADCAST_MODE_ASYNC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BROADCAST_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"BROADCAST_MODE_BLOCK" => Some(Self::Block),
"BROADCAST_MODE_SYNC" => Some(Self::Sync),
"BROADCAST_MODE_ASYNC" => Some(Self::Async),
_ => None,
}
}
}
#[cfg(feature = "rpc")]
pub mod service_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 ServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ServiceClient<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> ServiceClient<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,
) -> ServiceClient<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,
{
ServiceClient::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 simulate(
&mut self,
request: impl tonic::IntoRequest<super::SimulateRequest>,
) -> std::result::Result<
tonic::Response<super::SimulateResponse>,
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.tx.v1beta1.Service/Simulate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "Simulate"));
self.inner.unary(req, path, codec).await
}
pub async fn get_tx(
&mut self,
request: impl tonic::IntoRequest<super::GetTxRequest>,
) -> std::result::Result<tonic::Response<super::GetTxResponse>, 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.tx.v1beta1.Service/GetTx",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "GetTx"));
self.inner.unary(req, path, codec).await
}
pub async fn broadcast_tx(
&mut self,
request: impl tonic::IntoRequest<super::BroadcastTxRequest>,
) -> std::result::Result<
tonic::Response<super::BroadcastTxResponse>,
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.tx.v1beta1.Service/BroadcastTx",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "BroadcastTx"));
self.inner.unary(req, path, codec).await
}
pub async fn get_txs_event(
&mut self,
request: impl tonic::IntoRequest<super::GetTxsEventRequest>,
) -> std::result::Result<
tonic::Response<super::GetTxsEventResponse>,
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.tx.v1beta1.Service/GetTxsEvent",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "GetTxsEvent"));
self.inner.unary(req, path, codec).await
}
pub async fn get_block_with_txs(
&mut self,
request: impl tonic::IntoRequest<super::GetBlockWithTxsRequest>,
) -> std::result::Result<
tonic::Response<super::GetBlockWithTxsResponse>,
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.tx.v1beta1.Service/GetBlockWithTxs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "GetBlockWithTxs"));
self.inner.unary(req, path, codec).await
}
pub async fn tx_decode(
&mut self,
request: impl tonic::IntoRequest<super::TxDecodeRequest>,
) -> std::result::Result<
tonic::Response<super::TxDecodeResponse>,
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.tx.v1beta1.Service/TxDecode",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "TxDecode"));
self.inner.unary(req, path, codec).await
}
pub async fn tx_encode(
&mut self,
request: impl tonic::IntoRequest<super::TxEncodeRequest>,
) -> std::result::Result<
tonic::Response<super::TxEncodeResponse>,
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.tx.v1beta1.Service/TxEncode",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "TxEncode"));
self.inner.unary(req, path, codec).await
}
pub async fn tx_encode_amino(
&mut self,
request: impl tonic::IntoRequest<super::TxEncodeAminoRequest>,
) -> std::result::Result<
tonic::Response<super::TxEncodeAminoResponse>,
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.tx.v1beta1.Service/TxEncodeAmino",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "TxEncodeAmino"));
self.inner.unary(req, path, codec).await
}
pub async fn tx_decode_amino(
&mut self,
request: impl tonic::IntoRequest<super::TxDecodeAminoRequest>,
) -> std::result::Result<
tonic::Response<super::TxDecodeAminoResponse>,
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.tx.v1beta1.Service/TxDecodeAmino",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "TxDecodeAmino"));
self.inner.unary(req, path, codec).await
}
}
}
#[cfg(feature = "rpc")]
pub mod service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait Service: Send + Sync + 'static {
async fn simulate(
&self,
request: tonic::Request<super::SimulateRequest>,
) -> std::result::Result<
tonic::Response<super::SimulateResponse>,
tonic::Status,
>;
async fn get_tx(
&self,
request: tonic::Request<super::GetTxRequest>,
) -> std::result::Result<tonic::Response<super::GetTxResponse>, tonic::Status>;
async fn broadcast_tx(
&self,
request: tonic::Request<super::BroadcastTxRequest>,
) -> std::result::Result<
tonic::Response<super::BroadcastTxResponse>,
tonic::Status,
>;
async fn get_txs_event(
&self,
request: tonic::Request<super::GetTxsEventRequest>,
) -> std::result::Result<
tonic::Response<super::GetTxsEventResponse>,
tonic::Status,
>;
async fn get_block_with_txs(
&self,
request: tonic::Request<super::GetBlockWithTxsRequest>,
) -> std::result::Result<
tonic::Response<super::GetBlockWithTxsResponse>,
tonic::Status,
>;
async fn tx_decode(
&self,
request: tonic::Request<super::TxDecodeRequest>,
) -> std::result::Result<
tonic::Response<super::TxDecodeResponse>,
tonic::Status,
>;
async fn tx_encode(
&self,
request: tonic::Request<super::TxEncodeRequest>,
) -> std::result::Result<
tonic::Response<super::TxEncodeResponse>,
tonic::Status,
>;
async fn tx_encode_amino(
&self,
request: tonic::Request<super::TxEncodeAminoRequest>,
) -> std::result::Result<
tonic::Response<super::TxEncodeAminoResponse>,
tonic::Status,
>;
async fn tx_decode_amino(
&self,
request: tonic::Request<super::TxDecodeAminoRequest>,
) -> std::result::Result<
tonic::Response<super::TxDecodeAminoResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct ServiceServer<T: Service> {
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: Service> ServiceServer<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 ServiceServer<T>
where
T: Service,
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() {
"/cosmos.tx.v1beta1.Service/Simulate" => {
#[allow(non_camel_case_types)]
struct SimulateSvc<T: Service>(pub Arc<T>);
impl<T: Service> tonic::server::UnaryService<super::SimulateRequest>
for SimulateSvc<T> {
type Response = super::SimulateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SimulateRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Service>::simulate(&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 = SimulateSvc(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)
}
"/cosmos.tx.v1beta1.Service/GetTx" => {
#[allow(non_camel_case_types)]
struct GetTxSvc<T: Service>(pub Arc<T>);
impl<T: Service> tonic::server::UnaryService<super::GetTxRequest>
for GetTxSvc<T> {
type Response = super::GetTxResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetTxRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Service>::get_tx(&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 = GetTxSvc(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)
}
"/cosmos.tx.v1beta1.Service/BroadcastTx" => {
#[allow(non_camel_case_types)]
struct BroadcastTxSvc<T: Service>(pub Arc<T>);
impl<
T: Service,
> tonic::server::UnaryService<super::BroadcastTxRequest>
for BroadcastTxSvc<T> {
type Response = super::BroadcastTxResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::BroadcastTxRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Service>::broadcast_tx(&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 = BroadcastTxSvc(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)
}
"/cosmos.tx.v1beta1.Service/GetTxsEvent" => {
#[allow(non_camel_case_types)]
struct GetTxsEventSvc<T: Service>(pub Arc<T>);
impl<
T: Service,
> tonic::server::UnaryService<super::GetTxsEventRequest>
for GetTxsEventSvc<T> {
type Response = super::GetTxsEventResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetTxsEventRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Service>::get_txs_event(&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 = GetTxsEventSvc(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)
}
"/cosmos.tx.v1beta1.Service/GetBlockWithTxs" => {
#[allow(non_camel_case_types)]
struct GetBlockWithTxsSvc<T: Service>(pub Arc<T>);
impl<
T: Service,
> tonic::server::UnaryService<super::GetBlockWithTxsRequest>
for GetBlockWithTxsSvc<T> {
type Response = super::GetBlockWithTxsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetBlockWithTxsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Service>::get_block_with_txs(&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 = GetBlockWithTxsSvc(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)
}
"/cosmos.tx.v1beta1.Service/TxDecode" => {
#[allow(non_camel_case_types)]
struct TxDecodeSvc<T: Service>(pub Arc<T>);
impl<T: Service> tonic::server::UnaryService<super::TxDecodeRequest>
for TxDecodeSvc<T> {
type Response = super::TxDecodeResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::TxDecodeRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Service>::tx_decode(&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 = TxDecodeSvc(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)
}
"/cosmos.tx.v1beta1.Service/TxEncode" => {
#[allow(non_camel_case_types)]
struct TxEncodeSvc<T: Service>(pub Arc<T>);
impl<T: Service> tonic::server::UnaryService<super::TxEncodeRequest>
for TxEncodeSvc<T> {
type Response = super::TxEncodeResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::TxEncodeRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Service>::tx_encode(&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 = TxEncodeSvc(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)
}
"/cosmos.tx.v1beta1.Service/TxEncodeAmino" => {
#[allow(non_camel_case_types)]
struct TxEncodeAminoSvc<T: Service>(pub Arc<T>);
impl<
T: Service,
> tonic::server::UnaryService<super::TxEncodeAminoRequest>
for TxEncodeAminoSvc<T> {
type Response = super::TxEncodeAminoResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::TxEncodeAminoRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Service>::tx_encode_amino(&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 = TxEncodeAminoSvc(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)
}
"/cosmos.tx.v1beta1.Service/TxDecodeAmino" => {
#[allow(non_camel_case_types)]
struct TxDecodeAminoSvc<T: Service>(pub Arc<T>);
impl<
T: Service,
> tonic::server::UnaryService<super::TxDecodeAminoRequest>
for TxDecodeAminoSvc<T> {
type Response = super::TxDecodeAminoResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::TxDecodeAminoRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Service>::tx_decode_amino(&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 = TxDecodeAminoSvc(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: Service> Clone for ServiceServer<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: Service> 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: Service> tonic::server::NamedService for ServiceServer<T> {
const NAME: &'static str = "cosmos.tx.v1beta1.Service";
}
}