diff --git a/crates/bin/pcli/src/command/tx.rs b/crates/bin/pcli/src/command/tx.rs index 90c49d523d..9289d1fb5c 100644 --- a/crates/bin/pcli/src/command/tx.rs +++ b/crates/bin/pcli/src/command/tx.rs @@ -51,7 +51,16 @@ use penumbra_proto::{ ValidatorPenaltyRequest, }, }, + cosmos::tx::v1beta1::{ + mode_info::{Single, Sum}, + service_client::ServiceClient as CosmosServiceClient, + AuthInfo as CosmosAuthInfo, BroadcastTxRequest as CosmosBroadcastTxRequest, + Fee as CosmosFee, ModeInfo, SignerInfo as CosmosSignerInfo, Tx as CosmosTx, + TxBody as CosmosTxBody, + }, + noble::forwarding::v1::{ForwardingPubKey, MsgRegisterAccount}, view::v1::GasPricesRequest, + Message, Name as _, }; use penumbra_shielded_pool::Ics20Withdrawal; use penumbra_stake::rate::RateData; @@ -60,6 +69,8 @@ use penumbra_transaction::{gas::swap_claim_gas_cost, Transaction}; use penumbra_view::{SpendableNoteRecord, ViewClient}; use penumbra_wallet::plan::{self, Planner}; use proposal::ProposalCmd; +use tonic::transport::{Channel, ClientTlsConfig}; +use url::Url; use crate::command::tx::auction::AuctionCmd; use crate::App; @@ -258,6 +269,22 @@ pub enum TxCmd { #[clap(long)] use_compat_address: bool, }, + #[clap(display_order = 970)] + /// Register a Noble forwarding account. + RegisterForwardingAccount { + /// The Noble node to submit the registration transaction to. + #[clap(long)] + noble_node: Url, + /// The Noble IBC channel to use for forwarding. + #[clap(long)] + channel: String, + /// The Penumbra address or address index to receive forwarded funds. + #[clap(long)] + address_or_index: String, + /// Whether or not to use an ephemeral address. + #[clap(long)] + ephemeral: bool, + }, /// Broadcast a saved transaction to the network #[clap(display_order = 1000)] Broadcast { @@ -319,6 +346,7 @@ impl TxCmd { TxCmd::Withdraw { .. } => false, TxCmd::Auction(_) => false, TxCmd::Broadcast { .. } => false, + TxCmd::RegisterForwardingAccount { .. } => false, } } @@ -326,6 +354,8 @@ impl TxCmd { // TODO: use a command line flag to determine the fee token, // and pull the appropriate GasPrices out of this rpc response, // the rest should follow + // TODO: fetching this here means that no tx commands + // can be run in offline mode, which is a bit annoying let gas_prices = app .view .as_mut() @@ -1333,7 +1363,109 @@ impl TxCmd { let transaction: Transaction = serde_json::from_slice(&fs::read(transaction)?)?; app.submit_transaction(transaction).await?; } + TxCmd::RegisterForwardingAccount { + noble_node, + channel, + address_or_index, + ephemeral, + } => { + let index: Result = address_or_index.parse(); + let fvk = app.config.full_viewing_key.clone(); + + let address = if let Ok(index) = index { + // address index provided + let (address, _dtk) = match ephemeral { + false => fvk.incoming().payment_address(index.into()), + true => fvk.incoming().ephemeral_address(OsRng, index.into()), + }; + + address + } else { + // address or nothing provided + let address: Address = address_or_index + .parse() + .map_err(|_| anyhow::anyhow!("Provided address is invalid."))?; + + address + }; + + let noble_address = address.noble_forwarding_address(channel); + + println!( + "registering Noble forwarding account with address {} to forward to Penumbra address {}...", + noble_address, address + ); + + let mut noble_client = CosmosServiceClient::new( + Channel::from_shared(noble_node.to_string())? + .tls_config(ClientTlsConfig::new())? + .connect() + .await?, + ); + + let tx = CosmosTx { + body: Some(CosmosTxBody { + messages: vec![pbjson_types::Any { + type_url: MsgRegisterAccount::type_url(), + value: MsgRegisterAccount { + signer: noble_address.to_string(), + recipient: address.to_string(), + channel: channel.to_string(), + } + .encode_to_vec() + .into(), + }], + memo: "".to_string(), + timeout_height: 0, + extension_options: vec![], + non_critical_extension_options: vec![], + }), + auth_info: Some(CosmosAuthInfo { + signer_infos: vec![CosmosSignerInfo { + public_key: Some(pbjson_types::Any { + type_url: ForwardingPubKey::type_url(), + value: ForwardingPubKey { + key: noble_address.bytes(), + } + .encode_to_vec() + .into(), + }), + mode_info: Some(ModeInfo { + // SIGN_MODE_DIRECT + sum: Some(Sum::Single(Single { mode: 1 })), + }), + sequence: 0, + }], + fee: Some(CosmosFee { + amount: vec![], + gas_limit: 200000u64, + payer: "".to_string(), + granter: "".to_string(), + }), + tip: None, + }), + signatures: vec![vec![]], + }; + let r = noble_client + .broadcast_tx(CosmosBroadcastTxRequest { + tx_bytes: tx.encode_to_vec().into(), + // sync + mode: 2, + }) + .await?; + + // let r = noble_client + // .register_account(MsgRegisterAccount { + // signer: noble_address, + // recipient: address.to_string(), + // channel: channel.to_string(), + // }) + // .await?; + + println!("Noble response: {:?}", r); + } } + Ok(()) } } diff --git a/crates/bin/pcli/src/command/view.rs b/crates/bin/pcli/src/command/view.rs index 3d57d1333c..0bc07a2d85 100644 --- a/crates/bin/pcli/src/command/view.rs +++ b/crates/bin/pcli/src/command/view.rs @@ -2,6 +2,7 @@ use anyhow::Result; use address::AddressCmd; use balance::BalanceCmd; +use noble_address::NobleAddressCmd; use staked::StakedCmd; use transaction_hashes::TransactionHashesCmd; use tx::TxCmd; @@ -14,6 +15,7 @@ use self::auction::AuctionCmd; mod address; mod auction; mod balance; +mod noble_address; mod staked; mod wallet_id; @@ -28,6 +30,8 @@ pub enum ViewCmd { WalletId(WalletIdCmd), /// View one of your addresses, either by numerical index, or a random ephemeral one. Address(AddressCmd), + /// View the Noble forwarding address associated with one of your addresses, either by numerical index, or a random ephemeral one. + NobleAddress(NobleAddressCmd), /// View your account balances. Balance(BalanceCmd), /// View your staked delegation tokens. @@ -52,6 +56,7 @@ impl ViewCmd { ViewCmd::Auction(auction_cmd) => auction_cmd.offline(), ViewCmd::WalletId(wallet_id_cmd) => wallet_id_cmd.offline(), ViewCmd::Address(address_cmd) => address_cmd.offline(), + ViewCmd::NobleAddress(address_cmd) => address_cmd.offline(), ViewCmd::Balance(balance_cmd) => balance_cmd.offline(), ViewCmd::Staked(staked_cmd) => staked_cmd.offline(), ViewCmd::Reset(_) => true, @@ -91,6 +96,9 @@ impl ViewCmd { ViewCmd::Address(address_cmd) => { address_cmd.exec(&full_viewing_key)?; } + ViewCmd::NobleAddress(noble_address_cmd) => { + noble_address_cmd.exec(&full_viewing_key)?; + } ViewCmd::Balance(balance_cmd) => { let view_client = app.view(); balance_cmd.exec(view_client).await?; diff --git a/crates/bin/pcli/src/command/view/noble_address.rs b/crates/bin/pcli/src/command/view/noble_address.rs new file mode 100644 index 0000000000..6f696147cc --- /dev/null +++ b/crates/bin/pcli/src/command/view/noble_address.rs @@ -0,0 +1,52 @@ +use anyhow::Result; +use rand_core::OsRng; + +use penumbra_keys::{Address, FullViewingKey}; + +#[derive(Debug, clap::Parser)] +pub struct NobleAddressCmd { + /// The address to provide information about + #[clap(default_value = "0")] + address_or_index: String, + /// Generate an ephemeral address instead of an indexed one. + #[clap(short, long)] + ephemeral: bool, + /// The Noble IBC channel to use for forwarding. + #[clap(long)] + channel: String, +} + +impl NobleAddressCmd { + /// Determine if this command requires a network sync before it executes. + pub fn offline(&self) -> bool { + true + } + + pub fn exec(&self, fvk: &FullViewingKey) -> Result<()> { + let index: Result = self.address_or_index.parse(); + + let address = if let Ok(index) = index { + // address index provided + let (address, _dtk) = match self.ephemeral { + false => fvk.incoming().payment_address(index.into()), + true => fvk.incoming().ephemeral_address(OsRng, index.into()), + }; + + address + } else { + // address or nothing provided + let address: Address = self + .address_or_index + .parse() + .map_err(|_| anyhow::anyhow!("Provided address is invalid."))?; + + address + }; + + let noble_address = address.noble_forwarding_address(&self.channel); + + println!("{}", noble_address); + + Ok(()) + } +} diff --git a/crates/core/keys/src/address.rs b/crates/core/keys/src/address.rs index e6dc61e918..3a136151b5 100644 --- a/crates/core/keys/src/address.rs +++ b/crates/core/keys/src/address.rs @@ -1,6 +1,7 @@ //! [Payment address][Address] facilities. use std::{ + fmt::Display, io::{Cursor, Read, Write}, sync::OnceLock, }; @@ -12,6 +13,7 @@ use f4jumble::{f4jumble, f4jumble_inv}; use penumbra_proto::{penumbra::core::keys::v1 as pb, serializers::bech32str, DomainType}; use rand::{CryptoRng, Rng}; use serde::{Deserialize, Serialize}; +use sha2::{Digest, Sha256}; mod r1cs; pub use r1cs::AddressVar; @@ -214,6 +216,49 @@ impl Address { bech32str::Bech32, ) } + + /// Generate a Noble forwarding address. + pub fn noble_forwarding_address(&self, channel: &str) -> NobleForwardingAddress { + NobleForwardingAddress { + channel: channel.to_string(), + recipient: format!("{}", self), + } + } +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct NobleForwardingAddress { + pub channel: String, + pub recipient: String, +} + +impl NobleForwardingAddress { + pub fn bytes(&self) -> Vec { + // Based on https://github.com/noble-assets/forwarding/blob/main/x/forwarding/types/account.go#L17 + let channel = self.channel.clone(); + let recipient = self.recipient.clone(); + let bz = format!("{channel}{recipient}").as_bytes().to_owned(); + let th = Sha256::digest("forwarding".as_bytes()); + let mut hasher = Sha256::new(); + hasher.update(th); + hasher.update(bz); + + // This constructs the account bytes for the Noble forwarding address + // Only use bytes 12 and on: + hasher.finalize()[12..].to_vec() + } +} + +impl Display for NobleForwardingAddress { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + let addr_bytes = &self.bytes(); + + write!( + f, + "{}", + bech32str::encode(&addr_bytes, "noble", bech32str::Bech32) + ) + } } impl DomainType for Address { diff --git a/crates/proto/src/gen/cosmos.app.v1alpha1.rs b/crates/proto/src/gen/cosmos.app.v1alpha1.rs new file mode 100644 index 0000000000..de74556a7a --- /dev/null +++ b/crates/proto/src/gen/cosmos.app.v1alpha1.rs @@ -0,0 +1,102 @@ +/// ModuleDescriptor describes an app module. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ModuleDescriptor { + /// go_import names the package that should be imported by an app to load the + /// module in the runtime module registry. It is required to make debugging + /// of configuration errors easier for users. + #[prost(string, tag = "1")] + pub go_import: ::prost::alloc::string::String, + /// use_package refers to a protobuf package that this module + /// uses and exposes to the world. In an app, only one module should "use" + /// or own a single protobuf package. It is assumed that the module uses + /// all of the .proto files in a single package. + #[prost(message, repeated, tag = "2")] + pub use_package: ::prost::alloc::vec::Vec, + /// can_migrate_from defines which module versions this module can migrate + /// state from. The framework will check that one module version is able to + /// migrate from a previous module version before attempting to update its + /// config. It is assumed that modules can transitively migrate from earlier + /// versions. For instance if v3 declares it can migrate from v2, and v2 + /// declares it can migrate from v1, the framework knows how to migrate + /// from v1 to v3, assuming all 3 module versions are registered at runtime. + #[prost(message, repeated, tag = "3")] + pub can_migrate_from: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ModuleDescriptor { + const NAME: &'static str = "ModuleDescriptor"; + const PACKAGE: &'static str = "cosmos.app.v1alpha1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.app.v1alpha1.{}", Self::NAME) + } +} +/// PackageReference is a reference to a protobuf package used by a module. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PackageReference { + /// name is the fully-qualified name of the package. + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, + /// revision is the optional revision of the package that is being used. + /// Protobuf packages used in Cosmos should generally have a major version + /// as the last part of the package name, ex. foo.bar.baz.v1. + /// The revision of a package can be thought of as the minor version of a + /// package which has additional backwards compatible definitions that weren't + /// present in a previous version. + /// + /// A package should indicate its revision with a source code comment + /// above the package declaration in one of its files containing the + /// text "Revision N" where N is an integer revision. All packages start + /// at revision 0 the first time they are released in a module. + /// + /// When a new version of a module is released and items are added to existing + /// .proto files, these definitions should contain comments of the form + /// "Since: Revision N" where N is an integer revision. + /// + /// When the module runtime starts up, it will check the pinned proto + /// image and panic if there are runtime protobuf definitions that are not + /// in the pinned descriptor which do not have + /// a "Since Revision N" comment or have a "Since Revision N" comment where + /// N is \<= to the revision specified here. This indicates that the protobuf + /// files have been updated, but the pinned file descriptor hasn't. + /// + /// If there are items in the pinned file descriptor with a revision + /// greater than the value indicated here, this will also cause a panic + /// as it may mean that the pinned descriptor for a legacy module has been + /// improperly updated or that there is some other versioning discrepancy. + /// Runtime protobuf definitions will also be checked for compatibility + /// with pinned file descriptors to make sure there are no incompatible changes. + /// + /// This behavior ensures that: + /// + /// * pinned proto images are up-to-date + /// * protobuf files are carefully annotated with revision comments which + /// are important good client UX + /// * protobuf files are changed in backwards and forwards compatible ways + #[prost(uint32, tag = "2")] + pub revision: u32, +} +impl ::prost::Name for PackageReference { + const NAME: &'static str = "PackageReference"; + const PACKAGE: &'static str = "cosmos.app.v1alpha1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.app.v1alpha1.{}", Self::NAME) + } +} +/// MigrateFromInfo is information on a module version that a newer module +/// can migrate from. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MigrateFromInfo { + /// module is the fully-qualified protobuf name of the module config object + /// for the previous module version, ex: "cosmos.group.module.v1.Module". + #[prost(string, tag = "1")] + pub module: ::prost::alloc::string::String, +} +impl ::prost::Name for MigrateFromInfo { + const NAME: &'static str = "MigrateFromInfo"; + const PACKAGE: &'static str = "cosmos.app.v1alpha1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.app.v1alpha1.{}", Self::NAME) + } +} diff --git a/crates/proto/src/gen/cosmos.auth.v1beta1.rs b/crates/proto/src/gen/cosmos.auth.v1beta1.rs new file mode 100644 index 0000000000..494ee21f5f --- /dev/null +++ b/crates/proto/src/gen/cosmos.auth.v1beta1.rs @@ -0,0 +1,83 @@ +/// BaseAccount defines a base account type. It contains all the necessary fields +/// for basic account functionality. Any custom account type should extend this +/// type for additional functionality (e.g. vesting). +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BaseAccount { + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub pub_key: ::core::option::Option<::pbjson_types::Any>, + #[prost(uint64, tag = "3")] + pub account_number: u64, + #[prost(uint64, tag = "4")] + pub sequence: u64, +} +impl ::prost::Name for BaseAccount { + const NAME: &'static str = "BaseAccount"; + const PACKAGE: &'static str = "cosmos.auth.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) + } +} +/// ModuleAccount defines an account for modules that holds coins on a pool. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ModuleAccount { + #[prost(message, optional, tag = "1")] + pub base_account: ::core::option::Option, + #[prost(string, tag = "2")] + pub name: ::prost::alloc::string::String, + #[prost(string, repeated, tag = "3")] + pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +impl ::prost::Name for ModuleAccount { + const NAME: &'static str = "ModuleAccount"; + const PACKAGE: &'static str = "cosmos.auth.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) + } +} +/// ModuleCredential represents a unclaimable pubkey for base accounts controlled by modules. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ModuleCredential { + /// module_name is the name of the module used for address derivation (passed into address.Module). + #[prost(string, tag = "1")] + pub module_name: ::prost::alloc::string::String, + /// derivation_keys is for deriving a module account address (passed into address.Module) + /// adding more keys creates sub-account addresses (passed into address.Derive) + #[prost(bytes = "vec", repeated, tag = "2")] + pub derivation_keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +impl ::prost::Name for ModuleCredential { + const NAME: &'static str = "ModuleCredential"; + const PACKAGE: &'static str = "cosmos.auth.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) + } +} +/// Params defines the parameters for the auth module. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Params { + #[prost(uint64, tag = "1")] + pub max_memo_characters: u64, + #[prost(uint64, tag = "2")] + pub tx_sig_limit: u64, + #[prost(uint64, tag = "3")] + pub tx_size_cost_per_byte: u64, + #[prost(uint64, tag = "4")] + pub sig_verify_cost_ed25519: u64, + #[prost(uint64, tag = "5")] + pub sig_verify_cost_secp256k1: u64, +} +impl ::prost::Name for Params { + const NAME: &'static str = "Params"; + const PACKAGE: &'static str = "cosmos.auth.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) + } +} diff --git a/crates/proto/src/gen/cosmos.base.abci.v1beta1.rs b/crates/proto/src/gen/cosmos.base.abci.v1beta1.rs new file mode 100644 index 0000000000..574a2519a4 --- /dev/null +++ b/crates/proto/src/gen/cosmos.base.abci.v1beta1.rs @@ -0,0 +1,285 @@ +/// TxResponse defines a structure containing relevant tx data and metadata. The +/// tags are stringified and the log is JSON decoded. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxResponse { + /// The block height + #[prost(int64, tag = "1")] + pub height: i64, + /// The transaction hash. + #[prost(string, tag = "2")] + pub txhash: ::prost::alloc::string::String, + /// Namespace for the Code + #[prost(string, tag = "3")] + pub codespace: ::prost::alloc::string::String, + /// Response code. + #[prost(uint32, tag = "4")] + pub code: u32, + /// Result bytes, if any. + #[prost(string, tag = "5")] + pub data: ::prost::alloc::string::String, + /// The output of the application's logger (raw string). May be + /// non-deterministic. + #[prost(string, tag = "6")] + pub raw_log: ::prost::alloc::string::String, + /// The output of the application's logger (typed). May be non-deterministic. + #[prost(message, repeated, tag = "7")] + pub logs: ::prost::alloc::vec::Vec, + /// Additional information. May be non-deterministic. + #[prost(string, tag = "8")] + pub info: ::prost::alloc::string::String, + /// Amount of gas requested for transaction. + #[prost(int64, tag = "9")] + pub gas_wanted: i64, + /// Amount of gas consumed by transaction. + #[prost(int64, tag = "10")] + pub gas_used: i64, + /// The request transaction bytes. + #[prost(message, optional, tag = "11")] + pub tx: ::core::option::Option<::pbjson_types::Any>, + /// Time of the previous block. For heights > 1, it's the weighted median of + /// the timestamps of the valid votes in the block.LastCommit. For height == 1, + /// it's genesis time. + #[prost(string, tag = "12")] + pub timestamp: ::prost::alloc::string::String, + /// Events defines all the events emitted by processing a transaction. Note, + /// these events include those emitted by processing all the messages and those + /// emitted from the ante. Whereas Logs contains the events, with + /// additional metadata, emitted only by processing the messages. + /// + /// Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + #[prost(message, repeated, tag = "13")] + pub events: ::prost::alloc::vec::Vec< + super::super::super::super::tendermint::abci::Event, + >, +} +impl ::prost::Name for TxResponse { + const NAME: &'static str = "TxResponse"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.base.abci.v1beta1.{}", Self::NAME) + } +} +/// ABCIMessageLog defines a structure containing an indexed tx ABCI message log. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AbciMessageLog { + #[prost(uint32, tag = "1")] + pub msg_index: u32, + #[prost(string, tag = "2")] + pub log: ::prost::alloc::string::String, + /// Events contains a slice of Event objects that were emitted during some + /// execution. + #[prost(message, repeated, tag = "3")] + pub events: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for AbciMessageLog { + const NAME: &'static str = "ABCIMessageLog"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.base.abci.v1beta1.{}", Self::NAME) + } +} +/// StringEvent defines en Event object wrapper where all the attributes +/// contain key/value pairs that are strings instead of raw bytes. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StringEvent { + #[prost(string, tag = "1")] + pub r#type: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub attributes: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for StringEvent { + const NAME: &'static str = "StringEvent"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.base.abci.v1beta1.{}", Self::NAME) + } +} +/// Attribute defines an attribute wrapper where the key and value are +/// strings instead of raw bytes. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Attribute { + #[prost(string, tag = "1")] + pub key: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub value: ::prost::alloc::string::String, +} +impl ::prost::Name for Attribute { + const NAME: &'static str = "Attribute"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.base.abci.v1beta1.{}", Self::NAME) + } +} +/// GasInfo defines tx execution gas context. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GasInfo { + /// GasWanted is the maximum units of work we allow this tx to perform. + #[prost(uint64, tag = "1")] + pub gas_wanted: u64, + /// GasUsed is the amount of gas actually consumed. + #[prost(uint64, tag = "2")] + pub gas_used: u64, +} +impl ::prost::Name for GasInfo { + const NAME: &'static str = "GasInfo"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.base.abci.v1beta1.{}", Self::NAME) + } +} +/// Result is the union of ResponseFormat and ResponseCheckTx. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Result { + /// Data is any data returned from message or handler execution. It MUST be + /// length prefixed in order to separate data from multiple message executions. + /// Deprecated. This field is still populated, but prefer msg_response instead + /// because it also contains the Msg response typeURL. + #[deprecated] + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, + /// Log contains the log information from message or handler execution. + #[prost(string, tag = "2")] + pub log: ::prost::alloc::string::String, + /// Events contains a slice of Event objects that were emitted during message + /// or handler execution. + #[prost(message, repeated, tag = "3")] + pub events: ::prost::alloc::vec::Vec< + super::super::super::super::tendermint::abci::Event, + >, + /// msg_responses contains the Msg handler responses type packed in Anys. + /// + /// Since: cosmos-sdk 0.46 + #[prost(message, repeated, tag = "4")] + pub msg_responses: ::prost::alloc::vec::Vec<::pbjson_types::Any>, +} +impl ::prost::Name for Result { + const NAME: &'static str = "Result"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.base.abci.v1beta1.{}", Self::NAME) + } +} +/// SimulationResponse defines the response generated when a transaction is +/// successfully simulated. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SimulationResponse { + #[prost(message, optional, tag = "1")] + pub gas_info: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub result: ::core::option::Option, +} +impl ::prost::Name for SimulationResponse { + const NAME: &'static str = "SimulationResponse"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.base.abci.v1beta1.{}", Self::NAME) + } +} +/// MsgData defines the data returned in a Result object during message +/// execution. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgData { + #[prost(string, tag = "1")] + pub msg_type: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgData { + const NAME: &'static str = "MsgData"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.base.abci.v1beta1.{}", Self::NAME) + } +} +/// TxMsgData defines a list of MsgData. A transaction will have a MsgData object +/// for each message. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxMsgData { + /// data field is deprecated and not populated. + #[deprecated] + #[prost(message, repeated, tag = "1")] + pub data: ::prost::alloc::vec::Vec, + /// msg_responses contains the Msg handler responses packed into Anys. + /// + /// Since: cosmos-sdk 0.46 + #[prost(message, repeated, tag = "2")] + pub msg_responses: ::prost::alloc::vec::Vec<::pbjson_types::Any>, +} +impl ::prost::Name for TxMsgData { + const NAME: &'static str = "TxMsgData"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.base.abci.v1beta1.{}", Self::NAME) + } +} +/// SearchTxsResult defines a structure for querying txs pageable +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchTxsResult { + /// Count of all txs + #[prost(uint64, tag = "1")] + pub total_count: u64, + /// Count of txs in current page + #[prost(uint64, tag = "2")] + pub count: u64, + /// Index of current page, start from 1 + #[prost(uint64, tag = "3")] + pub page_number: u64, + /// Count of total pages + #[prost(uint64, tag = "4")] + pub page_total: u64, + /// Max count txs per page + #[prost(uint64, tag = "5")] + pub limit: u64, + /// List of txs in current page + #[prost(message, repeated, tag = "6")] + pub txs: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for SearchTxsResult { + const NAME: &'static str = "SearchTxsResult"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.base.abci.v1beta1.{}", Self::NAME) + } +} +/// SearchBlocksResult defines a structure for querying blocks pageable +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchBlocksResult { + /// Count of all blocks + #[prost(int64, tag = "1")] + pub total_count: i64, + /// Count of blocks in current page + #[prost(int64, tag = "2")] + pub count: i64, + /// Index of current page, start from 1 + #[prost(int64, tag = "3")] + pub page_number: i64, + /// Count of total pages + #[prost(int64, tag = "4")] + pub page_total: i64, + /// Max count blocks per page + #[prost(int64, tag = "5")] + pub limit: i64, + /// List of blocks in current page + #[prost(message, repeated, tag = "6")] + pub blocks: ::prost::alloc::vec::Vec< + super::super::super::super::tendermint::types::Block, + >, +} +impl ::prost::Name for SearchBlocksResult { + const NAME: &'static str = "SearchBlocksResult"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.base.abci.v1beta1.{}", Self::NAME) + } +} diff --git a/crates/proto/src/gen/cosmos.crypto.multisig.v1beta1.rs b/crates/proto/src/gen/cosmos.crypto.multisig.v1beta1.rs new file mode 100644 index 0000000000..1d784f6978 --- /dev/null +++ b/crates/proto/src/gen/cosmos.crypto.multisig.v1beta1.rs @@ -0,0 +1,35 @@ +/// MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. +/// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers +/// signed and with which modes. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MultiSignature { + #[prost(bytes = "vec", repeated, tag = "1")] + pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +impl ::prost::Name for MultiSignature { + const NAME: &'static str = "MultiSignature"; + const PACKAGE: &'static str = "cosmos.crypto.multisig.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.crypto.multisig.v1beta1.{}", Self::NAME) + } +} +/// CompactBitArray is an implementation of a space efficient bit array. +/// This is used to ensure that the encoded data takes up a minimal amount of +/// space after proto encoding. +/// This is not thread safe, and is not intended for concurrent usage. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CompactBitArray { + #[prost(uint32, tag = "1")] + pub extra_bits_stored: u32, + #[prost(bytes = "vec", tag = "2")] + pub elems: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for CompactBitArray { + const NAME: &'static str = "CompactBitArray"; + const PACKAGE: &'static str = "cosmos.crypto.multisig.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.crypto.multisig.v1beta1.{}", Self::NAME) + } +} diff --git a/crates/proto/src/gen/cosmos.tx.config.v1.rs b/crates/proto/src/gen/cosmos.tx.config.v1.rs new file mode 100644 index 0000000000..b79ab2e0fd --- /dev/null +++ b/crates/proto/src/gen/cosmos.tx.config.v1.rs @@ -0,0 +1,20 @@ +/// Config is the config object of the x/auth/tx package. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Config { + /// skip_ante_handler defines whether the ante handler registration should be skipped in case an app wants to override + /// this functionality. + #[prost(bool, tag = "1")] + pub skip_ante_handler: bool, + /// skip_post_handler defines whether the post handler registration should be skipped in case an app wants to override + /// this functionality. + #[prost(bool, tag = "2")] + pub skip_post_handler: bool, +} +impl ::prost::Name for Config { + const NAME: &'static str = "Config"; + const PACKAGE: &'static str = "cosmos.tx.config.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.tx.config.v1.{}", Self::NAME) + } +} diff --git a/crates/proto/src/gen/cosmos.tx.signing.v1beta1.rs b/crates/proto/src/gen/cosmos.tx.signing.v1beta1.rs new file mode 100644 index 0000000000..c5b8f2f52f --- /dev/null +++ b/crates/proto/src/gen/cosmos.tx.signing.v1beta1.rs @@ -0,0 +1,189 @@ +/// SignatureDescriptors wraps multiple SignatureDescriptor's. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignatureDescriptors { + /// signatures are the signature descriptors + #[prost(message, repeated, tag = "1")] + pub signatures: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for SignatureDescriptors { + const NAME: &'static str = "SignatureDescriptors"; + const PACKAGE: &'static str = "cosmos.tx.signing.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.tx.signing.v1beta1.{}", Self::NAME) + } +} +/// SignatureDescriptor is a convenience type which represents the full data for +/// a signature including the public key of the signer, signing modes and the +/// signature itself. It is primarily used for coordinating signatures between +/// clients. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignatureDescriptor { + /// public_key is the public key of the signer + #[prost(message, optional, tag = "1")] + pub public_key: ::core::option::Option<::pbjson_types::Any>, + #[prost(message, optional, tag = "2")] + pub data: ::core::option::Option, + /// sequence is the sequence of the account, which describes the + /// number of committed transactions signed by a given address. It is used to prevent + /// replay attacks. + #[prost(uint64, tag = "3")] + pub sequence: u64, +} +/// Nested message and enum types in `SignatureDescriptor`. +pub mod signature_descriptor { + /// Data represents signature data + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Data { + /// sum is the oneof that specifies whether this represents single or multi-signature data + #[prost(oneof = "data::Sum", tags = "1, 2")] + pub sum: ::core::option::Option, + } + /// Nested message and enum types in `Data`. + pub mod data { + /// Single is the signature data for a single signer + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Single { + /// mode is the signing mode of the single signer + #[prost(enumeration = "super::super::SignMode", tag = "1")] + pub mode: i32, + /// signature is the raw signature bytes + #[prost(bytes = "vec", tag = "2")] + pub signature: ::prost::alloc::vec::Vec, + } + impl ::prost::Name for Single { + const NAME: &'static str = "Single"; + const PACKAGE: &'static str = "cosmos.tx.signing.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!( + "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.{}", Self::NAME + ) + } + } + /// Multi is the signature data for a multisig public key + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Multi { + /// bitarray specifies which keys within the multisig are signing + #[prost(message, optional, tag = "1")] + pub bitarray: ::core::option::Option< + super::super::super::super::super::crypto::multisig::v1beta1::CompactBitArray, + >, + /// signatures is the signatures of the multi-signature + #[prost(message, repeated, tag = "2")] + pub signatures: ::prost::alloc::vec::Vec, + } + impl ::prost::Name for Multi { + const NAME: &'static str = "Multi"; + const PACKAGE: &'static str = "cosmos.tx.signing.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!( + "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.{}", Self::NAME + ) + } + } + /// sum is the oneof that specifies whether this represents single or multi-signature data + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Sum { + /// single represents a single signer + #[prost(message, tag = "1")] + Single(Single), + /// multi represents a multisig signer + #[prost(message, tag = "2")] + Multi(Multi), + } + } + impl ::prost::Name for Data { + const NAME: &'static str = "Data"; + const PACKAGE: &'static str = "cosmos.tx.signing.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!( + "cosmos.tx.signing.v1beta1.SignatureDescriptor.{}", Self::NAME + ) + } + } +} +impl ::prost::Name for SignatureDescriptor { + const NAME: &'static str = "SignatureDescriptor"; + const PACKAGE: &'static str = "cosmos.tx.signing.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.tx.signing.v1beta1.{}", Self::NAME) + } +} +/// SignMode represents a signing mode with its own security guarantees. +/// +/// This enum should be considered a registry of all known sign modes +/// in the Cosmos ecosystem. Apps are not expected to support all known +/// sign modes. Apps that would like to support custom sign modes are +/// encouraged to open a small PR against this file to add a new case +/// to this SignMode enum describing their sign mode so that different +/// apps have a consistent version of this enum. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SignMode { + /// SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + /// rejected. + Unspecified = 0, + /// SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + /// verified with raw bytes from Tx. + Direct = 1, + /// SIGN_MODE_TEXTUAL is a future signing mode that will verify some + /// human-readable textual representation on top of the binary representation + /// from SIGN_MODE_DIRECT. It is currently experimental, and should be used + /// for testing purposes only, until Textual is fully released. Please follow + /// the tracking issue + Textual = 2, + /// SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + /// SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not + /// require signers signing over other signers' `signer_info`. It also allows + /// for adding Tips in transactions. + /// + /// Since: cosmos-sdk 0.46 + DirectAux = 3, + /// SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + /// Amino JSON and will be removed in the future. + LegacyAminoJson = 127, + /// SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + /// SDK. Ref: + /// + /// Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + /// but is not implemented on the SDK by default. To enable EIP-191, you need + /// to pass a custom `TxConfig` that has an implementation of + /// `SignModeHandler` for EIP-191. The SDK may decide to fully support + /// EIP-191 in the future. + /// + /// Since: cosmos-sdk 0.45.2 + Eip191 = 191, +} +impl SignMode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SignMode::Unspecified => "SIGN_MODE_UNSPECIFIED", + SignMode::Direct => "SIGN_MODE_DIRECT", + SignMode::Textual => "SIGN_MODE_TEXTUAL", + SignMode::DirectAux => "SIGN_MODE_DIRECT_AUX", + SignMode::LegacyAminoJson => "SIGN_MODE_LEGACY_AMINO_JSON", + SignMode::Eip191 => "SIGN_MODE_EIP_191", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SIGN_MODE_UNSPECIFIED" => Some(Self::Unspecified), + "SIGN_MODE_DIRECT" => Some(Self::Direct), + "SIGN_MODE_TEXTUAL" => Some(Self::Textual), + "SIGN_MODE_DIRECT_AUX" => Some(Self::DirectAux), + "SIGN_MODE_LEGACY_AMINO_JSON" => Some(Self::LegacyAminoJson), + "SIGN_MODE_EIP_191" => Some(Self::Eip191), + _ => None, + } + } +} diff --git a/crates/proto/src/gen/cosmos.tx.v1beta1.rs b/crates/proto/src/gen/cosmos.tx.v1beta1.rs new file mode 100644 index 0000000000..8aeb187cda --- /dev/null +++ b/crates/proto/src/gen/cosmos.tx.v1beta1.rs @@ -0,0 +1,1774 @@ +/// Tx is the standard type used for broadcasting transactions. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Tx { + /// body is the processable content of the transaction + #[prost(message, optional, tag = "1")] + pub body: ::core::option::Option, + /// auth_info is the authorization related content of the transaction, + /// specifically signers, signer modes and fee + #[prost(message, optional, tag = "2")] + pub auth_info: ::core::option::Option, + /// signatures is a list of signatures that matches the length and order of + /// AuthInfo's signer_infos to allow connecting signature meta information like + /// public key and signing mode by position. + #[prost(bytes = "vec", repeated, tag = "3")] + pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +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) + } +} +/// TxRaw is a variant of Tx that pins the signer's exact binary representation +/// of body and auth_info. This is used for signing, broadcasting and +/// verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and +/// the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used +/// as the transaction ID. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxRaw { + /// body_bytes is a protobuf serialization of a TxBody that matches the + /// representation in SignDoc. + #[prost(bytes = "vec", tag = "1")] + pub body_bytes: ::prost::alloc::vec::Vec, + /// auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + /// representation in SignDoc. + #[prost(bytes = "vec", tag = "2")] + pub auth_info_bytes: ::prost::alloc::vec::Vec, + /// signatures is a list of signatures that matches the length and order of + /// AuthInfo's signer_infos to allow connecting signature meta information like + /// public key and signing mode by position. + #[prost(bytes = "vec", repeated, tag = "3")] + pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +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) + } +} +/// SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignDoc { + /// body_bytes is protobuf serialization of a TxBody that matches the + /// representation in TxRaw. + #[prost(bytes = "vec", tag = "1")] + pub body_bytes: ::prost::alloc::vec::Vec, + /// auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + /// representation in TxRaw. + #[prost(bytes = "vec", tag = "2")] + pub auth_info_bytes: ::prost::alloc::vec::Vec, + /// chain_id is the unique identifier of the chain this transaction targets. + /// It prevents signed transactions from being used on another chain by an + /// attacker + #[prost(string, tag = "3")] + pub chain_id: ::prost::alloc::string::String, + /// account_number is the account number of the account in state + #[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) + } +} +/// SignDocDirectAux is the type used for generating sign bytes for +/// SIGN_MODE_DIRECT_AUX. +/// +/// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignDocDirectAux { + /// body_bytes is protobuf serialization of a TxBody that matches the + /// representation in TxRaw. + #[prost(bytes = "vec", tag = "1")] + pub body_bytes: ::prost::alloc::vec::Vec, + /// public_key is the public key of the signing account. + #[prost(message, optional, tag = "2")] + pub public_key: ::core::option::Option<::pbjson_types::Any>, + /// chain_id is the identifier of the chain this transaction targets. + /// It prevents signed transactions from being used on another chain by an + /// attacker. + #[prost(string, tag = "3")] + pub chain_id: ::prost::alloc::string::String, + /// account_number is the account number of the account in state. + #[prost(uint64, tag = "4")] + pub account_number: u64, + /// sequence is the sequence number of the signing account. + #[prost(uint64, tag = "5")] + pub sequence: u64, + /// Tip is the optional tip used for transactions fees paid in another denom. + /// It should be left empty if the signer is not the tipper for this + /// transaction. + /// + /// This field is ignored if the chain didn't enable tips, i.e. didn't add the + /// `TipDecorator` in its posthandler. + #[prost(message, optional, tag = "6")] + pub tip: ::core::option::Option, +} +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) + } +} +/// TxBody is the body of a transaction that all signers sign over. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxBody { + /// messages is a list of messages to be executed. The required signers of + /// those messages define the number and order of elements in AuthInfo's + /// signer_infos and Tx's signatures. Each required signer address is added to + /// the list only the first time it occurs. + /// By convention, the first required signer (usually from the first message) + /// is referred to as the primary signer and pays the fee for the whole + /// transaction. + #[prost(message, repeated, tag = "1")] + pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + /// memo is any arbitrary note/comment to be added to the transaction. + /// WARNING: in clients, any publicly exposed text should not be called memo, + /// but should be called `note` instead (see ). + #[prost(string, tag = "2")] + pub memo: ::prost::alloc::string::String, + /// timeout is the block height after which this transaction will not + /// be processed by the chain + #[prost(uint64, tag = "3")] + pub timeout_height: u64, + /// extension_options are arbitrary options that can be added by chains + /// when the default options are not sufficient. If any of these are present + /// and can't be handled, the transaction will be rejected + #[prost(message, repeated, tag = "1023")] + pub extension_options: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + /// extension_options are arbitrary options that can be added by chains + /// when the default options are not sufficient. If any of these are present + /// and can't be handled, they will be ignored + #[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) + } +} +/// AuthInfo describes the fee and signer modes that are used to sign a +/// transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthInfo { + /// signer_infos defines the signing modes for the required signers. The number + /// and order of elements must match the required signers from TxBody's + /// messages. The first element is the primary signer and the one which pays + /// the fee. + #[prost(message, repeated, tag = "1")] + pub signer_infos: ::prost::alloc::vec::Vec, + /// Fee is the fee and gas limit for the transaction. The first signer is the + /// primary signer and the one which pays the fee. The fee can be calculated + /// based on the cost of evaluating the body and doing signature verification + /// of the signers. This can be estimated via simulation. + #[prost(message, optional, tag = "2")] + pub fee: ::core::option::Option, + /// Tip is the optional tip used for transactions fees paid in another denom. + /// + /// This field is ignored if the chain didn't enable tips, i.e. didn't add the + /// `TipDecorator` in its posthandler. + /// + /// Since: cosmos-sdk 0.46 + #[prost(message, optional, tag = "3")] + pub tip: ::core::option::Option, +} +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) + } +} +/// SignerInfo describes the public key and signing mode of a single top-level +/// signer. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignerInfo { + /// public_key is the public key of the signer. It is optional for accounts + /// that already exist in state. If unset, the verifier can use the required + /// signer address for this position and lookup the public key. + #[prost(message, optional, tag = "1")] + pub public_key: ::core::option::Option<::pbjson_types::Any>, + /// mode_info describes the signing mode of the signer and is a nested + /// structure to support nested multisig pubkey's + #[prost(message, optional, tag = "2")] + pub mode_info: ::core::option::Option, + /// sequence is the sequence of the account, which describes the + /// number of committed transactions signed by a given address. It is used to + /// prevent replay attacks. + #[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) + } +} +/// ModeInfo describes the signing mode of a single or nested multisig signer. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ModeInfo { + /// sum is the oneof that specifies whether this represents a single or nested + /// multisig signer + #[prost(oneof = "mode_info::Sum", tags = "1, 2")] + pub sum: ::core::option::Option, +} +/// Nested message and enum types in `ModeInfo`. +pub mod mode_info { + /// Single is the mode info for a single signer. It is structured as a message + /// to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the + /// future + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Single { + /// mode is the signing mode of the single signer + #[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) + } + } + /// Multi is the mode info for a multisig public key + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Multi { + /// bitarray specifies which keys within the multisig are signing + #[prost(message, optional, tag = "1")] + pub bitarray: ::core::option::Option< + super::super::super::crypto::multisig::v1beta1::CompactBitArray, + >, + /// mode_infos is the corresponding modes of the signers of the multisig + /// which could include nested multisig public keys + #[prost(message, repeated, tag = "2")] + pub mode_infos: ::prost::alloc::vec::Vec, + } + 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) + } + } + /// sum is the oneof that specifies whether this represents a single or nested + /// multisig signer + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Sum { + /// single represents a single signer + #[prost(message, tag = "1")] + Single(Single), + /// multi represents a nested multisig signer + #[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) + } +} +/// Fee includes the amount of coins paid in fees and the maximum +/// gas to be used by the transaction. The ratio yields an effective "gasprice", +/// which must be above some miminum to be accepted into the mempool. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Fee { + /// amount is the amount of coins to be paid as a fee + #[prost(message, repeated, tag = "1")] + pub amount: ::prost::alloc::vec::Vec, + /// gas_limit is the maximum gas that can be used in transaction processing + /// before an out of gas error occurs + #[prost(uint64, tag = "2")] + pub gas_limit: u64, + /// if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. + /// the payer must be a tx signer (and thus have signed this field in AuthInfo). + /// setting this field does *not* change the ordering of required signers for the transaction. + #[prost(string, tag = "3")] + pub payer: ::prost::alloc::string::String, + /// if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used + /// to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does + /// not support fee grants, this will fail + #[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) + } +} +/// Tip is the tip used for meta-transactions. +/// +/// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Tip { + /// amount is the amount of the tip + #[prost(message, repeated, tag = "1")] + pub amount: ::prost::alloc::vec::Vec, + /// tipper is the address of the account paying for the tip + #[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) + } +} +/// AuxSignerData is the intermediary format that an auxiliary signer (e.g. a +/// tipper) builds and sends to the fee payer (who will build and broadcast the +/// actual tx). AuxSignerData is not a valid tx in itself, and will be rejected +/// by the node if sent directly as-is. +/// +/// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuxSignerData { + /// address is the bech32-encoded address of the auxiliary signer. If using + /// AuxSignerData across different chains, the bech32 prefix of the target + /// chain (where the final transaction is broadcasted) should be used. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// sign_doc is the SIGN_MODE_DIRECT_AUX sign doc that the auxiliary signer + /// signs. Note: we use the same sign doc even if we're signing with + /// LEGACY_AMINO_JSON. + #[prost(message, optional, tag = "2")] + pub sign_doc: ::core::option::Option, + /// mode is the signing mode of the single signer. + #[prost(enumeration = "super::signing::v1beta1::SignMode", tag = "3")] + pub mode: i32, + /// sig is the signature of the sign doc. + #[prost(bytes = "vec", tag = "4")] + pub sig: ::prost::alloc::vec::Vec, +} +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) + } +} +/// GetTxsEventRequest is the request type for the Service.TxsByEvents +/// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTxsEventRequest { + /// events is the list of transaction event type. + /// Deprecated post v0.47.x: use query instead, which should contain a valid + /// events query. + #[deprecated] + #[prost(string, repeated, tag = "1")] + pub events: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// pagination defines a pagination for the request. + /// Deprecated post v0.46.x: use page and limit instead. + #[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, + /// page is the page number to query, starts at 1. If not provided, will + /// default to first page. + #[prost(uint64, tag = "4")] + pub page: u64, + /// limit is the total number of results to be returned in the result page. + /// If left empty it will default to a value to be set by each app. + #[prost(uint64, tag = "5")] + pub limit: u64, + /// query defines the transaction event query that is proxied to Tendermint's + /// TxSearch RPC method. The query must be valid. + /// + /// Since Cosmos SDK 0.48 + #[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) + } +} +/// GetTxsEventResponse is the response type for the Service.TxsByEvents +/// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTxsEventResponse { + /// txs is the list of queried transactions. + #[prost(message, repeated, tag = "1")] + pub txs: ::prost::alloc::vec::Vec, + /// tx_responses is the list of queried TxResponses. + #[prost(message, repeated, tag = "2")] + pub tx_responses: ::prost::alloc::vec::Vec< + super::super::base::abci::v1beta1::TxResponse, + >, + /// pagination defines a pagination for the response. + /// Deprecated post v0.46.x: use total instead. + #[deprecated] + #[prost(message, optional, tag = "3")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, + /// total is total number of results available + #[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) + } +} +/// BroadcastTxRequest is the request type for the Service.BroadcastTxRequest +/// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BroadcastTxRequest { + /// tx_bytes is the raw transaction. + #[prost(bytes = "vec", tag = "1")] + pub tx_bytes: ::prost::alloc::vec::Vec, + #[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) + } +} +/// BroadcastTxResponse is the response type for the +/// Service.BroadcastTx method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BroadcastTxResponse { + /// tx_response is the queried TxResponses. + #[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) + } +} +/// SimulateRequest is the request type for the Service.Simulate +/// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SimulateRequest { + /// tx is the transaction to simulate. + /// Deprecated. Send raw tx bytes instead. + #[deprecated] + #[prost(message, optional, tag = "1")] + pub tx: ::core::option::Option, + /// tx_bytes is the raw transaction. + /// + /// Since: cosmos-sdk 0.43 + #[prost(bytes = "vec", tag = "2")] + pub tx_bytes: ::prost::alloc::vec::Vec, +} +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) + } +} +/// SimulateResponse is the response type for the +/// Service.SimulateRPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SimulateResponse { + /// gas_info is the information about gas used in the simulation. + #[prost(message, optional, tag = "1")] + pub gas_info: ::core::option::Option, + /// result is the result of the simulation. + #[prost(message, optional, tag = "2")] + pub result: ::core::option::Option, +} +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) + } +} +/// GetTxRequest is the request type for the Service.GetTx +/// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTxRequest { + /// hash is the tx hash to query, encoded as a hex string. + #[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) + } +} +/// GetTxResponse is the response type for the Service.GetTx method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTxResponse { + /// tx is the queried transaction. + #[prost(message, optional, tag = "1")] + pub tx: ::core::option::Option, + /// tx_response is the queried TxResponses. + #[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) + } +} +/// GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs +/// RPC method. +/// +/// Since: cosmos-sdk 0.45.2 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBlockWithTxsRequest { + /// height is the height of the block to query. + #[prost(int64, tag = "1")] + pub height: i64, + /// pagination defines a pagination for the request. + #[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) + } +} +/// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs +/// method. +/// +/// Since: cosmos-sdk 0.45.2 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBlockWithTxsResponse { + /// txs are the transactions in the block. + #[prost(message, repeated, tag = "1")] + pub txs: ::prost::alloc::vec::Vec, + #[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, + /// pagination defines a pagination for the response. + #[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) + } +} +/// TxDecodeRequest is the request type for the Service.TxDecode +/// RPC method. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxDecodeRequest { + /// tx_bytes is the raw transaction. + #[prost(bytes = "vec", tag = "1")] + pub tx_bytes: ::prost::alloc::vec::Vec, +} +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) + } +} +/// TxDecodeResponse is the response type for the +/// Service.TxDecode method. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxDecodeResponse { + /// tx is the decoded transaction. + #[prost(message, optional, tag = "1")] + pub tx: ::core::option::Option, +} +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) + } +} +/// TxEncodeRequest is the request type for the Service.TxEncode +/// RPC method. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxEncodeRequest { + /// tx is the transaction to encode. + #[prost(message, optional, tag = "1")] + pub tx: ::core::option::Option, +} +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) + } +} +/// TxEncodeResponse is the response type for the +/// Service.TxEncode method. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxEncodeResponse { + /// tx_bytes is the encoded transaction bytes. + #[prost(bytes = "vec", tag = "1")] + pub tx_bytes: ::prost::alloc::vec::Vec, +} +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) + } +} +/// TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino +/// RPC method. +/// +/// Since: cosmos-sdk 0.47 +#[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) + } +} +/// TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino +/// RPC method. +/// +/// Since: cosmos-sdk 0.47 +#[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, +} +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) + } +} +/// TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino +/// RPC method. +/// +/// Since: cosmos-sdk 0.47 +#[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, +} +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) + } +} +/// TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino +/// RPC method. +/// +/// Since: cosmos-sdk 0.47 +#[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) + } +} +/// OrderBy defines the sorting order +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum OrderBy { + /// ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults + /// to ASC in this case. + Unspecified = 0, + /// ORDER_BY_ASC defines ascending order + Asc = 1, + /// ORDER_BY_DESC defines descending order + Desc = 2, +} +impl OrderBy { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + 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", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ORDER_BY_UNSPECIFIED" => Some(Self::Unspecified), + "ORDER_BY_ASC" => Some(Self::Asc), + "ORDER_BY_DESC" => Some(Self::Desc), + _ => None, + } + } +} +/// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC +/// method. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum BroadcastMode { + /// zero-value for mode ordering + Unspecified = 0, + /// DEPRECATED: use BROADCAST_MODE_SYNC instead, + /// BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. + Block = 1, + /// BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits + /// for a CheckTx execution response only. + Sync = 2, + /// BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client + /// returns immediately. + Async = 3, +} +impl BroadcastMode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + 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", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + 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, + } + } +} +/// Generated client implementations. +#[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; + /// Service defines a gRPC service for interacting with transactions. + #[derive(Debug, Clone)] + pub struct ServiceClient { + inner: tonic::client::Grpc, + } + impl ServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl ServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> ServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + ServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// Simulate simulates executing a transaction for estimating gas usage. + pub async fn simulate( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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 + } + /// GetTx fetches a tx by hash. + pub async fn get_tx( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, 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 + } + /// BroadcastTx broadcast transaction. + pub async fn broadcast_tx( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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 + } + /// GetTxsEvent fetches txs by event. + pub async fn get_txs_event( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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 + } + /// GetBlockWithTxs fetches a block with decoded txs. + /// + /// Since: cosmos-sdk 0.45.2 + pub async fn get_block_with_txs( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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 + } + /// TxDecode decodes the transaction. + /// + /// Since: cosmos-sdk 0.47 + pub async fn tx_decode( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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 + } + /// TxEncode encodes the transaction. + /// + /// Since: cosmos-sdk 0.47 + pub async fn tx_encode( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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 + } + /// TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. + /// + /// Since: cosmos-sdk 0.47 + pub async fn tx_encode_amino( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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 + } + /// TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. + /// + /// Since: cosmos-sdk 0.47 + pub async fn tx_decode_amino( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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 + } + } +} +/// Generated server implementations. +#[cfg(feature = "rpc")] +pub mod service_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with ServiceServer. + #[async_trait] + pub trait Service: Send + Sync + 'static { + /// Simulate simulates executing a transaction for estimating gas usage. + async fn simulate( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// GetTx fetches a tx by hash. + async fn get_tx( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + /// BroadcastTx broadcast transaction. + async fn broadcast_tx( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// GetTxsEvent fetches txs by event. + async fn get_txs_event( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// GetBlockWithTxs fetches a block with decoded txs. + /// + /// Since: cosmos-sdk 0.45.2 + async fn get_block_with_txs( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// TxDecode decodes the transaction. + /// + /// Since: cosmos-sdk 0.47 + async fn tx_decode( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// TxEncode encodes the transaction. + /// + /// Since: cosmos-sdk 0.47 + async fn tx_encode( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. + /// + /// Since: cosmos-sdk 0.47 + async fn tx_encode_amino( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. + /// + /// Since: cosmos-sdk 0.47 + async fn tx_decode_amino( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + /// Service defines a gRPC service for interacting with transactions. + #[derive(Debug)] + pub struct ServiceServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl ServiceServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> 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( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for ServiceServer + where + T: Service, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/cosmos.tx.v1beta1.Service/Simulate" => { + #[allow(non_camel_case_types)] + struct SimulateSvc(pub Arc); + impl tonic::server::UnaryService + for SimulateSvc { + type Response = super::SimulateResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::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(pub Arc); + impl tonic::server::UnaryService + for GetTxSvc { + type Response = super::GetTxResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::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(pub Arc); + impl< + T: Service, + > tonic::server::UnaryService + for BroadcastTxSvc { + type Response = super::BroadcastTxResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::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(pub Arc); + impl< + T: Service, + > tonic::server::UnaryService + for GetTxsEventSvc { + type Response = super::GetTxsEventResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::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(pub Arc); + impl< + T: Service, + > tonic::server::UnaryService + for GetBlockWithTxsSvc { + type Response = super::GetBlockWithTxsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::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(pub Arc); + impl tonic::server::UnaryService + for TxDecodeSvc { + type Response = super::TxDecodeResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::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(pub Arc); + impl tonic::server::UnaryService + for TxEncodeSvc { + type Response = super::TxEncodeResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::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(pub Arc); + impl< + T: Service, + > tonic::server::UnaryService + for TxEncodeAminoSvc { + type Response = super::TxEncodeAminoResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::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(pub Arc); + impl< + T: Service, + > tonic::server::UnaryService + for TxDecodeAminoSvc { + type Response = super::TxDecodeAminoResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::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 Clone for ServiceServer { + 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 Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for ServiceServer { + const NAME: &'static str = "cosmos.tx.v1beta1.Service"; + } +} diff --git a/crates/proto/src/gen/noble.forwarding.v1.rs b/crates/proto/src/gen/noble.forwarding.v1.rs new file mode 100644 index 0000000000..1bfadd3576 --- /dev/null +++ b/crates/proto/src/gen/noble.forwarding.v1.rs @@ -0,0 +1,1083 @@ +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ForwardingAccount { + #[prost(message, optional, tag = "1")] + pub base_account: ::core::option::Option< + super::super::super::cosmos::auth::v1beta1::BaseAccount, + >, + #[prost(string, tag = "2")] + pub channel: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub recipient: ::prost::alloc::string::String, + #[prost(int64, tag = "4")] + pub created_at: i64, +} +impl ::prost::Name for ForwardingAccount { + const NAME: &'static str = "ForwardingAccount"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ForwardingPubKey { + #[prost(bytes = "vec", tag = "1")] + pub key: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ForwardingPubKey { + const NAME: &'static str = "ForwardingPubKey"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenesisState { + #[prost(map = "string, uint64", tag = "1")] + pub num_of_accounts: ::std::collections::HashMap< + ::prost::alloc::string::String, + u64, + >, + #[prost(map = "string, uint64", tag = "2")] + pub num_of_forwards: ::std::collections::HashMap< + ::prost::alloc::string::String, + u64, + >, + #[prost(map = "string, string", tag = "3")] + pub total_forwarded: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, +} +impl ::prost::Name for GenesisState { + const NAME: &'static str = "GenesisState"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterAccountData { + #[prost(string, tag = "1")] + pub recipient: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub channel: ::prost::alloc::string::String, +} +impl ::prost::Name for RegisterAccountData { + const NAME: &'static str = "RegisterAccountData"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterAccountMemo { + #[prost(message, optional, tag = "1")] + pub noble: ::core::option::Option, +} +/// Nested message and enum types in `RegisterAccountMemo`. +pub mod register_account_memo { + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct RegisterAccountDataWrapper { + #[prost(message, optional, tag = "1")] + pub forwarding: ::core::option::Option, + } + impl ::prost::Name for RegisterAccountDataWrapper { + const NAME: &'static str = "RegisterAccountDataWrapper"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!( + "noble.forwarding.v1.RegisterAccountMemo.{}", Self::NAME + ) + } + } +} +impl ::prost::Name for RegisterAccountMemo { + const NAME: &'static str = "RegisterAccountMemo"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryAddress { + #[prost(string, tag = "1")] + pub channel: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub recipient: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryAddress { + const NAME: &'static str = "QueryAddress"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryAddressResponse { + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + #[prost(bool, tag = "2")] + pub exists: bool, +} +impl ::prost::Name for QueryAddressResponse { + const NAME: &'static str = "QueryAddressResponse"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryStats {} +impl ::prost::Name for QueryStats { + const NAME: &'static str = "QueryStats"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryStatsResponse { + #[prost(map = "string, message", tag = "1")] + pub stats: ::std::collections::HashMap<::prost::alloc::string::String, Stats>, +} +impl ::prost::Name for QueryStatsResponse { + const NAME: &'static str = "QueryStatsResponse"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryStatsByChannel { + #[prost(string, tag = "1")] + pub channel: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryStatsByChannel { + const NAME: &'static str = "QueryStatsByChannel"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryStatsByChannelResponse { + #[prost(uint64, tag = "1")] + pub num_of_accounts: u64, + #[prost(uint64, tag = "2")] + pub num_of_forwards: u64, + #[prost(message, repeated, tag = "3")] + pub total_forwarded: ::prost::alloc::vec::Vec< + super::super::super::cosmos::base::v1beta1::Coin, + >, +} +impl ::prost::Name for QueryStatsByChannelResponse { + const NAME: &'static str = "QueryStatsByChannelResponse"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Stats { + #[prost(string, tag = "1")] + pub chain_id: ::prost::alloc::string::String, + #[prost(uint64, tag = "2")] + pub num_of_accounts: u64, + #[prost(uint64, tag = "3")] + pub num_of_forwards: u64, + #[prost(message, repeated, tag = "4")] + pub total_forwarded: ::prost::alloc::vec::Vec< + super::super::super::cosmos::base::v1beta1::Coin, + >, +} +impl ::prost::Name for Stats { + const NAME: &'static str = "Stats"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +/// Generated client implementations. +#[cfg(feature = "rpc")] +pub mod query_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct QueryClient { + inner: tonic::client::Grpc, + } + impl QueryClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl QueryClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> QueryClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + QueryClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 address( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/noble.forwarding.v1.Query/Address", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("noble.forwarding.v1.Query", "Address")); + self.inner.unary(req, path, codec).await + } + pub async fn stats( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/noble.forwarding.v1.Query/Stats", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("noble.forwarding.v1.Query", "Stats")); + self.inner.unary(req, path, codec).await + } + pub async fn stats_by_channel( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/noble.forwarding.v1.Query/StatsByChannel", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("noble.forwarding.v1.Query", "StatsByChannel")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +#[cfg(feature = "rpc")] +pub mod query_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. + #[async_trait] + pub trait Query: Send + Sync + 'static { + async fn address( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn stats( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn stats_by_channel( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + #[derive(Debug)] + pub struct QueryServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl QueryServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> 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( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for QueryServer + where + T: Query, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/noble.forwarding.v1.Query/Address" => { + #[allow(non_camel_case_types)] + struct AddressSvc(pub Arc); + impl tonic::server::UnaryService + for AddressSvc { + type Response = super::QueryAddressResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::address(&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 = AddressSvc(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) + } + "/noble.forwarding.v1.Query/Stats" => { + #[allow(non_camel_case_types)] + struct StatsSvc(pub Arc); + impl tonic::server::UnaryService + for StatsSvc { + type Response = super::QueryStatsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::stats(&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 = StatsSvc(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) + } + "/noble.forwarding.v1.Query/StatsByChannel" => { + #[allow(non_camel_case_types)] + struct StatsByChannelSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for StatsByChannelSvc { + type Response = super::QueryStatsByChannelResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::stats_by_channel(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = StatsByChannelSvc(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 Clone for QueryServer { + 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 Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "noble.forwarding.v1.Query"; + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRegisterAccount { + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub recipient: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub channel: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgRegisterAccount { + const NAME: &'static str = "MsgRegisterAccount"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRegisterAccountResponse { + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgRegisterAccountResponse { + const NAME: &'static str = "MsgRegisterAccountResponse"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgClearAccount { + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub address: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgClearAccount { + const NAME: &'static str = "MsgClearAccount"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgClearAccountResponse {} +impl ::prost::Name for MsgClearAccountResponse { + const NAME: &'static str = "MsgClearAccountResponse"; + const PACKAGE: &'static str = "noble.forwarding.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("noble.forwarding.v1.{}", Self::NAME) + } +} +/// Generated client implementations. +#[cfg(feature = "rpc")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MsgClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> MsgClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 register_account( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/noble.forwarding.v1.Msg/RegisterAccount", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("noble.forwarding.v1.Msg", "RegisterAccount")); + self.inner.unary(req, path, codec).await + } + pub async fn clear_account( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/noble.forwarding.v1.Msg/ClearAccount", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("noble.forwarding.v1.Msg", "ClearAccount")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +#[cfg(feature = "rpc")] +pub mod msg_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + #[async_trait] + pub trait Msg: Send + Sync + 'static { + async fn register_account( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn clear_account( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + #[derive(Debug)] + pub struct MsgServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl MsgServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> 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( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for MsgServer + where + T: Msg, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/noble.forwarding.v1.Msg/RegisterAccount" => { + #[allow(non_camel_case_types)] + struct RegisterAccountSvc(pub Arc); + impl tonic::server::UnaryService + for RegisterAccountSvc { + type Response = super::MsgRegisterAccountResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::register_account(&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 = RegisterAccountSvc(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) + } + "/noble.forwarding.v1.Msg/ClearAccount" => { + #[allow(non_camel_case_types)] + struct ClearAccountSvc(pub Arc); + impl tonic::server::UnaryService + for ClearAccountSvc { + type Response = super::MsgClearAccountResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::clear_account(&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 = ClearAccountSvc(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 Clone for MsgServer { + 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 Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "noble.forwarding.v1.Msg"; + } +} diff --git a/crates/proto/src/gen/proto_descriptor.bin.no_lfs b/crates/proto/src/gen/proto_descriptor.bin.no_lfs index 049d277678..5127703ec3 100644 Binary files a/crates/proto/src/gen/proto_descriptor.bin.no_lfs and b/crates/proto/src/gen/proto_descriptor.bin.no_lfs differ diff --git a/crates/proto/src/gen/tendermint.abci.rs b/crates/proto/src/gen/tendermint.abci.rs new file mode 100644 index 0000000000..2cb2c6e801 --- /dev/null +++ b/crates/proto/src/gen/tendermint.abci.rs @@ -0,0 +1,2579 @@ +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Request { + #[prost( + oneof = "request::Value", + tags = "1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17" + )] + pub value: ::core::option::Option, +} +/// Nested message and enum types in `Request`. +pub mod request { + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Value { + #[prost(message, tag = "1")] + Echo(super::RequestEcho), + #[prost(message, tag = "2")] + Flush(super::RequestFlush), + #[prost(message, tag = "3")] + Info(super::RequestInfo), + #[prost(message, tag = "5")] + InitChain(super::RequestInitChain), + #[prost(message, tag = "6")] + Query(super::RequestQuery), + #[prost(message, tag = "7")] + BeginBlock(super::RequestBeginBlock), + #[prost(message, tag = "8")] + CheckTx(super::RequestCheckTx), + #[prost(message, tag = "9")] + DeliverTx(super::RequestDeliverTx), + #[prost(message, tag = "10")] + EndBlock(super::RequestEndBlock), + #[prost(message, tag = "11")] + Commit(super::RequestCommit), + #[prost(message, tag = "12")] + ListSnapshots(super::RequestListSnapshots), + #[prost(message, tag = "13")] + OfferSnapshot(super::RequestOfferSnapshot), + #[prost(message, tag = "14")] + LoadSnapshotChunk(super::RequestLoadSnapshotChunk), + #[prost(message, tag = "15")] + ApplySnapshotChunk(super::RequestApplySnapshotChunk), + #[prost(message, tag = "16")] + PrepareProposal(super::RequestPrepareProposal), + #[prost(message, tag = "17")] + ProcessProposal(super::RequestProcessProposal), + } +} +impl ::prost::Name for Request { + const NAME: &'static str = "Request"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestEcho { + #[prost(string, tag = "1")] + pub message: ::prost::alloc::string::String, +} +impl ::prost::Name for RequestEcho { + const NAME: &'static str = "RequestEcho"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestFlush {} +impl ::prost::Name for RequestFlush { + const NAME: &'static str = "RequestFlush"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestInfo { + #[prost(string, tag = "1")] + pub version: ::prost::alloc::string::String, + #[prost(uint64, tag = "2")] + pub block_version: u64, + #[prost(uint64, tag = "3")] + pub p2p_version: u64, + #[prost(string, tag = "4")] + pub abci_version: ::prost::alloc::string::String, +} +impl ::prost::Name for RequestInfo { + const NAME: &'static str = "RequestInfo"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestInitChain { + #[prost(message, optional, tag = "1")] + pub time: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(string, tag = "2")] + pub chain_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub consensus_params: ::core::option::Option, + #[prost(message, repeated, tag = "4")] + pub validators: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "5")] + pub app_state_bytes: ::prost::alloc::vec::Vec, + #[prost(int64, tag = "6")] + pub initial_height: i64, +} +impl ::prost::Name for RequestInitChain { + const NAME: &'static str = "RequestInitChain"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestQuery { + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub path: ::prost::alloc::string::String, + #[prost(int64, tag = "3")] + pub height: i64, + #[prost(bool, tag = "4")] + pub prove: bool, +} +impl ::prost::Name for RequestQuery { + const NAME: &'static str = "RequestQuery"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestBeginBlock { + #[prost(bytes = "vec", tag = "1")] + pub hash: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub header: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub last_commit_info: ::core::option::Option, + #[prost(message, repeated, tag = "4")] + pub byzantine_validators: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for RequestBeginBlock { + const NAME: &'static str = "RequestBeginBlock"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestCheckTx { + #[prost(bytes = "vec", tag = "1")] + pub tx: ::prost::alloc::vec::Vec, + #[prost(enumeration = "CheckTxType", tag = "2")] + pub r#type: i32, +} +impl ::prost::Name for RequestCheckTx { + const NAME: &'static str = "RequestCheckTx"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestDeliverTx { + #[prost(bytes = "vec", tag = "1")] + pub tx: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for RequestDeliverTx { + const NAME: &'static str = "RequestDeliverTx"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestEndBlock { + #[prost(int64, tag = "1")] + pub height: i64, +} +impl ::prost::Name for RequestEndBlock { + const NAME: &'static str = "RequestEndBlock"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestCommit {} +impl ::prost::Name for RequestCommit { + const NAME: &'static str = "RequestCommit"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +/// lists available snapshots +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestListSnapshots {} +impl ::prost::Name for RequestListSnapshots { + const NAME: &'static str = "RequestListSnapshots"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +/// offers a snapshot to the application +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestOfferSnapshot { + /// snapshot offered by peers + #[prost(message, optional, tag = "1")] + pub snapshot: ::core::option::Option, + /// light client-verified app hash for snapshot height + #[prost(bytes = "vec", tag = "2")] + pub app_hash: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for RequestOfferSnapshot { + const NAME: &'static str = "RequestOfferSnapshot"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +/// loads a snapshot chunk +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestLoadSnapshotChunk { + #[prost(uint64, tag = "1")] + pub height: u64, + #[prost(uint32, tag = "2")] + pub format: u32, + #[prost(uint32, tag = "3")] + pub chunk: u32, +} +impl ::prost::Name for RequestLoadSnapshotChunk { + const NAME: &'static str = "RequestLoadSnapshotChunk"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +/// Applies a snapshot chunk +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestApplySnapshotChunk { + #[prost(uint32, tag = "1")] + pub index: u32, + #[prost(bytes = "vec", tag = "2")] + pub chunk: ::prost::alloc::vec::Vec, + #[prost(string, tag = "3")] + pub sender: ::prost::alloc::string::String, +} +impl ::prost::Name for RequestApplySnapshotChunk { + const NAME: &'static str = "RequestApplySnapshotChunk"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestPrepareProposal { + /// the modified transactions cannot exceed this size. + #[prost(int64, tag = "1")] + pub max_tx_bytes: i64, + /// txs is an array of transactions that will be included in a block, + /// sent to the app for possible modifications. + #[prost(bytes = "vec", repeated, tag = "2")] + pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, + #[prost(message, optional, tag = "3")] + pub local_last_commit: ::core::option::Option, + #[prost(message, repeated, tag = "4")] + pub misbehavior: ::prost::alloc::vec::Vec, + #[prost(int64, tag = "5")] + pub height: i64, + #[prost(message, optional, tag = "6")] + pub time: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(bytes = "vec", tag = "7")] + pub next_validators_hash: ::prost::alloc::vec::Vec, + /// address of the public key of the validator proposing the block. + #[prost(bytes = "vec", tag = "8")] + pub proposer_address: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for RequestPrepareProposal { + const NAME: &'static str = "RequestPrepareProposal"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestProcessProposal { + #[prost(bytes = "vec", repeated, tag = "1")] + pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, + #[prost(message, optional, tag = "2")] + pub proposed_last_commit: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub misbehavior: ::prost::alloc::vec::Vec, + /// hash is the merkle root hash of the fields of the proposed block. + #[prost(bytes = "vec", tag = "4")] + pub hash: ::prost::alloc::vec::Vec, + #[prost(int64, tag = "5")] + pub height: i64, + #[prost(message, optional, tag = "6")] + pub time: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(bytes = "vec", tag = "7")] + pub next_validators_hash: ::prost::alloc::vec::Vec, + /// address of the public key of the original proposer of the block. + #[prost(bytes = "vec", tag = "8")] + pub proposer_address: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for RequestProcessProposal { + const NAME: &'static str = "RequestProcessProposal"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Response { + #[prost( + oneof = "response::Value", + tags = "1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18" + )] + pub value: ::core::option::Option, +} +/// Nested message and enum types in `Response`. +pub mod response { + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Value { + #[prost(message, tag = "1")] + Exception(super::ResponseException), + #[prost(message, tag = "2")] + Echo(super::ResponseEcho), + #[prost(message, tag = "3")] + Flush(super::ResponseFlush), + #[prost(message, tag = "4")] + Info(super::ResponseInfo), + #[prost(message, tag = "6")] + InitChain(super::ResponseInitChain), + #[prost(message, tag = "7")] + Query(super::ResponseQuery), + #[prost(message, tag = "8")] + BeginBlock(super::ResponseBeginBlock), + #[prost(message, tag = "9")] + CheckTx(super::ResponseCheckTx), + #[prost(message, tag = "10")] + DeliverTx(super::ResponseDeliverTx), + #[prost(message, tag = "11")] + EndBlock(super::ResponseEndBlock), + #[prost(message, tag = "12")] + Commit(super::ResponseCommit), + #[prost(message, tag = "13")] + ListSnapshots(super::ResponseListSnapshots), + #[prost(message, tag = "14")] + OfferSnapshot(super::ResponseOfferSnapshot), + #[prost(message, tag = "15")] + LoadSnapshotChunk(super::ResponseLoadSnapshotChunk), + #[prost(message, tag = "16")] + ApplySnapshotChunk(super::ResponseApplySnapshotChunk), + #[prost(message, tag = "17")] + PrepareProposal(super::ResponsePrepareProposal), + #[prost(message, tag = "18")] + ProcessProposal(super::ResponseProcessProposal), + } +} +impl ::prost::Name for Response { + const NAME: &'static str = "Response"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +/// nondeterministic +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseException { + #[prost(string, tag = "1")] + pub error: ::prost::alloc::string::String, +} +impl ::prost::Name for ResponseException { + const NAME: &'static str = "ResponseException"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseEcho { + #[prost(string, tag = "1")] + pub message: ::prost::alloc::string::String, +} +impl ::prost::Name for ResponseEcho { + const NAME: &'static str = "ResponseEcho"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseFlush {} +impl ::prost::Name for ResponseFlush { + const NAME: &'static str = "ResponseFlush"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseInfo { + #[prost(string, tag = "1")] + pub data: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub version: ::prost::alloc::string::String, + #[prost(uint64, tag = "3")] + pub app_version: u64, + #[prost(int64, tag = "4")] + pub last_block_height: i64, + #[prost(bytes = "vec", tag = "5")] + pub last_block_app_hash: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ResponseInfo { + const NAME: &'static str = "ResponseInfo"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseInitChain { + #[prost(message, optional, tag = "1")] + pub consensus_params: ::core::option::Option, + #[prost(message, repeated, tag = "2")] + pub validators: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "3")] + pub app_hash: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ResponseInitChain { + const NAME: &'static str = "ResponseInitChain"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseQuery { + #[prost(uint32, tag = "1")] + pub code: u32, + /// bytes data = 2; // use "value" instead. + /// + /// nondeterministic + #[prost(string, tag = "3")] + pub log: ::prost::alloc::string::String, + /// nondeterministic + #[prost(string, tag = "4")] + pub info: ::prost::alloc::string::String, + #[prost(int64, tag = "5")] + pub index: i64, + #[prost(bytes = "vec", tag = "6")] + pub key: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "7")] + pub value: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "8")] + pub proof_ops: ::core::option::Option, + #[prost(int64, tag = "9")] + pub height: i64, + #[prost(string, tag = "10")] + pub codespace: ::prost::alloc::string::String, +} +impl ::prost::Name for ResponseQuery { + const NAME: &'static str = "ResponseQuery"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseBeginBlock { + #[prost(message, repeated, tag = "1")] + pub events: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ResponseBeginBlock { + const NAME: &'static str = "ResponseBeginBlock"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseCheckTx { + #[prost(uint32, tag = "1")] + pub code: u32, + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, + /// nondeterministic + #[prost(string, tag = "3")] + pub log: ::prost::alloc::string::String, + /// nondeterministic + #[prost(string, tag = "4")] + pub info: ::prost::alloc::string::String, + #[prost(int64, tag = "5")] + pub gas_wanted: i64, + #[prost(int64, tag = "6")] + pub gas_used: i64, + #[prost(message, repeated, tag = "7")] + pub events: ::prost::alloc::vec::Vec, + #[prost(string, tag = "8")] + pub codespace: ::prost::alloc::string::String, + #[prost(string, tag = "9")] + pub sender: ::prost::alloc::string::String, + #[prost(int64, tag = "10")] + pub priority: i64, + /// mempool_error is set by CometBFT. + /// ABCI applictions creating a ResponseCheckTX should not set mempool_error. + #[prost(string, tag = "11")] + pub mempool_error: ::prost::alloc::string::String, +} +impl ::prost::Name for ResponseCheckTx { + const NAME: &'static str = "ResponseCheckTx"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseDeliverTx { + #[prost(uint32, tag = "1")] + pub code: u32, + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, + /// nondeterministic + #[prost(string, tag = "3")] + pub log: ::prost::alloc::string::String, + /// nondeterministic + #[prost(string, tag = "4")] + pub info: ::prost::alloc::string::String, + #[prost(int64, tag = "5")] + pub gas_wanted: i64, + #[prost(int64, tag = "6")] + pub gas_used: i64, + /// nondeterministic + #[prost(message, repeated, tag = "7")] + pub events: ::prost::alloc::vec::Vec, + #[prost(string, tag = "8")] + pub codespace: ::prost::alloc::string::String, +} +impl ::prost::Name for ResponseDeliverTx { + const NAME: &'static str = "ResponseDeliverTx"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseEndBlock { + #[prost(message, repeated, tag = "1")] + pub validator_updates: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub consensus_param_updates: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub events: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ResponseEndBlock { + const NAME: &'static str = "ResponseEndBlock"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseCommit { + /// reserve 1 + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, + #[prost(int64, tag = "3")] + pub retain_height: i64, +} +impl ::prost::Name for ResponseCommit { + const NAME: &'static str = "ResponseCommit"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseListSnapshots { + #[prost(message, repeated, tag = "1")] + pub snapshots: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ResponseListSnapshots { + const NAME: &'static str = "ResponseListSnapshots"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseOfferSnapshot { + #[prost(enumeration = "response_offer_snapshot::Result", tag = "1")] + pub result: i32, +} +/// Nested message and enum types in `ResponseOfferSnapshot`. +pub mod response_offer_snapshot { + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum Result { + /// Unknown result, abort all snapshot restoration + Unknown = 0, + /// Snapshot accepted, apply chunks + Accept = 1, + /// Abort all snapshot restoration + Abort = 2, + /// Reject this specific snapshot, try others + Reject = 3, + /// Reject all snapshots of this format, try others + RejectFormat = 4, + /// Reject all snapshots from the sender(s), try others + RejectSender = 5, + } + impl Result { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Result::Unknown => "UNKNOWN", + Result::Accept => "ACCEPT", + Result::Abort => "ABORT", + Result::Reject => "REJECT", + Result::RejectFormat => "REJECT_FORMAT", + Result::RejectSender => "REJECT_SENDER", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "UNKNOWN" => Some(Self::Unknown), + "ACCEPT" => Some(Self::Accept), + "ABORT" => Some(Self::Abort), + "REJECT" => Some(Self::Reject), + "REJECT_FORMAT" => Some(Self::RejectFormat), + "REJECT_SENDER" => Some(Self::RejectSender), + _ => None, + } + } + } +} +impl ::prost::Name for ResponseOfferSnapshot { + const NAME: &'static str = "ResponseOfferSnapshot"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseLoadSnapshotChunk { + #[prost(bytes = "vec", tag = "1")] + pub chunk: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ResponseLoadSnapshotChunk { + const NAME: &'static str = "ResponseLoadSnapshotChunk"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseApplySnapshotChunk { + #[prost(enumeration = "response_apply_snapshot_chunk::Result", tag = "1")] + pub result: i32, + /// Chunks to refetch and reapply + #[prost(uint32, repeated, tag = "2")] + pub refetch_chunks: ::prost::alloc::vec::Vec, + /// Chunk senders to reject and ban + #[prost(string, repeated, tag = "3")] + pub reject_senders: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Nested message and enum types in `ResponseApplySnapshotChunk`. +pub mod response_apply_snapshot_chunk { + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum Result { + /// Unknown result, abort all snapshot restoration + Unknown = 0, + /// Chunk successfully accepted + Accept = 1, + /// Abort all snapshot restoration + Abort = 2, + /// Retry chunk (combine with refetch and reject) + Retry = 3, + /// Retry snapshot (combine with refetch and reject) + RetrySnapshot = 4, + /// Reject this snapshot, try others + RejectSnapshot = 5, + } + impl Result { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Result::Unknown => "UNKNOWN", + Result::Accept => "ACCEPT", + Result::Abort => "ABORT", + Result::Retry => "RETRY", + Result::RetrySnapshot => "RETRY_SNAPSHOT", + Result::RejectSnapshot => "REJECT_SNAPSHOT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "UNKNOWN" => Some(Self::Unknown), + "ACCEPT" => Some(Self::Accept), + "ABORT" => Some(Self::Abort), + "RETRY" => Some(Self::Retry), + "RETRY_SNAPSHOT" => Some(Self::RetrySnapshot), + "REJECT_SNAPSHOT" => Some(Self::RejectSnapshot), + _ => None, + } + } + } +} +impl ::prost::Name for ResponseApplySnapshotChunk { + const NAME: &'static str = "ResponseApplySnapshotChunk"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponsePrepareProposal { + #[prost(bytes = "vec", repeated, tag = "1")] + pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +impl ::prost::Name for ResponsePrepareProposal { + const NAME: &'static str = "ResponsePrepareProposal"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseProcessProposal { + #[prost(enumeration = "response_process_proposal::ProposalStatus", tag = "1")] + pub status: i32, +} +/// Nested message and enum types in `ResponseProcessProposal`. +pub mod response_process_proposal { + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ProposalStatus { + Unknown = 0, + Accept = 1, + Reject = 2, + } + impl ProposalStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ProposalStatus::Unknown => "UNKNOWN", + ProposalStatus::Accept => "ACCEPT", + ProposalStatus::Reject => "REJECT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "UNKNOWN" => Some(Self::Unknown), + "ACCEPT" => Some(Self::Accept), + "REJECT" => Some(Self::Reject), + _ => None, + } + } + } +} +impl ::prost::Name for ResponseProcessProposal { + const NAME: &'static str = "ResponseProcessProposal"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CommitInfo { + #[prost(int32, tag = "1")] + pub round: i32, + #[prost(message, repeated, tag = "2")] + pub votes: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for CommitInfo { + const NAME: &'static str = "CommitInfo"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExtendedCommitInfo { + /// The round at which the block proposer decided in the previous height. + #[prost(int32, tag = "1")] + pub round: i32, + /// List of validators' addresses in the last validator set with their voting + /// information, including vote extensions. + #[prost(message, repeated, tag = "2")] + pub votes: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ExtendedCommitInfo { + const NAME: &'static str = "ExtendedCommitInfo"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +/// Event allows application developers to attach additional information to +/// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. +/// Later, transactions may be queried using these events. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Event { + #[prost(string, tag = "1")] + pub r#type: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub attributes: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for Event { + const NAME: &'static str = "Event"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +/// EventAttribute is a single key-value pair, associated with an event. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EventAttribute { + #[prost(string, tag = "1")] + pub key: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub value: ::prost::alloc::string::String, + /// nondeterministic + #[prost(bool, tag = "3")] + pub index: bool, +} +impl ::prost::Name for EventAttribute { + const NAME: &'static str = "EventAttribute"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +/// TxResult contains results of executing the transaction. +/// +/// One usage is indexing transaction results. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxResult { + #[prost(int64, tag = "1")] + pub height: i64, + #[prost(uint32, tag = "2")] + pub index: u32, + #[prost(bytes = "vec", tag = "3")] + pub tx: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "4")] + pub result: ::core::option::Option, +} +impl ::prost::Name for TxResult { + const NAME: &'static str = "TxResult"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +/// Validator +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Validator { + /// The first 20 bytes of SHA256(public key) + #[prost(bytes = "vec", tag = "1")] + pub address: ::prost::alloc::vec::Vec, + /// PubKey pub_key = 2 \[(gogoproto.nullable)=false\]; + /// + /// The voting power + #[prost(int64, tag = "3")] + pub power: i64, +} +impl ::prost::Name for Validator { + const NAME: &'static str = "Validator"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +/// ValidatorUpdate +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ValidatorUpdate { + #[prost(message, optional, tag = "1")] + pub pub_key: ::core::option::Option, + #[prost(int64, tag = "2")] + pub power: i64, +} +impl ::prost::Name for ValidatorUpdate { + const NAME: &'static str = "ValidatorUpdate"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +/// VoteInfo +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VoteInfo { + #[prost(message, optional, tag = "1")] + pub validator: ::core::option::Option, + #[prost(bool, tag = "2")] + pub signed_last_block: bool, +} +impl ::prost::Name for VoteInfo { + const NAME: &'static str = "VoteInfo"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExtendedVoteInfo { + #[prost(message, optional, tag = "1")] + pub validator: ::core::option::Option, + #[prost(bool, tag = "2")] + pub signed_last_block: bool, + /// Reserved for future use + #[prost(bytes = "vec", tag = "3")] + pub vote_extension: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ExtendedVoteInfo { + const NAME: &'static str = "ExtendedVoteInfo"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Misbehavior { + #[prost(enumeration = "MisbehaviorType", tag = "1")] + pub r#type: i32, + /// The offending validator + #[prost(message, optional, tag = "2")] + pub validator: ::core::option::Option, + /// The height when the offense occurred + #[prost(int64, tag = "3")] + pub height: i64, + /// The corresponding time where the offense occurred + #[prost(message, optional, tag = "4")] + pub time: ::core::option::Option<::pbjson_types::Timestamp>, + /// Total voting power of the validator set in case the ABCI application does + /// not store historical validators. + /// + #[prost(int64, tag = "5")] + pub total_voting_power: i64, +} +impl ::prost::Name for Misbehavior { + const NAME: &'static str = "Misbehavior"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Snapshot { + /// The height at which the snapshot was taken + #[prost(uint64, tag = "1")] + pub height: u64, + /// The application-specific snapshot format + #[prost(uint32, tag = "2")] + pub format: u32, + /// Number of chunks in the snapshot + #[prost(uint32, tag = "3")] + pub chunks: u32, + /// Arbitrary snapshot hash, equal only if identical + #[prost(bytes = "vec", tag = "4")] + pub hash: ::prost::alloc::vec::Vec, + /// Arbitrary application metadata + #[prost(bytes = "vec", tag = "5")] + pub metadata: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for Snapshot { + const NAME: &'static str = "Snapshot"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.abci.{}", Self::NAME) + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum CheckTxType { + New = 0, + Recheck = 1, +} +impl CheckTxType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + CheckTxType::New => "NEW", + CheckTxType::Recheck => "RECHECK", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "NEW" => Some(Self::New), + "RECHECK" => Some(Self::Recheck), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum MisbehaviorType { + Unknown = 0, + DuplicateVote = 1, + LightClientAttack = 2, +} +impl MisbehaviorType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + MisbehaviorType::Unknown => "UNKNOWN", + MisbehaviorType::DuplicateVote => "DUPLICATE_VOTE", + MisbehaviorType::LightClientAttack => "LIGHT_CLIENT_ATTACK", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "UNKNOWN" => Some(Self::Unknown), + "DUPLICATE_VOTE" => Some(Self::DuplicateVote), + "LIGHT_CLIENT_ATTACK" => Some(Self::LightClientAttack), + _ => None, + } + } +} +/// Generated client implementations. +#[cfg(feature = "rpc")] +pub mod abci_application_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 AbciApplicationClient { + inner: tonic::client::Grpc, + } + impl AbciApplicationClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl AbciApplicationClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> AbciApplicationClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + AbciApplicationClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 echo( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, 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( + "/tendermint.abci.ABCIApplication/Echo", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("tendermint.abci.ABCIApplication", "Echo")); + self.inner.unary(req, path, codec).await + } + pub async fn flush( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, 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( + "/tendermint.abci.ABCIApplication/Flush", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("tendermint.abci.ABCIApplication", "Flush")); + self.inner.unary(req, path, codec).await + } + pub async fn info( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, 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( + "/tendermint.abci.ABCIApplication/Info", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("tendermint.abci.ABCIApplication", "Info")); + self.inner.unary(req, path, codec).await + } + pub async fn deliver_tx( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/tendermint.abci.ABCIApplication/DeliverTx", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("tendermint.abci.ABCIApplication", "DeliverTx")); + self.inner.unary(req, path, codec).await + } + pub async fn check_tx( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/tendermint.abci.ABCIApplication/CheckTx", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("tendermint.abci.ABCIApplication", "CheckTx")); + self.inner.unary(req, path, codec).await + } + pub async fn query( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, 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( + "/tendermint.abci.ABCIApplication/Query", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("tendermint.abci.ABCIApplication", "Query")); + self.inner.unary(req, path, codec).await + } + pub async fn commit( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, 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( + "/tendermint.abci.ABCIApplication/Commit", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("tendermint.abci.ABCIApplication", "Commit")); + self.inner.unary(req, path, codec).await + } + pub async fn init_chain( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/tendermint.abci.ABCIApplication/InitChain", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("tendermint.abci.ABCIApplication", "InitChain")); + self.inner.unary(req, path, codec).await + } + pub async fn begin_block( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/tendermint.abci.ABCIApplication/BeginBlock", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("tendermint.abci.ABCIApplication", "BeginBlock"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn end_block( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/tendermint.abci.ABCIApplication/EndBlock", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("tendermint.abci.ABCIApplication", "EndBlock")); + self.inner.unary(req, path, codec).await + } + pub async fn list_snapshots( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/tendermint.abci.ABCIApplication/ListSnapshots", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("tendermint.abci.ABCIApplication", "ListSnapshots"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn offer_snapshot( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/tendermint.abci.ABCIApplication/OfferSnapshot", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("tendermint.abci.ABCIApplication", "OfferSnapshot"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn load_snapshot_chunk( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/tendermint.abci.ABCIApplication/LoadSnapshotChunk", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "tendermint.abci.ABCIApplication", + "LoadSnapshotChunk", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn apply_snapshot_chunk( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/tendermint.abci.ABCIApplication/ApplySnapshotChunk", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "tendermint.abci.ABCIApplication", + "ApplySnapshotChunk", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn prepare_proposal( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/tendermint.abci.ABCIApplication/PrepareProposal", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("tendermint.abci.ABCIApplication", "PrepareProposal"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn process_proposal( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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( + "/tendermint.abci.ABCIApplication/ProcessProposal", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("tendermint.abci.ABCIApplication", "ProcessProposal"), + ); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +#[cfg(feature = "rpc")] +pub mod abci_application_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with AbciApplicationServer. + #[async_trait] + pub trait AbciApplication: Send + Sync + 'static { + async fn echo( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + async fn flush( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + async fn info( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + async fn deliver_tx( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn check_tx( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + async fn query( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + async fn commit( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + async fn init_chain( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn begin_block( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn end_block( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn list_snapshots( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn offer_snapshot( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn load_snapshot_chunk( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn apply_snapshot_chunk( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn prepare_proposal( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn process_proposal( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + #[derive(Debug)] + pub struct AbciApplicationServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl AbciApplicationServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> 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( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for AbciApplicationServer + where + T: AbciApplication, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/tendermint.abci.ABCIApplication/Echo" => { + #[allow(non_camel_case_types)] + struct EchoSvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService for EchoSvc { + type Response = super::ResponseEcho; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::echo(&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 = EchoSvc(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) + } + "/tendermint.abci.ABCIApplication/Flush" => { + #[allow(non_camel_case_types)] + struct FlushSvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService for FlushSvc { + type Response = super::ResponseFlush; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::flush(&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 = FlushSvc(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) + } + "/tendermint.abci.ABCIApplication/Info" => { + #[allow(non_camel_case_types)] + struct InfoSvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService for InfoSvc { + type Response = super::ResponseInfo; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::info(&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 = InfoSvc(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) + } + "/tendermint.abci.ABCIApplication/DeliverTx" => { + #[allow(non_camel_case_types)] + struct DeliverTxSvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService + for DeliverTxSvc { + type Response = super::ResponseDeliverTx; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::deliver_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 = DeliverTxSvc(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) + } + "/tendermint.abci.ABCIApplication/CheckTx" => { + #[allow(non_camel_case_types)] + struct CheckTxSvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService + for CheckTxSvc { + type Response = super::ResponseCheckTx; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::check_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 = CheckTxSvc(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) + } + "/tendermint.abci.ABCIApplication/Query" => { + #[allow(non_camel_case_types)] + struct QuerySvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService for QuerySvc { + type Response = super::ResponseQuery; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::query(&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 = QuerySvc(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) + } + "/tendermint.abci.ABCIApplication/Commit" => { + #[allow(non_camel_case_types)] + struct CommitSvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService + for CommitSvc { + type Response = super::ResponseCommit; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::commit(&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 = CommitSvc(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) + } + "/tendermint.abci.ABCIApplication/InitChain" => { + #[allow(non_camel_case_types)] + struct InitChainSvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService + for InitChainSvc { + type Response = super::ResponseInitChain; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::init_chain(&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 = InitChainSvc(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) + } + "/tendermint.abci.ABCIApplication/BeginBlock" => { + #[allow(non_camel_case_types)] + struct BeginBlockSvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService + for BeginBlockSvc { + type Response = super::ResponseBeginBlock; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::begin_block(&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 = BeginBlockSvc(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) + } + "/tendermint.abci.ABCIApplication/EndBlock" => { + #[allow(non_camel_case_types)] + struct EndBlockSvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService + for EndBlockSvc { + type Response = super::ResponseEndBlock; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::end_block(&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 = EndBlockSvc(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) + } + "/tendermint.abci.ABCIApplication/ListSnapshots" => { + #[allow(non_camel_case_types)] + struct ListSnapshotsSvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService + for ListSnapshotsSvc { + type Response = super::ResponseListSnapshots; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::list_snapshots(&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 = ListSnapshotsSvc(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) + } + "/tendermint.abci.ABCIApplication/OfferSnapshot" => { + #[allow(non_camel_case_types)] + struct OfferSnapshotSvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService + for OfferSnapshotSvc { + type Response = super::ResponseOfferSnapshot; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::offer_snapshot(&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 = OfferSnapshotSvc(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) + } + "/tendermint.abci.ABCIApplication/LoadSnapshotChunk" => { + #[allow(non_camel_case_types)] + struct LoadSnapshotChunkSvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService + for LoadSnapshotChunkSvc { + type Response = super::ResponseLoadSnapshotChunk; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::load_snapshot_chunk(&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 = LoadSnapshotChunkSvc(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) + } + "/tendermint.abci.ABCIApplication/ApplySnapshotChunk" => { + #[allow(non_camel_case_types)] + struct ApplySnapshotChunkSvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService + for ApplySnapshotChunkSvc { + type Response = super::ResponseApplySnapshotChunk; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::apply_snapshot_chunk( + &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 = ApplySnapshotChunkSvc(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) + } + "/tendermint.abci.ABCIApplication/PrepareProposal" => { + #[allow(non_camel_case_types)] + struct PrepareProposalSvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService + for PrepareProposalSvc { + type Response = super::ResponsePrepareProposal; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::prepare_proposal(&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 = PrepareProposalSvc(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) + } + "/tendermint.abci.ABCIApplication/ProcessProposal" => { + #[allow(non_camel_case_types)] + struct ProcessProposalSvc(pub Arc); + impl< + T: AbciApplication, + > tonic::server::UnaryService + for ProcessProposalSvc { + type Response = super::ResponseProcessProposal; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::process_proposal(&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 = ProcessProposalSvc(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 Clone for AbciApplicationServer { + 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 Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for AbciApplicationServer { + const NAME: &'static str = "tendermint.abci.ABCIApplication"; + } +} diff --git a/crates/proto/src/gen/tendermint.types.rs b/crates/proto/src/gen/tendermint.types.rs index 8ea4e48fe9..dd05ee65c4 100644 --- a/crates/proto/src/gen/tendermint.types.rs +++ b/crates/proto/src/gen/tendermint.types.rs @@ -502,3 +502,121 @@ impl ::prost::Name for Block { ::prost::alloc::format!("tendermint.types.{}", Self::NAME) } } +/// ConsensusParams contains consensus critical parameters that determine the +/// validity of blocks. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConsensusParams { + #[prost(message, optional, tag = "1")] + pub block: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub evidence: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub validator: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub version: ::core::option::Option, +} +impl ::prost::Name for ConsensusParams { + const NAME: &'static str = "ConsensusParams"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.types.{}", Self::NAME) + } +} +/// BlockParams contains limits on the block size. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BlockParams { + /// Max block size, in bytes. + /// Note: must be greater than 0 + #[prost(int64, tag = "1")] + pub max_bytes: i64, + /// Max gas per block. + /// Note: must be greater or equal to -1 + #[prost(int64, tag = "2")] + pub max_gas: i64, +} +impl ::prost::Name for BlockParams { + const NAME: &'static str = "BlockParams"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.types.{}", Self::NAME) + } +} +/// EvidenceParams determine how we handle evidence of malfeasance. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EvidenceParams { + /// Max age of evidence, in blocks. + /// + /// The basic formula for calculating this is: MaxAgeDuration / {average block + /// time}. + #[prost(int64, tag = "1")] + pub max_age_num_blocks: i64, + /// Max age of evidence, in time. + /// + /// It should correspond with an app's "unbonding period" or other similar + /// mechanism for handling [Nothing-At-Stake + /// attacks](). + #[prost(message, optional, tag = "2")] + pub max_age_duration: ::core::option::Option<::pbjson_types::Duration>, + /// This sets the maximum size of total evidence in bytes that can be committed in a single block. + /// and should fall comfortably under the max block bytes. + /// Default is 1048576 or 1MB + #[prost(int64, tag = "3")] + pub max_bytes: i64, +} +impl ::prost::Name for EvidenceParams { + const NAME: &'static str = "EvidenceParams"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.types.{}", Self::NAME) + } +} +/// ValidatorParams restrict the public key types validators can use. +/// NOTE: uses ABCI pubkey naming, not Amino names. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ValidatorParams { + #[prost(string, repeated, tag = "1")] + pub pub_key_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +impl ::prost::Name for ValidatorParams { + const NAME: &'static str = "ValidatorParams"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.types.{}", Self::NAME) + } +} +/// VersionParams contains the ABCI application version. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VersionParams { + #[prost(uint64, tag = "1")] + pub app: u64, +} +impl ::prost::Name for VersionParams { + const NAME: &'static str = "VersionParams"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.types.{}", Self::NAME) + } +} +/// HashedParams is a subset of ConsensusParams. +/// +/// It is hashed into the Header.ConsensusHash. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HashedParams { + #[prost(int64, tag = "1")] + pub block_max_bytes: i64, + #[prost(int64, tag = "2")] + pub block_max_gas: i64, +} +impl ::prost::Name for HashedParams { + const NAME: &'static str = "HashedParams"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("tendermint.types.{}", Self::NAME) + } +} diff --git a/crates/proto/src/lib.rs b/crates/proto/src/lib.rs index 42bd785867..d48882a2c2 100644 --- a/crates/proto/src/lib.rs +++ b/crates/proto/src/lib.rs @@ -276,6 +276,76 @@ pub mod tendermint { pub mod p2p { include!("gen/tendermint.p2p.rs"); } + + pub mod abci { + include!("gen/tendermint.abci.rs"); + } +} + +pub mod noble { + pub mod forwarding { + pub mod v1 { + include!("gen/noble.forwarding.v1.rs"); + } + } +} + +pub mod cosmos { + pub mod base { + pub mod v1beta1 { + include!("gen/cosmos.base.v1beta1.rs"); + } + + pub mod query { + pub mod v1beta1 { + include!("gen/cosmos.base.query.v1beta1.rs"); + } + } + + pub mod abci { + pub mod v1beta1 { + include!("gen/cosmos.base.abci.v1beta1.rs"); + } + } + } + + pub mod auth { + pub mod v1beta1 { + include!("gen/cosmos.auth.v1beta1.rs"); + } + } + + pub mod bank { + pub mod v1beta1 { + include!("gen/cosmos.bank.v1beta1.rs"); + } + } + + pub mod tx { + pub mod v1beta1 { + include!("gen/cosmos.tx.v1beta1.rs"); + } + + pub mod config { + pub mod v1 { + include!("gen/cosmos.tx.config.v1.rs"); + } + } + + pub mod signing { + pub mod v1beta1 { + include!("gen/cosmos.tx.signing.v1beta1.rs"); + } + } + } + + pub mod crypto { + pub mod multisig { + pub mod v1beta1 { + include!("gen/cosmos.crypto.multisig.v1beta1.rs"); + } + } + } } #[cfg(feature = "rpc")] diff --git a/deployments/scripts/protobuf-codegen b/deployments/scripts/protobuf-codegen index 2765293cb0..9f9b2a7c2d 100755 --- a/deployments/scripts/protobuf-codegen +++ b/deployments/scripts/protobuf-codegen @@ -20,6 +20,7 @@ buf dep update penumbra # Pull our vendored cosmos/IBC proto defs so we can get reflection for service definitions. # The penumbra dependencies will override some of these. +buf export buf.build/noble-assets/forwarding:5a8609a6772d417584a9c60cd8b80881 --output rust-vendored/ buf export buf.build/cosmos/cosmos-sdk:e7a85cef453e4b999ad9aff8714ae05f --output rust-vendored/ buf export buf.build/cosmos/ibc:7ab44ae956a0488ea04e04511efa5f70 --output rust-vendored/ diff --git a/proto/rust-vendored/google/protobuf/any.proto b/proto/rust-vendored/google/protobuf/any.proto new file mode 100644 index 0000000000..58b511583a --- /dev/null +++ b/proto/rust-vendored/google/protobuf/any.proto @@ -0,0 +1,164 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +import "gogoproto/gogo.proto"; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "AnyProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := ptypes.MarshalAny(foo) +// ... +// foo := &pb.Foo{} +// if err := ptypes.UnmarshalAny(any, foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// +message Any { + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + // + string type_url = 1; + + // Must be a valid serialized protocol buffer of the above specified type. + bytes value = 2; + + option (gogoproto.typedecl) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.gostring) = false; + option (gogoproto.stringer) = false; +} + +option (gogoproto.goproto_registration) = false; diff --git a/proto/rust-vendored/noble/forwarding/v1/account.proto b/proto/rust-vendored/noble/forwarding/v1/account.proto new file mode 100644 index 0000000000..0fc9cdba7b --- /dev/null +++ b/proto/rust-vendored/noble/forwarding/v1/account.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package noble.forwarding.v1; + +import "cosmos/auth/v1beta1/auth.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/noble-assets/forwarding/x/forwarding/types"; + +message ForwardingAccount { + cosmos.auth.v1beta1.BaseAccount base_account = 1 [(gogoproto.embed) = true]; + + string channel = 2; + string recipient = 3; + int64 created_at = 4; +} + +message ForwardingPubKey { + option (gogoproto.goproto_stringer) = false; + + bytes key = 1; +} diff --git a/proto/rust-vendored/noble/forwarding/v1/genesis.proto b/proto/rust-vendored/noble/forwarding/v1/genesis.proto new file mode 100644 index 0000000000..bcbbc9f448 --- /dev/null +++ b/proto/rust-vendored/noble/forwarding/v1/genesis.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package noble.forwarding.v1; + +option go_package = "github.com/noble-assets/forwarding/x/forwarding/types"; + +message GenesisState { + map num_of_accounts = 1; + map num_of_forwards = 2; + map total_forwarded = 3; +} diff --git a/proto/rust-vendored/noble/forwarding/v1/packet.proto b/proto/rust-vendored/noble/forwarding/v1/packet.proto new file mode 100644 index 0000000000..875de708e0 --- /dev/null +++ b/proto/rust-vendored/noble/forwarding/v1/packet.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package noble.forwarding.v1; + +option go_package = "github.com/noble-assets/forwarding/x/forwarding/types"; + +message RegisterAccountData { + string recipient = 1; + string channel = 2; +} + +message RegisterAccountMemo { + message RegisterAccountDataWrapper { + RegisterAccountData forwarding = 1; + } + + RegisterAccountDataWrapper noble = 1; +} diff --git a/proto/rust-vendored/noble/forwarding/v1/query.proto b/proto/rust-vendored/noble/forwarding/v1/query.proto new file mode 100644 index 0000000000..866ce6679e --- /dev/null +++ b/proto/rust-vendored/noble/forwarding/v1/query.proto @@ -0,0 +1,66 @@ +syntax = "proto3"; + +package noble.forwarding.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/noble-assets/forwarding/x/forwarding/types"; + +service Query { + rpc Address(QueryAddress) returns (QueryAddressResponse) { + option (google.api.http).get = "/noble/forwarding/v1/address/{channel}/{recipient}"; + } + + rpc Stats(QueryStats) returns (QueryStatsResponse) { + option (google.api.http).get = "/noble/forwarding/v1/stats"; + } + + rpc StatsByChannel(QueryStatsByChannel) returns (QueryStatsByChannelResponse) { + option (google.api.http).get = "/noble/forwarding/v1/stats/{channel}"; + } +} + +// + +message QueryAddress { + string channel = 1; + string recipient = 2; +} + +message QueryAddressResponse { + string address = 1; + bool exists = 2; +} + +message QueryStats {} + +message QueryStatsResponse { + map stats = 1 [(gogoproto.nullable) = false]; +} + +message QueryStatsByChannel { + string channel = 1; +} + +message QueryStatsByChannelResponse { + uint64 num_of_accounts = 1; + uint64 num_of_forwards = 2; + repeated cosmos.base.v1beta1.Coin total_forwarded = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// + +message Stats { + string chain_id = 1; + uint64 num_of_accounts = 2; + uint64 num_of_forwards = 3; + repeated cosmos.base.v1beta1.Coin total_forwarded = 4 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} diff --git a/proto/rust-vendored/noble/forwarding/v1/tx.proto b/proto/rust-vendored/noble/forwarding/v1/tx.proto new file mode 100644 index 0000000000..0485a193b1 --- /dev/null +++ b/proto/rust-vendored/noble/forwarding/v1/tx.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package noble.forwarding.v1; + +option go_package = "github.com/noble-assets/forwarding/x/forwarding/types"; + +service Msg { + rpc RegisterAccount(noble.forwarding.v1.MsgRegisterAccount) returns (noble.forwarding.v1.MsgRegisterAccountResponse); + rpc ClearAccount(noble.forwarding.v1.MsgClearAccount) returns (noble.forwarding.v1.MsgClearAccountResponse); +} + +// + +message MsgRegisterAccount { + string signer = 1; + string recipient = 2; + string channel = 3; +} + +message MsgRegisterAccountResponse { + string address = 1; +} + +message MsgClearAccount { + string signer = 1; + string address = 2; +} + +message MsgClearAccountResponse {} diff --git a/tools/proto-compiler/src/main.rs b/tools/proto-compiler/src/main.rs index 0dfb4bfeed..8915c3d811 100644 --- a/tools/proto-compiler/src/main.rs +++ b/tools/proto-compiler/src/main.rs @@ -116,13 +116,25 @@ fn main() -> anyhow::Result<()> { "../../proto/penumbra/penumbra/tools/summoning/v1/summoning.proto", "../../proto/penumbra/penumbra/util/tendermint_proxy/v1/tendermint_proxy.proto", "../../proto/penumbra/penumbra/view/v1/view.proto", + "../../proto/rust-vendored/tendermint/abci/types.proto", "../../proto/rust-vendored/tendermint/types/validator.proto", "../../proto/rust-vendored/tendermint/p2p/types.proto", "../../proto/rust-vendored/cosmos/bank/v1beta1/query.proto", + "../../proto/rust-vendored/cosmos/tx/v1beta1/service.proto", + "../../proto/rust-vendored/cosmos/tx/v1beta1/tx.proto", + "../../proto/rust-vendored/cosmos/tx/config/v1/config.proto", + "../../proto/rust-vendored/cosmos/tx/signing/v1beta1/signing.proto", + "../../proto/rust-vendored/cosmos/base/abci/v1beta1/abci.proto", + "../../proto/rust-vendored/cosmos/crypto/multisig/v1beta1/multisig.proto", "../../proto/rust-vendored/ibc/applications/transfer/v1/query.proto", "../../proto/rust-vendored/ibc/core/channel/v1/query.proto", "../../proto/rust-vendored/ibc/core/client/v1/query.proto", "../../proto/rust-vendored/ibc/core/connection/v1/query.proto", + "../../proto/rust-vendored/noble/forwarding/v1/account.proto", + "../../proto/rust-vendored/noble/forwarding/v1/genesis.proto", + "../../proto/rust-vendored/noble/forwarding/v1/packet.proto", + "../../proto/rust-vendored/noble/forwarding/v1/query.proto", + "../../proto/rust-vendored/noble/forwarding/v1/tx.proto", ], &["../../proto/penumbra/", "../../proto/rust-vendored/"], )?;