penumbra_sdk_proto/gen/
cosmos.tx.v1beta1.rs

1// This file is @generated by prost-build.
2/// Tx is the standard type used for broadcasting transactions.
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Tx {
5    /// body is the processable content of the transaction
6    #[prost(message, optional, tag = "1")]
7    pub body: ::core::option::Option<TxBody>,
8    /// auth_info is the authorization related content of the transaction,
9    /// specifically signers, signer modes and fee
10    #[prost(message, optional, tag = "2")]
11    pub auth_info: ::core::option::Option<AuthInfo>,
12    /// signatures is a list of signatures that matches the length and order of
13    /// AuthInfo's signer_infos to allow connecting signature meta information like
14    /// public key and signing mode by position.
15    #[prost(bytes = "vec", repeated, tag = "3")]
16    pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
17}
18impl ::prost::Name for Tx {
19    const NAME: &'static str = "Tx";
20    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
21    fn full_name() -> ::prost::alloc::string::String {
22        "cosmos.tx.v1beta1.Tx".into()
23    }
24    fn type_url() -> ::prost::alloc::string::String {
25        "/cosmos.tx.v1beta1.Tx".into()
26    }
27}
28/// TxRaw is a variant of Tx that pins the signer's exact binary representation
29/// of body and auth_info. This is used for signing, broadcasting and
30/// verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and
31/// the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used
32/// as the transaction ID.
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct TxRaw {
35    /// body_bytes is a protobuf serialization of a TxBody that matches the
36    /// representation in SignDoc.
37    #[prost(bytes = "vec", tag = "1")]
38    pub body_bytes: ::prost::alloc::vec::Vec<u8>,
39    /// auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
40    /// representation in SignDoc.
41    #[prost(bytes = "vec", tag = "2")]
42    pub auth_info_bytes: ::prost::alloc::vec::Vec<u8>,
43    /// signatures is a list of signatures that matches the length and order of
44    /// AuthInfo's signer_infos to allow connecting signature meta information like
45    /// public key and signing mode by position.
46    #[prost(bytes = "vec", repeated, tag = "3")]
47    pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
48}
49impl ::prost::Name for TxRaw {
50    const NAME: &'static str = "TxRaw";
51    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
52    fn full_name() -> ::prost::alloc::string::String {
53        "cosmos.tx.v1beta1.TxRaw".into()
54    }
55    fn type_url() -> ::prost::alloc::string::String {
56        "/cosmos.tx.v1beta1.TxRaw".into()
57    }
58}
59/// SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT.
60#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct SignDoc {
62    /// body_bytes is protobuf serialization of a TxBody that matches the
63    /// representation in TxRaw.
64    #[prost(bytes = "vec", tag = "1")]
65    pub body_bytes: ::prost::alloc::vec::Vec<u8>,
66    /// auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
67    /// representation in TxRaw.
68    #[prost(bytes = "vec", tag = "2")]
69    pub auth_info_bytes: ::prost::alloc::vec::Vec<u8>,
70    /// chain_id is the unique identifier of the chain this transaction targets.
71    /// It prevents signed transactions from being used on another chain by an
72    /// attacker
73    #[prost(string, tag = "3")]
74    pub chain_id: ::prost::alloc::string::String,
75    /// account_number is the account number of the account in state
76    #[prost(uint64, tag = "4")]
77    pub account_number: u64,
78}
79impl ::prost::Name for SignDoc {
80    const NAME: &'static str = "SignDoc";
81    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
82    fn full_name() -> ::prost::alloc::string::String {
83        "cosmos.tx.v1beta1.SignDoc".into()
84    }
85    fn type_url() -> ::prost::alloc::string::String {
86        "/cosmos.tx.v1beta1.SignDoc".into()
87    }
88}
89/// SignDocDirectAux is the type used for generating sign bytes for
90/// SIGN_MODE_DIRECT_AUX.
91///
92/// Since: cosmos-sdk 0.46
93#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct SignDocDirectAux {
95    /// body_bytes is protobuf serialization of a TxBody that matches the
96    /// representation in TxRaw.
97    #[prost(bytes = "vec", tag = "1")]
98    pub body_bytes: ::prost::alloc::vec::Vec<u8>,
99    /// public_key is the public key of the signing account.
100    #[prost(message, optional, tag = "2")]
101    pub public_key: ::core::option::Option<::pbjson_types::Any>,
102    /// chain_id is the identifier of the chain this transaction targets.
103    /// It prevents signed transactions from being used on another chain by an
104    /// attacker.
105    #[prost(string, tag = "3")]
106    pub chain_id: ::prost::alloc::string::String,
107    /// account_number is the account number of the account in state.
108    #[prost(uint64, tag = "4")]
109    pub account_number: u64,
110    /// sequence is the sequence number of the signing account.
111    #[prost(uint64, tag = "5")]
112    pub sequence: u64,
113    /// Tip is the optional tip used for transactions fees paid in another denom.
114    /// It should be left empty if the signer is not the tipper for this
115    /// transaction.
116    ///
117    /// This field is ignored if the chain didn't enable tips, i.e. didn't add the
118    /// `TipDecorator` in its posthandler.
119    #[prost(message, optional, tag = "6")]
120    pub tip: ::core::option::Option<Tip>,
121}
122impl ::prost::Name for SignDocDirectAux {
123    const NAME: &'static str = "SignDocDirectAux";
124    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
125    fn full_name() -> ::prost::alloc::string::String {
126        "cosmos.tx.v1beta1.SignDocDirectAux".into()
127    }
128    fn type_url() -> ::prost::alloc::string::String {
129        "/cosmos.tx.v1beta1.SignDocDirectAux".into()
130    }
131}
132/// TxBody is the body of a transaction that all signers sign over.
133#[derive(Clone, PartialEq, ::prost::Message)]
134pub struct TxBody {
135    /// messages is a list of messages to be executed. The required signers of
136    /// those messages define the number and order of elements in AuthInfo's
137    /// signer_infos and Tx's signatures. Each required signer address is added to
138    /// the list only the first time it occurs.
139    /// By convention, the first required signer (usually from the first message)
140    /// is referred to as the primary signer and pays the fee for the whole
141    /// transaction.
142    #[prost(message, repeated, tag = "1")]
143    pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>,
144    /// memo is any arbitrary note/comment to be added to the transaction.
145    /// WARNING: in clients, any publicly exposed text should not be called memo,
146    /// but should be called `note` instead (see <https://github.com/cosmos/cosmos-sdk/issues/9122>).
147    #[prost(string, tag = "2")]
148    pub memo: ::prost::alloc::string::String,
149    /// timeout is the block height after which this transaction will not
150    /// be processed by the chain
151    #[prost(uint64, tag = "3")]
152    pub timeout_height: u64,
153    /// extension_options are arbitrary options that can be added by chains
154    /// when the default options are not sufficient. If any of these are present
155    /// and can't be handled, the transaction will be rejected
156    #[prost(message, repeated, tag = "1023")]
157    pub extension_options: ::prost::alloc::vec::Vec<::pbjson_types::Any>,
158    /// extension_options are arbitrary options that can be added by chains
159    /// when the default options are not sufficient. If any of these are present
160    /// and can't be handled, they will be ignored
161    #[prost(message, repeated, tag = "2047")]
162    pub non_critical_extension_options: ::prost::alloc::vec::Vec<::pbjson_types::Any>,
163}
164impl ::prost::Name for TxBody {
165    const NAME: &'static str = "TxBody";
166    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
167    fn full_name() -> ::prost::alloc::string::String {
168        "cosmos.tx.v1beta1.TxBody".into()
169    }
170    fn type_url() -> ::prost::alloc::string::String {
171        "/cosmos.tx.v1beta1.TxBody".into()
172    }
173}
174/// AuthInfo describes the fee and signer modes that are used to sign a
175/// transaction.
176#[derive(Clone, PartialEq, ::prost::Message)]
177pub struct AuthInfo {
178    /// signer_infos defines the signing modes for the required signers. The number
179    /// and order of elements must match the required signers from TxBody's
180    /// messages. The first element is the primary signer and the one which pays
181    /// the fee.
182    #[prost(message, repeated, tag = "1")]
183    pub signer_infos: ::prost::alloc::vec::Vec<SignerInfo>,
184    /// Fee is the fee and gas limit for the transaction. The first signer is the
185    /// primary signer and the one which pays the fee. The fee can be calculated
186    /// based on the cost of evaluating the body and doing signature verification
187    /// of the signers. This can be estimated via simulation.
188    #[prost(message, optional, tag = "2")]
189    pub fee: ::core::option::Option<Fee>,
190    /// Tip is the optional tip used for transactions fees paid in another denom.
191    ///
192    /// This field is ignored if the chain didn't enable tips, i.e. didn't add the
193    /// `TipDecorator` in its posthandler.
194    ///
195    /// Since: cosmos-sdk 0.46
196    #[prost(message, optional, tag = "3")]
197    pub tip: ::core::option::Option<Tip>,
198}
199impl ::prost::Name for AuthInfo {
200    const NAME: &'static str = "AuthInfo";
201    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
202    fn full_name() -> ::prost::alloc::string::String {
203        "cosmos.tx.v1beta1.AuthInfo".into()
204    }
205    fn type_url() -> ::prost::alloc::string::String {
206        "/cosmos.tx.v1beta1.AuthInfo".into()
207    }
208}
209/// SignerInfo describes the public key and signing mode of a single top-level
210/// signer.
211#[derive(Clone, PartialEq, ::prost::Message)]
212pub struct SignerInfo {
213    /// public_key is the public key of the signer. It is optional for accounts
214    /// that already exist in state. If unset, the verifier can use the required
215    /// signer address for this position and lookup the public key.
216    #[prost(message, optional, tag = "1")]
217    pub public_key: ::core::option::Option<::pbjson_types::Any>,
218    /// mode_info describes the signing mode of the signer and is a nested
219    /// structure to support nested multisig pubkey's
220    #[prost(message, optional, tag = "2")]
221    pub mode_info: ::core::option::Option<ModeInfo>,
222    /// sequence is the sequence of the account, which describes the
223    /// number of committed transactions signed by a given address. It is used to
224    /// prevent replay attacks.
225    #[prost(uint64, tag = "3")]
226    pub sequence: u64,
227}
228impl ::prost::Name for SignerInfo {
229    const NAME: &'static str = "SignerInfo";
230    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
231    fn full_name() -> ::prost::alloc::string::String {
232        "cosmos.tx.v1beta1.SignerInfo".into()
233    }
234    fn type_url() -> ::prost::alloc::string::String {
235        "/cosmos.tx.v1beta1.SignerInfo".into()
236    }
237}
238/// ModeInfo describes the signing mode of a single or nested multisig signer.
239#[derive(Clone, PartialEq, ::prost::Message)]
240pub struct ModeInfo {
241    /// sum is the oneof that specifies whether this represents a single or nested
242    /// multisig signer
243    #[prost(oneof = "mode_info::Sum", tags = "1, 2")]
244    pub sum: ::core::option::Option<mode_info::Sum>,
245}
246/// Nested message and enum types in `ModeInfo`.
247pub mod mode_info {
248    /// Single is the mode info for a single signer. It is structured as a message
249    /// to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the
250    /// future
251    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
252    pub struct Single {
253        /// mode is the signing mode of the single signer
254        #[prost(enumeration = "super::super::signing::v1beta1::SignMode", tag = "1")]
255        pub mode: i32,
256    }
257    impl ::prost::Name for Single {
258        const NAME: &'static str = "Single";
259        const PACKAGE: &'static str = "cosmos.tx.v1beta1";
260        fn full_name() -> ::prost::alloc::string::String {
261            "cosmos.tx.v1beta1.ModeInfo.Single".into()
262        }
263        fn type_url() -> ::prost::alloc::string::String {
264            "/cosmos.tx.v1beta1.ModeInfo.Single".into()
265        }
266    }
267    /// Multi is the mode info for a multisig public key
268    #[derive(Clone, PartialEq, ::prost::Message)]
269    pub struct Multi {
270        /// bitarray specifies which keys within the multisig are signing
271        #[prost(message, optional, tag = "1")]
272        pub bitarray: ::core::option::Option<
273            super::super::super::crypto::multisig::v1beta1::CompactBitArray,
274        >,
275        /// mode_infos is the corresponding modes of the signers of the multisig
276        /// which could include nested multisig public keys
277        #[prost(message, repeated, tag = "2")]
278        pub mode_infos: ::prost::alloc::vec::Vec<super::ModeInfo>,
279    }
280    impl ::prost::Name for Multi {
281        const NAME: &'static str = "Multi";
282        const PACKAGE: &'static str = "cosmos.tx.v1beta1";
283        fn full_name() -> ::prost::alloc::string::String {
284            "cosmos.tx.v1beta1.ModeInfo.Multi".into()
285        }
286        fn type_url() -> ::prost::alloc::string::String {
287            "/cosmos.tx.v1beta1.ModeInfo.Multi".into()
288        }
289    }
290    /// sum is the oneof that specifies whether this represents a single or nested
291    /// multisig signer
292    #[derive(Clone, PartialEq, ::prost::Oneof)]
293    pub enum Sum {
294        /// single represents a single signer
295        #[prost(message, tag = "1")]
296        Single(Single),
297        /// multi represents a nested multisig signer
298        #[prost(message, tag = "2")]
299        Multi(Multi),
300    }
301}
302impl ::prost::Name for ModeInfo {
303    const NAME: &'static str = "ModeInfo";
304    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
305    fn full_name() -> ::prost::alloc::string::String {
306        "cosmos.tx.v1beta1.ModeInfo".into()
307    }
308    fn type_url() -> ::prost::alloc::string::String {
309        "/cosmos.tx.v1beta1.ModeInfo".into()
310    }
311}
312/// Fee includes the amount of coins paid in fees and the maximum
313/// gas to be used by the transaction. The ratio yields an effective "gasprice",
314/// which must be above some miminum to be accepted into the mempool.
315#[derive(Clone, PartialEq, ::prost::Message)]
316pub struct Fee {
317    /// amount is the amount of coins to be paid as a fee
318    #[prost(message, repeated, tag = "1")]
319    pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
320    /// gas_limit is the maximum gas that can be used in transaction processing
321    /// before an out of gas error occurs
322    #[prost(uint64, tag = "2")]
323    pub gas_limit: u64,
324    /// if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees.
325    /// the payer must be a tx signer (and thus have signed this field in AuthInfo).
326    /// setting this field does *not* change the ordering of required signers for the transaction.
327    #[prost(string, tag = "3")]
328    pub payer: ::prost::alloc::string::String,
329    /// if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used
330    /// to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does
331    /// not support fee grants, this will fail
332    #[prost(string, tag = "4")]
333    pub granter: ::prost::alloc::string::String,
334}
335impl ::prost::Name for Fee {
336    const NAME: &'static str = "Fee";
337    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
338    fn full_name() -> ::prost::alloc::string::String {
339        "cosmos.tx.v1beta1.Fee".into()
340    }
341    fn type_url() -> ::prost::alloc::string::String {
342        "/cosmos.tx.v1beta1.Fee".into()
343    }
344}
345/// Tip is the tip used for meta-transactions.
346///
347/// Since: cosmos-sdk 0.46
348#[derive(Clone, PartialEq, ::prost::Message)]
349pub struct Tip {
350    /// amount is the amount of the tip
351    #[prost(message, repeated, tag = "1")]
352    pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
353    /// tipper is the address of the account paying for the tip
354    #[prost(string, tag = "2")]
355    pub tipper: ::prost::alloc::string::String,
356}
357impl ::prost::Name for Tip {
358    const NAME: &'static str = "Tip";
359    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
360    fn full_name() -> ::prost::alloc::string::String {
361        "cosmos.tx.v1beta1.Tip".into()
362    }
363    fn type_url() -> ::prost::alloc::string::String {
364        "/cosmos.tx.v1beta1.Tip".into()
365    }
366}
367/// AuxSignerData is the intermediary format that an auxiliary signer (e.g. a
368/// tipper) builds and sends to the fee payer (who will build and broadcast the
369/// actual tx). AuxSignerData is not a valid tx in itself, and will be rejected
370/// by the node if sent directly as-is.
371///
372/// Since: cosmos-sdk 0.46
373#[derive(Clone, PartialEq, ::prost::Message)]
374pub struct AuxSignerData {
375    /// address is the bech32-encoded address of the auxiliary signer. If using
376    /// AuxSignerData across different chains, the bech32 prefix of the target
377    /// chain (where the final transaction is broadcasted) should be used.
378    #[prost(string, tag = "1")]
379    pub address: ::prost::alloc::string::String,
380    /// sign_doc is the SIGN_MODE_DIRECT_AUX sign doc that the auxiliary signer
381    /// signs. Note: we use the same sign doc even if we're signing with
382    /// LEGACY_AMINO_JSON.
383    #[prost(message, optional, tag = "2")]
384    pub sign_doc: ::core::option::Option<SignDocDirectAux>,
385    /// mode is the signing mode of the single signer.
386    #[prost(enumeration = "super::signing::v1beta1::SignMode", tag = "3")]
387    pub mode: i32,
388    /// sig is the signature of the sign doc.
389    #[prost(bytes = "vec", tag = "4")]
390    pub sig: ::prost::alloc::vec::Vec<u8>,
391}
392impl ::prost::Name for AuxSignerData {
393    const NAME: &'static str = "AuxSignerData";
394    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
395    fn full_name() -> ::prost::alloc::string::String {
396        "cosmos.tx.v1beta1.AuxSignerData".into()
397    }
398    fn type_url() -> ::prost::alloc::string::String {
399        "/cosmos.tx.v1beta1.AuxSignerData".into()
400    }
401}
402/// GetTxsEventRequest is the request type for the Service.TxsByEvents
403/// RPC method.
404#[derive(Clone, PartialEq, ::prost::Message)]
405pub struct GetTxsEventRequest {
406    /// events is the list of transaction event type.
407    /// Deprecated post v0.47.x: use query instead, which should contain a valid
408    /// events query.
409    #[deprecated]
410    #[prost(string, repeated, tag = "1")]
411    pub events: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
412    /// pagination defines a pagination for the request.
413    /// Deprecated post v0.46.x: use page and limit instead.
414    #[deprecated]
415    #[prost(message, optional, tag = "2")]
416    pub pagination: ::core::option::Option<
417        super::super::base::query::v1beta1::PageRequest,
418    >,
419    #[prost(enumeration = "OrderBy", tag = "3")]
420    pub order_by: i32,
421    /// page is the page number to query, starts at 1. If not provided, will
422    /// default to first page.
423    #[prost(uint64, tag = "4")]
424    pub page: u64,
425    /// limit is the total number of results to be returned in the result page.
426    /// If left empty it will default to a value to be set by each app.
427    #[prost(uint64, tag = "5")]
428    pub limit: u64,
429    /// query defines the transaction event query that is proxied to Tendermint's
430    /// TxSearch RPC method. The query must be valid.
431    ///
432    /// Since Cosmos SDK 0.48
433    #[prost(string, tag = "6")]
434    pub query: ::prost::alloc::string::String,
435}
436impl ::prost::Name for GetTxsEventRequest {
437    const NAME: &'static str = "GetTxsEventRequest";
438    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
439    fn full_name() -> ::prost::alloc::string::String {
440        "cosmos.tx.v1beta1.GetTxsEventRequest".into()
441    }
442    fn type_url() -> ::prost::alloc::string::String {
443        "/cosmos.tx.v1beta1.GetTxsEventRequest".into()
444    }
445}
446/// GetTxsEventResponse is the response type for the Service.TxsByEvents
447/// RPC method.
448#[derive(Clone, PartialEq, ::prost::Message)]
449pub struct GetTxsEventResponse {
450    /// txs is the list of queried transactions.
451    #[prost(message, repeated, tag = "1")]
452    pub txs: ::prost::alloc::vec::Vec<Tx>,
453    /// tx_responses is the list of queried TxResponses.
454    #[prost(message, repeated, tag = "2")]
455    pub tx_responses: ::prost::alloc::vec::Vec<
456        super::super::base::abci::v1beta1::TxResponse,
457    >,
458    /// pagination defines a pagination for the response.
459    /// Deprecated post v0.46.x: use total instead.
460    #[deprecated]
461    #[prost(message, optional, tag = "3")]
462    pub pagination: ::core::option::Option<
463        super::super::base::query::v1beta1::PageResponse,
464    >,
465    /// total is total number of results available
466    #[prost(uint64, tag = "4")]
467    pub total: u64,
468}
469impl ::prost::Name for GetTxsEventResponse {
470    const NAME: &'static str = "GetTxsEventResponse";
471    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
472    fn full_name() -> ::prost::alloc::string::String {
473        "cosmos.tx.v1beta1.GetTxsEventResponse".into()
474    }
475    fn type_url() -> ::prost::alloc::string::String {
476        "/cosmos.tx.v1beta1.GetTxsEventResponse".into()
477    }
478}
479/// BroadcastTxRequest is the request type for the Service.BroadcastTxRequest
480/// RPC method.
481#[derive(Clone, PartialEq, ::prost::Message)]
482pub struct BroadcastTxRequest {
483    /// tx_bytes is the raw transaction.
484    #[prost(bytes = "vec", tag = "1")]
485    pub tx_bytes: ::prost::alloc::vec::Vec<u8>,
486    #[prost(enumeration = "BroadcastMode", tag = "2")]
487    pub mode: i32,
488}
489impl ::prost::Name for BroadcastTxRequest {
490    const NAME: &'static str = "BroadcastTxRequest";
491    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
492    fn full_name() -> ::prost::alloc::string::String {
493        "cosmos.tx.v1beta1.BroadcastTxRequest".into()
494    }
495    fn type_url() -> ::prost::alloc::string::String {
496        "/cosmos.tx.v1beta1.BroadcastTxRequest".into()
497    }
498}
499/// BroadcastTxResponse is the response type for the
500/// Service.BroadcastTx method.
501#[derive(Clone, PartialEq, ::prost::Message)]
502pub struct BroadcastTxResponse {
503    /// tx_response is the queried TxResponses.
504    #[prost(message, optional, tag = "1")]
505    pub tx_response: ::core::option::Option<
506        super::super::base::abci::v1beta1::TxResponse,
507    >,
508}
509impl ::prost::Name for BroadcastTxResponse {
510    const NAME: &'static str = "BroadcastTxResponse";
511    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
512    fn full_name() -> ::prost::alloc::string::String {
513        "cosmos.tx.v1beta1.BroadcastTxResponse".into()
514    }
515    fn type_url() -> ::prost::alloc::string::String {
516        "/cosmos.tx.v1beta1.BroadcastTxResponse".into()
517    }
518}
519/// SimulateRequest is the request type for the Service.Simulate
520/// RPC method.
521#[derive(Clone, PartialEq, ::prost::Message)]
522pub struct SimulateRequest {
523    /// tx is the transaction to simulate.
524    /// Deprecated. Send raw tx bytes instead.
525    #[deprecated]
526    #[prost(message, optional, tag = "1")]
527    pub tx: ::core::option::Option<Tx>,
528    /// tx_bytes is the raw transaction.
529    ///
530    /// Since: cosmos-sdk 0.43
531    #[prost(bytes = "vec", tag = "2")]
532    pub tx_bytes: ::prost::alloc::vec::Vec<u8>,
533}
534impl ::prost::Name for SimulateRequest {
535    const NAME: &'static str = "SimulateRequest";
536    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
537    fn full_name() -> ::prost::alloc::string::String {
538        "cosmos.tx.v1beta1.SimulateRequest".into()
539    }
540    fn type_url() -> ::prost::alloc::string::String {
541        "/cosmos.tx.v1beta1.SimulateRequest".into()
542    }
543}
544/// SimulateResponse is the response type for the
545/// Service.SimulateRPC method.
546#[derive(Clone, PartialEq, ::prost::Message)]
547pub struct SimulateResponse {
548    /// gas_info is the information about gas used in the simulation.
549    #[prost(message, optional, tag = "1")]
550    pub gas_info: ::core::option::Option<super::super::base::abci::v1beta1::GasInfo>,
551    /// result is the result of the simulation.
552    #[prost(message, optional, tag = "2")]
553    pub result: ::core::option::Option<super::super::base::abci::v1beta1::Result>,
554}
555impl ::prost::Name for SimulateResponse {
556    const NAME: &'static str = "SimulateResponse";
557    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
558    fn full_name() -> ::prost::alloc::string::String {
559        "cosmos.tx.v1beta1.SimulateResponse".into()
560    }
561    fn type_url() -> ::prost::alloc::string::String {
562        "/cosmos.tx.v1beta1.SimulateResponse".into()
563    }
564}
565/// GetTxRequest is the request type for the Service.GetTx
566/// RPC method.
567#[derive(Clone, PartialEq, ::prost::Message)]
568pub struct GetTxRequest {
569    /// hash is the tx hash to query, encoded as a hex string.
570    #[prost(string, tag = "1")]
571    pub hash: ::prost::alloc::string::String,
572}
573impl ::prost::Name for GetTxRequest {
574    const NAME: &'static str = "GetTxRequest";
575    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
576    fn full_name() -> ::prost::alloc::string::String {
577        "cosmos.tx.v1beta1.GetTxRequest".into()
578    }
579    fn type_url() -> ::prost::alloc::string::String {
580        "/cosmos.tx.v1beta1.GetTxRequest".into()
581    }
582}
583/// GetTxResponse is the response type for the Service.GetTx method.
584#[derive(Clone, PartialEq, ::prost::Message)]
585pub struct GetTxResponse {
586    /// tx is the queried transaction.
587    #[prost(message, optional, tag = "1")]
588    pub tx: ::core::option::Option<Tx>,
589    /// tx_response is the queried TxResponses.
590    #[prost(message, optional, tag = "2")]
591    pub tx_response: ::core::option::Option<
592        super::super::base::abci::v1beta1::TxResponse,
593    >,
594}
595impl ::prost::Name for GetTxResponse {
596    const NAME: &'static str = "GetTxResponse";
597    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
598    fn full_name() -> ::prost::alloc::string::String {
599        "cosmos.tx.v1beta1.GetTxResponse".into()
600    }
601    fn type_url() -> ::prost::alloc::string::String {
602        "/cosmos.tx.v1beta1.GetTxResponse".into()
603    }
604}
605/// GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs
606/// RPC method.
607///
608/// Since: cosmos-sdk 0.45.2
609#[derive(Clone, PartialEq, ::prost::Message)]
610pub struct GetBlockWithTxsRequest {
611    /// height is the height of the block to query.
612    #[prost(int64, tag = "1")]
613    pub height: i64,
614    /// pagination defines a pagination for the request.
615    #[prost(message, optional, tag = "2")]
616    pub pagination: ::core::option::Option<
617        super::super::base::query::v1beta1::PageRequest,
618    >,
619}
620impl ::prost::Name for GetBlockWithTxsRequest {
621    const NAME: &'static str = "GetBlockWithTxsRequest";
622    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
623    fn full_name() -> ::prost::alloc::string::String {
624        "cosmos.tx.v1beta1.GetBlockWithTxsRequest".into()
625    }
626    fn type_url() -> ::prost::alloc::string::String {
627        "/cosmos.tx.v1beta1.GetBlockWithTxsRequest".into()
628    }
629}
630/// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs
631/// method.
632///
633/// Since: cosmos-sdk 0.45.2
634#[derive(Clone, PartialEq, ::prost::Message)]
635pub struct GetBlockWithTxsResponse {
636    /// txs are the transactions in the block.
637    #[prost(message, repeated, tag = "1")]
638    pub txs: ::prost::alloc::vec::Vec<Tx>,
639    #[prost(message, optional, tag = "2")]
640    pub block_id: ::core::option::Option<
641        super::super::super::tendermint::types::BlockId,
642    >,
643    #[prost(message, optional, tag = "3")]
644    pub block: ::core::option::Option<super::super::super::tendermint::types::Block>,
645    /// pagination defines a pagination for the response.
646    #[prost(message, optional, tag = "4")]
647    pub pagination: ::core::option::Option<
648        super::super::base::query::v1beta1::PageResponse,
649    >,
650}
651impl ::prost::Name for GetBlockWithTxsResponse {
652    const NAME: &'static str = "GetBlockWithTxsResponse";
653    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
654    fn full_name() -> ::prost::alloc::string::String {
655        "cosmos.tx.v1beta1.GetBlockWithTxsResponse".into()
656    }
657    fn type_url() -> ::prost::alloc::string::String {
658        "/cosmos.tx.v1beta1.GetBlockWithTxsResponse".into()
659    }
660}
661/// TxDecodeRequest is the request type for the Service.TxDecode
662/// RPC method.
663///
664/// Since: cosmos-sdk 0.47
665#[derive(Clone, PartialEq, ::prost::Message)]
666pub struct TxDecodeRequest {
667    /// tx_bytes is the raw transaction.
668    #[prost(bytes = "vec", tag = "1")]
669    pub tx_bytes: ::prost::alloc::vec::Vec<u8>,
670}
671impl ::prost::Name for TxDecodeRequest {
672    const NAME: &'static str = "TxDecodeRequest";
673    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
674    fn full_name() -> ::prost::alloc::string::String {
675        "cosmos.tx.v1beta1.TxDecodeRequest".into()
676    }
677    fn type_url() -> ::prost::alloc::string::String {
678        "/cosmos.tx.v1beta1.TxDecodeRequest".into()
679    }
680}
681/// TxDecodeResponse is the response type for the
682/// Service.TxDecode method.
683///
684/// Since: cosmos-sdk 0.47
685#[derive(Clone, PartialEq, ::prost::Message)]
686pub struct TxDecodeResponse {
687    /// tx is the decoded transaction.
688    #[prost(message, optional, tag = "1")]
689    pub tx: ::core::option::Option<Tx>,
690}
691impl ::prost::Name for TxDecodeResponse {
692    const NAME: &'static str = "TxDecodeResponse";
693    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
694    fn full_name() -> ::prost::alloc::string::String {
695        "cosmos.tx.v1beta1.TxDecodeResponse".into()
696    }
697    fn type_url() -> ::prost::alloc::string::String {
698        "/cosmos.tx.v1beta1.TxDecodeResponse".into()
699    }
700}
701/// TxEncodeRequest is the request type for the Service.TxEncode
702/// RPC method.
703///
704/// Since: cosmos-sdk 0.47
705#[derive(Clone, PartialEq, ::prost::Message)]
706pub struct TxEncodeRequest {
707    /// tx is the transaction to encode.
708    #[prost(message, optional, tag = "1")]
709    pub tx: ::core::option::Option<Tx>,
710}
711impl ::prost::Name for TxEncodeRequest {
712    const NAME: &'static str = "TxEncodeRequest";
713    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
714    fn full_name() -> ::prost::alloc::string::String {
715        "cosmos.tx.v1beta1.TxEncodeRequest".into()
716    }
717    fn type_url() -> ::prost::alloc::string::String {
718        "/cosmos.tx.v1beta1.TxEncodeRequest".into()
719    }
720}
721/// TxEncodeResponse is the response type for the
722/// Service.TxEncode method.
723///
724/// Since: cosmos-sdk 0.47
725#[derive(Clone, PartialEq, ::prost::Message)]
726pub struct TxEncodeResponse {
727    /// tx_bytes is the encoded transaction bytes.
728    #[prost(bytes = "vec", tag = "1")]
729    pub tx_bytes: ::prost::alloc::vec::Vec<u8>,
730}
731impl ::prost::Name for TxEncodeResponse {
732    const NAME: &'static str = "TxEncodeResponse";
733    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
734    fn full_name() -> ::prost::alloc::string::String {
735        "cosmos.tx.v1beta1.TxEncodeResponse".into()
736    }
737    fn type_url() -> ::prost::alloc::string::String {
738        "/cosmos.tx.v1beta1.TxEncodeResponse".into()
739    }
740}
741/// TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino
742/// RPC method.
743///
744/// Since: cosmos-sdk 0.47
745#[derive(Clone, PartialEq, ::prost::Message)]
746pub struct TxEncodeAminoRequest {
747    #[prost(string, tag = "1")]
748    pub amino_json: ::prost::alloc::string::String,
749}
750impl ::prost::Name for TxEncodeAminoRequest {
751    const NAME: &'static str = "TxEncodeAminoRequest";
752    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
753    fn full_name() -> ::prost::alloc::string::String {
754        "cosmos.tx.v1beta1.TxEncodeAminoRequest".into()
755    }
756    fn type_url() -> ::prost::alloc::string::String {
757        "/cosmos.tx.v1beta1.TxEncodeAminoRequest".into()
758    }
759}
760/// TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino
761/// RPC method.
762///
763/// Since: cosmos-sdk 0.47
764#[derive(Clone, PartialEq, ::prost::Message)]
765pub struct TxEncodeAminoResponse {
766    #[prost(bytes = "vec", tag = "1")]
767    pub amino_binary: ::prost::alloc::vec::Vec<u8>,
768}
769impl ::prost::Name for TxEncodeAminoResponse {
770    const NAME: &'static str = "TxEncodeAminoResponse";
771    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
772    fn full_name() -> ::prost::alloc::string::String {
773        "cosmos.tx.v1beta1.TxEncodeAminoResponse".into()
774    }
775    fn type_url() -> ::prost::alloc::string::String {
776        "/cosmos.tx.v1beta1.TxEncodeAminoResponse".into()
777    }
778}
779/// TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino
780/// RPC method.
781///
782/// Since: cosmos-sdk 0.47
783#[derive(Clone, PartialEq, ::prost::Message)]
784pub struct TxDecodeAminoRequest {
785    #[prost(bytes = "vec", tag = "1")]
786    pub amino_binary: ::prost::alloc::vec::Vec<u8>,
787}
788impl ::prost::Name for TxDecodeAminoRequest {
789    const NAME: &'static str = "TxDecodeAminoRequest";
790    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
791    fn full_name() -> ::prost::alloc::string::String {
792        "cosmos.tx.v1beta1.TxDecodeAminoRequest".into()
793    }
794    fn type_url() -> ::prost::alloc::string::String {
795        "/cosmos.tx.v1beta1.TxDecodeAminoRequest".into()
796    }
797}
798/// TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino
799/// RPC method.
800///
801/// Since: cosmos-sdk 0.47
802#[derive(Clone, PartialEq, ::prost::Message)]
803pub struct TxDecodeAminoResponse {
804    #[prost(string, tag = "1")]
805    pub amino_json: ::prost::alloc::string::String,
806}
807impl ::prost::Name for TxDecodeAminoResponse {
808    const NAME: &'static str = "TxDecodeAminoResponse";
809    const PACKAGE: &'static str = "cosmos.tx.v1beta1";
810    fn full_name() -> ::prost::alloc::string::String {
811        "cosmos.tx.v1beta1.TxDecodeAminoResponse".into()
812    }
813    fn type_url() -> ::prost::alloc::string::String {
814        "/cosmos.tx.v1beta1.TxDecodeAminoResponse".into()
815    }
816}
817/// OrderBy defines the sorting order
818#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
819#[repr(i32)]
820pub enum OrderBy {
821    /// ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults
822    /// to ASC in this case.
823    Unspecified = 0,
824    /// ORDER_BY_ASC defines ascending order
825    Asc = 1,
826    /// ORDER_BY_DESC defines descending order
827    Desc = 2,
828}
829impl OrderBy {
830    /// String value of the enum field names used in the ProtoBuf definition.
831    ///
832    /// The values are not transformed in any way and thus are considered stable
833    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
834    pub fn as_str_name(&self) -> &'static str {
835        match self {
836            Self::Unspecified => "ORDER_BY_UNSPECIFIED",
837            Self::Asc => "ORDER_BY_ASC",
838            Self::Desc => "ORDER_BY_DESC",
839        }
840    }
841    /// Creates an enum from field names used in the ProtoBuf definition.
842    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
843        match value {
844            "ORDER_BY_UNSPECIFIED" => Some(Self::Unspecified),
845            "ORDER_BY_ASC" => Some(Self::Asc),
846            "ORDER_BY_DESC" => Some(Self::Desc),
847            _ => None,
848        }
849    }
850}
851/// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC
852/// method.
853#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
854#[repr(i32)]
855pub enum BroadcastMode {
856    /// zero-value for mode ordering
857    Unspecified = 0,
858    /// DEPRECATED: use BROADCAST_MODE_SYNC instead,
859    /// BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards.
860    Block = 1,
861    /// BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits
862    /// for a CheckTx execution response only.
863    Sync = 2,
864    /// BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client
865    /// returns immediately.
866    Async = 3,
867}
868impl BroadcastMode {
869    /// String value of the enum field names used in the ProtoBuf definition.
870    ///
871    /// The values are not transformed in any way and thus are considered stable
872    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
873    pub fn as_str_name(&self) -> &'static str {
874        match self {
875            Self::Unspecified => "BROADCAST_MODE_UNSPECIFIED",
876            Self::Block => "BROADCAST_MODE_BLOCK",
877            Self::Sync => "BROADCAST_MODE_SYNC",
878            Self::Async => "BROADCAST_MODE_ASYNC",
879        }
880    }
881    /// Creates an enum from field names used in the ProtoBuf definition.
882    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
883        match value {
884            "BROADCAST_MODE_UNSPECIFIED" => Some(Self::Unspecified),
885            "BROADCAST_MODE_BLOCK" => Some(Self::Block),
886            "BROADCAST_MODE_SYNC" => Some(Self::Sync),
887            "BROADCAST_MODE_ASYNC" => Some(Self::Async),
888            _ => None,
889        }
890    }
891}
892/// Generated client implementations.
893#[cfg(feature = "rpc")]
894pub mod service_client {
895    #![allow(
896        unused_variables,
897        dead_code,
898        missing_docs,
899        clippy::wildcard_imports,
900        clippy::let_unit_value,
901    )]
902    use tonic::codegen::*;
903    use tonic::codegen::http::Uri;
904    /// Service defines a gRPC service for interacting with transactions.
905    #[derive(Debug, Clone)]
906    pub struct ServiceClient<T> {
907        inner: tonic::client::Grpc<T>,
908    }
909    impl ServiceClient<tonic::transport::Channel> {
910        /// Attempt to create a new client by connecting to a given endpoint.
911        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
912        where
913            D: TryInto<tonic::transport::Endpoint>,
914            D::Error: Into<StdError>,
915        {
916            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
917            Ok(Self::new(conn))
918        }
919    }
920    impl<T> ServiceClient<T>
921    where
922        T: tonic::client::GrpcService<tonic::body::BoxBody>,
923        T::Error: Into<StdError>,
924        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
925        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
926    {
927        pub fn new(inner: T) -> Self {
928            let inner = tonic::client::Grpc::new(inner);
929            Self { inner }
930        }
931        pub fn with_origin(inner: T, origin: Uri) -> Self {
932            let inner = tonic::client::Grpc::with_origin(inner, origin);
933            Self { inner }
934        }
935        pub fn with_interceptor<F>(
936            inner: T,
937            interceptor: F,
938        ) -> ServiceClient<InterceptedService<T, F>>
939        where
940            F: tonic::service::Interceptor,
941            T::ResponseBody: Default,
942            T: tonic::codegen::Service<
943                http::Request<tonic::body::BoxBody>,
944                Response = http::Response<
945                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
946                >,
947            >,
948            <T as tonic::codegen::Service<
949                http::Request<tonic::body::BoxBody>,
950            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
951        {
952            ServiceClient::new(InterceptedService::new(inner, interceptor))
953        }
954        /// Compress requests with the given encoding.
955        ///
956        /// This requires the server to support it otherwise it might respond with an
957        /// error.
958        #[must_use]
959        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
960            self.inner = self.inner.send_compressed(encoding);
961            self
962        }
963        /// Enable decompressing responses.
964        #[must_use]
965        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
966            self.inner = self.inner.accept_compressed(encoding);
967            self
968        }
969        /// Limits the maximum size of a decoded message.
970        ///
971        /// Default: `4MB`
972        #[must_use]
973        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
974            self.inner = self.inner.max_decoding_message_size(limit);
975            self
976        }
977        /// Limits the maximum size of an encoded message.
978        ///
979        /// Default: `usize::MAX`
980        #[must_use]
981        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
982            self.inner = self.inner.max_encoding_message_size(limit);
983            self
984        }
985        /// Simulate simulates executing a transaction for estimating gas usage.
986        pub async fn simulate(
987            &mut self,
988            request: impl tonic::IntoRequest<super::SimulateRequest>,
989        ) -> std::result::Result<
990            tonic::Response<super::SimulateResponse>,
991            tonic::Status,
992        > {
993            self.inner
994                .ready()
995                .await
996                .map_err(|e| {
997                    tonic::Status::unknown(
998                        format!("Service was not ready: {}", e.into()),
999                    )
1000                })?;
1001            let codec = tonic::codec::ProstCodec::default();
1002            let path = http::uri::PathAndQuery::from_static(
1003                "/cosmos.tx.v1beta1.Service/Simulate",
1004            );
1005            let mut req = request.into_request();
1006            req.extensions_mut()
1007                .insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "Simulate"));
1008            self.inner.unary(req, path, codec).await
1009        }
1010        /// GetTx fetches a tx by hash.
1011        pub async fn get_tx(
1012            &mut self,
1013            request: impl tonic::IntoRequest<super::GetTxRequest>,
1014        ) -> std::result::Result<tonic::Response<super::GetTxResponse>, tonic::Status> {
1015            self.inner
1016                .ready()
1017                .await
1018                .map_err(|e| {
1019                    tonic::Status::unknown(
1020                        format!("Service was not ready: {}", e.into()),
1021                    )
1022                })?;
1023            let codec = tonic::codec::ProstCodec::default();
1024            let path = http::uri::PathAndQuery::from_static(
1025                "/cosmos.tx.v1beta1.Service/GetTx",
1026            );
1027            let mut req = request.into_request();
1028            req.extensions_mut()
1029                .insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "GetTx"));
1030            self.inner.unary(req, path, codec).await
1031        }
1032        /// BroadcastTx broadcast transaction.
1033        pub async fn broadcast_tx(
1034            &mut self,
1035            request: impl tonic::IntoRequest<super::BroadcastTxRequest>,
1036        ) -> std::result::Result<
1037            tonic::Response<super::BroadcastTxResponse>,
1038            tonic::Status,
1039        > {
1040            self.inner
1041                .ready()
1042                .await
1043                .map_err(|e| {
1044                    tonic::Status::unknown(
1045                        format!("Service was not ready: {}", e.into()),
1046                    )
1047                })?;
1048            let codec = tonic::codec::ProstCodec::default();
1049            let path = http::uri::PathAndQuery::from_static(
1050                "/cosmos.tx.v1beta1.Service/BroadcastTx",
1051            );
1052            let mut req = request.into_request();
1053            req.extensions_mut()
1054                .insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "BroadcastTx"));
1055            self.inner.unary(req, path, codec).await
1056        }
1057        /// GetTxsEvent fetches txs by event.
1058        pub async fn get_txs_event(
1059            &mut self,
1060            request: impl tonic::IntoRequest<super::GetTxsEventRequest>,
1061        ) -> std::result::Result<
1062            tonic::Response<super::GetTxsEventResponse>,
1063            tonic::Status,
1064        > {
1065            self.inner
1066                .ready()
1067                .await
1068                .map_err(|e| {
1069                    tonic::Status::unknown(
1070                        format!("Service was not ready: {}", e.into()),
1071                    )
1072                })?;
1073            let codec = tonic::codec::ProstCodec::default();
1074            let path = http::uri::PathAndQuery::from_static(
1075                "/cosmos.tx.v1beta1.Service/GetTxsEvent",
1076            );
1077            let mut req = request.into_request();
1078            req.extensions_mut()
1079                .insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "GetTxsEvent"));
1080            self.inner.unary(req, path, codec).await
1081        }
1082        /// GetBlockWithTxs fetches a block with decoded txs.
1083        ///
1084        /// Since: cosmos-sdk 0.45.2
1085        pub async fn get_block_with_txs(
1086            &mut self,
1087            request: impl tonic::IntoRequest<super::GetBlockWithTxsRequest>,
1088        ) -> std::result::Result<
1089            tonic::Response<super::GetBlockWithTxsResponse>,
1090            tonic::Status,
1091        > {
1092            self.inner
1093                .ready()
1094                .await
1095                .map_err(|e| {
1096                    tonic::Status::unknown(
1097                        format!("Service was not ready: {}", e.into()),
1098                    )
1099                })?;
1100            let codec = tonic::codec::ProstCodec::default();
1101            let path = http::uri::PathAndQuery::from_static(
1102                "/cosmos.tx.v1beta1.Service/GetBlockWithTxs",
1103            );
1104            let mut req = request.into_request();
1105            req.extensions_mut()
1106                .insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "GetBlockWithTxs"));
1107            self.inner.unary(req, path, codec).await
1108        }
1109        /// TxDecode decodes the transaction.
1110        ///
1111        /// Since: cosmos-sdk 0.47
1112        pub async fn tx_decode(
1113            &mut self,
1114            request: impl tonic::IntoRequest<super::TxDecodeRequest>,
1115        ) -> std::result::Result<
1116            tonic::Response<super::TxDecodeResponse>,
1117            tonic::Status,
1118        > {
1119            self.inner
1120                .ready()
1121                .await
1122                .map_err(|e| {
1123                    tonic::Status::unknown(
1124                        format!("Service was not ready: {}", e.into()),
1125                    )
1126                })?;
1127            let codec = tonic::codec::ProstCodec::default();
1128            let path = http::uri::PathAndQuery::from_static(
1129                "/cosmos.tx.v1beta1.Service/TxDecode",
1130            );
1131            let mut req = request.into_request();
1132            req.extensions_mut()
1133                .insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "TxDecode"));
1134            self.inner.unary(req, path, codec).await
1135        }
1136        /// TxEncode encodes the transaction.
1137        ///
1138        /// Since: cosmos-sdk 0.47
1139        pub async fn tx_encode(
1140            &mut self,
1141            request: impl tonic::IntoRequest<super::TxEncodeRequest>,
1142        ) -> std::result::Result<
1143            tonic::Response<super::TxEncodeResponse>,
1144            tonic::Status,
1145        > {
1146            self.inner
1147                .ready()
1148                .await
1149                .map_err(|e| {
1150                    tonic::Status::unknown(
1151                        format!("Service was not ready: {}", e.into()),
1152                    )
1153                })?;
1154            let codec = tonic::codec::ProstCodec::default();
1155            let path = http::uri::PathAndQuery::from_static(
1156                "/cosmos.tx.v1beta1.Service/TxEncode",
1157            );
1158            let mut req = request.into_request();
1159            req.extensions_mut()
1160                .insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "TxEncode"));
1161            self.inner.unary(req, path, codec).await
1162        }
1163        /// TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes.
1164        ///
1165        /// Since: cosmos-sdk 0.47
1166        pub async fn tx_encode_amino(
1167            &mut self,
1168            request: impl tonic::IntoRequest<super::TxEncodeAminoRequest>,
1169        ) -> std::result::Result<
1170            tonic::Response<super::TxEncodeAminoResponse>,
1171            tonic::Status,
1172        > {
1173            self.inner
1174                .ready()
1175                .await
1176                .map_err(|e| {
1177                    tonic::Status::unknown(
1178                        format!("Service was not ready: {}", e.into()),
1179                    )
1180                })?;
1181            let codec = tonic::codec::ProstCodec::default();
1182            let path = http::uri::PathAndQuery::from_static(
1183                "/cosmos.tx.v1beta1.Service/TxEncodeAmino",
1184            );
1185            let mut req = request.into_request();
1186            req.extensions_mut()
1187                .insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "TxEncodeAmino"));
1188            self.inner.unary(req, path, codec).await
1189        }
1190        /// TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON.
1191        ///
1192        /// Since: cosmos-sdk 0.47
1193        pub async fn tx_decode_amino(
1194            &mut self,
1195            request: impl tonic::IntoRequest<super::TxDecodeAminoRequest>,
1196        ) -> std::result::Result<
1197            tonic::Response<super::TxDecodeAminoResponse>,
1198            tonic::Status,
1199        > {
1200            self.inner
1201                .ready()
1202                .await
1203                .map_err(|e| {
1204                    tonic::Status::unknown(
1205                        format!("Service was not ready: {}", e.into()),
1206                    )
1207                })?;
1208            let codec = tonic::codec::ProstCodec::default();
1209            let path = http::uri::PathAndQuery::from_static(
1210                "/cosmos.tx.v1beta1.Service/TxDecodeAmino",
1211            );
1212            let mut req = request.into_request();
1213            req.extensions_mut()
1214                .insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "TxDecodeAmino"));
1215            self.inner.unary(req, path, codec).await
1216        }
1217    }
1218}
1219/// Generated server implementations.
1220#[cfg(feature = "rpc")]
1221pub mod service_server {
1222    #![allow(
1223        unused_variables,
1224        dead_code,
1225        missing_docs,
1226        clippy::wildcard_imports,
1227        clippy::let_unit_value,
1228    )]
1229    use tonic::codegen::*;
1230    /// Generated trait containing gRPC methods that should be implemented for use with ServiceServer.
1231    #[async_trait]
1232    pub trait Service: std::marker::Send + std::marker::Sync + 'static {
1233        /// Simulate simulates executing a transaction for estimating gas usage.
1234        async fn simulate(
1235            &self,
1236            request: tonic::Request<super::SimulateRequest>,
1237        ) -> std::result::Result<
1238            tonic::Response<super::SimulateResponse>,
1239            tonic::Status,
1240        >;
1241        /// GetTx fetches a tx by hash.
1242        async fn get_tx(
1243            &self,
1244            request: tonic::Request<super::GetTxRequest>,
1245        ) -> std::result::Result<tonic::Response<super::GetTxResponse>, tonic::Status>;
1246        /// BroadcastTx broadcast transaction.
1247        async fn broadcast_tx(
1248            &self,
1249            request: tonic::Request<super::BroadcastTxRequest>,
1250        ) -> std::result::Result<
1251            tonic::Response<super::BroadcastTxResponse>,
1252            tonic::Status,
1253        >;
1254        /// GetTxsEvent fetches txs by event.
1255        async fn get_txs_event(
1256            &self,
1257            request: tonic::Request<super::GetTxsEventRequest>,
1258        ) -> std::result::Result<
1259            tonic::Response<super::GetTxsEventResponse>,
1260            tonic::Status,
1261        >;
1262        /// GetBlockWithTxs fetches a block with decoded txs.
1263        ///
1264        /// Since: cosmos-sdk 0.45.2
1265        async fn get_block_with_txs(
1266            &self,
1267            request: tonic::Request<super::GetBlockWithTxsRequest>,
1268        ) -> std::result::Result<
1269            tonic::Response<super::GetBlockWithTxsResponse>,
1270            tonic::Status,
1271        >;
1272        /// TxDecode decodes the transaction.
1273        ///
1274        /// Since: cosmos-sdk 0.47
1275        async fn tx_decode(
1276            &self,
1277            request: tonic::Request<super::TxDecodeRequest>,
1278        ) -> std::result::Result<
1279            tonic::Response<super::TxDecodeResponse>,
1280            tonic::Status,
1281        >;
1282        /// TxEncode encodes the transaction.
1283        ///
1284        /// Since: cosmos-sdk 0.47
1285        async fn tx_encode(
1286            &self,
1287            request: tonic::Request<super::TxEncodeRequest>,
1288        ) -> std::result::Result<
1289            tonic::Response<super::TxEncodeResponse>,
1290            tonic::Status,
1291        >;
1292        /// TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes.
1293        ///
1294        /// Since: cosmos-sdk 0.47
1295        async fn tx_encode_amino(
1296            &self,
1297            request: tonic::Request<super::TxEncodeAminoRequest>,
1298        ) -> std::result::Result<
1299            tonic::Response<super::TxEncodeAminoResponse>,
1300            tonic::Status,
1301        >;
1302        /// TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON.
1303        ///
1304        /// Since: cosmos-sdk 0.47
1305        async fn tx_decode_amino(
1306            &self,
1307            request: tonic::Request<super::TxDecodeAminoRequest>,
1308        ) -> std::result::Result<
1309            tonic::Response<super::TxDecodeAminoResponse>,
1310            tonic::Status,
1311        >;
1312    }
1313    /// Service defines a gRPC service for interacting with transactions.
1314    #[derive(Debug)]
1315    pub struct ServiceServer<T> {
1316        inner: Arc<T>,
1317        accept_compression_encodings: EnabledCompressionEncodings,
1318        send_compression_encodings: EnabledCompressionEncodings,
1319        max_decoding_message_size: Option<usize>,
1320        max_encoding_message_size: Option<usize>,
1321    }
1322    impl<T> ServiceServer<T> {
1323        pub fn new(inner: T) -> Self {
1324            Self::from_arc(Arc::new(inner))
1325        }
1326        pub fn from_arc(inner: Arc<T>) -> Self {
1327            Self {
1328                inner,
1329                accept_compression_encodings: Default::default(),
1330                send_compression_encodings: Default::default(),
1331                max_decoding_message_size: None,
1332                max_encoding_message_size: None,
1333            }
1334        }
1335        pub fn with_interceptor<F>(
1336            inner: T,
1337            interceptor: F,
1338        ) -> InterceptedService<Self, F>
1339        where
1340            F: tonic::service::Interceptor,
1341        {
1342            InterceptedService::new(Self::new(inner), interceptor)
1343        }
1344        /// Enable decompressing requests with the given encoding.
1345        #[must_use]
1346        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1347            self.accept_compression_encodings.enable(encoding);
1348            self
1349        }
1350        /// Compress responses with the given encoding, if the client supports it.
1351        #[must_use]
1352        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1353            self.send_compression_encodings.enable(encoding);
1354            self
1355        }
1356        /// Limits the maximum size of a decoded message.
1357        ///
1358        /// Default: `4MB`
1359        #[must_use]
1360        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1361            self.max_decoding_message_size = Some(limit);
1362            self
1363        }
1364        /// Limits the maximum size of an encoded message.
1365        ///
1366        /// Default: `usize::MAX`
1367        #[must_use]
1368        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1369            self.max_encoding_message_size = Some(limit);
1370            self
1371        }
1372    }
1373    impl<T, B> tonic::codegen::Service<http::Request<B>> for ServiceServer<T>
1374    where
1375        T: Service,
1376        B: Body + std::marker::Send + 'static,
1377        B::Error: Into<StdError> + std::marker::Send + 'static,
1378    {
1379        type Response = http::Response<tonic::body::BoxBody>;
1380        type Error = std::convert::Infallible;
1381        type Future = BoxFuture<Self::Response, Self::Error>;
1382        fn poll_ready(
1383            &mut self,
1384            _cx: &mut Context<'_>,
1385        ) -> Poll<std::result::Result<(), Self::Error>> {
1386            Poll::Ready(Ok(()))
1387        }
1388        fn call(&mut self, req: http::Request<B>) -> Self::Future {
1389            match req.uri().path() {
1390                "/cosmos.tx.v1beta1.Service/Simulate" => {
1391                    #[allow(non_camel_case_types)]
1392                    struct SimulateSvc<T: Service>(pub Arc<T>);
1393                    impl<T: Service> tonic::server::UnaryService<super::SimulateRequest>
1394                    for SimulateSvc<T> {
1395                        type Response = super::SimulateResponse;
1396                        type Future = BoxFuture<
1397                            tonic::Response<Self::Response>,
1398                            tonic::Status,
1399                        >;
1400                        fn call(
1401                            &mut self,
1402                            request: tonic::Request<super::SimulateRequest>,
1403                        ) -> Self::Future {
1404                            let inner = Arc::clone(&self.0);
1405                            let fut = async move {
1406                                <T as Service>::simulate(&inner, request).await
1407                            };
1408                            Box::pin(fut)
1409                        }
1410                    }
1411                    let accept_compression_encodings = self.accept_compression_encodings;
1412                    let send_compression_encodings = self.send_compression_encodings;
1413                    let max_decoding_message_size = self.max_decoding_message_size;
1414                    let max_encoding_message_size = self.max_encoding_message_size;
1415                    let inner = self.inner.clone();
1416                    let fut = async move {
1417                        let method = SimulateSvc(inner);
1418                        let codec = tonic::codec::ProstCodec::default();
1419                        let mut grpc = tonic::server::Grpc::new(codec)
1420                            .apply_compression_config(
1421                                accept_compression_encodings,
1422                                send_compression_encodings,
1423                            )
1424                            .apply_max_message_size_config(
1425                                max_decoding_message_size,
1426                                max_encoding_message_size,
1427                            );
1428                        let res = grpc.unary(method, req).await;
1429                        Ok(res)
1430                    };
1431                    Box::pin(fut)
1432                }
1433                "/cosmos.tx.v1beta1.Service/GetTx" => {
1434                    #[allow(non_camel_case_types)]
1435                    struct GetTxSvc<T: Service>(pub Arc<T>);
1436                    impl<T: Service> tonic::server::UnaryService<super::GetTxRequest>
1437                    for GetTxSvc<T> {
1438                        type Response = super::GetTxResponse;
1439                        type Future = BoxFuture<
1440                            tonic::Response<Self::Response>,
1441                            tonic::Status,
1442                        >;
1443                        fn call(
1444                            &mut self,
1445                            request: tonic::Request<super::GetTxRequest>,
1446                        ) -> Self::Future {
1447                            let inner = Arc::clone(&self.0);
1448                            let fut = async move {
1449                                <T as Service>::get_tx(&inner, request).await
1450                            };
1451                            Box::pin(fut)
1452                        }
1453                    }
1454                    let accept_compression_encodings = self.accept_compression_encodings;
1455                    let send_compression_encodings = self.send_compression_encodings;
1456                    let max_decoding_message_size = self.max_decoding_message_size;
1457                    let max_encoding_message_size = self.max_encoding_message_size;
1458                    let inner = self.inner.clone();
1459                    let fut = async move {
1460                        let method = GetTxSvc(inner);
1461                        let codec = tonic::codec::ProstCodec::default();
1462                        let mut grpc = tonic::server::Grpc::new(codec)
1463                            .apply_compression_config(
1464                                accept_compression_encodings,
1465                                send_compression_encodings,
1466                            )
1467                            .apply_max_message_size_config(
1468                                max_decoding_message_size,
1469                                max_encoding_message_size,
1470                            );
1471                        let res = grpc.unary(method, req).await;
1472                        Ok(res)
1473                    };
1474                    Box::pin(fut)
1475                }
1476                "/cosmos.tx.v1beta1.Service/BroadcastTx" => {
1477                    #[allow(non_camel_case_types)]
1478                    struct BroadcastTxSvc<T: Service>(pub Arc<T>);
1479                    impl<
1480                        T: Service,
1481                    > tonic::server::UnaryService<super::BroadcastTxRequest>
1482                    for BroadcastTxSvc<T> {
1483                        type Response = super::BroadcastTxResponse;
1484                        type Future = BoxFuture<
1485                            tonic::Response<Self::Response>,
1486                            tonic::Status,
1487                        >;
1488                        fn call(
1489                            &mut self,
1490                            request: tonic::Request<super::BroadcastTxRequest>,
1491                        ) -> Self::Future {
1492                            let inner = Arc::clone(&self.0);
1493                            let fut = async move {
1494                                <T as Service>::broadcast_tx(&inner, request).await
1495                            };
1496                            Box::pin(fut)
1497                        }
1498                    }
1499                    let accept_compression_encodings = self.accept_compression_encodings;
1500                    let send_compression_encodings = self.send_compression_encodings;
1501                    let max_decoding_message_size = self.max_decoding_message_size;
1502                    let max_encoding_message_size = self.max_encoding_message_size;
1503                    let inner = self.inner.clone();
1504                    let fut = async move {
1505                        let method = BroadcastTxSvc(inner);
1506                        let codec = tonic::codec::ProstCodec::default();
1507                        let mut grpc = tonic::server::Grpc::new(codec)
1508                            .apply_compression_config(
1509                                accept_compression_encodings,
1510                                send_compression_encodings,
1511                            )
1512                            .apply_max_message_size_config(
1513                                max_decoding_message_size,
1514                                max_encoding_message_size,
1515                            );
1516                        let res = grpc.unary(method, req).await;
1517                        Ok(res)
1518                    };
1519                    Box::pin(fut)
1520                }
1521                "/cosmos.tx.v1beta1.Service/GetTxsEvent" => {
1522                    #[allow(non_camel_case_types)]
1523                    struct GetTxsEventSvc<T: Service>(pub Arc<T>);
1524                    impl<
1525                        T: Service,
1526                    > tonic::server::UnaryService<super::GetTxsEventRequest>
1527                    for GetTxsEventSvc<T> {
1528                        type Response = super::GetTxsEventResponse;
1529                        type Future = BoxFuture<
1530                            tonic::Response<Self::Response>,
1531                            tonic::Status,
1532                        >;
1533                        fn call(
1534                            &mut self,
1535                            request: tonic::Request<super::GetTxsEventRequest>,
1536                        ) -> Self::Future {
1537                            let inner = Arc::clone(&self.0);
1538                            let fut = async move {
1539                                <T as Service>::get_txs_event(&inner, request).await
1540                            };
1541                            Box::pin(fut)
1542                        }
1543                    }
1544                    let accept_compression_encodings = self.accept_compression_encodings;
1545                    let send_compression_encodings = self.send_compression_encodings;
1546                    let max_decoding_message_size = self.max_decoding_message_size;
1547                    let max_encoding_message_size = self.max_encoding_message_size;
1548                    let inner = self.inner.clone();
1549                    let fut = async move {
1550                        let method = GetTxsEventSvc(inner);
1551                        let codec = tonic::codec::ProstCodec::default();
1552                        let mut grpc = tonic::server::Grpc::new(codec)
1553                            .apply_compression_config(
1554                                accept_compression_encodings,
1555                                send_compression_encodings,
1556                            )
1557                            .apply_max_message_size_config(
1558                                max_decoding_message_size,
1559                                max_encoding_message_size,
1560                            );
1561                        let res = grpc.unary(method, req).await;
1562                        Ok(res)
1563                    };
1564                    Box::pin(fut)
1565                }
1566                "/cosmos.tx.v1beta1.Service/GetBlockWithTxs" => {
1567                    #[allow(non_camel_case_types)]
1568                    struct GetBlockWithTxsSvc<T: Service>(pub Arc<T>);
1569                    impl<
1570                        T: Service,
1571                    > tonic::server::UnaryService<super::GetBlockWithTxsRequest>
1572                    for GetBlockWithTxsSvc<T> {
1573                        type Response = super::GetBlockWithTxsResponse;
1574                        type Future = BoxFuture<
1575                            tonic::Response<Self::Response>,
1576                            tonic::Status,
1577                        >;
1578                        fn call(
1579                            &mut self,
1580                            request: tonic::Request<super::GetBlockWithTxsRequest>,
1581                        ) -> Self::Future {
1582                            let inner = Arc::clone(&self.0);
1583                            let fut = async move {
1584                                <T as Service>::get_block_with_txs(&inner, request).await
1585                            };
1586                            Box::pin(fut)
1587                        }
1588                    }
1589                    let accept_compression_encodings = self.accept_compression_encodings;
1590                    let send_compression_encodings = self.send_compression_encodings;
1591                    let max_decoding_message_size = self.max_decoding_message_size;
1592                    let max_encoding_message_size = self.max_encoding_message_size;
1593                    let inner = self.inner.clone();
1594                    let fut = async move {
1595                        let method = GetBlockWithTxsSvc(inner);
1596                        let codec = tonic::codec::ProstCodec::default();
1597                        let mut grpc = tonic::server::Grpc::new(codec)
1598                            .apply_compression_config(
1599                                accept_compression_encodings,
1600                                send_compression_encodings,
1601                            )
1602                            .apply_max_message_size_config(
1603                                max_decoding_message_size,
1604                                max_encoding_message_size,
1605                            );
1606                        let res = grpc.unary(method, req).await;
1607                        Ok(res)
1608                    };
1609                    Box::pin(fut)
1610                }
1611                "/cosmos.tx.v1beta1.Service/TxDecode" => {
1612                    #[allow(non_camel_case_types)]
1613                    struct TxDecodeSvc<T: Service>(pub Arc<T>);
1614                    impl<T: Service> tonic::server::UnaryService<super::TxDecodeRequest>
1615                    for TxDecodeSvc<T> {
1616                        type Response = super::TxDecodeResponse;
1617                        type Future = BoxFuture<
1618                            tonic::Response<Self::Response>,
1619                            tonic::Status,
1620                        >;
1621                        fn call(
1622                            &mut self,
1623                            request: tonic::Request<super::TxDecodeRequest>,
1624                        ) -> Self::Future {
1625                            let inner = Arc::clone(&self.0);
1626                            let fut = async move {
1627                                <T as Service>::tx_decode(&inner, request).await
1628                            };
1629                            Box::pin(fut)
1630                        }
1631                    }
1632                    let accept_compression_encodings = self.accept_compression_encodings;
1633                    let send_compression_encodings = self.send_compression_encodings;
1634                    let max_decoding_message_size = self.max_decoding_message_size;
1635                    let max_encoding_message_size = self.max_encoding_message_size;
1636                    let inner = self.inner.clone();
1637                    let fut = async move {
1638                        let method = TxDecodeSvc(inner);
1639                        let codec = tonic::codec::ProstCodec::default();
1640                        let mut grpc = tonic::server::Grpc::new(codec)
1641                            .apply_compression_config(
1642                                accept_compression_encodings,
1643                                send_compression_encodings,
1644                            )
1645                            .apply_max_message_size_config(
1646                                max_decoding_message_size,
1647                                max_encoding_message_size,
1648                            );
1649                        let res = grpc.unary(method, req).await;
1650                        Ok(res)
1651                    };
1652                    Box::pin(fut)
1653                }
1654                "/cosmos.tx.v1beta1.Service/TxEncode" => {
1655                    #[allow(non_camel_case_types)]
1656                    struct TxEncodeSvc<T: Service>(pub Arc<T>);
1657                    impl<T: Service> tonic::server::UnaryService<super::TxEncodeRequest>
1658                    for TxEncodeSvc<T> {
1659                        type Response = super::TxEncodeResponse;
1660                        type Future = BoxFuture<
1661                            tonic::Response<Self::Response>,
1662                            tonic::Status,
1663                        >;
1664                        fn call(
1665                            &mut self,
1666                            request: tonic::Request<super::TxEncodeRequest>,
1667                        ) -> Self::Future {
1668                            let inner = Arc::clone(&self.0);
1669                            let fut = async move {
1670                                <T as Service>::tx_encode(&inner, request).await
1671                            };
1672                            Box::pin(fut)
1673                        }
1674                    }
1675                    let accept_compression_encodings = self.accept_compression_encodings;
1676                    let send_compression_encodings = self.send_compression_encodings;
1677                    let max_decoding_message_size = self.max_decoding_message_size;
1678                    let max_encoding_message_size = self.max_encoding_message_size;
1679                    let inner = self.inner.clone();
1680                    let fut = async move {
1681                        let method = TxEncodeSvc(inner);
1682                        let codec = tonic::codec::ProstCodec::default();
1683                        let mut grpc = tonic::server::Grpc::new(codec)
1684                            .apply_compression_config(
1685                                accept_compression_encodings,
1686                                send_compression_encodings,
1687                            )
1688                            .apply_max_message_size_config(
1689                                max_decoding_message_size,
1690                                max_encoding_message_size,
1691                            );
1692                        let res = grpc.unary(method, req).await;
1693                        Ok(res)
1694                    };
1695                    Box::pin(fut)
1696                }
1697                "/cosmos.tx.v1beta1.Service/TxEncodeAmino" => {
1698                    #[allow(non_camel_case_types)]
1699                    struct TxEncodeAminoSvc<T: Service>(pub Arc<T>);
1700                    impl<
1701                        T: Service,
1702                    > tonic::server::UnaryService<super::TxEncodeAminoRequest>
1703                    for TxEncodeAminoSvc<T> {
1704                        type Response = super::TxEncodeAminoResponse;
1705                        type Future = BoxFuture<
1706                            tonic::Response<Self::Response>,
1707                            tonic::Status,
1708                        >;
1709                        fn call(
1710                            &mut self,
1711                            request: tonic::Request<super::TxEncodeAminoRequest>,
1712                        ) -> Self::Future {
1713                            let inner = Arc::clone(&self.0);
1714                            let fut = async move {
1715                                <T as Service>::tx_encode_amino(&inner, request).await
1716                            };
1717                            Box::pin(fut)
1718                        }
1719                    }
1720                    let accept_compression_encodings = self.accept_compression_encodings;
1721                    let send_compression_encodings = self.send_compression_encodings;
1722                    let max_decoding_message_size = self.max_decoding_message_size;
1723                    let max_encoding_message_size = self.max_encoding_message_size;
1724                    let inner = self.inner.clone();
1725                    let fut = async move {
1726                        let method = TxEncodeAminoSvc(inner);
1727                        let codec = tonic::codec::ProstCodec::default();
1728                        let mut grpc = tonic::server::Grpc::new(codec)
1729                            .apply_compression_config(
1730                                accept_compression_encodings,
1731                                send_compression_encodings,
1732                            )
1733                            .apply_max_message_size_config(
1734                                max_decoding_message_size,
1735                                max_encoding_message_size,
1736                            );
1737                        let res = grpc.unary(method, req).await;
1738                        Ok(res)
1739                    };
1740                    Box::pin(fut)
1741                }
1742                "/cosmos.tx.v1beta1.Service/TxDecodeAmino" => {
1743                    #[allow(non_camel_case_types)]
1744                    struct TxDecodeAminoSvc<T: Service>(pub Arc<T>);
1745                    impl<
1746                        T: Service,
1747                    > tonic::server::UnaryService<super::TxDecodeAminoRequest>
1748                    for TxDecodeAminoSvc<T> {
1749                        type Response = super::TxDecodeAminoResponse;
1750                        type Future = BoxFuture<
1751                            tonic::Response<Self::Response>,
1752                            tonic::Status,
1753                        >;
1754                        fn call(
1755                            &mut self,
1756                            request: tonic::Request<super::TxDecodeAminoRequest>,
1757                        ) -> Self::Future {
1758                            let inner = Arc::clone(&self.0);
1759                            let fut = async move {
1760                                <T as Service>::tx_decode_amino(&inner, request).await
1761                            };
1762                            Box::pin(fut)
1763                        }
1764                    }
1765                    let accept_compression_encodings = self.accept_compression_encodings;
1766                    let send_compression_encodings = self.send_compression_encodings;
1767                    let max_decoding_message_size = self.max_decoding_message_size;
1768                    let max_encoding_message_size = self.max_encoding_message_size;
1769                    let inner = self.inner.clone();
1770                    let fut = async move {
1771                        let method = TxDecodeAminoSvc(inner);
1772                        let codec = tonic::codec::ProstCodec::default();
1773                        let mut grpc = tonic::server::Grpc::new(codec)
1774                            .apply_compression_config(
1775                                accept_compression_encodings,
1776                                send_compression_encodings,
1777                            )
1778                            .apply_max_message_size_config(
1779                                max_decoding_message_size,
1780                                max_encoding_message_size,
1781                            );
1782                        let res = grpc.unary(method, req).await;
1783                        Ok(res)
1784                    };
1785                    Box::pin(fut)
1786                }
1787                _ => {
1788                    Box::pin(async move {
1789                        let mut response = http::Response::new(empty_body());
1790                        let headers = response.headers_mut();
1791                        headers
1792                            .insert(
1793                                tonic::Status::GRPC_STATUS,
1794                                (tonic::Code::Unimplemented as i32).into(),
1795                            );
1796                        headers
1797                            .insert(
1798                                http::header::CONTENT_TYPE,
1799                                tonic::metadata::GRPC_CONTENT_TYPE,
1800                            );
1801                        Ok(response)
1802                    })
1803                }
1804            }
1805        }
1806    }
1807    impl<T> Clone for ServiceServer<T> {
1808        fn clone(&self) -> Self {
1809            let inner = self.inner.clone();
1810            Self {
1811                inner,
1812                accept_compression_encodings: self.accept_compression_encodings,
1813                send_compression_encodings: self.send_compression_encodings,
1814                max_decoding_message_size: self.max_decoding_message_size,
1815                max_encoding_message_size: self.max_encoding_message_size,
1816            }
1817        }
1818    }
1819    /// Generated gRPC service name
1820    pub const SERVICE_NAME: &str = "cosmos.tx.v1beta1.Service";
1821    impl<T> tonic::server::NamedService for ServiceServer<T> {
1822        const NAME: &'static str = SERVICE_NAME;
1823    }
1824}