From 53f1ce4355d3c86dc4b90745319f9a729e34e721 Mon Sep 17 00:00:00 2001 From: Romain Ruetschi <106849+romac@users.noreply.github.com> Date: Thu, 25 Jan 2024 14:09:23 +0100 Subject: [PATCH 01/11] Use Cosmos SDK and ICS23 protos via the `cosmos_sdk_proto` crate --- Cargo.toml | 7 +- scripts/sync-protobuf.sh | 55 - src/COSMOS_SDK_COMMIT | 1 - src/lib.rs | 219 +- src/prost/cosmos.app.v1alpha1.rs | 101 - src/prost/cosmos.app.v1alpha1.serde.rs | 329 - src/prost/cosmos.auth.module.v1.rs | 40 - src/prost/cosmos.auth.module.v1.serde.rs | 235 - src/prost/cosmos.auth.v1beta1.rs | 1827 ---- src/prost/cosmos.auth.v1beta1.serde.rs | 2668 ------ src/prost/cosmos.bank.module.v1.rs | 22 - src/prost/cosmos.bank.module.v1.serde.rs | 109 - src/prost/cosmos.bank.v1beta1.rs | 2524 ------ src/prost/cosmos.bank.v1beta1.serde.rs | 4293 --------- src/prost/cosmos.base.abci.v1beta1.rs | 253 - src/prost/cosmos.base.kv.v1beta1.rs | 30 - src/prost/cosmos.base.kv.v1beta1.serde.rs | 205 - src/prost/cosmos.base.node.v1beta1.rs | 316 - src/prost/cosmos.base.node.v1beta1.serde.rs | 163 - src/prost/cosmos.base.query.v1beta1.rs | 70 - src/prost/cosmos.base.query.v1beta1.serde.rs | 284 - src/prost/cosmos.base.reflection.v1beta1.rs | 461 - .../cosmos.base.reflection.v1beta1.serde.rs | 347 - src/prost/cosmos.base.reflection.v2alpha1.rs | 1197 --- .../cosmos.base.reflection.v2alpha1.serde.rs | 2515 ------ src/prost/cosmos.base.snapshots.v1beta1.rs | 184 - .../cosmos.base.snapshots.v1beta1.serde.rs | 1082 --- src/prost/cosmos.base.store.v1beta1.serde.rs | 791 -- src/prost/cosmos.base.tendermint.v1beta1.rs | 1262 --- src/prost/cosmos.base.v1beta1.rs | 66 - src/prost/cosmos.base.v1beta1.serde.rs | 398 - src/prost/cosmos.crypto.ed25519.rs | 33 - src/prost/cosmos.crypto.ed25519.serde.rs | 188 - src/prost/cosmos.crypto.hd.v1.rs | 28 - src/prost/cosmos.crypto.hd.v1.serde.rs | 169 - src/prost/cosmos.crypto.keyring.v1.rs | 96 - src/prost/cosmos.crypto.keyring.v1.serde.rs | 495 -- src/prost/cosmos.crypto.multisig.rs | 20 - src/prost/cosmos.crypto.multisig.serde.rs | 111 - src/prost/cosmos.crypto.multisig.v1beta1.rs | 35 - .../cosmos.crypto.multisig.v1beta1.serde.rs | 208 - src/prost/cosmos.crypto.secp256k1.rs | 32 - src/prost/cosmos.crypto.secp256k1.serde.rs | 188 - src/prost/cosmos.crypto.secp256r1.rs | 31 - src/prost/cosmos.crypto.secp256r1.serde.rs | 188 - src/prost/cosmos.gov.module.v1.rs | 19 - src/prost/cosmos.gov.module.v1.serde.rs | 112 - src/prost/cosmos.gov.v1.rs | 2459 ------ src/prost/cosmos.gov.v1.serde.rs | 4771 ---------- src/prost/cosmos.gov.v1beta1.rs | 2160 ----- src/prost/cosmos.gov.v1beta1.serde.rs | 4091 --------- src/prost/cosmos.ics23.v1.serde.rs | 1936 ---- src/prost/cosmos.staking.module.v1.rs | 20 - src/prost/cosmos.staking.module.v1.serde.rs | 109 - src/prost/cosmos.staking.v1beta1.rs | 3742 -------- src/prost/cosmos.staking.v1beta1.serde.rs | 7752 ----------------- src/prost/cosmos.tx.config.v1.rs | 20 - src/prost/cosmos.tx.config.v1.serde.rs | 110 - src/prost/cosmos.tx.signing.v1beta1.rs | 189 - src/prost/cosmos.tx.signing.v1beta1.serde.rs | 633 -- src/prost/cosmos.tx.v1beta1.rs | 1763 ---- src/prost/cosmos.upgrade.module.v1.rs | 15 - src/prost/cosmos.upgrade.module.v1.serde.rs | 91 - src/prost/cosmos.upgrade.v1beta1.rs | 1365 --- src/prost/cosmos.upgrade.v1beta1.serde.rs | 1731 ---- src/prost/google.api.rs | 12 +- src/prost/ibc.applications.fee.v1.rs | 24 +- ...ibc.applications.interchain_accounts.v1.rs | 2 +- src/prost/ibc.applications.nft_transfer.v1.rs | 4 +- src/prost/ibc.applications.transfer.v1.rs | 16 +- src/prost/ibc.core.channel.v1.rs | 16 +- src/prost/ibc.core.client.v1.rs | 20 +- src/prost/ibc.core.commitment.v1.rs | 2 +- src/prost/ibc.core.connection.v1.rs | 4 +- src/prost/ibc.lightclients.tendermint.v1.rs | 2 +- .../interchain_security.ccv.provider.v1.rs | 2 +- src/prost/interchain_security.ccv.v1.rs | 2 +- src/prost/proto_descriptor.bin | Bin 754051 -> 498339 bytes tools/proto-compiler/src/cmd/compile.rs | 53 +- 79 files changed, 63 insertions(+), 57060 deletions(-) delete mode 100644 src/COSMOS_SDK_COMMIT delete mode 100644 src/prost/cosmos.app.v1alpha1.rs delete mode 100644 src/prost/cosmos.app.v1alpha1.serde.rs delete mode 100644 src/prost/cosmos.auth.module.v1.rs delete mode 100644 src/prost/cosmos.auth.module.v1.serde.rs delete mode 100644 src/prost/cosmos.auth.v1beta1.rs delete mode 100644 src/prost/cosmos.auth.v1beta1.serde.rs delete mode 100644 src/prost/cosmos.bank.module.v1.rs delete mode 100644 src/prost/cosmos.bank.module.v1.serde.rs delete mode 100644 src/prost/cosmos.bank.v1beta1.rs delete mode 100644 src/prost/cosmos.bank.v1beta1.serde.rs delete mode 100644 src/prost/cosmos.base.abci.v1beta1.rs delete mode 100644 src/prost/cosmos.base.kv.v1beta1.rs delete mode 100644 src/prost/cosmos.base.kv.v1beta1.serde.rs delete mode 100644 src/prost/cosmos.base.node.v1beta1.rs delete mode 100644 src/prost/cosmos.base.node.v1beta1.serde.rs delete mode 100644 src/prost/cosmos.base.query.v1beta1.rs delete mode 100644 src/prost/cosmos.base.query.v1beta1.serde.rs delete mode 100644 src/prost/cosmos.base.reflection.v1beta1.rs delete mode 100644 src/prost/cosmos.base.reflection.v1beta1.serde.rs delete mode 100644 src/prost/cosmos.base.reflection.v2alpha1.rs delete mode 100644 src/prost/cosmos.base.reflection.v2alpha1.serde.rs delete mode 100644 src/prost/cosmos.base.snapshots.v1beta1.rs delete mode 100644 src/prost/cosmos.base.snapshots.v1beta1.serde.rs delete mode 100644 src/prost/cosmos.base.store.v1beta1.serde.rs delete mode 100644 src/prost/cosmos.base.tendermint.v1beta1.rs delete mode 100644 src/prost/cosmos.base.v1beta1.rs delete mode 100644 src/prost/cosmos.base.v1beta1.serde.rs delete mode 100644 src/prost/cosmos.crypto.ed25519.rs delete mode 100644 src/prost/cosmos.crypto.ed25519.serde.rs delete mode 100644 src/prost/cosmos.crypto.hd.v1.rs delete mode 100644 src/prost/cosmos.crypto.hd.v1.serde.rs delete mode 100644 src/prost/cosmos.crypto.keyring.v1.rs delete mode 100644 src/prost/cosmos.crypto.keyring.v1.serde.rs delete mode 100644 src/prost/cosmos.crypto.multisig.rs delete mode 100644 src/prost/cosmos.crypto.multisig.serde.rs delete mode 100644 src/prost/cosmos.crypto.multisig.v1beta1.rs delete mode 100644 src/prost/cosmos.crypto.multisig.v1beta1.serde.rs delete mode 100644 src/prost/cosmos.crypto.secp256k1.rs delete mode 100644 src/prost/cosmos.crypto.secp256k1.serde.rs delete mode 100644 src/prost/cosmos.crypto.secp256r1.rs delete mode 100644 src/prost/cosmos.crypto.secp256r1.serde.rs delete mode 100644 src/prost/cosmos.gov.module.v1.rs delete mode 100644 src/prost/cosmos.gov.module.v1.serde.rs delete mode 100644 src/prost/cosmos.gov.v1.rs delete mode 100644 src/prost/cosmos.gov.v1.serde.rs delete mode 100644 src/prost/cosmos.gov.v1beta1.rs delete mode 100644 src/prost/cosmos.gov.v1beta1.serde.rs delete mode 100644 src/prost/cosmos.ics23.v1.serde.rs delete mode 100644 src/prost/cosmos.staking.module.v1.rs delete mode 100644 src/prost/cosmos.staking.module.v1.serde.rs delete mode 100644 src/prost/cosmos.staking.v1beta1.rs delete mode 100644 src/prost/cosmos.staking.v1beta1.serde.rs delete mode 100644 src/prost/cosmos.tx.config.v1.rs delete mode 100644 src/prost/cosmos.tx.config.v1.serde.rs delete mode 100644 src/prost/cosmos.tx.signing.v1beta1.rs delete mode 100644 src/prost/cosmos.tx.signing.v1beta1.serde.rs delete mode 100644 src/prost/cosmos.tx.v1beta1.rs delete mode 100644 src/prost/cosmos.upgrade.module.v1.rs delete mode 100644 src/prost/cosmos.upgrade.module.v1.serde.rs delete mode 100644 src/prost/cosmos.upgrade.v1beta1.rs delete mode 100644 src/prost/cosmos.upgrade.v1beta1.serde.rs diff --git a/Cargo.toml b/Cargo.toml index 4ccd1005..2dc7e788 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,6 +51,11 @@ borsh = { version = "0.10", default-features = false, optional = true } version = "0.34" default-features = false +[dependencies.cosmos-sdk-proto] +version = "0.20.0" +path = "../cosmos-rust/cosmos-sdk-proto" +default-features = false + [dev-dependencies] serde_json = "1.0.107" @@ -58,7 +63,7 @@ serde_json = "1.0.107" default = ["std", "client"] std = ["prost/std", "bytes/std", "subtle-encoding/std", "base64/std", "flex-error/std", "ics23/std", "informalsystems-pbjson/std"] serde = ["dep:serde", "ics23/serde", "informalsystems-pbjson"] -client = ["std", "dep:tonic", "tonic/codegen", "tonic/transport", "tonic/prost"] +client = ["std", "dep:tonic", "tonic/codegen", "tonic/transport", "tonic/prost", "cosmos-sdk-proto/grpc-transport"] json-schema = ["std", "serde", "dep:schemars"] server = ["std", "dep:tonic", "tonic/codegen", "tonic/transport", "tonic/prost"] parity-scale-codec = ["dep:parity-scale-codec", "dep:scale-info"] diff --git a/scripts/sync-protobuf.sh b/scripts/sync-protobuf.sh index dbf5b653..37d4cfb2 100755 --- a/scripts/sync-protobuf.sh +++ b/scripts/sync-protobuf.sh @@ -5,7 +5,6 @@ set -eou pipefail # syn-protobuf.sh is a bash script to sync the protobuf # files using ibc-proto-compiler. This script will checkout # the protobuf files from the git versions specified in -# proto/src/prost/COSMOS_SDK_COMMIT and # proto/src/prost/IBC_GO_COMMIT. If you want to sync # the protobuf files to a newer version, modify the # corresponding of those 2 files by specifying the commit ID @@ -23,17 +22,14 @@ set -eou pipefail # the script is called. CACHE_PATH="${XDG_CACHE_HOME:-$HOME/.cache}"/ibc-proto-rs-build -COSMOS_SDK_GIT="${COSMOS_SDK_GIT:-$CACHE_PATH/cosmos-sdk.git}" IBC_GO_GIT="${IBC_GO_GIT:-$CACHE_PATH/ibc-go.git}" COSMOS_ICS_GIT="${COSMOS_ICS_GIT:-$CACHE_PATH/interchain-security.git}" NFT_TRANSFER_GIT="${NFT_TRANSFER_GIT:-$CACHE_PATH/nft-transfer.git}" -COSMOS_SDK_COMMIT="$(cat src/COSMOS_SDK_COMMIT)" IBC_GO_COMMIT="$(cat src/IBC_GO_COMMIT)" INTERCHAIN_SECURITY_COMMIT="$(cat src/INTERCHAIN_SECURITY_COMMIT)" NFT_TRANSFER_COMMIT="$(cat src/NFT_TRANSFER_COMMIT)" -echo "COSMOS_SDK_COMMIT: $COSMOS_SDK_COMMIT" echo "IBC_GO_COMMIT: $IBC_GO_COMMIT" echo "INTERCHAIN_SECURITY_COMMIT: $INTERCHAIN_SECURITY_COMMIT" echo "NFT_TRANSFER_COMMIT: $NFT_TRANSFER_COMMIT" @@ -61,29 +57,10 @@ else echo "Using existing interchain-security bare git repository at $COSMOS_ICS_GIT" fi -# Use either --sdk-commit flag for commit ID, -# or --sdk-tag for git tag. Because we can't modify -# proto-compiler to have smart detection on that. - -if [[ "$COSMOS_SDK_COMMIT" =~ ^[a-zA-Z0-9]{40}$ ]] -then - SDK_COMMIT_OPTION="--sdk-commit" -else - SDK_COMMIT_OPTION="--sdk-tag" -fi - # If the git directories does not exist, clone them as # bare git repositories so that no local modification # can be done there. -if [[ ! -e "$COSMOS_SDK_GIT" ]] -then - echo "Cloning cosmos-sdk source code to as bare git repository to $COSMOS_SDK_GIT" - git clone --mirror https://github.com/cosmos/cosmos-sdk.git "$COSMOS_SDK_GIT" -else - echo "Using existing cosmos-sdk bare git repository at $COSMOS_SDK_GIT" -fi - if [[ ! -e "$IBC_GO_GIT" ]] then echo "Cloning ibc-go source code to as bare git repository to $IBC_GO_GIT" @@ -107,10 +84,6 @@ pushd "$COSMOS_ICS_GIT" git fetch popd -pushd "$COSMOS_SDK_GIT" -git fetch -popd - pushd "$IBC_GO_GIT" git fetch popd @@ -134,32 +107,6 @@ buf mod update buf export -v -o ../proto-include popd -COSMOS_SDK_DIR=$(mktemp -d /tmp/cosmos-sdk-XXXXXXXX) - -pushd "$COSMOS_SDK_DIR" -git clone "$COSMOS_SDK_GIT" . -git checkout -b "$COSMOS_SDK_COMMIT" "$COSMOS_SDK_COMMIT" - -cd proto -buf mod update -buf export -v -o ../proto-include -popd - -cat << "EOF" >> "$COSMOS_SDK_DIR/proto-include/cosmos/staking/v1beta1/staking.proto" - -// InfractionType indicates the infraction type a validator commited. -enum InfractionType { - option (gogoproto.goproto_enum_prefix) = false; - - // UNSPECIFIED defines an empty infraction type. - INFRACTION_TYPE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "InfractionEmpty"]; - // DOUBLE_SIGN defines a validator that double-signs a block. - INFRACTION_TYPE_DOUBLE_SIGN = 1 [(gogoproto.enumvalue_customname) = "DoubleSign"]; - // DOWNTIME defines a validator that missed signing too many blocks. - INFRACTION_TYPE_DOWNTIME = 2 [(gogoproto.enumvalue_customname) = "Downtime"]; -} -EOF - IBC_GO_DIR=$(mktemp -d /tmp/ibc-go-XXXXXXXX) pushd "$IBC_GO_DIR" @@ -198,7 +145,6 @@ cargo build cargo run -- compile \ --ics "$COSMOS_ICS_DIR/proto-include" \ - --sdk "$COSMOS_SDK_DIR/proto-include" \ --ibc "$IBC_GO_DIR/proto-include" \ --nft "$NFT_TRANSFER_DIR/proto-include" \ --out ../../src/prost @@ -218,6 +164,5 @@ rm -f src/prost/tendermint.abci.rs # Remove the temporary checkouts of the repositories rm -rf "$COSMOS_ICS_DIR" -rm -rf "$COSMOS_SDK_DIR" rm -rf "$IBC_GO_DIR" rm -rf "$NFT_TRANSFER_DIR" diff --git a/src/COSMOS_SDK_COMMIT b/src/COSMOS_SDK_COMMIT deleted file mode 100644 index 1eef4d5b..00000000 --- a/src/COSMOS_SDK_COMMIT +++ /dev/null @@ -1 +0,0 @@ -2e9e5d6eea24d6c11eddc9c002c66e89ae036187 diff --git a/src/lib.rs b/src/lib.rs index bc37dda7..9fad861a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,9 +29,6 @@ macro_rules! include_proto { }; } -/// The version (commit hash) of the Cosmos SDK used when generating this library. -pub const COSMOS_SDK_COMMIT: &str = include_str!("COSMOS_SDK_COMMIT"); - /// The version (commit hash) of IBC Go used when generating this library. pub const IBC_GO_COMMIT: &str = include_str!("IBC_GO_COMMIT"); @@ -45,217 +42,8 @@ pub const NFT_TRANSFER_COMMIT: &str = include_str!("NFT_TRANSFER_COMMIT"); #[cfg(feature = "proto-descriptor")] pub const FILE_DESCRIPTOR_SET: &[u8] = include_bytes!("prost/proto_descriptor.bin"); -pub mod cosmos { - pub mod app { - pub mod v1alpha1 { - include_proto!("cosmos.app.v1alpha1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.app.v1alpha1.serde.rs"); - } - } - pub mod auth { - pub mod v1beta1 { - include_proto!("cosmos.auth.v1beta1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.auth.v1beta1.serde.rs"); - /// EthAccount defines an Ethermint account. - /// TODO: remove when/if a canonical `EthAccount` - /// lands in the next Cosmos SDK release - /// (note https://github.com/cosmos/cosmos-sdk/pull/9981 - /// only adds the PubKey type) - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EthAccount { - #[prost(message, optional, tag = "1")] - pub base_account: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - pub code_hash: ::prost::alloc::vec::Vec, - } - } - pub mod module { - pub mod v1 { - include_proto!("cosmos.auth.module.v1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.auth.module.v1.serde.rs"); - } - } - } - pub mod staking { - pub mod v1beta1 { - include_proto!("cosmos.staking.v1beta1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.staking.v1beta1.serde.rs"); - } - pub mod module { - pub mod v1 { - include_proto!("cosmos.staking.module.v1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.staking.module.v1.serde.rs"); - } - } - } - pub mod bank { - pub mod v1beta1 { - include_proto!("cosmos.bank.v1beta1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.bank.v1beta1.serde.rs"); - } - pub mod module { - pub mod v1 { - include_proto!("cosmos.bank.module.v1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.bank.module.v1.serde.rs"); - } - } - } - pub mod base { - pub mod abci { - pub mod v1beta1 { - include_proto!("cosmos.base.abci.v1beta1.rs"); - } - } - pub mod node { - pub mod v1beta1 { - include_proto!("cosmos.base.node.v1beta1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.base.node.v1beta1.serde.rs"); - } - } - pub mod query { - pub mod v1beta1 { - include_proto!("cosmos.base.query.v1beta1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.base.query.v1beta1.serde.rs"); - } - } - pub mod reflection { - pub mod v1beta1 { - include_proto!("cosmos.base.reflection.v1beta1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.base.reflection.v1beta1.serde.rs"); - } - } - pub mod v1beta1 { - include_proto!("cosmos.base.v1beta1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.base.v1beta1.serde.rs"); - } - pub mod tendermint { - pub mod v1beta1 { - include_proto!("cosmos.base.tendermint.v1beta1.rs"); - } - } - pub mod kv { - pub mod v1beta1 { - include_proto!("cosmos.base.kv.v1beta1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.base.kv.v1beta1.serde.rs"); - } - } - pub mod snapshots { - pub mod v1beta1 { - include_proto!("cosmos.base.snapshots.v1beta1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.base.snapshots.v1beta1.serde.rs"); - } - } - } - pub mod crypto { - pub mod multisig { - pub mod v1beta1 { - include_proto!("cosmos.crypto.multisig.v1beta1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.crypto.multisig.v1beta1.serde.rs"); - } - include_proto!("cosmos.crypto.multisig.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.crypto.multisig.serde.rs"); - } - pub mod ed25519 { - include_proto!("cosmos.crypto.ed25519.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.crypto.ed25519.serde.rs"); - } - pub mod secp256k1 { - include_proto!("cosmos.crypto.secp256k1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.crypto.secp256k1.serde.rs"); - } - pub mod secp256r1 { - include_proto!("cosmos.crypto.secp256r1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.crypto.secp256r1.serde.rs"); - } - pub mod keyring { - pub mod v1 { - include_proto!("cosmos.crypto.keyring.v1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.crypto.keyring.v1.serde.rs"); - } - } - pub mod hd { - pub mod v1 { - include_proto!("cosmos.crypto.hd.v1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.crypto.hd.v1.serde.rs"); - } - } - } - pub mod tx { - pub mod config { - pub mod v1 { - include_proto!("cosmos.tx.config.v1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.tx.config.v1.serde.rs"); - } - } - pub mod signing { - pub mod v1beta1 { - include_proto!("cosmos.tx.signing.v1beta1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.tx.signing.v1beta1.serde.rs"); - } - } - pub mod v1beta1 { - include_proto!("cosmos.tx.v1beta1.rs"); - } - } - pub mod upgrade { - pub mod v1beta1 { - include_proto!("cosmos.upgrade.v1beta1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.upgrade.v1beta1.serde.rs"); - } - pub mod module { - pub mod v1 { - include_proto!("cosmos.upgrade.module.v1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.upgrade.module.v1.serde.rs"); - } - } - } - pub mod gov { - pub mod v1 { - include_proto!("cosmos.gov.v1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.gov.v1.serde.rs"); - } - pub mod v1beta1 { - include_proto!("cosmos.gov.v1beta1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.gov.v1beta1.serde.rs"); - } - pub mod module { - pub mod v1 { - include_proto!("cosmos.gov.module.v1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.gov.module.v1.serde.rs"); - } - } - } - pub mod ics23 { - pub use ics23 as v1; - } -} +// Re-export Cosmos SDK protos from the `cosmos_sdk_proto` crate +pub use cosmos_sdk_proto::cosmos; pub mod ibc { #[deprecated(since = "0.15.0", note = "Use `ibc_proto::ibc::applications` instead")] @@ -383,9 +171,6 @@ pub mod ibc { } } -// Re-export `ics23` definitions for backward compatibility -pub use ics23; - pub mod interchain_security { pub mod ccv { #[allow(clippy::match_single_binding)] diff --git a/src/prost/cosmos.app.v1alpha1.rs b/src/prost/cosmos.app.v1alpha1.rs deleted file mode 100644 index b70937bf..00000000 --- a/src/prost/cosmos.app.v1alpha1.rs +++ /dev/null @@ -1,101 +0,0 @@ -/// 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/src/prost/cosmos.app.v1alpha1.serde.rs b/src/prost/cosmos.app.v1alpha1.serde.rs deleted file mode 100644 index 95f7c7de..00000000 --- a/src/prost/cosmos.app.v1alpha1.serde.rs +++ /dev/null @@ -1,329 +0,0 @@ -impl serde::Serialize for MigrateFromInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.app.v1alpha1.MigrateFromInfo", len)?; - if true { - struct_ser.serialize_field("module", &self.module)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MigrateFromInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "module", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Module, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "module" => Ok(GeneratedField::Module), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MigrateFromInfo; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.app.v1alpha1.MigrateFromInfo") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut module__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Module => { - if module__.is_some() { - return Err(serde::de::Error::duplicate_field("module")); - } - module__ = Some(map_.next_value()?); - } - } - } - Ok(MigrateFromInfo { - module: module__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.app.v1alpha1.MigrateFromInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ModuleDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.app.v1alpha1.ModuleDescriptor", len)?; - if true { - struct_ser.serialize_field("goImport", &self.go_import)?; - } - if true { - struct_ser.serialize_field("usePackage", &self.use_package)?; - } - if true { - struct_ser.serialize_field("canMigrateFrom", &self.can_migrate_from)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ModuleDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "go_import", - "goImport", - "use_package", - "usePackage", - "can_migrate_from", - "canMigrateFrom", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - GoImport, - UsePackage, - CanMigrateFrom, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "goImport" | "go_import" => Ok(GeneratedField::GoImport), - "usePackage" | "use_package" => Ok(GeneratedField::UsePackage), - "canMigrateFrom" | "can_migrate_from" => Ok(GeneratedField::CanMigrateFrom), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ModuleDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.app.v1alpha1.ModuleDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut go_import__ = None; - let mut use_package__ = None; - let mut can_migrate_from__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::GoImport => { - if go_import__.is_some() { - return Err(serde::de::Error::duplicate_field("goImport")); - } - go_import__ = Some(map_.next_value()?); - } - GeneratedField::UsePackage => { - if use_package__.is_some() { - return Err(serde::de::Error::duplicate_field("usePackage")); - } - use_package__ = Some(map_.next_value()?); - } - GeneratedField::CanMigrateFrom => { - if can_migrate_from__.is_some() { - return Err(serde::de::Error::duplicate_field("canMigrateFrom")); - } - can_migrate_from__ = Some(map_.next_value()?); - } - } - } - Ok(ModuleDescriptor { - go_import: go_import__.unwrap_or_default(), - use_package: use_package__.unwrap_or_default(), - can_migrate_from: can_migrate_from__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.app.v1alpha1.ModuleDescriptor", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for PackageReference { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.app.v1alpha1.PackageReference", len)?; - if true { - struct_ser.serialize_field("name", &self.name)?; - } - if true { - struct_ser.serialize_field("revision", &self.revision)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PackageReference { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "name", - "revision", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Name, - Revision, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "name" => Ok(GeneratedField::Name), - "revision" => Ok(GeneratedField::Revision), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PackageReference; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.app.v1alpha1.PackageReference") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut name__ = None; - let mut revision__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - GeneratedField::Revision => { - if revision__.is_some() { - return Err(serde::de::Error::duplicate_field("revision")); - } - revision__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(PackageReference { - name: name__.unwrap_or_default(), - revision: revision__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.app.v1alpha1.PackageReference", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.auth.module.v1.rs b/src/prost/cosmos.auth.module.v1.rs deleted file mode 100644 index 59a0940d..00000000 --- a/src/prost/cosmos.auth.module.v1.rs +++ /dev/null @@ -1,40 +0,0 @@ -/// Module is the config object for the auth module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Module { - /// bech32_prefix is the bech32 account prefix for the app. - #[prost(string, tag = "1")] - pub bech32_prefix: ::prost::alloc::string::String, - /// module_account_permissions are module account permissions. - #[prost(message, repeated, tag = "2")] - pub module_account_permissions: ::prost::alloc::vec::Vec, - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "3")] - pub authority: ::prost::alloc::string::String, -} -impl ::prost::Name for Module { - const NAME: &'static str = "Module"; - const PACKAGE: &'static str = "cosmos.auth.module.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.module.v1.{}", Self::NAME) - } -} -/// ModuleAccountPermission represents permissions for a module account. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ModuleAccountPermission { - /// account is the name of the module. - #[prost(string, tag = "1")] - pub account: ::prost::alloc::string::String, - /// permissions are the permissions this module has. Currently recognized - /// values are minter, burner and staking. - #[prost(string, repeated, tag = "2")] - pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for ModuleAccountPermission { - const NAME: &'static str = "ModuleAccountPermission"; - const PACKAGE: &'static str = "cosmos.auth.module.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.module.v1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.auth.module.v1.serde.rs b/src/prost/cosmos.auth.module.v1.serde.rs deleted file mode 100644 index 72f892f8..00000000 --- a/src/prost/cosmos.auth.module.v1.serde.rs +++ /dev/null @@ -1,235 +0,0 @@ -impl serde::Serialize for Module { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.module.v1.Module", len)?; - if true { - struct_ser.serialize_field("bech32Prefix", &self.bech32_prefix)?; - } - if true { - struct_ser.serialize_field("moduleAccountPermissions", &self.module_account_permissions)?; - } - if true { - struct_ser.serialize_field("authority", &self.authority)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Module { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "bech32_prefix", - "bech32Prefix", - "module_account_permissions", - "moduleAccountPermissions", - "authority", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Bech32Prefix, - ModuleAccountPermissions, - Authority, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "bech32Prefix" | "bech32_prefix" => Ok(GeneratedField::Bech32Prefix), - "moduleAccountPermissions" | "module_account_permissions" => Ok(GeneratedField::ModuleAccountPermissions), - "authority" => Ok(GeneratedField::Authority), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Module; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.module.v1.Module") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut bech32_prefix__ = None; - let mut module_account_permissions__ = None; - let mut authority__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Bech32Prefix => { - if bech32_prefix__.is_some() { - return Err(serde::de::Error::duplicate_field("bech32Prefix")); - } - bech32_prefix__ = Some(map_.next_value()?); - } - GeneratedField::ModuleAccountPermissions => { - if module_account_permissions__.is_some() { - return Err(serde::de::Error::duplicate_field("moduleAccountPermissions")); - } - module_account_permissions__ = Some(map_.next_value()?); - } - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); - } - authority__ = Some(map_.next_value()?); - } - } - } - Ok(Module { - bech32_prefix: bech32_prefix__.unwrap_or_default(), - module_account_permissions: module_account_permissions__.unwrap_or_default(), - authority: authority__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.module.v1.Module", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ModuleAccountPermission { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.module.v1.ModuleAccountPermission", len)?; - if true { - struct_ser.serialize_field("account", &self.account)?; - } - if true { - struct_ser.serialize_field("permissions", &self.permissions)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ModuleAccountPermission { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "account", - "permissions", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Account, - Permissions, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "account" => Ok(GeneratedField::Account), - "permissions" => Ok(GeneratedField::Permissions), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ModuleAccountPermission; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.module.v1.ModuleAccountPermission") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut account__ = None; - let mut permissions__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Account => { - if account__.is_some() { - return Err(serde::de::Error::duplicate_field("account")); - } - account__ = Some(map_.next_value()?); - } - GeneratedField::Permissions => { - if permissions__.is_some() { - return Err(serde::de::Error::duplicate_field("permissions")); - } - permissions__ = Some(map_.next_value()?); - } - } - } - Ok(ModuleAccountPermission { - account: account__.unwrap_or_default(), - permissions: permissions__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.module.v1.ModuleAccountPermission", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.auth.v1beta1.rs b/src/prost/cosmos.auth.v1beta1.rs deleted file mode 100644 index b6c3e8d7..00000000 --- a/src/prost/cosmos.auth.v1beta1.rs +++ /dev/null @@ -1,1827 +0,0 @@ -/// 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, - #[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) - } -} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/auth parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Msg defines the x/auth Msg service. - #[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 - } - /// UpdateParams defines a (governance) operation for updating the x/auth module - /// parameters. The authority defaults to the x/gov module account. - /// - /// Since: cosmos-sdk 0.47 - pub async fn update_params( - &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.auth.v1beta1.Msg/UpdateParams", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.auth.v1beta1.Msg", "UpdateParams")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -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 { - /// UpdateParams defines a (governance) operation for updating the x/auth module - /// parameters. The authority defaults to the x/gov module account. - /// - /// Since: cosmos-sdk 0.47 - async fn update_params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Msg defines the x/auth Msg service. - #[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() { - "/cosmos.auth.v1beta1.Msg/UpdateParams" => { - #[allow(non_camel_case_types)] - struct UpdateParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateParamsSvc { - type Response = super::MsgUpdateParamsResponse; - 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 { - ::update_params(&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 = UpdateParamsSvc(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 = "cosmos.auth.v1beta1.Msg"; - } -} -/// QueryAccountsRequest is the request type for the Query/Accounts RPC method. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAccountsRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryAccountsRequest { - const NAME: &'static str = "QueryAccountsRequest"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// QueryAccountsResponse is the response type for the Query/Accounts RPC method. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAccountsResponse { - /// accounts are the existing accounts - #[prost(message, repeated, tag = "1")] - pub accounts: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryAccountsResponse { - const NAME: &'static str = "QueryAccountsResponse"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// QueryAccountRequest is the request type for the Query/Account RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAccountRequest { - /// address defines the address to query for. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryAccountRequest { - const NAME: &'static str = "QueryAccountRequest"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// QueryAccountResponse is the response type for the Query/Account RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAccountResponse { - /// account defines the account of the corresponding address. - #[prost(message, optional, tag = "1")] - pub account: ::core::option::Option, -} -impl ::prost::Name for QueryAccountResponse { - const NAME: &'static str = "QueryAccountResponse"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryModuleAccountsRequest {} -impl ::prost::Name for QueryModuleAccountsRequest { - const NAME: &'static str = "QueryModuleAccountsRequest"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryModuleAccountsResponse { - #[prost(message, repeated, tag = "1")] - pub accounts: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for QueryModuleAccountsResponse { - const NAME: &'static str = "QueryModuleAccountsResponse"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryModuleAccountByNameRequest { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryModuleAccountByNameRequest { - const NAME: &'static str = "QueryModuleAccountByNameRequest"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryModuleAccountByNameResponse { - #[prost(message, optional, tag = "1")] - pub account: ::core::option::Option, -} -impl ::prost::Name for QueryModuleAccountByNameResponse { - const NAME: &'static str = "QueryModuleAccountByNameResponse"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Bech32PrefixRequest {} -impl ::prost::Name for Bech32PrefixRequest { - const NAME: &'static str = "Bech32PrefixRequest"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// Bech32PrefixResponse is the response type for Bech32Prefix rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Bech32PrefixResponse { - #[prost(string, tag = "1")] - pub bech32_prefix: ::prost::alloc::string::String, -} -impl ::prost::Name for Bech32PrefixResponse { - const NAME: &'static str = "Bech32PrefixResponse"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// AddressBytesToStringRequest is the request type for AddressString rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AddressBytesToStringRequest { - #[prost(bytes = "vec", tag = "1")] - pub address_bytes: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for AddressBytesToStringRequest { - const NAME: &'static str = "AddressBytesToStringRequest"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// AddressBytesToStringResponse is the response type for AddressString rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AddressBytesToStringResponse { - #[prost(string, tag = "1")] - pub address_string: ::prost::alloc::string::String, -} -impl ::prost::Name for AddressBytesToStringResponse { - const NAME: &'static str = "AddressBytesToStringResponse"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// AddressStringToBytesRequest is the request type for AccountBytes rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AddressStringToBytesRequest { - #[prost(string, tag = "1")] - pub address_string: ::prost::alloc::string::String, -} -impl ::prost::Name for AddressStringToBytesRequest { - const NAME: &'static str = "AddressStringToBytesRequest"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// AddressStringToBytesResponse is the response type for AddressBytes rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AddressStringToBytesResponse { - #[prost(bytes = "vec", tag = "1")] - pub address_bytes: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for AddressStringToBytesResponse { - const NAME: &'static str = "AddressStringToBytesResponse"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method -/// -/// Since: cosmos-sdk 0.46.2 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAccountAddressByIdRequest { - /// Deprecated, use account_id instead - /// - /// id is the account number of the address to be queried. This field - /// should have been an uint64 (like all account numbers), and will be - /// updated to uint64 in a future version of the auth query. - #[deprecated] - #[prost(int64, tag = "1")] - pub id: i64, - /// account_id is the account number of the address to be queried. - /// - /// Since: cosmos-sdk 0.47 - #[prost(uint64, tag = "2")] - pub account_id: u64, -} -impl ::prost::Name for QueryAccountAddressByIdRequest { - const NAME: &'static str = "QueryAccountAddressByIDRequest"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method -/// -/// Since: cosmos-sdk 0.46.2 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAccountAddressByIdResponse { - #[prost(string, tag = "1")] - pub account_address: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryAccountAddressByIdResponse { - const NAME: &'static str = "QueryAccountAddressByIDResponse"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// QueryAccountInfoRequest is the Query/AccountInfo request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAccountInfoRequest { - /// address is the account address string. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryAccountInfoRequest { - const NAME: &'static str = "QueryAccountInfoRequest"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// QueryAccountInfoResponse is the Query/AccountInfo response type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAccountInfoResponse { - /// info is the account info which is represented by BaseAccount. - #[prost(message, optional, tag = "1")] - pub info: ::core::option::Option, -} -impl ::prost::Name for QueryAccountInfoResponse { - const NAME: &'static str = "QueryAccountInfoResponse"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Query defines the gRPC querier service. - #[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 - } - /// Accounts returns all the existing accounts. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - /// - /// Since: cosmos-sdk 0.43 - pub async fn accounts( - &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.auth.v1beta1.Query/Accounts", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.auth.v1beta1.Query", "Accounts")); - self.inner.unary(req, path, codec).await - } - /// Account returns account details based on address. - pub async fn 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( - "/cosmos.auth.v1beta1.Query/Account", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.auth.v1beta1.Query", "Account")); - self.inner.unary(req, path, codec).await - } - /// AccountAddressByID returns account address based on account number. - /// - /// Since: cosmos-sdk 0.46.2 - pub async fn account_address_by_id( - &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.auth.v1beta1.Query/AccountAddressByID", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.auth.v1beta1.Query", "AccountAddressByID"), - ); - self.inner.unary(req, path, codec).await - } - /// Params queries all parameters. - pub async fn params( - &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.auth.v1beta1.Query/Params", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.auth.v1beta1.Query", "Params")); - self.inner.unary(req, path, codec).await - } - /// ModuleAccounts returns all the existing module accounts. - /// - /// Since: cosmos-sdk 0.46 - pub async fn module_accounts( - &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.auth.v1beta1.Query/ModuleAccounts", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.auth.v1beta1.Query", "ModuleAccounts")); - self.inner.unary(req, path, codec).await - } - /// ModuleAccountByName returns the module account info by module name - pub async fn module_account_by_name( - &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.auth.v1beta1.Query/ModuleAccountByName", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.auth.v1beta1.Query", "ModuleAccountByName"), - ); - self.inner.unary(req, path, codec).await - } - /// Bech32Prefix queries bech32Prefix - /// - /// Since: cosmos-sdk 0.46 - pub async fn bech32_prefix( - &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.auth.v1beta1.Query/Bech32Prefix", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.auth.v1beta1.Query", "Bech32Prefix")); - self.inner.unary(req, path, codec).await - } - /// AddressBytesToString converts Account Address bytes to string - /// - /// Since: cosmos-sdk 0.46 - pub async fn address_bytes_to_string( - &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.auth.v1beta1.Query/AddressBytesToString", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.auth.v1beta1.Query", "AddressBytesToString"), - ); - self.inner.unary(req, path, codec).await - } - /// AddressStringToBytes converts Address string to bytes - /// - /// Since: cosmos-sdk 0.46 - pub async fn address_string_to_bytes( - &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.auth.v1beta1.Query/AddressStringToBytes", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.auth.v1beta1.Query", "AddressStringToBytes"), - ); - self.inner.unary(req, path, codec).await - } - /// AccountInfo queries account info which is common to all account types. - /// - /// Since: cosmos-sdk 0.47 - pub async fn account_info( - &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.auth.v1beta1.Query/AccountInfo", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.auth.v1beta1.Query", "AccountInfo")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -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 { - /// Accounts returns all the existing accounts. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - /// - /// Since: cosmos-sdk 0.43 - async fn accounts( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Account returns account details based on address. - async fn account( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// AccountAddressByID returns account address based on account number. - /// - /// Since: cosmos-sdk 0.46.2 - async fn account_address_by_id( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Params queries all parameters. - async fn params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ModuleAccounts returns all the existing module accounts. - /// - /// Since: cosmos-sdk 0.46 - async fn module_accounts( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ModuleAccountByName returns the module account info by module name - async fn module_account_by_name( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Bech32Prefix queries bech32Prefix - /// - /// Since: cosmos-sdk 0.46 - async fn bech32_prefix( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// AddressBytesToString converts Account Address bytes to string - /// - /// Since: cosmos-sdk 0.46 - async fn address_bytes_to_string( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// AddressStringToBytes converts Address string to bytes - /// - /// Since: cosmos-sdk 0.46 - async fn address_string_to_bytes( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// AccountInfo queries account info which is common to all account types. - /// - /// Since: cosmos-sdk 0.47 - async fn account_info( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Query defines the gRPC querier service. - #[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() { - "/cosmos.auth.v1beta1.Query/Accounts" => { - #[allow(non_camel_case_types)] - struct AccountsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for AccountsSvc { - type Response = super::QueryAccountsResponse; - 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 { - ::accounts(&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 = AccountsSvc(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.auth.v1beta1.Query/Account" => { - #[allow(non_camel_case_types)] - struct AccountSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for AccountSvc { - type Response = super::QueryAccountResponse; - 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 { - ::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 = AccountSvc(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.auth.v1beta1.Query/AccountAddressByID" => { - #[allow(non_camel_case_types)] - struct AccountAddressByIDSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for AccountAddressByIDSvc { - type Response = super::QueryAccountAddressByIdResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::QueryAccountAddressByIdRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::account_address_by_id(&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 = AccountAddressByIDSvc(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.auth.v1beta1.Query/Params" => { - #[allow(non_camel_case_types)] - struct ParamsSvc(pub Arc); - impl tonic::server::UnaryService - for ParamsSvc { - type Response = super::QueryParamsResponse; - 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 { - ::params(&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 = ParamsSvc(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.auth.v1beta1.Query/ModuleAccounts" => { - #[allow(non_camel_case_types)] - struct ModuleAccountsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ModuleAccountsSvc { - type Response = super::QueryModuleAccountsResponse; - 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 { - ::module_accounts(&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 = ModuleAccountsSvc(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.auth.v1beta1.Query/ModuleAccountByName" => { - #[allow(non_camel_case_types)] - struct ModuleAccountByNameSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ModuleAccountByNameSvc { - type Response = super::QueryModuleAccountByNameResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::QueryModuleAccountByNameRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::module_account_by_name(&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 = ModuleAccountByNameSvc(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.auth.v1beta1.Query/Bech32Prefix" => { - #[allow(non_camel_case_types)] - struct Bech32PrefixSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for Bech32PrefixSvc { - type Response = super::Bech32PrefixResponse; - 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 { - ::bech32_prefix(&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 = Bech32PrefixSvc(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.auth.v1beta1.Query/AddressBytesToString" => { - #[allow(non_camel_case_types)] - struct AddressBytesToStringSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for AddressBytesToStringSvc { - type Response = super::AddressBytesToStringResponse; - 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_bytes_to_string(&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 = AddressBytesToStringSvc(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.auth.v1beta1.Query/AddressStringToBytes" => { - #[allow(non_camel_case_types)] - struct AddressStringToBytesSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for AddressStringToBytesSvc { - type Response = super::AddressStringToBytesResponse; - 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_string_to_bytes(&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 = AddressStringToBytesSvc(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.auth.v1beta1.Query/AccountInfo" => { - #[allow(non_camel_case_types)] - struct AccountInfoSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for AccountInfoSvc { - type Response = super::QueryAccountInfoResponse; - 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 { - ::account_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 = AccountInfoSvc(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 = "cosmos.auth.v1beta1.Query"; - } -} -/// GenesisState defines the auth module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// params defines all the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// accounts are the accounts present at genesis. - #[prost(message, repeated, tag = "2")] - pub accounts: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; - 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/src/prost/cosmos.auth.v1beta1.serde.rs b/src/prost/cosmos.auth.v1beta1.serde.rs deleted file mode 100644 index 2a8f69cb..00000000 --- a/src/prost/cosmos.auth.v1beta1.serde.rs +++ /dev/null @@ -1,2668 +0,0 @@ -impl serde::Serialize for AddressBytesToStringRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.AddressBytesToStringRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("addressBytes", pbjson::private::base64::encode(&self.address_bytes).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for AddressBytesToStringRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address_bytes", - "addressBytes", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - AddressBytes, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "addressBytes" | "address_bytes" => Ok(GeneratedField::AddressBytes), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = AddressBytesToStringRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.AddressBytesToStringRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address_bytes__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::AddressBytes => { - if address_bytes__.is_some() { - return Err(serde::de::Error::duplicate_field("addressBytes")); - } - address_bytes__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(AddressBytesToStringRequest { - address_bytes: address_bytes__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.AddressBytesToStringRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for AddressBytesToStringResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.AddressBytesToStringResponse", len)?; - if true { - struct_ser.serialize_field("addressString", &self.address_string)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for AddressBytesToStringResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address_string", - "addressString", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - AddressString, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "addressString" | "address_string" => Ok(GeneratedField::AddressString), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = AddressBytesToStringResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.AddressBytesToStringResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address_string__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::AddressString => { - if address_string__.is_some() { - return Err(serde::de::Error::duplicate_field("addressString")); - } - address_string__ = Some(map_.next_value()?); - } - } - } - Ok(AddressBytesToStringResponse { - address_string: address_string__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.AddressBytesToStringResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for AddressStringToBytesRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.AddressStringToBytesRequest", len)?; - if true { - struct_ser.serialize_field("addressString", &self.address_string)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for AddressStringToBytesRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address_string", - "addressString", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - AddressString, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "addressString" | "address_string" => Ok(GeneratedField::AddressString), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = AddressStringToBytesRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.AddressStringToBytesRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address_string__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::AddressString => { - if address_string__.is_some() { - return Err(serde::de::Error::duplicate_field("addressString")); - } - address_string__ = Some(map_.next_value()?); - } - } - } - Ok(AddressStringToBytesRequest { - address_string: address_string__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.AddressStringToBytesRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for AddressStringToBytesResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.AddressStringToBytesResponse", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("addressBytes", pbjson::private::base64::encode(&self.address_bytes).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for AddressStringToBytesResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address_bytes", - "addressBytes", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - AddressBytes, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "addressBytes" | "address_bytes" => Ok(GeneratedField::AddressBytes), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = AddressStringToBytesResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.AddressStringToBytesResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address_bytes__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::AddressBytes => { - if address_bytes__.is_some() { - return Err(serde::de::Error::duplicate_field("addressBytes")); - } - address_bytes__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(AddressStringToBytesResponse { - address_bytes: address_bytes__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.AddressStringToBytesResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for BaseAccount { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.BaseAccount", len)?; - if true { - struct_ser.serialize_field("address", &self.address)?; - } - if let Some(v) = self.pub_key.as_ref() { - struct_ser.serialize_field("pubKey", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("accountNumber", ::alloc::string::ToString::to_string(&self.account_number).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("sequence", ::alloc::string::ToString::to_string(&self.sequence).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for BaseAccount { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - "pub_key", - "pubKey", - "account_number", - "accountNumber", - "sequence", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - PubKey, - AccountNumber, - Sequence, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "pubKey" | "pub_key" => Ok(GeneratedField::PubKey), - "accountNumber" | "account_number" => Ok(GeneratedField::AccountNumber), - "sequence" => Ok(GeneratedField::Sequence), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = BaseAccount; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.BaseAccount") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut pub_key__ = None; - let mut account_number__ = None; - let mut sequence__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } - GeneratedField::PubKey => { - if pub_key__.is_some() { - return Err(serde::de::Error::duplicate_field("pubKey")); - } - pub_key__ = map_.next_value()?; - } - GeneratedField::AccountNumber => { - if account_number__.is_some() { - return Err(serde::de::Error::duplicate_field("accountNumber")); - } - account_number__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Sequence => { - if sequence__.is_some() { - return Err(serde::de::Error::duplicate_field("sequence")); - } - sequence__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(BaseAccount { - address: address__.unwrap_or_default(), - pub_key: pub_key__, - account_number: account_number__.unwrap_or_default(), - sequence: sequence__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.BaseAccount", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Bech32PrefixRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.Bech32PrefixRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Bech32PrefixRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Bech32PrefixRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.Bech32PrefixRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(Bech32PrefixRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.Bech32PrefixRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Bech32PrefixResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.Bech32PrefixResponse", len)?; - if true { - struct_ser.serialize_field("bech32Prefix", &self.bech32_prefix)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Bech32PrefixResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "bech32_prefix", - "bech32Prefix", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Bech32Prefix, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "bech32Prefix" | "bech32_prefix" => Ok(GeneratedField::Bech32Prefix), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Bech32PrefixResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.Bech32PrefixResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut bech32_prefix__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Bech32Prefix => { - if bech32_prefix__.is_some() { - return Err(serde::de::Error::duplicate_field("bech32Prefix")); - } - bech32_prefix__ = Some(map_.next_value()?); - } - } - } - Ok(Bech32PrefixResponse { - bech32_prefix: bech32_prefix__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.Bech32PrefixResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GenesisState { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.GenesisState", len)?; - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; - } - if true { - struct_ser.serialize_field("accounts", &self.accounts)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GenesisState { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "params", - "accounts", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Params, - Accounts, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "params" => Ok(GeneratedField::Params), - "accounts" => Ok(GeneratedField::Accounts), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GenesisState; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.GenesisState") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut params__ = None; - let mut accounts__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); - } - params__ = map_.next_value()?; - } - GeneratedField::Accounts => { - if accounts__.is_some() { - return Err(serde::de::Error::duplicate_field("accounts")); - } - accounts__ = Some(map_.next_value()?); - } - } - } - Ok(GenesisState { - params: params__, - accounts: accounts__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.GenesisState", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ModuleAccount { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.ModuleAccount", len)?; - if let Some(v) = self.base_account.as_ref() { - struct_ser.serialize_field("baseAccount", v)?; - } - if true { - struct_ser.serialize_field("name", &self.name)?; - } - if true { - struct_ser.serialize_field("permissions", &self.permissions)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ModuleAccount { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "base_account", - "baseAccount", - "name", - "permissions", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - BaseAccount, - Name, - Permissions, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "baseAccount" | "base_account" => Ok(GeneratedField::BaseAccount), - "name" => Ok(GeneratedField::Name), - "permissions" => Ok(GeneratedField::Permissions), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ModuleAccount; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.ModuleAccount") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut base_account__ = None; - let mut name__ = None; - let mut permissions__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::BaseAccount => { - if base_account__.is_some() { - return Err(serde::de::Error::duplicate_field("baseAccount")); - } - base_account__ = map_.next_value()?; - } - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - GeneratedField::Permissions => { - if permissions__.is_some() { - return Err(serde::de::Error::duplicate_field("permissions")); - } - permissions__ = Some(map_.next_value()?); - } - } - } - Ok(ModuleAccount { - base_account: base_account__, - name: name__.unwrap_or_default(), - permissions: permissions__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.ModuleAccount", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ModuleCredential { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.ModuleCredential", len)?; - if true { - struct_ser.serialize_field("moduleName", &self.module_name)?; - } - if true { - struct_ser.serialize_field("derivationKeys", &self.derivation_keys.iter().map(pbjson::private::base64::encode).collect::<::alloc::vec::Vec<_>>())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ModuleCredential { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "module_name", - "moduleName", - "derivation_keys", - "derivationKeys", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ModuleName, - DerivationKeys, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "moduleName" | "module_name" => Ok(GeneratedField::ModuleName), - "derivationKeys" | "derivation_keys" => Ok(GeneratedField::DerivationKeys), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ModuleCredential; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.ModuleCredential") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut module_name__ = None; - let mut derivation_keys__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ModuleName => { - if module_name__.is_some() { - return Err(serde::de::Error::duplicate_field("moduleName")); - } - module_name__ = Some(map_.next_value()?); - } - GeneratedField::DerivationKeys => { - if derivation_keys__.is_some() { - return Err(serde::de::Error::duplicate_field("derivationKeys")); - } - derivation_keys__ = - Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::BytesDeserialize<_>>>()? - .into_iter().map(|x| x.0).collect()) - ; - } - } - } - Ok(ModuleCredential { - module_name: module_name__.unwrap_or_default(), - derivation_keys: derivation_keys__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.ModuleCredential", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgUpdateParams { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.MsgUpdateParams", len)?; - if true { - struct_ser.serialize_field("authority", &self.authority)?; - } - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgUpdateParams { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "authority", - "params", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authority, - Params, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "authority" => Ok(GeneratedField::Authority), - "params" => Ok(GeneratedField::Params), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateParams; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.MsgUpdateParams") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut authority__ = None; - let mut params__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); - } - authority__ = Some(map_.next_value()?); - } - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); - } - params__ = map_.next_value()?; - } - } - } - Ok(MsgUpdateParams { - authority: authority__.unwrap_or_default(), - params: params__, - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.MsgUpdateParams", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgUpdateParamsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.MsgUpdateParamsResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgUpdateParamsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateParamsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.MsgUpdateParamsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgUpdateParamsResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.MsgUpdateParamsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Params { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.Params", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("maxMemoCharacters", ::alloc::string::ToString::to_string(&self.max_memo_characters).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("txSigLimit", ::alloc::string::ToString::to_string(&self.tx_sig_limit).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("txSizeCostPerByte", ::alloc::string::ToString::to_string(&self.tx_size_cost_per_byte).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("sigVerifyCostEd25519", ::alloc::string::ToString::to_string(&self.sig_verify_cost_ed25519).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("sigVerifyCostSecp256k1", ::alloc::string::ToString::to_string(&self.sig_verify_cost_secp256k1).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Params { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "max_memo_characters", - "maxMemoCharacters", - "tx_sig_limit", - "txSigLimit", - "tx_size_cost_per_byte", - "txSizeCostPerByte", - "sig_verify_cost_ed25519", - "sigVerifyCostEd25519", - "sig_verify_cost_secp256k1", - "sigVerifyCostSecp256k1", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - MaxMemoCharacters, - TxSigLimit, - TxSizeCostPerByte, - SigVerifyCostEd25519, - SigVerifyCostSecp256k1, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "maxMemoCharacters" | "max_memo_characters" => Ok(GeneratedField::MaxMemoCharacters), - "txSigLimit" | "tx_sig_limit" => Ok(GeneratedField::TxSigLimit), - "txSizeCostPerByte" | "tx_size_cost_per_byte" => Ok(GeneratedField::TxSizeCostPerByte), - "sigVerifyCostEd25519" | "sig_verify_cost_ed25519" => Ok(GeneratedField::SigVerifyCostEd25519), - "sigVerifyCostSecp256k1" | "sig_verify_cost_secp256k1" => Ok(GeneratedField::SigVerifyCostSecp256k1), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Params; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.Params") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut max_memo_characters__ = None; - let mut tx_sig_limit__ = None; - let mut tx_size_cost_per_byte__ = None; - let mut sig_verify_cost_ed25519__ = None; - let mut sig_verify_cost_secp256k1__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::MaxMemoCharacters => { - if max_memo_characters__.is_some() { - return Err(serde::de::Error::duplicate_field("maxMemoCharacters")); - } - max_memo_characters__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::TxSigLimit => { - if tx_sig_limit__.is_some() { - return Err(serde::de::Error::duplicate_field("txSigLimit")); - } - tx_sig_limit__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::TxSizeCostPerByte => { - if tx_size_cost_per_byte__.is_some() { - return Err(serde::de::Error::duplicate_field("txSizeCostPerByte")); - } - tx_size_cost_per_byte__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::SigVerifyCostEd25519 => { - if sig_verify_cost_ed25519__.is_some() { - return Err(serde::de::Error::duplicate_field("sigVerifyCostEd25519")); - } - sig_verify_cost_ed25519__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::SigVerifyCostSecp256k1 => { - if sig_verify_cost_secp256k1__.is_some() { - return Err(serde::de::Error::duplicate_field("sigVerifyCostSecp256k1")); - } - sig_verify_cost_secp256k1__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(Params { - max_memo_characters: max_memo_characters__.unwrap_or_default(), - tx_sig_limit: tx_sig_limit__.unwrap_or_default(), - tx_size_cost_per_byte: tx_size_cost_per_byte__.unwrap_or_default(), - sig_verify_cost_ed25519: sig_verify_cost_ed25519__.unwrap_or_default(), - sig_verify_cost_secp256k1: sig_verify_cost_secp256k1__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.Params", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryAccountAddressByIdRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.QueryAccountAddressByIDRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("id", ::alloc::string::ToString::to_string(&self.id).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("accountId", ::alloc::string::ToString::to_string(&self.account_id).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "id", - "account_id", - "accountId", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Id, - AccountId, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "id" => Ok(GeneratedField::Id), - "accountId" | "account_id" => Ok(GeneratedField::AccountId), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAccountAddressByIdRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountAddressByIDRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut id__ = None; - let mut account_id__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Id => { - if id__.is_some() { - return Err(serde::de::Error::duplicate_field("id")); - } - id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::AccountId => { - if account_id__.is_some() { - return Err(serde::de::Error::duplicate_field("accountId")); - } - account_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(QueryAccountAddressByIdRequest { - id: id__.unwrap_or_default(), - account_id: account_id__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.QueryAccountAddressByIDRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryAccountAddressByIdResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.QueryAccountAddressByIDResponse", len)?; - if true { - struct_ser.serialize_field("accountAddress", &self.account_address)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "account_address", - "accountAddress", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - AccountAddress, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "accountAddress" | "account_address" => Ok(GeneratedField::AccountAddress), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAccountAddressByIdResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountAddressByIDResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut account_address__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::AccountAddress => { - if account_address__.is_some() { - return Err(serde::de::Error::duplicate_field("accountAddress")); - } - account_address__ = Some(map_.next_value()?); - } - } - } - Ok(QueryAccountAddressByIdResponse { - account_address: account_address__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.QueryAccountAddressByIDResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryAccountInfoRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.QueryAccountInfoRequest", len)?; - if true { - struct_ser.serialize_field("address", &self.address)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryAccountInfoRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAccountInfoRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountInfoRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } - } - } - Ok(QueryAccountInfoRequest { - address: address__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.QueryAccountInfoRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryAccountInfoResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.QueryAccountInfoResponse", len)?; - if let Some(v) = self.info.as_ref() { - struct_ser.serialize_field("info", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryAccountInfoResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "info", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Info, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "info" => Ok(GeneratedField::Info), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAccountInfoResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountInfoResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut info__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Info => { - if info__.is_some() { - return Err(serde::de::Error::duplicate_field("info")); - } - info__ = map_.next_value()?; - } - } - } - Ok(QueryAccountInfoResponse { - info: info__, - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.QueryAccountInfoResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryAccountRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.QueryAccountRequest", len)?; - if true { - struct_ser.serialize_field("address", &self.address)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryAccountRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAccountRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } - } - } - Ok(QueryAccountRequest { - address: address__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.QueryAccountRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryAccountResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.QueryAccountResponse", len)?; - if let Some(v) = self.account.as_ref() { - struct_ser.serialize_field("account", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryAccountResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "account", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Account, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "account" => Ok(GeneratedField::Account), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAccountResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut account__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Account => { - if account__.is_some() { - return Err(serde::de::Error::duplicate_field("account")); - } - account__ = map_.next_value()?; - } - } - } - Ok(QueryAccountResponse { - account: account__, - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.QueryAccountResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryAccountsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.QueryAccountsRequest", len)?; - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryAccountsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAccountsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryAccountsRequest { - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.QueryAccountsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryAccountsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.QueryAccountsResponse", len)?; - if true { - struct_ser.serialize_field("accounts", &self.accounts)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryAccountsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "accounts", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Accounts, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "accounts" => Ok(GeneratedField::Accounts), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAccountsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut accounts__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Accounts => { - if accounts__.is_some() { - return Err(serde::de::Error::duplicate_field("accounts")); - } - accounts__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryAccountsResponse { - accounts: accounts__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.QueryAccountsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryModuleAccountByNameRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.QueryModuleAccountByNameRequest", len)?; - if true { - struct_ser.serialize_field("name", &self.name)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "name", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Name, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "name" => Ok(GeneratedField::Name), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryModuleAccountByNameRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.QueryModuleAccountByNameRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut name__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - } - } - Ok(QueryModuleAccountByNameRequest { - name: name__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.QueryModuleAccountByNameRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryModuleAccountByNameResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.QueryModuleAccountByNameResponse", len)?; - if let Some(v) = self.account.as_ref() { - struct_ser.serialize_field("account", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "account", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Account, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "account" => Ok(GeneratedField::Account), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryModuleAccountByNameResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.QueryModuleAccountByNameResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut account__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Account => { - if account__.is_some() { - return Err(serde::de::Error::duplicate_field("account")); - } - account__ = map_.next_value()?; - } - } - } - Ok(QueryModuleAccountByNameResponse { - account: account__, - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.QueryModuleAccountByNameResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryModuleAccountsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.QueryModuleAccountsRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryModuleAccountsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryModuleAccountsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.QueryModuleAccountsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(QueryModuleAccountsRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.QueryModuleAccountsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryModuleAccountsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.QueryModuleAccountsResponse", len)?; - if true { - struct_ser.serialize_field("accounts", &self.accounts)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryModuleAccountsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "accounts", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Accounts, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "accounts" => Ok(GeneratedField::Accounts), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryModuleAccountsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.QueryModuleAccountsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut accounts__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Accounts => { - if accounts__.is_some() { - return Err(serde::de::Error::duplicate_field("accounts")); - } - accounts__ = Some(map_.next_value()?); - } - } - } - Ok(QueryModuleAccountsResponse { - accounts: accounts__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.QueryModuleAccountsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryParamsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.QueryParamsRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryParamsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryParamsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.QueryParamsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(QueryParamsRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.QueryParamsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryParamsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.QueryParamsResponse", len)?; - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryParamsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "params", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Params, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "params" => Ok(GeneratedField::Params), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryParamsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.auth.v1beta1.QueryParamsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut params__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); - } - params__ = map_.next_value()?; - } - } - } - Ok(QueryParamsResponse { - params: params__, - }) - } - } - deserializer.deserialize_struct("cosmos.auth.v1beta1.QueryParamsResponse", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.bank.module.v1.rs b/src/prost/cosmos.bank.module.v1.rs deleted file mode 100644 index fe1abca4..00000000 --- a/src/prost/cosmos.bank.module.v1.rs +++ /dev/null @@ -1,22 +0,0 @@ -/// Module is the config object of the bank module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Module { - /// blocked_module_accounts configures exceptional module accounts which should be blocked from receiving funds. - /// If left empty it defaults to the list of account names supplied in the auth module configuration as - /// module_account_permissions - #[prost(string, repeated, tag = "1")] - pub blocked_module_accounts_override: ::prost::alloc::vec::Vec< - ::prost::alloc::string::String, - >, - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} -impl ::prost::Name for Module { - const NAME: &'static str = "Module"; - const PACKAGE: &'static str = "cosmos.bank.module.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.module.v1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.bank.module.v1.serde.rs b/src/prost/cosmos.bank.module.v1.serde.rs deleted file mode 100644 index d9196d61..00000000 --- a/src/prost/cosmos.bank.module.v1.serde.rs +++ /dev/null @@ -1,109 +0,0 @@ -impl serde::Serialize for Module { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.module.v1.Module", len)?; - if true { - struct_ser.serialize_field("blockedModuleAccountsOverride", &self.blocked_module_accounts_override)?; - } - if true { - struct_ser.serialize_field("authority", &self.authority)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Module { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "blocked_module_accounts_override", - "blockedModuleAccountsOverride", - "authority", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - BlockedModuleAccountsOverride, - Authority, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "blockedModuleAccountsOverride" | "blocked_module_accounts_override" => Ok(GeneratedField::BlockedModuleAccountsOverride), - "authority" => Ok(GeneratedField::Authority), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Module; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.module.v1.Module") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut blocked_module_accounts_override__ = None; - let mut authority__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::BlockedModuleAccountsOverride => { - if blocked_module_accounts_override__.is_some() { - return Err(serde::de::Error::duplicate_field("blockedModuleAccountsOverride")); - } - blocked_module_accounts_override__ = Some(map_.next_value()?); - } - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); - } - authority__ = Some(map_.next_value()?); - } - } - } - Ok(Module { - blocked_module_accounts_override: blocked_module_accounts_override__.unwrap_or_default(), - authority: authority__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.module.v1.Module", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.bank.v1beta1.rs b/src/prost/cosmos.bank.v1beta1.rs deleted file mode 100644 index 842fd5c8..00000000 --- a/src/prost/cosmos.bank.v1beta1.rs +++ /dev/null @@ -1,2524 +0,0 @@ -/// Params defines the parameters for the bank module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// Deprecated: Use of SendEnabled in params is deprecated. - /// For genesis, use the newly added send_enabled field in the genesis object. - /// Storage, lookup, and manipulation of this information is now in the keeper. - /// - /// As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files. - #[deprecated] - #[prost(message, repeated, tag = "1")] - pub send_enabled: ::prost::alloc::vec::Vec, - #[prost(bool, tag = "2")] - pub default_send_enabled: bool, -} -impl ::prost::Name for Params { - const NAME: &'static str = "Params"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// SendEnabled maps coin denom to a send_enabled status (whether a denom is -/// sendable). -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SendEnabled { - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - #[prost(bool, tag = "2")] - pub enabled: bool, -} -impl ::prost::Name for SendEnabled { - const NAME: &'static str = "SendEnabled"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// Input models transaction input. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Input { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub coins: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Input { - const NAME: &'static str = "Input"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// Output models transaction outputs. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Output { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub coins: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Output { - const NAME: &'static str = "Output"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// Supply represents a struct that passively keeps track of the total supply -/// amounts in the network. -/// This message is deprecated now that supply is indexed by denom. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Supply { - #[prost(message, repeated, tag = "1")] - pub total: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Supply { - const NAME: &'static str = "Supply"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// DenomUnit represents a struct that describes a given -/// denomination unit of the basic token. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DenomUnit { - /// denom represents the string name of the given denom unit (e.g uatom). - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - /// exponent represents power of 10 exponent that one must - /// raise the base_denom to in order to equal the given DenomUnit's denom - /// 1 denom = 10^exponent base_denom - /// (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with - /// exponent = 6, thus: 1 atom = 10^6 uatom). - #[prost(uint32, tag = "2")] - pub exponent: u32, - /// aliases is a list of string aliases for the given denom - #[prost(string, repeated, tag = "3")] - pub aliases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for DenomUnit { - const NAME: &'static str = "DenomUnit"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// Metadata represents a struct that describes -/// a basic token. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Metadata { - #[prost(string, tag = "1")] - pub description: ::prost::alloc::string::String, - /// denom_units represents the list of DenomUnit's for a given coin - #[prost(message, repeated, tag = "2")] - pub denom_units: ::prost::alloc::vec::Vec, - /// base represents the base denom (should be the DenomUnit with exponent = 0). - #[prost(string, tag = "3")] - pub base: ::prost::alloc::string::String, - /// display indicates the suggested denom that should be - /// displayed in clients. - #[prost(string, tag = "4")] - pub display: ::prost::alloc::string::String, - /// name defines the name of the token (eg: Cosmos Atom) - /// - /// Since: cosmos-sdk 0.43 - #[prost(string, tag = "5")] - pub name: ::prost::alloc::string::String, - /// symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - /// be the same as the display. - /// - /// Since: cosmos-sdk 0.43 - #[prost(string, tag = "6")] - pub symbol: ::prost::alloc::string::String, - /// URI to a document (on or off-chain) that contains additional information. Optional. - /// - /// Since: cosmos-sdk 0.46 - #[prost(string, tag = "7")] - pub uri: ::prost::alloc::string::String, - /// URIHash is a sha256 hash of a document pointed by URI. It's used to verify that - /// the document didn't change. Optional. - /// - /// Since: cosmos-sdk 0.46 - #[prost(string, tag = "8")] - pub uri_hash: ::prost::alloc::string::String, -} -impl ::prost::Name for Metadata { - const NAME: &'static str = "Metadata"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// MsgSend represents a message to send coins from one account to another. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSend { - #[prost(string, tag = "1")] - pub from_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub to_address: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgSend { - const NAME: &'static str = "MsgSend"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// MsgSendResponse defines the Msg/Send response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSendResponse {} -impl ::prost::Name for MsgSendResponse { - const NAME: &'static str = "MsgSendResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// MsgMultiSend represents an arbitrary multi-in, multi-out send message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMultiSend { - /// Inputs, despite being `repeated`, only allows one sender input. This is - /// checked in MsgMultiSend's ValidateBasic. - #[prost(message, repeated, tag = "1")] - pub inputs: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub outputs: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgMultiSend { - const NAME: &'static str = "MsgMultiSend"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// MsgMultiSendResponse defines the Msg/MultiSend response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMultiSendResponse {} -impl ::prost::Name for MsgMultiSendResponse { - const NAME: &'static str = "MsgMultiSendResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/bank parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// MsgSetSendEnabled is the Msg/SetSendEnabled request type. -/// -/// Only entries to add/update/delete need to be included. -/// Existing SendEnabled entries that are not included in this -/// message are left unchanged. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSetSendEnabled { - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// send_enabled is the list of entries to add or update. - #[prost(message, repeated, tag = "2")] - pub send_enabled: ::prost::alloc::vec::Vec, - /// use_default_for is a list of denoms that should use the params.default_send_enabled value. - /// Denoms listed here will have their SendEnabled entries deleted. - /// If a denom is included that doesn't have a SendEnabled entry, - /// it will be ignored. - #[prost(string, repeated, tag = "3")] - pub use_default_for: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for MsgSetSendEnabled { - const NAME: &'static str = "MsgSetSendEnabled"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// MsgSetSendEnabledResponse defines the Msg/SetSendEnabled response type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSetSendEnabledResponse {} -impl ::prost::Name for MsgSetSendEnabledResponse { - const NAME: &'static str = "MsgSetSendEnabledResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Msg defines the bank Msg service. - #[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 - } - /// Send defines a method for sending coins from one account to another account. - pub async fn send( - &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.bank.v1beta1.Msg/Send", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "Send")); - self.inner.unary(req, path, codec).await - } - /// MultiSend defines a method for sending coins from some accounts to other accounts. - pub async fn multi_send( - &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.bank.v1beta1.Msg/MultiSend", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "MultiSend")); - self.inner.unary(req, path, codec).await - } - /// UpdateParams defines a governance operation for updating the x/bank module parameters. - /// The authority is defined in the keeper. - /// - /// Since: cosmos-sdk 0.47 - pub async fn update_params( - &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.bank.v1beta1.Msg/UpdateParams", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "UpdateParams")); - self.inner.unary(req, path, codec).await - } - /// SetSendEnabled is a governance operation for setting the SendEnabled flag - /// on any number of Denoms. Only the entries to add or update should be - /// included. Entries that already exist in the store, but that aren't - /// included in this message, will be left unchanged. - /// - /// Since: cosmos-sdk 0.47 - pub async fn set_send_enabled( - &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.bank.v1beta1.Msg/SetSendEnabled", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "SetSendEnabled")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -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 { - /// Send defines a method for sending coins from one account to another account. - async fn send( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - /// MultiSend defines a method for sending coins from some accounts to other accounts. - async fn multi_send( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// UpdateParams defines a governance operation for updating the x/bank module parameters. - /// The authority is defined in the keeper. - /// - /// Since: cosmos-sdk 0.47 - async fn update_params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// SetSendEnabled is a governance operation for setting the SendEnabled flag - /// on any number of Denoms. Only the entries to add or update should be - /// included. Entries that already exist in the store, but that aren't - /// included in this message, will be left unchanged. - /// - /// Since: cosmos-sdk 0.47 - async fn set_send_enabled( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Msg defines the bank Msg service. - #[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() { - "/cosmos.bank.v1beta1.Msg/Send" => { - #[allow(non_camel_case_types)] - struct SendSvc(pub Arc); - impl tonic::server::UnaryService - for SendSvc { - type Response = super::MsgSendResponse; - 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 { - ::send(&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 = SendSvc(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.bank.v1beta1.Msg/MultiSend" => { - #[allow(non_camel_case_types)] - struct MultiSendSvc(pub Arc); - impl tonic::server::UnaryService - for MultiSendSvc { - type Response = super::MsgMultiSendResponse; - 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 { - ::multi_send(&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 = MultiSendSvc(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.bank.v1beta1.Msg/UpdateParams" => { - #[allow(non_camel_case_types)] - struct UpdateParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateParamsSvc { - type Response = super::MsgUpdateParamsResponse; - 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 { - ::update_params(&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 = UpdateParamsSvc(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.bank.v1beta1.Msg/SetSendEnabled" => { - #[allow(non_camel_case_types)] - struct SetSendEnabledSvc(pub Arc); - impl tonic::server::UnaryService - for SetSendEnabledSvc { - type Response = super::MsgSetSendEnabledResponse; - 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 { - ::set_send_enabled(&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 = SetSendEnabledSvc(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 = "cosmos.bank.v1beta1.Msg"; - } -} -/// QueryBalanceRequest is the request type for the Query/Balance RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryBalanceRequest { - /// address is the address to query balances for. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// denom is the coin denom to query balances for. - #[prost(string, tag = "2")] - pub denom: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryBalanceRequest { - const NAME: &'static str = "QueryBalanceRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryBalanceResponse is the response type for the Query/Balance RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryBalanceResponse { - /// balance is the balance of the coin. - #[prost(message, optional, tag = "1")] - pub balance: ::core::option::Option, -} -impl ::prost::Name for QueryBalanceResponse { - const NAME: &'static str = "QueryBalanceResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryBalanceRequest is the request type for the Query/AllBalances RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllBalancesRequest { - /// address is the address to query balances for. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryAllBalancesRequest { - const NAME: &'static str = "QueryAllBalancesRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllBalancesResponse { - /// balances is the balances of all the coins. - #[prost(message, repeated, tag = "1")] - pub balances: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryAllBalancesResponse { - const NAME: &'static str = "QueryAllBalancesResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QuerySpendableBalancesRequest defines the gRPC request structure for querying -/// an account's spendable balances. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySpendableBalancesRequest { - /// address is the address to query spendable balances for. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QuerySpendableBalancesRequest { - const NAME: &'static str = "QuerySpendableBalancesRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QuerySpendableBalancesResponse defines the gRPC response structure for querying -/// an account's spendable balances. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySpendableBalancesResponse { - /// balances is the spendable balances of all the coins. - #[prost(message, repeated, tag = "1")] - pub balances: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QuerySpendableBalancesResponse { - const NAME: &'static str = "QuerySpendableBalancesResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QuerySpendableBalanceByDenomRequest defines the gRPC request structure for -/// querying an account's spendable balance for a specific denom. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySpendableBalanceByDenomRequest { - /// address is the address to query balances for. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// denom is the coin denom to query balances for. - #[prost(string, tag = "2")] - pub denom: ::prost::alloc::string::String, -} -impl ::prost::Name for QuerySpendableBalanceByDenomRequest { - const NAME: &'static str = "QuerySpendableBalanceByDenomRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QuerySpendableBalanceByDenomResponse defines the gRPC response structure for -/// querying an account's spendable balance for a specific denom. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySpendableBalanceByDenomResponse { - /// balance is the balance of the coin. - #[prost(message, optional, tag = "1")] - pub balance: ::core::option::Option, -} -impl ::prost::Name for QuerySpendableBalanceByDenomResponse { - const NAME: &'static str = "QuerySpendableBalanceByDenomResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTotalSupplyRequest { - /// pagination defines an optional pagination for the request. - /// - /// Since: cosmos-sdk 0.43 - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryTotalSupplyRequest { - const NAME: &'static str = "QueryTotalSupplyRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTotalSupplyResponse { - /// supply is the supply of the coins - #[prost(message, repeated, tag = "1")] - pub supply: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - /// - /// Since: cosmos-sdk 0.43 - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryTotalSupplyResponse { - const NAME: &'static str = "QueryTotalSupplyResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySupplyOfRequest { - /// denom is the coin denom to query balances for. - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, -} -impl ::prost::Name for QuerySupplyOfRequest { - const NAME: &'static str = "QuerySupplyOfRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySupplyOfResponse { - /// amount is the supply of the coin. - #[prost(message, optional, tag = "1")] - pub amount: ::core::option::Option, -} -impl ::prost::Name for QuerySupplyOfResponse { - const NAME: &'static str = "QuerySupplyOfResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryParamsRequest defines the request type for querying x/bank parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryParamsResponse defines the response type for querying x/bank parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomsMetadataRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryDenomsMetadataRequest { - const NAME: &'static str = "QueryDenomsMetadataRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomsMetadataResponse { - /// metadata provides the client information for all the registered tokens. - #[prost(message, repeated, tag = "1")] - pub metadatas: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryDenomsMetadataResponse { - const NAME: &'static str = "QueryDenomsMetadataResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomMetadataRequest { - /// denom is the coin denom to query the metadata for. - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryDenomMetadataRequest { - const NAME: &'static str = "QueryDenomMetadataRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomMetadataResponse { - /// metadata describes and provides all the client information for the requested token. - #[prost(message, optional, tag = "1")] - pub metadata: ::core::option::Option, -} -impl ::prost::Name for QueryDenomMetadataResponse { - const NAME: &'static str = "QueryDenomMetadataResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, -/// which queries for a paginated set of all account holders of a particular -/// denomination. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomOwnersRequest { - /// denom defines the coin denomination to query all account holders for. - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryDenomOwnersRequest { - const NAME: &'static str = "QueryDenomOwnersRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// DenomOwner defines structure representing an account that owns or holds a -/// particular denominated token. It contains the account address and account -/// balance of the denominated token. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DenomOwner { - /// address defines the address that owns a particular denomination. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// balance is the balance of the denominated coin for an account. - #[prost(message, optional, tag = "2")] - pub balance: ::core::option::Option, -} -impl ::prost::Name for DenomOwner { - const NAME: &'static str = "DenomOwner"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomOwnersResponse { - #[prost(message, repeated, tag = "1")] - pub denom_owners: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryDenomOwnersResponse { - const NAME: &'static str = "QueryDenomOwnersResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QuerySendEnabledRequest defines the RPC request for looking up SendEnabled entries. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySendEnabledRequest { - /// denoms is the specific denoms you want look up. Leave empty to get all entries. - #[prost(string, repeated, tag = "1")] - pub denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// pagination defines an optional pagination for the request. This field is - /// only read if the denoms field is empty. - #[prost(message, optional, tag = "99")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QuerySendEnabledRequest { - const NAME: &'static str = "QuerySendEnabledRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QuerySendEnabledResponse defines the RPC response of a SendEnable query. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySendEnabledResponse { - #[prost(message, repeated, tag = "1")] - pub send_enabled: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. This field is only - /// populated if the denoms field in the request is empty. - #[prost(message, optional, tag = "99")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QuerySendEnabledResponse { - const NAME: &'static str = "QuerySendEnabledResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Query defines the gRPC querier service. - #[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 - } - /// Balance queries the balance of a single coin for a single account. - pub async fn balance( - &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.bank.v1beta1.Query/Balance", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "Balance")); - self.inner.unary(req, path, codec).await - } - /// AllBalances queries the balance of all coins for a single account. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn all_balances( - &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.bank.v1beta1.Query/AllBalances", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "AllBalances")); - self.inner.unary(req, path, codec).await - } - /// SpendableBalances queries the spendable balance of all coins for a single - /// account. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - /// - /// Since: cosmos-sdk 0.46 - pub async fn spendable_balances( - &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.bank.v1beta1.Query/SpendableBalances", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.bank.v1beta1.Query", "SpendableBalances"), - ); - self.inner.unary(req, path, codec).await - } - /// SpendableBalanceByDenom queries the spendable balance of a single denom for - /// a single account. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - /// - /// Since: cosmos-sdk 0.47 - pub async fn spendable_balance_by_denom( - &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.bank.v1beta1.Query/SpendableBalanceByDenom", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.bank.v1beta1.Query", - "SpendableBalanceByDenom", - ), - ); - self.inner.unary(req, path, codec).await - } - /// TotalSupply queries the total supply of all coins. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn total_supply( - &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.bank.v1beta1.Query/TotalSupply", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "TotalSupply")); - self.inner.unary(req, path, codec).await - } - /// SupplyOf queries the supply of a single coin. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn supply_of( - &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.bank.v1beta1.Query/SupplyOf", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "SupplyOf")); - self.inner.unary(req, path, codec).await - } - /// Params queries the parameters of x/bank module. - pub async fn params( - &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.bank.v1beta1.Query/Params", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "Params")); - self.inner.unary(req, path, codec).await - } - /// DenomsMetadata queries the client metadata of a given coin denomination. - pub async fn denom_metadata( - &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.bank.v1beta1.Query/DenomMetadata", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "DenomMetadata")); - self.inner.unary(req, path, codec).await - } - /// DenomsMetadata queries the client metadata for all registered coin - /// denominations. - pub async fn denoms_metadata( - &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.bank.v1beta1.Query/DenomsMetadata", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "DenomsMetadata")); - self.inner.unary(req, path, codec).await - } - /// DenomOwners queries for all account addresses that own a particular token - /// denomination. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - /// - /// Since: cosmos-sdk 0.46 - pub async fn denom_owners( - &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.bank.v1beta1.Query/DenomOwners", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "DenomOwners")); - self.inner.unary(req, path, codec).await - } - /// SendEnabled queries for SendEnabled entries. - /// - /// This query only returns denominations that have specific SendEnabled settings. - /// Any denomination that does not have a specific setting will use the default - /// params.default_send_enabled, and will not be returned by this query. - /// - /// Since: cosmos-sdk 0.47 - pub async fn send_enabled( - &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.bank.v1beta1.Query/SendEnabled", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "SendEnabled")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -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 { - /// Balance queries the balance of a single coin for a single account. - async fn balance( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// AllBalances queries the balance of all coins for a single account. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn all_balances( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// SpendableBalances queries the spendable balance of all coins for a single - /// account. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - /// - /// Since: cosmos-sdk 0.46 - async fn spendable_balances( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// SpendableBalanceByDenom queries the spendable balance of a single denom for - /// a single account. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - /// - /// Since: cosmos-sdk 0.47 - async fn spendable_balance_by_denom( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// TotalSupply queries the total supply of all coins. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn total_supply( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// SupplyOf queries the supply of a single coin. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn supply_of( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Params queries the parameters of x/bank module. - async fn params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// DenomsMetadata queries the client metadata of a given coin denomination. - async fn denom_metadata( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// DenomsMetadata queries the client metadata for all registered coin - /// denominations. - async fn denoms_metadata( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// DenomOwners queries for all account addresses that own a particular token - /// denomination. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - /// - /// Since: cosmos-sdk 0.46 - async fn denom_owners( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// SendEnabled queries for SendEnabled entries. - /// - /// This query only returns denominations that have specific SendEnabled settings. - /// Any denomination that does not have a specific setting will use the default - /// params.default_send_enabled, and will not be returned by this query. - /// - /// Since: cosmos-sdk 0.47 - async fn send_enabled( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Query defines the gRPC querier service. - #[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() { - "/cosmos.bank.v1beta1.Query/Balance" => { - #[allow(non_camel_case_types)] - struct BalanceSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for BalanceSvc { - type Response = super::QueryBalanceResponse; - 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 { - ::balance(&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 = BalanceSvc(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.bank.v1beta1.Query/AllBalances" => { - #[allow(non_camel_case_types)] - struct AllBalancesSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for AllBalancesSvc { - type Response = super::QueryAllBalancesResponse; - 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 { - ::all_balances(&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 = AllBalancesSvc(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.bank.v1beta1.Query/SpendableBalances" => { - #[allow(non_camel_case_types)] - struct SpendableBalancesSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for SpendableBalancesSvc { - type Response = super::QuerySpendableBalancesResponse; - 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 { - ::spendable_balances(&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 = SpendableBalancesSvc(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.bank.v1beta1.Query/SpendableBalanceByDenom" => { - #[allow(non_camel_case_types)] - struct SpendableBalanceByDenomSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService< - super::QuerySpendableBalanceByDenomRequest, - > for SpendableBalanceByDenomSvc { - type Response = super::QuerySpendableBalanceByDenomResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::QuerySpendableBalanceByDenomRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::spendable_balance_by_denom(&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 = SpendableBalanceByDenomSvc(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.bank.v1beta1.Query/TotalSupply" => { - #[allow(non_camel_case_types)] - struct TotalSupplySvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for TotalSupplySvc { - type Response = super::QueryTotalSupplyResponse; - 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 { - ::total_supply(&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 = TotalSupplySvc(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.bank.v1beta1.Query/SupplyOf" => { - #[allow(non_camel_case_types)] - struct SupplyOfSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for SupplyOfSvc { - type Response = super::QuerySupplyOfResponse; - 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 { - ::supply_of(&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 = SupplyOfSvc(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.bank.v1beta1.Query/Params" => { - #[allow(non_camel_case_types)] - struct ParamsSvc(pub Arc); - impl tonic::server::UnaryService - for ParamsSvc { - type Response = super::QueryParamsResponse; - 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 { - ::params(&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 = ParamsSvc(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.bank.v1beta1.Query/DenomMetadata" => { - #[allow(non_camel_case_types)] - struct DenomMetadataSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DenomMetadataSvc { - type Response = super::QueryDenomMetadataResponse; - 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 { - ::denom_metadata(&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 = DenomMetadataSvc(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.bank.v1beta1.Query/DenomsMetadata" => { - #[allow(non_camel_case_types)] - struct DenomsMetadataSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DenomsMetadataSvc { - type Response = super::QueryDenomsMetadataResponse; - 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 { - ::denoms_metadata(&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 = DenomsMetadataSvc(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.bank.v1beta1.Query/DenomOwners" => { - #[allow(non_camel_case_types)] - struct DenomOwnersSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DenomOwnersSvc { - type Response = super::QueryDenomOwnersResponse; - 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 { - ::denom_owners(&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 = DenomOwnersSvc(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.bank.v1beta1.Query/SendEnabled" => { - #[allow(non_camel_case_types)] - struct SendEnabledSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for SendEnabledSvc { - type Response = super::QuerySendEnabledResponse; - 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 { - ::send_enabled(&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 = SendEnabledSvc(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 = "cosmos.bank.v1beta1.Query"; - } -} -/// SendAuthorization allows the grantee to spend up to spend_limit coins from -/// the granter's account. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SendAuthorization { - #[prost(message, repeated, tag = "1")] - pub spend_limit: ::prost::alloc::vec::Vec, - /// allow_list specifies an optional list of addresses to whom the grantee can send tokens on behalf of the - /// granter. If omitted, any recipient is allowed. - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, repeated, tag = "2")] - pub allow_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for SendAuthorization { - const NAME: &'static str = "SendAuthorization"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// GenesisState defines the bank module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// params defines all the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// balances is an array containing the balances of all the accounts. - #[prost(message, repeated, tag = "2")] - pub balances: ::prost::alloc::vec::Vec, - /// supply represents the total supply. If it is left empty, then supply will be calculated based on the provided - /// balances. Otherwise, it will be used to validate that the sum of the balances equals this amount. - #[prost(message, repeated, tag = "3")] - pub supply: ::prost::alloc::vec::Vec, - /// denom_metadata defines the metadata of the different coins. - #[prost(message, repeated, tag = "4")] - pub denom_metadata: ::prost::alloc::vec::Vec, - /// send_enabled defines the denoms where send is enabled or disabled. - /// - /// Since: cosmos-sdk 0.47 - #[prost(message, repeated, tag = "5")] - pub send_enabled: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// Balance defines an account address and balance pair used in the bank module's -/// genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Balance { - /// address is the address of the balance holder. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// coins defines the different coins this balance holds. - #[prost(message, repeated, tag = "2")] - pub coins: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Balance { - const NAME: &'static str = "Balance"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.bank.v1beta1.serde.rs b/src/prost/cosmos.bank.v1beta1.serde.rs deleted file mode 100644 index 6fc304d4..00000000 --- a/src/prost/cosmos.bank.v1beta1.serde.rs +++ /dev/null @@ -1,4293 +0,0 @@ -impl serde::Serialize for Balance { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.Balance", len)?; - if true { - struct_ser.serialize_field("address", &self.address)?; - } - if true { - struct_ser.serialize_field("coins", &self.coins)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Balance { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - "coins", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - Coins, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "coins" => Ok(GeneratedField::Coins), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Balance; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.Balance") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut coins__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } - GeneratedField::Coins => { - if coins__.is_some() { - return Err(serde::de::Error::duplicate_field("coins")); - } - coins__ = Some(map_.next_value()?); - } - } - } - Ok(Balance { - address: address__.unwrap_or_default(), - coins: coins__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.Balance", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for DenomOwner { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.DenomOwner", len)?; - if true { - struct_ser.serialize_field("address", &self.address)?; - } - if let Some(v) = self.balance.as_ref() { - struct_ser.serialize_field("balance", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for DenomOwner { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - "balance", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - Balance, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "balance" => Ok(GeneratedField::Balance), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DenomOwner; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.DenomOwner") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut balance__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } - GeneratedField::Balance => { - if balance__.is_some() { - return Err(serde::de::Error::duplicate_field("balance")); - } - balance__ = map_.next_value()?; - } - } - } - Ok(DenomOwner { - address: address__.unwrap_or_default(), - balance: balance__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.DenomOwner", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for DenomUnit { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.DenomUnit", len)?; - if true { - struct_ser.serialize_field("denom", &self.denom)?; - } - if true { - struct_ser.serialize_field("exponent", &self.exponent)?; - } - if true { - struct_ser.serialize_field("aliases", &self.aliases)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for DenomUnit { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "denom", - "exponent", - "aliases", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Denom, - Exponent, - Aliases, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "denom" => Ok(GeneratedField::Denom), - "exponent" => Ok(GeneratedField::Exponent), - "aliases" => Ok(GeneratedField::Aliases), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DenomUnit; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.DenomUnit") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut denom__ = None; - let mut exponent__ = None; - let mut aliases__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Denom => { - if denom__.is_some() { - return Err(serde::de::Error::duplicate_field("denom")); - } - denom__ = Some(map_.next_value()?); - } - GeneratedField::Exponent => { - if exponent__.is_some() { - return Err(serde::de::Error::duplicate_field("exponent")); - } - exponent__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Aliases => { - if aliases__.is_some() { - return Err(serde::de::Error::duplicate_field("aliases")); - } - aliases__ = Some(map_.next_value()?); - } - } - } - Ok(DenomUnit { - denom: denom__.unwrap_or_default(), - exponent: exponent__.unwrap_or_default(), - aliases: aliases__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.DenomUnit", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GenesisState { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.GenesisState", len)?; - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; - } - if true { - struct_ser.serialize_field("balances", &self.balances)?; - } - if true { - struct_ser.serialize_field("supply", &self.supply)?; - } - if true { - struct_ser.serialize_field("denomMetadata", &self.denom_metadata)?; - } - if true { - struct_ser.serialize_field("sendEnabled", &self.send_enabled)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GenesisState { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "params", - "balances", - "supply", - "denom_metadata", - "denomMetadata", - "send_enabled", - "sendEnabled", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Params, - Balances, - Supply, - DenomMetadata, - SendEnabled, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "params" => Ok(GeneratedField::Params), - "balances" => Ok(GeneratedField::Balances), - "supply" => Ok(GeneratedField::Supply), - "denomMetadata" | "denom_metadata" => Ok(GeneratedField::DenomMetadata), - "sendEnabled" | "send_enabled" => Ok(GeneratedField::SendEnabled), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GenesisState; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.GenesisState") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut params__ = None; - let mut balances__ = None; - let mut supply__ = None; - let mut denom_metadata__ = None; - let mut send_enabled__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); - } - params__ = map_.next_value()?; - } - GeneratedField::Balances => { - if balances__.is_some() { - return Err(serde::de::Error::duplicate_field("balances")); - } - balances__ = Some(map_.next_value()?); - } - GeneratedField::Supply => { - if supply__.is_some() { - return Err(serde::de::Error::duplicate_field("supply")); - } - supply__ = Some(map_.next_value()?); - } - GeneratedField::DenomMetadata => { - if denom_metadata__.is_some() { - return Err(serde::de::Error::duplicate_field("denomMetadata")); - } - denom_metadata__ = Some(map_.next_value()?); - } - GeneratedField::SendEnabled => { - if send_enabled__.is_some() { - return Err(serde::de::Error::duplicate_field("sendEnabled")); - } - send_enabled__ = Some(map_.next_value()?); - } - } - } - Ok(GenesisState { - params: params__, - balances: balances__.unwrap_or_default(), - supply: supply__.unwrap_or_default(), - denom_metadata: denom_metadata__.unwrap_or_default(), - send_enabled: send_enabled__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.GenesisState", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Input { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.Input", len)?; - if true { - struct_ser.serialize_field("address", &self.address)?; - } - if true { - struct_ser.serialize_field("coins", &self.coins)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Input { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - "coins", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - Coins, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "coins" => Ok(GeneratedField::Coins), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Input; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.Input") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut coins__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } - GeneratedField::Coins => { - if coins__.is_some() { - return Err(serde::de::Error::duplicate_field("coins")); - } - coins__ = Some(map_.next_value()?); - } - } - } - Ok(Input { - address: address__.unwrap_or_default(), - coins: coins__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.Input", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Metadata { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.Metadata", len)?; - if true { - struct_ser.serialize_field("description", &self.description)?; - } - if true { - struct_ser.serialize_field("denomUnits", &self.denom_units)?; - } - if true { - struct_ser.serialize_field("base", &self.base)?; - } - if true { - struct_ser.serialize_field("display", &self.display)?; - } - if true { - struct_ser.serialize_field("name", &self.name)?; - } - if true { - struct_ser.serialize_field("symbol", &self.symbol)?; - } - if true { - struct_ser.serialize_field("uri", &self.uri)?; - } - if true { - struct_ser.serialize_field("uriHash", &self.uri_hash)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Metadata { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "description", - "denom_units", - "denomUnits", - "base", - "display", - "name", - "symbol", - "uri", - "uri_hash", - "uriHash", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Description, - DenomUnits, - Base, - Display, - Name, - Symbol, - Uri, - UriHash, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "description" => Ok(GeneratedField::Description), - "denomUnits" | "denom_units" => Ok(GeneratedField::DenomUnits), - "base" => Ok(GeneratedField::Base), - "display" => Ok(GeneratedField::Display), - "name" => Ok(GeneratedField::Name), - "symbol" => Ok(GeneratedField::Symbol), - "uri" => Ok(GeneratedField::Uri), - "uriHash" | "uri_hash" => Ok(GeneratedField::UriHash), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Metadata; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.Metadata") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut description__ = None; - let mut denom_units__ = None; - let mut base__ = None; - let mut display__ = None; - let mut name__ = None; - let mut symbol__ = None; - let mut uri__ = None; - let mut uri_hash__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); - } - description__ = Some(map_.next_value()?); - } - GeneratedField::DenomUnits => { - if denom_units__.is_some() { - return Err(serde::de::Error::duplicate_field("denomUnits")); - } - denom_units__ = Some(map_.next_value()?); - } - GeneratedField::Base => { - if base__.is_some() { - return Err(serde::de::Error::duplicate_field("base")); - } - base__ = Some(map_.next_value()?); - } - GeneratedField::Display => { - if display__.is_some() { - return Err(serde::de::Error::duplicate_field("display")); - } - display__ = Some(map_.next_value()?); - } - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - GeneratedField::Symbol => { - if symbol__.is_some() { - return Err(serde::de::Error::duplicate_field("symbol")); - } - symbol__ = Some(map_.next_value()?); - } - GeneratedField::Uri => { - if uri__.is_some() { - return Err(serde::de::Error::duplicate_field("uri")); - } - uri__ = Some(map_.next_value()?); - } - GeneratedField::UriHash => { - if uri_hash__.is_some() { - return Err(serde::de::Error::duplicate_field("uriHash")); - } - uri_hash__ = Some(map_.next_value()?); - } - } - } - Ok(Metadata { - description: description__.unwrap_or_default(), - denom_units: denom_units__.unwrap_or_default(), - base: base__.unwrap_or_default(), - display: display__.unwrap_or_default(), - name: name__.unwrap_or_default(), - symbol: symbol__.unwrap_or_default(), - uri: uri__.unwrap_or_default(), - uri_hash: uri_hash__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.Metadata", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgMultiSend { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.MsgMultiSend", len)?; - if true { - struct_ser.serialize_field("inputs", &self.inputs)?; - } - if true { - struct_ser.serialize_field("outputs", &self.outputs)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgMultiSend { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "inputs", - "outputs", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Inputs, - Outputs, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "inputs" => Ok(GeneratedField::Inputs), - "outputs" => Ok(GeneratedField::Outputs), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgMultiSend; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.MsgMultiSend") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut inputs__ = None; - let mut outputs__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Inputs => { - if inputs__.is_some() { - return Err(serde::de::Error::duplicate_field("inputs")); - } - inputs__ = Some(map_.next_value()?); - } - GeneratedField::Outputs => { - if outputs__.is_some() { - return Err(serde::de::Error::duplicate_field("outputs")); - } - outputs__ = Some(map_.next_value()?); - } - } - } - Ok(MsgMultiSend { - inputs: inputs__.unwrap_or_default(), - outputs: outputs__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.MsgMultiSend", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgMultiSendResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.MsgMultiSendResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgMultiSendResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgMultiSendResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.MsgMultiSendResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgMultiSendResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.MsgMultiSendResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgSend { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.MsgSend", len)?; - if true { - struct_ser.serialize_field("fromAddress", &self.from_address)?; - } - if true { - struct_ser.serialize_field("toAddress", &self.to_address)?; - } - if true { - struct_ser.serialize_field("amount", &self.amount)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgSend { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "from_address", - "fromAddress", - "to_address", - "toAddress", - "amount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - FromAddress, - ToAddress, - Amount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "fromAddress" | "from_address" => Ok(GeneratedField::FromAddress), - "toAddress" | "to_address" => Ok(GeneratedField::ToAddress), - "amount" => Ok(GeneratedField::Amount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgSend; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.MsgSend") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut from_address__ = None; - let mut to_address__ = None; - let mut amount__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::FromAddress => { - if from_address__.is_some() { - return Err(serde::de::Error::duplicate_field("fromAddress")); - } - from_address__ = Some(map_.next_value()?); - } - GeneratedField::ToAddress => { - if to_address__.is_some() { - return Err(serde::de::Error::duplicate_field("toAddress")); - } - to_address__ = Some(map_.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = Some(map_.next_value()?); - } - } - } - Ok(MsgSend { - from_address: from_address__.unwrap_or_default(), - to_address: to_address__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.MsgSend", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgSendResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.MsgSendResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgSendResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgSendResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.MsgSendResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgSendResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.MsgSendResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgSetSendEnabled { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.MsgSetSendEnabled", len)?; - if true { - struct_ser.serialize_field("authority", &self.authority)?; - } - if true { - struct_ser.serialize_field("sendEnabled", &self.send_enabled)?; - } - if true { - struct_ser.serialize_field("useDefaultFor", &self.use_default_for)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgSetSendEnabled { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "authority", - "send_enabled", - "sendEnabled", - "use_default_for", - "useDefaultFor", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authority, - SendEnabled, - UseDefaultFor, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "authority" => Ok(GeneratedField::Authority), - "sendEnabled" | "send_enabled" => Ok(GeneratedField::SendEnabled), - "useDefaultFor" | "use_default_for" => Ok(GeneratedField::UseDefaultFor), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgSetSendEnabled; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.MsgSetSendEnabled") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut authority__ = None; - let mut send_enabled__ = None; - let mut use_default_for__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); - } - authority__ = Some(map_.next_value()?); - } - GeneratedField::SendEnabled => { - if send_enabled__.is_some() { - return Err(serde::de::Error::duplicate_field("sendEnabled")); - } - send_enabled__ = Some(map_.next_value()?); - } - GeneratedField::UseDefaultFor => { - if use_default_for__.is_some() { - return Err(serde::de::Error::duplicate_field("useDefaultFor")); - } - use_default_for__ = Some(map_.next_value()?); - } - } - } - Ok(MsgSetSendEnabled { - authority: authority__.unwrap_or_default(), - send_enabled: send_enabled__.unwrap_or_default(), - use_default_for: use_default_for__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.MsgSetSendEnabled", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgSetSendEnabledResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.MsgSetSendEnabledResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgSetSendEnabledResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgSetSendEnabledResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.MsgSetSendEnabledResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgSetSendEnabledResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.MsgSetSendEnabledResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgUpdateParams { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.MsgUpdateParams", len)?; - if true { - struct_ser.serialize_field("authority", &self.authority)?; - } - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgUpdateParams { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "authority", - "params", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authority, - Params, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "authority" => Ok(GeneratedField::Authority), - "params" => Ok(GeneratedField::Params), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateParams; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.MsgUpdateParams") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut authority__ = None; - let mut params__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); - } - authority__ = Some(map_.next_value()?); - } - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); - } - params__ = map_.next_value()?; - } - } - } - Ok(MsgUpdateParams { - authority: authority__.unwrap_or_default(), - params: params__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.MsgUpdateParams", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgUpdateParamsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.MsgUpdateParamsResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgUpdateParamsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateParamsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.MsgUpdateParamsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgUpdateParamsResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.MsgUpdateParamsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Output { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.Output", len)?; - if true { - struct_ser.serialize_field("address", &self.address)?; - } - if true { - struct_ser.serialize_field("coins", &self.coins)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Output { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - "coins", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - Coins, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "coins" => Ok(GeneratedField::Coins), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Output; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.Output") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut coins__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } - GeneratedField::Coins => { - if coins__.is_some() { - return Err(serde::de::Error::duplicate_field("coins")); - } - coins__ = Some(map_.next_value()?); - } - } - } - Ok(Output { - address: address__.unwrap_or_default(), - coins: coins__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.Output", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Params { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.Params", len)?; - if true { - struct_ser.serialize_field("sendEnabled", &self.send_enabled)?; - } - if true { - struct_ser.serialize_field("defaultSendEnabled", &self.default_send_enabled)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Params { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "send_enabled", - "sendEnabled", - "default_send_enabled", - "defaultSendEnabled", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - SendEnabled, - DefaultSendEnabled, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "sendEnabled" | "send_enabled" => Ok(GeneratedField::SendEnabled), - "defaultSendEnabled" | "default_send_enabled" => Ok(GeneratedField::DefaultSendEnabled), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Params; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.Params") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut send_enabled__ = None; - let mut default_send_enabled__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::SendEnabled => { - if send_enabled__.is_some() { - return Err(serde::de::Error::duplicate_field("sendEnabled")); - } - send_enabled__ = Some(map_.next_value()?); - } - GeneratedField::DefaultSendEnabled => { - if default_send_enabled__.is_some() { - return Err(serde::de::Error::duplicate_field("defaultSendEnabled")); - } - default_send_enabled__ = Some(map_.next_value()?); - } - } - } - Ok(Params { - send_enabled: send_enabled__.unwrap_or_default(), - default_send_enabled: default_send_enabled__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.Params", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryAllBalancesRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryAllBalancesRequest", len)?; - if true { - struct_ser.serialize_field("address", &self.address)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryAllBalancesRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAllBalancesRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QueryAllBalancesRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryAllBalancesRequest { - address: address__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryAllBalancesRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryAllBalancesResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryAllBalancesResponse", len)?; - if true { - struct_ser.serialize_field("balances", &self.balances)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryAllBalancesResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "balances", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Balances, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "balances" => Ok(GeneratedField::Balances), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAllBalancesResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QueryAllBalancesResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut balances__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Balances => { - if balances__.is_some() { - return Err(serde::de::Error::duplicate_field("balances")); - } - balances__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryAllBalancesResponse { - balances: balances__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryAllBalancesResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryBalanceRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryBalanceRequest", len)?; - if true { - struct_ser.serialize_field("address", &self.address)?; - } - if true { - struct_ser.serialize_field("denom", &self.denom)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - "denom", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - Denom, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "denom" => Ok(GeneratedField::Denom), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryBalanceRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QueryBalanceRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut denom__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } - GeneratedField::Denom => { - if denom__.is_some() { - return Err(serde::de::Error::duplicate_field("denom")); - } - denom__ = Some(map_.next_value()?); - } - } - } - Ok(QueryBalanceRequest { - address: address__.unwrap_or_default(), - denom: denom__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryBalanceRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryBalanceResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryBalanceResponse", len)?; - if let Some(v) = self.balance.as_ref() { - struct_ser.serialize_field("balance", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "balance", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Balance, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "balance" => Ok(GeneratedField::Balance), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryBalanceResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QueryBalanceResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut balance__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Balance => { - if balance__.is_some() { - return Err(serde::de::Error::duplicate_field("balance")); - } - balance__ = map_.next_value()?; - } - } - } - Ok(QueryBalanceResponse { - balance: balance__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryBalanceResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDenomMetadataRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomMetadataRequest", len)?; - if true { - struct_ser.serialize_field("denom", &self.denom)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDenomMetadataRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "denom", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Denom, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "denom" => Ok(GeneratedField::Denom), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDenomMetadataRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomMetadataRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut denom__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Denom => { - if denom__.is_some() { - return Err(serde::de::Error::duplicate_field("denom")); - } - denom__ = Some(map_.next_value()?); - } - } - } - Ok(QueryDenomMetadataRequest { - denom: denom__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryDenomMetadataRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDenomMetadataResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomMetadataResponse", len)?; - if let Some(v) = self.metadata.as_ref() { - struct_ser.serialize_field("metadata", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDenomMetadataResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "metadata", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Metadata, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "metadata" => Ok(GeneratedField::Metadata), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDenomMetadataResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomMetadataResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut metadata__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Metadata => { - if metadata__.is_some() { - return Err(serde::de::Error::duplicate_field("metadata")); - } - metadata__ = map_.next_value()?; - } - } - } - Ok(QueryDenomMetadataResponse { - metadata: metadata__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryDenomMetadataResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDenomOwnersRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomOwnersRequest", len)?; - if true { - struct_ser.serialize_field("denom", &self.denom)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDenomOwnersRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "denom", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Denom, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "denom" => Ok(GeneratedField::Denom), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDenomOwnersRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomOwnersRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut denom__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Denom => { - if denom__.is_some() { - return Err(serde::de::Error::duplicate_field("denom")); - } - denom__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryDenomOwnersRequest { - denom: denom__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryDenomOwnersRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDenomOwnersResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomOwnersResponse", len)?; - if true { - struct_ser.serialize_field("denomOwners", &self.denom_owners)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDenomOwnersResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "denom_owners", - "denomOwners", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DenomOwners, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "denomOwners" | "denom_owners" => Ok(GeneratedField::DenomOwners), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDenomOwnersResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomOwnersResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut denom_owners__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DenomOwners => { - if denom_owners__.is_some() { - return Err(serde::de::Error::duplicate_field("denomOwners")); - } - denom_owners__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryDenomOwnersResponse { - denom_owners: denom_owners__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryDenomOwnersResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDenomsMetadataRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomsMetadataRequest", len)?; - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDenomsMetadataRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomsMetadataRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryDenomsMetadataRequest { - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryDenomsMetadataRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDenomsMetadataResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomsMetadataResponse", len)?; - if true { - struct_ser.serialize_field("metadatas", &self.metadatas)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "metadatas", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Metadatas, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "metadatas" => Ok(GeneratedField::Metadatas), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDenomsMetadataResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomsMetadataResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut metadatas__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Metadatas => { - if metadatas__.is_some() { - return Err(serde::de::Error::duplicate_field("metadatas")); - } - metadatas__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryDenomsMetadataResponse { - metadatas: metadatas__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryDenomsMetadataResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryParamsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryParamsRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryParamsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryParamsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QueryParamsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(QueryParamsRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryParamsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryParamsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryParamsResponse", len)?; - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryParamsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "params", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Params, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "params" => Ok(GeneratedField::Params), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryParamsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QueryParamsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut params__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); - } - params__ = map_.next_value()?; - } - } - } - Ok(QueryParamsResponse { - params: params__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryParamsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QuerySendEnabledRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QuerySendEnabledRequest", len)?; - if true { - struct_ser.serialize_field("denoms", &self.denoms)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QuerySendEnabledRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "denoms", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Denoms, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "denoms" => Ok(GeneratedField::Denoms), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QuerySendEnabledRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QuerySendEnabledRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut denoms__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Denoms => { - if denoms__.is_some() { - return Err(serde::de::Error::duplicate_field("denoms")); - } - denoms__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QuerySendEnabledRequest { - denoms: denoms__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QuerySendEnabledRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QuerySendEnabledResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QuerySendEnabledResponse", len)?; - if true { - struct_ser.serialize_field("sendEnabled", &self.send_enabled)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QuerySendEnabledResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "send_enabled", - "sendEnabled", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - SendEnabled, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "sendEnabled" | "send_enabled" => Ok(GeneratedField::SendEnabled), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QuerySendEnabledResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QuerySendEnabledResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut send_enabled__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::SendEnabled => { - if send_enabled__.is_some() { - return Err(serde::de::Error::duplicate_field("sendEnabled")); - } - send_enabled__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QuerySendEnabledResponse { - send_enabled: send_enabled__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QuerySendEnabledResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QuerySpendableBalanceByDenomRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest", len)?; - if true { - struct_ser.serialize_field("address", &self.address)?; - } - if true { - struct_ser.serialize_field("denom", &self.denom)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QuerySpendableBalanceByDenomRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - "denom", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - Denom, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "denom" => Ok(GeneratedField::Denom), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QuerySpendableBalanceByDenomRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut denom__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } - GeneratedField::Denom => { - if denom__.is_some() { - return Err(serde::de::Error::duplicate_field("denom")); - } - denom__ = Some(map_.next_value()?); - } - } - } - Ok(QuerySpendableBalanceByDenomRequest { - address: address__.unwrap_or_default(), - denom: denom__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QuerySpendableBalanceByDenomResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse", len)?; - if let Some(v) = self.balance.as_ref() { - struct_ser.serialize_field("balance", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QuerySpendableBalanceByDenomResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "balance", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Balance, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "balance" => Ok(GeneratedField::Balance), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QuerySpendableBalanceByDenomResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut balance__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Balance => { - if balance__.is_some() { - return Err(serde::de::Error::duplicate_field("balance")); - } - balance__ = map_.next_value()?; - } - } - } - Ok(QuerySpendableBalanceByDenomResponse { - balance: balance__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QuerySpendableBalancesRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QuerySpendableBalancesRequest", len)?; - if true { - struct_ser.serialize_field("address", &self.address)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QuerySpendableBalancesRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QuerySpendableBalancesRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QuerySpendableBalancesRequest { - address: address__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QuerySpendableBalancesRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QuerySpendableBalancesResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QuerySpendableBalancesResponse", len)?; - if true { - struct_ser.serialize_field("balances", &self.balances)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "balances", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Balances, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "balances" => Ok(GeneratedField::Balances), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QuerySpendableBalancesResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QuerySpendableBalancesResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut balances__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Balances => { - if balances__.is_some() { - return Err(serde::de::Error::duplicate_field("balances")); - } - balances__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QuerySpendableBalancesResponse { - balances: balances__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QuerySpendableBalancesResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QuerySupplyOfRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QuerySupplyOfRequest", len)?; - if true { - struct_ser.serialize_field("denom", &self.denom)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QuerySupplyOfRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "denom", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Denom, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "denom" => Ok(GeneratedField::Denom), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QuerySupplyOfRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QuerySupplyOfRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut denom__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Denom => { - if denom__.is_some() { - return Err(serde::de::Error::duplicate_field("denom")); - } - denom__ = Some(map_.next_value()?); - } - } - } - Ok(QuerySupplyOfRequest { - denom: denom__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QuerySupplyOfRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QuerySupplyOfResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QuerySupplyOfResponse", len)?; - if let Some(v) = self.amount.as_ref() { - struct_ser.serialize_field("amount", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QuerySupplyOfResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "amount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Amount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "amount" => Ok(GeneratedField::Amount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QuerySupplyOfResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QuerySupplyOfResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut amount__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = map_.next_value()?; - } - } - } - Ok(QuerySupplyOfResponse { - amount: amount__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QuerySupplyOfResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryTotalSupplyRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryTotalSupplyRequest", len)?; - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryTotalSupplyRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryTotalSupplyRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QueryTotalSupplyRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryTotalSupplyRequest { - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryTotalSupplyRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryTotalSupplyResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryTotalSupplyResponse", len)?; - if true { - struct_ser.serialize_field("supply", &self.supply)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryTotalSupplyResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "supply", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Supply, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "supply" => Ok(GeneratedField::Supply), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryTotalSupplyResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.QueryTotalSupplyResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut supply__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Supply => { - if supply__.is_some() { - return Err(serde::de::Error::duplicate_field("supply")); - } - supply__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryTotalSupplyResponse { - supply: supply__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryTotalSupplyResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SendAuthorization { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.SendAuthorization", len)?; - if true { - struct_ser.serialize_field("spendLimit", &self.spend_limit)?; - } - if true { - struct_ser.serialize_field("allowList", &self.allow_list)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SendAuthorization { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "spend_limit", - "spendLimit", - "allow_list", - "allowList", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - SpendLimit, - AllowList, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "spendLimit" | "spend_limit" => Ok(GeneratedField::SpendLimit), - "allowList" | "allow_list" => Ok(GeneratedField::AllowList), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SendAuthorization; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.SendAuthorization") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut spend_limit__ = None; - let mut allow_list__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::SpendLimit => { - if spend_limit__.is_some() { - return Err(serde::de::Error::duplicate_field("spendLimit")); - } - spend_limit__ = Some(map_.next_value()?); - } - GeneratedField::AllowList => { - if allow_list__.is_some() { - return Err(serde::de::Error::duplicate_field("allowList")); - } - allow_list__ = Some(map_.next_value()?); - } - } - } - Ok(SendAuthorization { - spend_limit: spend_limit__.unwrap_or_default(), - allow_list: allow_list__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.SendAuthorization", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SendEnabled { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.SendEnabled", len)?; - if true { - struct_ser.serialize_field("denom", &self.denom)?; - } - if true { - struct_ser.serialize_field("enabled", &self.enabled)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SendEnabled { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "denom", - "enabled", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Denom, - Enabled, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "denom" => Ok(GeneratedField::Denom), - "enabled" => Ok(GeneratedField::Enabled), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SendEnabled; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.SendEnabled") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut denom__ = None; - let mut enabled__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Denom => { - if denom__.is_some() { - return Err(serde::de::Error::duplicate_field("denom")); - } - denom__ = Some(map_.next_value()?); - } - GeneratedField::Enabled => { - if enabled__.is_some() { - return Err(serde::de::Error::duplicate_field("enabled")); - } - enabled__ = Some(map_.next_value()?); - } - } - } - Ok(SendEnabled { - denom: denom__.unwrap_or_default(), - enabled: enabled__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.SendEnabled", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Supply { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.Supply", len)?; - if true { - struct_ser.serialize_field("total", &self.total)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Supply { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "total", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Total, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "total" => Ok(GeneratedField::Total), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Supply; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.bank.v1beta1.Supply") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut total__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Total => { - if total__.is_some() { - return Err(serde::de::Error::duplicate_field("total")); - } - total__ = Some(map_.next_value()?); - } - } - } - Ok(Supply { - total: total__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.bank.v1beta1.Supply", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.base.abci.v1beta1.rs b/src/prost/cosmos.base.abci.v1beta1.rs deleted file mode 100644 index 1097a955..00000000 --- a/src/prost/cosmos.base.abci.v1beta1.rs +++ /dev/null @@ -1,253 +0,0 @@ -/// 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, - /// 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<::tendermint_proto::v0_34::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<::tendermint_proto::v0_34::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< - super::super::super::super::google::protobuf::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< - super::super::super::super::google::protobuf::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) - } -} diff --git a/src/prost/cosmos.base.kv.v1beta1.rs b/src/prost/cosmos.base.kv.v1beta1.rs deleted file mode 100644 index 6bd5f9c6..00000000 --- a/src/prost/cosmos.base.kv.v1beta1.rs +++ /dev/null @@ -1,30 +0,0 @@ -/// Pairs defines a repeated slice of Pair objects. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Pairs { - #[prost(message, repeated, tag = "1")] - pub pairs: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Pairs { - const NAME: &'static str = "Pairs"; - const PACKAGE: &'static str = "cosmos.base.kv.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.kv.v1beta1.{}", Self::NAME) - } -} -/// Pair defines a key/value bytes tuple. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Pair { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - pub value: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Pair { - const NAME: &'static str = "Pair"; - const PACKAGE: &'static str = "cosmos.base.kv.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.kv.v1beta1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.base.kv.v1beta1.serde.rs b/src/prost/cosmos.base.kv.v1beta1.serde.rs deleted file mode 100644 index 3e2ed8b5..00000000 --- a/src/prost/cosmos.base.kv.v1beta1.serde.rs +++ /dev/null @@ -1,205 +0,0 @@ -impl serde::Serialize for Pair { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.kv.v1beta1.Pair", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("value", pbjson::private::base64::encode(&self.value).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Pair { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - "value", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - Value, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - "value" => Ok(GeneratedField::Value), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Pair; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.kv.v1beta1.Pair") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - let mut value__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); - } - value__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(Pair { - key: key__.unwrap_or_default(), - value: value__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.kv.v1beta1.Pair", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Pairs { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.kv.v1beta1.Pairs", len)?; - if true { - struct_ser.serialize_field("pairs", &self.pairs)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Pairs { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "pairs", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Pairs, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "pairs" => Ok(GeneratedField::Pairs), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Pairs; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.kv.v1beta1.Pairs") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut pairs__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Pairs => { - if pairs__.is_some() { - return Err(serde::de::Error::duplicate_field("pairs")); - } - pairs__ = Some(map_.next_value()?); - } - } - } - Ok(Pairs { - pairs: pairs__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.kv.v1beta1.Pairs", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.base.node.v1beta1.rs b/src/prost/cosmos.base.node.v1beta1.rs deleted file mode 100644 index 69d16e40..00000000 --- a/src/prost/cosmos.base.node.v1beta1.rs +++ /dev/null @@ -1,316 +0,0 @@ -/// ConfigRequest defines the request structure for the Config gRPC query. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConfigRequest {} -impl ::prost::Name for ConfigRequest { - const NAME: &'static str = "ConfigRequest"; - const PACKAGE: &'static str = "cosmos.base.node.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.node.v1beta1.{}", Self::NAME) - } -} -/// ConfigResponse defines the response structure for the Config gRPC query. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConfigResponse { - #[prost(string, tag = "1")] - pub minimum_gas_price: ::prost::alloc::string::String, -} -impl ::prost::Name for ConfigResponse { - const NAME: &'static str = "ConfigResponse"; - const PACKAGE: &'static str = "cosmos.base.node.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.node.v1beta1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -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 the gRPC querier service for node related queries. - #[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 - } - /// Config queries for the operator configuration. - pub async fn config( - &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.base.node.v1beta1.Service/Config", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.base.node.v1beta1.Service", "Config")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -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 { - /// Config queries for the operator configuration. - async fn config( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - } - /// Service defines the gRPC querier service for node related queries. - #[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.base.node.v1beta1.Service/Config" => { - #[allow(non_camel_case_types)] - struct ConfigSvc(pub Arc); - impl tonic::server::UnaryService - for ConfigSvc { - type Response = super::ConfigResponse; - 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 { - ::config(&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 = ConfigSvc(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.base.node.v1beta1.Service"; - } -} diff --git a/src/prost/cosmos.base.node.v1beta1.serde.rs b/src/prost/cosmos.base.node.v1beta1.serde.rs deleted file mode 100644 index 24a688cd..00000000 --- a/src/prost/cosmos.base.node.v1beta1.serde.rs +++ /dev/null @@ -1,163 +0,0 @@ -impl serde::Serialize for ConfigRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.base.node.v1beta1.ConfigRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ConfigRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ConfigRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.node.v1beta1.ConfigRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(ConfigRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.base.node.v1beta1.ConfigRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ConfigResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.node.v1beta1.ConfigResponse", len)?; - if true { - struct_ser.serialize_field("minimumGasPrice", &self.minimum_gas_price)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ConfigResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "minimum_gas_price", - "minimumGasPrice", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - MinimumGasPrice, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "minimumGasPrice" | "minimum_gas_price" => Ok(GeneratedField::MinimumGasPrice), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ConfigResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.node.v1beta1.ConfigResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut minimum_gas_price__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::MinimumGasPrice => { - if minimum_gas_price__.is_some() { - return Err(serde::de::Error::duplicate_field("minimumGasPrice")); - } - minimum_gas_price__ = Some(map_.next_value()?); - } - } - } - Ok(ConfigResponse { - minimum_gas_price: minimum_gas_price__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.node.v1beta1.ConfigResponse", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.base.query.v1beta1.rs b/src/prost/cosmos.base.query.v1beta1.rs deleted file mode 100644 index 2a5124cf..00000000 --- a/src/prost/cosmos.base.query.v1beta1.rs +++ /dev/null @@ -1,70 +0,0 @@ -/// PageRequest is to be embedded in gRPC request messages for efficient -/// pagination. Ex: -/// -/// message SomeRequest { -/// Foo some_parameter = 1; -/// PageRequest pagination = 2; -/// } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PageRequest { - /// key is a value returned in PageResponse.next_key to begin - /// querying the next page most efficiently. Only one of offset or key - /// should be set. - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, - /// offset is a numeric offset that can be used when key is unavailable. - /// It is less efficient than using key. Only one of offset or key should - /// be set. - #[prost(uint64, tag = "2")] - pub offset: 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 = "3")] - pub limit: u64, - /// count_total is set to true to indicate that the result set should include - /// a count of the total number of items available for pagination in UIs. - /// count_total is only respected when offset is used. It is ignored when key - /// is set. - #[prost(bool, tag = "4")] - pub count_total: bool, - /// reverse is set to true if results are to be returned in the descending order. - /// - /// Since: cosmos-sdk 0.43 - #[prost(bool, tag = "5")] - pub reverse: bool, -} -impl ::prost::Name for PageRequest { - const NAME: &'static str = "PageRequest"; - const PACKAGE: &'static str = "cosmos.base.query.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.query.v1beta1.{}", Self::NAME) - } -} -/// PageResponse is to be embedded in gRPC response messages where the -/// corresponding request message has used PageRequest. -/// -/// message SomeResponse { -/// repeated Bar results = 1; -/// PageResponse page = 2; -/// } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PageResponse { - /// next_key is the key to be passed to PageRequest.key to - /// query the next page most efficiently. It will be empty if - /// there are no more results. - #[prost(bytes = "vec", tag = "1")] - pub next_key: ::prost::alloc::vec::Vec, - /// total is total number of results available if PageRequest.count_total - /// was set, its value is undefined otherwise - #[prost(uint64, tag = "2")] - pub total: u64, -} -impl ::prost::Name for PageResponse { - const NAME: &'static str = "PageResponse"; - const PACKAGE: &'static str = "cosmos.base.query.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.query.v1beta1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.base.query.v1beta1.serde.rs b/src/prost/cosmos.base.query.v1beta1.serde.rs deleted file mode 100644 index b58155f7..00000000 --- a/src/prost/cosmos.base.query.v1beta1.serde.rs +++ /dev/null @@ -1,284 +0,0 @@ -impl serde::Serialize for PageRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.query.v1beta1.PageRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("offset", ::alloc::string::ToString::to_string(&self.offset).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("limit", ::alloc::string::ToString::to_string(&self.limit).as_str())?; - } - if true { - struct_ser.serialize_field("countTotal", &self.count_total)?; - } - if true { - struct_ser.serialize_field("reverse", &self.reverse)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PageRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - "offset", - "limit", - "count_total", - "countTotal", - "reverse", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - Offset, - Limit, - CountTotal, - Reverse, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - "offset" => Ok(GeneratedField::Offset), - "limit" => Ok(GeneratedField::Limit), - "countTotal" | "count_total" => Ok(GeneratedField::CountTotal), - "reverse" => Ok(GeneratedField::Reverse), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PageRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.query.v1beta1.PageRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - let mut offset__ = None; - let mut limit__ = None; - let mut count_total__ = None; - let mut reverse__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Offset => { - if offset__.is_some() { - return Err(serde::de::Error::duplicate_field("offset")); - } - offset__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Limit => { - if limit__.is_some() { - return Err(serde::de::Error::duplicate_field("limit")); - } - limit__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::CountTotal => { - if count_total__.is_some() { - return Err(serde::de::Error::duplicate_field("countTotal")); - } - count_total__ = Some(map_.next_value()?); - } - GeneratedField::Reverse => { - if reverse__.is_some() { - return Err(serde::de::Error::duplicate_field("reverse")); - } - reverse__ = Some(map_.next_value()?); - } - } - } - Ok(PageRequest { - key: key__.unwrap_or_default(), - offset: offset__.unwrap_or_default(), - limit: limit__.unwrap_or_default(), - count_total: count_total__.unwrap_or_default(), - reverse: reverse__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.query.v1beta1.PageRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for PageResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.query.v1beta1.PageResponse", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("nextKey", pbjson::private::base64::encode(&self.next_key).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("total", ::alloc::string::ToString::to_string(&self.total).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PageResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "next_key", - "nextKey", - "total", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - NextKey, - Total, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "nextKey" | "next_key" => Ok(GeneratedField::NextKey), - "total" => Ok(GeneratedField::Total), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PageResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.query.v1beta1.PageResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut next_key__ = None; - let mut total__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::NextKey => { - if next_key__.is_some() { - return Err(serde::de::Error::duplicate_field("nextKey")); - } - next_key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Total => { - if total__.is_some() { - return Err(serde::de::Error::duplicate_field("total")); - } - total__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(PageResponse { - next_key: next_key__.unwrap_or_default(), - total: total__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.query.v1beta1.PageResponse", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.base.reflection.v1beta1.rs b/src/prost/cosmos.base.reflection.v1beta1.rs deleted file mode 100644 index 09305595..00000000 --- a/src/prost/cosmos.base.reflection.v1beta1.rs +++ /dev/null @@ -1,461 +0,0 @@ -/// ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListAllInterfacesRequest {} -impl ::prost::Name for ListAllInterfacesRequest { - const NAME: &'static str = "ListAllInterfacesRequest"; - const PACKAGE: &'static str = "cosmos.base.reflection.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v1beta1.{}", Self::NAME) - } -} -/// ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListAllInterfacesResponse { - /// interface_names is an array of all the registered interfaces. - #[prost(string, repeated, tag = "1")] - pub interface_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for ListAllInterfacesResponse { - const NAME: &'static str = "ListAllInterfacesResponse"; - const PACKAGE: &'static str = "cosmos.base.reflection.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v1beta1.{}", Self::NAME) - } -} -/// ListImplementationsRequest is the request type of the ListImplementations -/// RPC. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListImplementationsRequest { - /// interface_name defines the interface to query the implementations for. - #[prost(string, tag = "1")] - pub interface_name: ::prost::alloc::string::String, -} -impl ::prost::Name for ListImplementationsRequest { - const NAME: &'static str = "ListImplementationsRequest"; - const PACKAGE: &'static str = "cosmos.base.reflection.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v1beta1.{}", Self::NAME) - } -} -/// ListImplementationsResponse is the response type of the ListImplementations -/// RPC. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListImplementationsResponse { - #[prost(string, repeated, tag = "1")] - pub implementation_message_names: ::prost::alloc::vec::Vec< - ::prost::alloc::string::String, - >, -} -impl ::prost::Name for ListImplementationsResponse { - const NAME: &'static str = "ListImplementationsResponse"; - const PACKAGE: &'static str = "cosmos.base.reflection.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v1beta1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod reflection_service_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// ReflectionService defines a service for interface reflection. - #[derive(Debug, Clone)] - pub struct ReflectionServiceClient { - inner: tonic::client::Grpc, - } - impl ReflectionServiceClient { - /// 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 ReflectionServiceClient - 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, - ) -> ReflectionServiceClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, - { - ReflectionServiceClient::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 - } - /// ListAllInterfaces lists all the interfaces registered in the interface - /// registry. - pub async fn list_all_interfaces( - &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.base.reflection.v1beta1.ReflectionService/ListAllInterfaces", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.base.reflection.v1beta1.ReflectionService", - "ListAllInterfaces", - ), - ); - self.inner.unary(req, path, codec).await - } - /// ListImplementations list all the concrete types that implement a given - /// interface. - pub async fn list_implementations( - &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.base.reflection.v1beta1.ReflectionService/ListImplementations", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.base.reflection.v1beta1.ReflectionService", - "ListImplementations", - ), - ); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -pub mod reflection_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 ReflectionServiceServer. - #[async_trait] - pub trait ReflectionService: Send + Sync + 'static { - /// ListAllInterfaces lists all the interfaces registered in the interface - /// registry. - async fn list_all_interfaces( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ListImplementations list all the concrete types that implement a given - /// interface. - async fn list_implementations( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// ReflectionService defines a service for interface reflection. - #[derive(Debug)] - pub struct ReflectionServiceServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - struct _Inner(Arc); - impl ReflectionServiceServer { - 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 ReflectionServiceServer - where - T: ReflectionService, - 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.base.reflection.v1beta1.ReflectionService/ListAllInterfaces" => { - #[allow(non_camel_case_types)] - struct ListAllInterfacesSvc(pub Arc); - impl< - T: ReflectionService, - > tonic::server::UnaryService - for ListAllInterfacesSvc { - type Response = super::ListAllInterfacesResponse; - 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_all_interfaces( - &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 = ListAllInterfacesSvc(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.base.reflection.v1beta1.ReflectionService/ListImplementations" => { - #[allow(non_camel_case_types)] - struct ListImplementationsSvc(pub Arc); - impl< - T: ReflectionService, - > tonic::server::UnaryService - for ListImplementationsSvc { - type Response = super::ListImplementationsResponse; - 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_implementations( - &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 = ListImplementationsSvc(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 ReflectionServiceServer { - 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 ReflectionServiceServer { - const NAME: &'static str = "cosmos.base.reflection.v1beta1.ReflectionService"; - } -} diff --git a/src/prost/cosmos.base.reflection.v1beta1.serde.rs b/src/prost/cosmos.base.reflection.v1beta1.serde.rs deleted file mode 100644 index 731bbdf0..00000000 --- a/src/prost/cosmos.base.reflection.v1beta1.serde.rs +++ /dev/null @@ -1,347 +0,0 @@ -impl serde::Serialize for ListAllInterfacesRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.base.reflection.v1beta1.ListAllInterfacesRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ListAllInterfacesRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ListAllInterfacesRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v1beta1.ListAllInterfacesRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(ListAllInterfacesRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v1beta1.ListAllInterfacesRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ListAllInterfacesResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v1beta1.ListAllInterfacesResponse", len)?; - if true { - struct_ser.serialize_field("interfaceNames", &self.interface_names)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ListAllInterfacesResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "interface_names", - "interfaceNames", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - InterfaceNames, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "interfaceNames" | "interface_names" => Ok(GeneratedField::InterfaceNames), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ListAllInterfacesResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v1beta1.ListAllInterfacesResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut interface_names__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::InterfaceNames => { - if interface_names__.is_some() { - return Err(serde::de::Error::duplicate_field("interfaceNames")); - } - interface_names__ = Some(map_.next_value()?); - } - } - } - Ok(ListAllInterfacesResponse { - interface_names: interface_names__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v1beta1.ListAllInterfacesResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ListImplementationsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v1beta1.ListImplementationsRequest", len)?; - if true { - struct_ser.serialize_field("interfaceName", &self.interface_name)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ListImplementationsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "interface_name", - "interfaceName", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - InterfaceName, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "interfaceName" | "interface_name" => Ok(GeneratedField::InterfaceName), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ListImplementationsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v1beta1.ListImplementationsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut interface_name__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::InterfaceName => { - if interface_name__.is_some() { - return Err(serde::de::Error::duplicate_field("interfaceName")); - } - interface_name__ = Some(map_.next_value()?); - } - } - } - Ok(ListImplementationsRequest { - interface_name: interface_name__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v1beta1.ListImplementationsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ListImplementationsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v1beta1.ListImplementationsResponse", len)?; - if true { - struct_ser.serialize_field("implementationMessageNames", &self.implementation_message_names)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ListImplementationsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "implementation_message_names", - "implementationMessageNames", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ImplementationMessageNames, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "implementationMessageNames" | "implementation_message_names" => Ok(GeneratedField::ImplementationMessageNames), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ListImplementationsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v1beta1.ListImplementationsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut implementation_message_names__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ImplementationMessageNames => { - if implementation_message_names__.is_some() { - return Err(serde::de::Error::duplicate_field("implementationMessageNames")); - } - implementation_message_names__ = Some(map_.next_value()?); - } - } - } - Ok(ListImplementationsResponse { - implementation_message_names: implementation_message_names__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v1beta1.ListImplementationsResponse", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.base.reflection.v2alpha1.rs b/src/prost/cosmos.base.reflection.v2alpha1.rs deleted file mode 100644 index ec09ac3a..00000000 --- a/src/prost/cosmos.base.reflection.v2alpha1.rs +++ /dev/null @@ -1,1197 +0,0 @@ -/// AppDescriptor describes a cosmos-sdk based application -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AppDescriptor { - /// AuthnDescriptor provides information on how to authenticate transactions on the application - /// NOTE: experimental and subject to change in future releases. - #[prost(message, optional, tag = "1")] - pub authn: ::core::option::Option, - /// chain provides the chain descriptor - #[prost(message, optional, tag = "2")] - pub chain: ::core::option::Option, - /// codec provides metadata information regarding codec related types - #[prost(message, optional, tag = "3")] - pub codec: ::core::option::Option, - /// configuration provides metadata information regarding the sdk.Config type - #[prost(message, optional, tag = "4")] - pub configuration: ::core::option::Option, - /// query_services provides metadata information regarding the available queriable endpoints - #[prost(message, optional, tag = "5")] - pub query_services: ::core::option::Option, - /// tx provides metadata information regarding how to send transactions to the given application - #[prost(message, optional, tag = "6")] - pub tx: ::core::option::Option, -} -impl ::prost::Name for AppDescriptor { - const NAME: &'static str = "AppDescriptor"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// TxDescriptor describes the accepted transaction type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TxDescriptor { - /// fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type) - /// it is not meant to support polymorphism of transaction types, it is supposed to be used by - /// reflection clients to understand if they can handle a specific transaction type in an application. - #[prost(string, tag = "1")] - pub fullname: ::prost::alloc::string::String, - /// msgs lists the accepted application messages (sdk.Msg) - #[prost(message, repeated, tag = "2")] - pub msgs: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for TxDescriptor { - const NAME: &'static str = "TxDescriptor"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// AuthnDescriptor provides information on how to sign transactions without relying -/// on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AuthnDescriptor { - /// sign_modes defines the supported signature algorithm - #[prost(message, repeated, tag = "1")] - pub sign_modes: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for AuthnDescriptor { - const NAME: &'static str = "AuthnDescriptor"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// SigningModeDescriptor provides information on a signing flow of the application -/// NOTE(fdymylja): here we could go as far as providing an entire flow on how -/// to sign a message given a SigningModeDescriptor, but it's better to think about -/// this another time -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SigningModeDescriptor { - /// name defines the unique name of the signing mode - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// number is the unique int32 identifier for the sign_mode enum - #[prost(int32, tag = "2")] - pub number: i32, - /// authn_info_provider_method_fullname defines the fullname of the method to call to get - /// the metadata required to authenticate using the provided sign_modes - #[prost(string, tag = "3")] - pub authn_info_provider_method_fullname: ::prost::alloc::string::String, -} -impl ::prost::Name for SigningModeDescriptor { - const NAME: &'static str = "SigningModeDescriptor"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// ChainDescriptor describes chain information of the application -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ChainDescriptor { - /// id is the chain id - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, -} -impl ::prost::Name for ChainDescriptor { - const NAME: &'static str = "ChainDescriptor"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// CodecDescriptor describes the registered interfaces and provides metadata information on the types -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CodecDescriptor { - /// interfaces is a list of the registerted interfaces descriptors - #[prost(message, repeated, tag = "1")] - pub interfaces: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for CodecDescriptor { - const NAME: &'static str = "CodecDescriptor"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// InterfaceDescriptor describes the implementation of an interface -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InterfaceDescriptor { - /// fullname is the name of the interface - #[prost(string, tag = "1")] - pub fullname: ::prost::alloc::string::String, - /// interface_accepting_messages contains information regarding the proto messages which contain the interface as - /// google.protobuf.Any field - #[prost(message, repeated, tag = "2")] - pub interface_accepting_messages: ::prost::alloc::vec::Vec< - InterfaceAcceptingMessageDescriptor, - >, - /// interface_implementers is a list of the descriptors of the interface implementers - #[prost(message, repeated, tag = "3")] - pub interface_implementers: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for InterfaceDescriptor { - const NAME: &'static str = "InterfaceDescriptor"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// InterfaceImplementerDescriptor describes an interface implementer -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InterfaceImplementerDescriptor { - /// fullname is the protobuf queryable name of the interface implementer - #[prost(string, tag = "1")] - pub fullname: ::prost::alloc::string::String, - /// type_url defines the type URL used when marshalling the type as any - /// this is required so we can provide type safe google.protobuf.Any marshalling and - /// unmarshalling, making sure that we don't accept just 'any' type - /// in our interface fields - #[prost(string, tag = "2")] - pub type_url: ::prost::alloc::string::String, -} -impl ::prost::Name for InterfaceImplementerDescriptor { - const NAME: &'static str = "InterfaceImplementerDescriptor"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// InterfaceAcceptingMessageDescriptor describes a protobuf message which contains -/// an interface represented as a google.protobuf.Any -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InterfaceAcceptingMessageDescriptor { - /// fullname is the protobuf fullname of the type containing the interface - #[prost(string, tag = "1")] - pub fullname: ::prost::alloc::string::String, - /// field_descriptor_names is a list of the protobuf name (not fullname) of the field - /// which contains the interface as google.protobuf.Any (the interface is the same, but - /// it can be in multiple fields of the same proto message) - #[prost(string, repeated, tag = "2")] - pub field_descriptor_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for InterfaceAcceptingMessageDescriptor { - const NAME: &'static str = "InterfaceAcceptingMessageDescriptor"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// ConfigurationDescriptor contains metadata information on the sdk.Config -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConfigurationDescriptor { - /// bech32_account_address_prefix is the account address prefix - #[prost(string, tag = "1")] - pub bech32_account_address_prefix: ::prost::alloc::string::String, -} -impl ::prost::Name for ConfigurationDescriptor { - const NAME: &'static str = "ConfigurationDescriptor"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDescriptor { - /// msg_type_url contains the TypeURL of a sdk.Msg. - #[prost(string, tag = "1")] - pub msg_type_url: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgDescriptor { - const NAME: &'static str = "MsgDescriptor"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetAuthnDescriptorRequest {} -impl ::prost::Name for GetAuthnDescriptorRequest { - const NAME: &'static str = "GetAuthnDescriptorRequest"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetAuthnDescriptorResponse { - /// authn describes how to authenticate to the application when sending transactions - #[prost(message, optional, tag = "1")] - pub authn: ::core::option::Option, -} -impl ::prost::Name for GetAuthnDescriptorResponse { - const NAME: &'static str = "GetAuthnDescriptorResponse"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetChainDescriptorRequest {} -impl ::prost::Name for GetChainDescriptorRequest { - const NAME: &'static str = "GetChainDescriptorRequest"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetChainDescriptorResponse { - /// chain describes application chain information - #[prost(message, optional, tag = "1")] - pub chain: ::core::option::Option, -} -impl ::prost::Name for GetChainDescriptorResponse { - const NAME: &'static str = "GetChainDescriptorResponse"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetCodecDescriptorRequest {} -impl ::prost::Name for GetCodecDescriptorRequest { - const NAME: &'static str = "GetCodecDescriptorRequest"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetCodecDescriptorResponse { - /// codec describes the application codec such as registered interfaces and implementations - #[prost(message, optional, tag = "1")] - pub codec: ::core::option::Option, -} -impl ::prost::Name for GetCodecDescriptorResponse { - const NAME: &'static str = "GetCodecDescriptorResponse"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetConfigurationDescriptorRequest {} -impl ::prost::Name for GetConfigurationDescriptorRequest { - const NAME: &'static str = "GetConfigurationDescriptorRequest"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetConfigurationDescriptorResponse { - /// config describes the application's sdk.Config - #[prost(message, optional, tag = "1")] - pub config: ::core::option::Option, -} -impl ::prost::Name for GetConfigurationDescriptorResponse { - const NAME: &'static str = "GetConfigurationDescriptorResponse"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetQueryServicesDescriptorRequest {} -impl ::prost::Name for GetQueryServicesDescriptorRequest { - const NAME: &'static str = "GetQueryServicesDescriptorRequest"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetQueryServicesDescriptorResponse { - /// queries provides information on the available queryable services - #[prost(message, optional, tag = "1")] - pub queries: ::core::option::Option, -} -impl ::prost::Name for GetQueryServicesDescriptorResponse { - const NAME: &'static str = "GetQueryServicesDescriptorResponse"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTxDescriptorRequest {} -impl ::prost::Name for GetTxDescriptorRequest { - const NAME: &'static str = "GetTxDescriptorRequest"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTxDescriptorResponse { - /// tx provides information on msgs that can be forwarded to the application - /// alongside the accepted transaction protobuf type - #[prost(message, optional, tag = "1")] - pub tx: ::core::option::Option, -} -impl ::prost::Name for GetTxDescriptorResponse { - const NAME: &'static str = "GetTxDescriptorResponse"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// QueryServicesDescriptor contains the list of cosmos-sdk queriable services -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryServicesDescriptor { - /// query_services is a list of cosmos-sdk QueryServiceDescriptor - #[prost(message, repeated, tag = "1")] - pub query_services: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for QueryServicesDescriptor { - const NAME: &'static str = "QueryServicesDescriptor"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// QueryServiceDescriptor describes a cosmos-sdk queryable service -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryServiceDescriptor { - /// fullname is the protobuf fullname of the service descriptor - #[prost(string, tag = "1")] - pub fullname: ::prost::alloc::string::String, - /// is_module describes if this service is actually exposed by an application's module - #[prost(bool, tag = "2")] - pub is_module: bool, - /// methods provides a list of query service methods - #[prost(message, repeated, tag = "3")] - pub methods: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for QueryServiceDescriptor { - const NAME: &'static str = "QueryServiceDescriptor"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// QueryMethodDescriptor describes a queryable method of a query service -/// no other info is provided beside method name and tendermint queryable path -/// because it would be redundant with the grpc reflection service -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryMethodDescriptor { - /// name is the protobuf name (not fullname) of the method - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// full_query_path is the path that can be used to query - /// this method via tendermint abci.Query - #[prost(string, tag = "2")] - pub full_query_path: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryMethodDescriptor { - const NAME: &'static str = "QueryMethodDescriptor"; - const PACKAGE: &'static str = "cosmos.base.reflection.v2alpha1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.reflection.v2alpha1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod reflection_service_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// ReflectionService defines a service for application reflection. - #[derive(Debug, Clone)] - pub struct ReflectionServiceClient { - inner: tonic::client::Grpc, - } - impl ReflectionServiceClient { - /// 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 ReflectionServiceClient - 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, - ) -> ReflectionServiceClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, - { - ReflectionServiceClient::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 - } - /// GetAuthnDescriptor returns information on how to authenticate transactions in the application - /// NOTE: this RPC is still experimental and might be subject to breaking changes or removal in - /// future releases of the cosmos-sdk. - pub async fn get_authn_descriptor( - &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.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.base.reflection.v2alpha1.ReflectionService", - "GetAuthnDescriptor", - ), - ); - self.inner.unary(req, path, codec).await - } - /// GetChainDescriptor returns the description of the chain - pub async fn get_chain_descriptor( - &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.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.base.reflection.v2alpha1.ReflectionService", - "GetChainDescriptor", - ), - ); - self.inner.unary(req, path, codec).await - } - /// GetCodecDescriptor returns the descriptor of the codec of the application - pub async fn get_codec_descriptor( - &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.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.base.reflection.v2alpha1.ReflectionService", - "GetCodecDescriptor", - ), - ); - self.inner.unary(req, path, codec).await - } - /// GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application - pub async fn get_configuration_descriptor( - &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.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.base.reflection.v2alpha1.ReflectionService", - "GetConfigurationDescriptor", - ), - ); - self.inner.unary(req, path, codec).await - } - /// GetQueryServicesDescriptor returns the available gRPC queryable services of the application - pub async fn get_query_services_descriptor( - &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.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.base.reflection.v2alpha1.ReflectionService", - "GetQueryServicesDescriptor", - ), - ); - self.inner.unary(req, path, codec).await - } - /// GetTxDescriptor returns information on the used transaction object and available msgs that can be used - pub async fn get_tx_descriptor( - &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.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.base.reflection.v2alpha1.ReflectionService", - "GetTxDescriptor", - ), - ); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -pub mod reflection_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 ReflectionServiceServer. - #[async_trait] - pub trait ReflectionService: Send + Sync + 'static { - /// GetAuthnDescriptor returns information on how to authenticate transactions in the application - /// NOTE: this RPC is still experimental and might be subject to breaking changes or removal in - /// future releases of the cosmos-sdk. - async fn get_authn_descriptor( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// GetChainDescriptor returns the description of the chain - async fn get_chain_descriptor( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// GetCodecDescriptor returns the descriptor of the codec of the application - async fn get_codec_descriptor( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application - async fn get_configuration_descriptor( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// GetQueryServicesDescriptor returns the available gRPC queryable services of the application - async fn get_query_services_descriptor( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// GetTxDescriptor returns information on the used transaction object and available msgs that can be used - async fn get_tx_descriptor( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// ReflectionService defines a service for application reflection. - #[derive(Debug)] - pub struct ReflectionServiceServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - struct _Inner(Arc); - impl ReflectionServiceServer { - 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 ReflectionServiceServer - where - T: ReflectionService, - 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.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor" => { - #[allow(non_camel_case_types)] - struct GetAuthnDescriptorSvc(pub Arc); - impl< - T: ReflectionService, - > tonic::server::UnaryService - for GetAuthnDescriptorSvc { - type Response = super::GetAuthnDescriptorResponse; - 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_authn_descriptor( - &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 = GetAuthnDescriptorSvc(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.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor" => { - #[allow(non_camel_case_types)] - struct GetChainDescriptorSvc(pub Arc); - impl< - T: ReflectionService, - > tonic::server::UnaryService - for GetChainDescriptorSvc { - type Response = super::GetChainDescriptorResponse; - 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_chain_descriptor( - &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 = GetChainDescriptorSvc(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.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor" => { - #[allow(non_camel_case_types)] - struct GetCodecDescriptorSvc(pub Arc); - impl< - T: ReflectionService, - > tonic::server::UnaryService - for GetCodecDescriptorSvc { - type Response = super::GetCodecDescriptorResponse; - 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_codec_descriptor( - &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 = GetCodecDescriptorSvc(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.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor" => { - #[allow(non_camel_case_types)] - struct GetConfigurationDescriptorSvc( - pub Arc, - ); - impl< - T: ReflectionService, - > tonic::server::UnaryService< - super::GetConfigurationDescriptorRequest, - > for GetConfigurationDescriptorSvc { - type Response = super::GetConfigurationDescriptorResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::GetConfigurationDescriptorRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::get_configuration_descriptor( - &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 = GetConfigurationDescriptorSvc(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.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor" => { - #[allow(non_camel_case_types)] - struct GetQueryServicesDescriptorSvc( - pub Arc, - ); - impl< - T: ReflectionService, - > tonic::server::UnaryService< - super::GetQueryServicesDescriptorRequest, - > for GetQueryServicesDescriptorSvc { - type Response = super::GetQueryServicesDescriptorResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::GetQueryServicesDescriptorRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::get_query_services_descriptor( - &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 = GetQueryServicesDescriptorSvc(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.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor" => { - #[allow(non_camel_case_types)] - struct GetTxDescriptorSvc(pub Arc); - impl< - T: ReflectionService, - > tonic::server::UnaryService - for GetTxDescriptorSvc { - type Response = super::GetTxDescriptorResponse; - 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_descriptor(&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 = GetTxDescriptorSvc(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 ReflectionServiceServer { - 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 ReflectionServiceServer { - const NAME: &'static str = "cosmos.base.reflection.v2alpha1.ReflectionService"; - } -} diff --git a/src/prost/cosmos.base.reflection.v2alpha1.serde.rs b/src/prost/cosmos.base.reflection.v2alpha1.serde.rs deleted file mode 100644 index 9103b97c..00000000 --- a/src/prost/cosmos.base.reflection.v2alpha1.serde.rs +++ /dev/null @@ -1,2515 +0,0 @@ -impl serde::Serialize for AppDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.AppDescriptor", len)?; - if let Some(v) = self.authn.as_ref() { - struct_ser.serialize_field("authn", v)?; - } - if let Some(v) = self.chain.as_ref() { - struct_ser.serialize_field("chain", v)?; - } - if let Some(v) = self.codec.as_ref() { - struct_ser.serialize_field("codec", v)?; - } - if let Some(v) = self.configuration.as_ref() { - struct_ser.serialize_field("configuration", v)?; - } - if let Some(v) = self.query_services.as_ref() { - struct_ser.serialize_field("queryServices", v)?; - } - if let Some(v) = self.tx.as_ref() { - struct_ser.serialize_field("tx", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for AppDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "authn", - "chain", - "codec", - "configuration", - "query_services", - "queryServices", - "tx", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authn, - Chain, - Codec, - Configuration, - QueryServices, - Tx, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "authn" => Ok(GeneratedField::Authn), - "chain" => Ok(GeneratedField::Chain), - "codec" => Ok(GeneratedField::Codec), - "configuration" => Ok(GeneratedField::Configuration), - "queryServices" | "query_services" => Ok(GeneratedField::QueryServices), - "tx" => Ok(GeneratedField::Tx), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = AppDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.AppDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut authn__ = None; - let mut chain__ = None; - let mut codec__ = None; - let mut configuration__ = None; - let mut query_services__ = None; - let mut tx__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Authn => { - if authn__.is_some() { - return Err(serde::de::Error::duplicate_field("authn")); - } - authn__ = map_.next_value()?; - } - GeneratedField::Chain => { - if chain__.is_some() { - return Err(serde::de::Error::duplicate_field("chain")); - } - chain__ = map_.next_value()?; - } - GeneratedField::Codec => { - if codec__.is_some() { - return Err(serde::de::Error::duplicate_field("codec")); - } - codec__ = map_.next_value()?; - } - GeneratedField::Configuration => { - if configuration__.is_some() { - return Err(serde::de::Error::duplicate_field("configuration")); - } - configuration__ = map_.next_value()?; - } - GeneratedField::QueryServices => { - if query_services__.is_some() { - return Err(serde::de::Error::duplicate_field("queryServices")); - } - query_services__ = map_.next_value()?; - } - GeneratedField::Tx => { - if tx__.is_some() { - return Err(serde::de::Error::duplicate_field("tx")); - } - tx__ = map_.next_value()?; - } - } - } - Ok(AppDescriptor { - authn: authn__, - chain: chain__, - codec: codec__, - configuration: configuration__, - query_services: query_services__, - tx: tx__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.AppDescriptor", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for AuthnDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.AuthnDescriptor", len)?; - if true { - struct_ser.serialize_field("signModes", &self.sign_modes)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for AuthnDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "sign_modes", - "signModes", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - SignModes, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "signModes" | "sign_modes" => Ok(GeneratedField::SignModes), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = AuthnDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.AuthnDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sign_modes__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::SignModes => { - if sign_modes__.is_some() { - return Err(serde::de::Error::duplicate_field("signModes")); - } - sign_modes__ = Some(map_.next_value()?); - } - } - } - Ok(AuthnDescriptor { - sign_modes: sign_modes__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.AuthnDescriptor", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ChainDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.ChainDescriptor", len)?; - if true { - struct_ser.serialize_field("id", &self.id)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ChainDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "id", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Id, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "id" => Ok(GeneratedField::Id), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ChainDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.ChainDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut id__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Id => { - if id__.is_some() { - return Err(serde::de::Error::duplicate_field("id")); - } - id__ = Some(map_.next_value()?); - } - } - } - Ok(ChainDescriptor { - id: id__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.ChainDescriptor", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CodecDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.CodecDescriptor", len)?; - if true { - struct_ser.serialize_field("interfaces", &self.interfaces)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CodecDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "interfaces", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Interfaces, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "interfaces" => Ok(GeneratedField::Interfaces), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CodecDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.CodecDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut interfaces__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Interfaces => { - if interfaces__.is_some() { - return Err(serde::de::Error::duplicate_field("interfaces")); - } - interfaces__ = Some(map_.next_value()?); - } - } - } - Ok(CodecDescriptor { - interfaces: interfaces__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.CodecDescriptor", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ConfigurationDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.ConfigurationDescriptor", len)?; - if true { - struct_ser.serialize_field("bech32AccountAddressPrefix", &self.bech32_account_address_prefix)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ConfigurationDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "bech32_account_address_prefix", - "bech32AccountAddressPrefix", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Bech32AccountAddressPrefix, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "bech32AccountAddressPrefix" | "bech32_account_address_prefix" => Ok(GeneratedField::Bech32AccountAddressPrefix), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ConfigurationDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.ConfigurationDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut bech32_account_address_prefix__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Bech32AccountAddressPrefix => { - if bech32_account_address_prefix__.is_some() { - return Err(serde::de::Error::duplicate_field("bech32AccountAddressPrefix")); - } - bech32_account_address_prefix__ = Some(map_.next_value()?); - } - } - } - Ok(ConfigurationDescriptor { - bech32_account_address_prefix: bech32_account_address_prefix__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.ConfigurationDescriptor", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetAuthnDescriptorRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetAuthnDescriptorRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(GetAuthnDescriptorRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetAuthnDescriptorResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse", len)?; - if let Some(v) = self.authn.as_ref() { - struct_ser.serialize_field("authn", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "authn", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authn, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "authn" => Ok(GeneratedField::Authn), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetAuthnDescriptorResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut authn__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Authn => { - if authn__.is_some() { - return Err(serde::de::Error::duplicate_field("authn")); - } - authn__ = map_.next_value()?; - } - } - } - Ok(GetAuthnDescriptorResponse { - authn: authn__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetChainDescriptorRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetChainDescriptorRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetChainDescriptorRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(GetChainDescriptorRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetChainDescriptorResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse", len)?; - if let Some(v) = self.chain.as_ref() { - struct_ser.serialize_field("chain", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetChainDescriptorResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "chain", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Chain, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "chain" => Ok(GeneratedField::Chain), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetChainDescriptorResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut chain__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Chain => { - if chain__.is_some() { - return Err(serde::de::Error::duplicate_field("chain")); - } - chain__ = map_.next_value()?; - } - } - } - Ok(GetChainDescriptorResponse { - chain: chain__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetCodecDescriptorRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetCodecDescriptorRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetCodecDescriptorRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(GetCodecDescriptorRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetCodecDescriptorResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse", len)?; - if let Some(v) = self.codec.as_ref() { - struct_ser.serialize_field("codec", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetCodecDescriptorResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "codec", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Codec, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "codec" => Ok(GeneratedField::Codec), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetCodecDescriptorResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut codec__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Codec => { - if codec__.is_some() { - return Err(serde::de::Error::duplicate_field("codec")); - } - codec__ = map_.next_value()?; - } - } - } - Ok(GetCodecDescriptorResponse { - codec: codec__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetConfigurationDescriptorRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetConfigurationDescriptorRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(GetConfigurationDescriptorRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetConfigurationDescriptorResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse", len)?; - if let Some(v) = self.config.as_ref() { - struct_ser.serialize_field("config", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "config", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Config, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "config" => Ok(GeneratedField::Config), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetConfigurationDescriptorResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut config__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Config => { - if config__.is_some() { - return Err(serde::de::Error::duplicate_field("config")); - } - config__ = map_.next_value()?; - } - } - } - Ok(GetConfigurationDescriptorResponse { - config: config__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetQueryServicesDescriptorRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetQueryServicesDescriptorRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(GetQueryServicesDescriptorRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetQueryServicesDescriptorResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse", len)?; - if let Some(v) = self.queries.as_ref() { - struct_ser.serialize_field("queries", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "queries", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Queries, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "queries" => Ok(GeneratedField::Queries), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetQueryServicesDescriptorResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut queries__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Queries => { - if queries__.is_some() { - return Err(serde::de::Error::duplicate_field("queries")); - } - queries__ = map_.next_value()?; - } - } - } - Ok(GetQueryServicesDescriptorResponse { - queries: queries__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetTxDescriptorRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetTxDescriptorRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetTxDescriptorRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(GetTxDescriptorRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetTxDescriptorResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse", len)?; - if let Some(v) = self.tx.as_ref() { - struct_ser.serialize_field("tx", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetTxDescriptorResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "tx", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Tx, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "tx" => Ok(GeneratedField::Tx), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetTxDescriptorResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut tx__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Tx => { - if tx__.is_some() { - return Err(serde::de::Error::duplicate_field("tx")); - } - tx__ = map_.next_value()?; - } - } - } - Ok(GetTxDescriptorResponse { - tx: tx__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for InterfaceAcceptingMessageDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor", len)?; - if true { - struct_ser.serialize_field("fullname", &self.fullname)?; - } - if true { - struct_ser.serialize_field("fieldDescriptorNames", &self.field_descriptor_names)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for InterfaceAcceptingMessageDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "fullname", - "field_descriptor_names", - "fieldDescriptorNames", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Fullname, - FieldDescriptorNames, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "fullname" => Ok(GeneratedField::Fullname), - "fieldDescriptorNames" | "field_descriptor_names" => Ok(GeneratedField::FieldDescriptorNames), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = InterfaceAcceptingMessageDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut fullname__ = None; - let mut field_descriptor_names__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Fullname => { - if fullname__.is_some() { - return Err(serde::de::Error::duplicate_field("fullname")); - } - fullname__ = Some(map_.next_value()?); - } - GeneratedField::FieldDescriptorNames => { - if field_descriptor_names__.is_some() { - return Err(serde::de::Error::duplicate_field("fieldDescriptorNames")); - } - field_descriptor_names__ = Some(map_.next_value()?); - } - } - } - Ok(InterfaceAcceptingMessageDescriptor { - fullname: fullname__.unwrap_or_default(), - field_descriptor_names: field_descriptor_names__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for InterfaceDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.InterfaceDescriptor", len)?; - if true { - struct_ser.serialize_field("fullname", &self.fullname)?; - } - if true { - struct_ser.serialize_field("interfaceAcceptingMessages", &self.interface_accepting_messages)?; - } - if true { - struct_ser.serialize_field("interfaceImplementers", &self.interface_implementers)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "fullname", - "interface_accepting_messages", - "interfaceAcceptingMessages", - "interface_implementers", - "interfaceImplementers", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Fullname, - InterfaceAcceptingMessages, - InterfaceImplementers, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "fullname" => Ok(GeneratedField::Fullname), - "interfaceAcceptingMessages" | "interface_accepting_messages" => Ok(GeneratedField::InterfaceAcceptingMessages), - "interfaceImplementers" | "interface_implementers" => Ok(GeneratedField::InterfaceImplementers), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = InterfaceDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.InterfaceDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut fullname__ = None; - let mut interface_accepting_messages__ = None; - let mut interface_implementers__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Fullname => { - if fullname__.is_some() { - return Err(serde::de::Error::duplicate_field("fullname")); - } - fullname__ = Some(map_.next_value()?); - } - GeneratedField::InterfaceAcceptingMessages => { - if interface_accepting_messages__.is_some() { - return Err(serde::de::Error::duplicate_field("interfaceAcceptingMessages")); - } - interface_accepting_messages__ = Some(map_.next_value()?); - } - GeneratedField::InterfaceImplementers => { - if interface_implementers__.is_some() { - return Err(serde::de::Error::duplicate_field("interfaceImplementers")); - } - interface_implementers__ = Some(map_.next_value()?); - } - } - } - Ok(InterfaceDescriptor { - fullname: fullname__.unwrap_or_default(), - interface_accepting_messages: interface_accepting_messages__.unwrap_or_default(), - interface_implementers: interface_implementers__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.InterfaceDescriptor", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for InterfaceImplementerDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor", len)?; - if true { - struct_ser.serialize_field("fullname", &self.fullname)?; - } - if true { - struct_ser.serialize_field("typeUrl", &self.type_url)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for InterfaceImplementerDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "fullname", - "type_url", - "typeUrl", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Fullname, - TypeUrl, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "fullname" => Ok(GeneratedField::Fullname), - "typeUrl" | "type_url" => Ok(GeneratedField::TypeUrl), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = InterfaceImplementerDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut fullname__ = None; - let mut type_url__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Fullname => { - if fullname__.is_some() { - return Err(serde::de::Error::duplicate_field("fullname")); - } - fullname__ = Some(map_.next_value()?); - } - GeneratedField::TypeUrl => { - if type_url__.is_some() { - return Err(serde::de::Error::duplicate_field("typeUrl")); - } - type_url__ = Some(map_.next_value()?); - } - } - } - Ok(InterfaceImplementerDescriptor { - fullname: fullname__.unwrap_or_default(), - type_url: type_url__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.MsgDescriptor", len)?; - if true { - struct_ser.serialize_field("msgTypeUrl", &self.msg_type_url)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "msg_type_url", - "msgTypeUrl", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - MsgTypeUrl, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "msgTypeUrl" | "msg_type_url" => Ok(GeneratedField::MsgTypeUrl), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.MsgDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut msg_type_url__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::MsgTypeUrl => { - if msg_type_url__.is_some() { - return Err(serde::de::Error::duplicate_field("msgTypeUrl")); - } - msg_type_url__ = Some(map_.next_value()?); - } - } - } - Ok(MsgDescriptor { - msg_type_url: msg_type_url__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.MsgDescriptor", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryMethodDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.QueryMethodDescriptor", len)?; - if true { - struct_ser.serialize_field("name", &self.name)?; - } - if true { - struct_ser.serialize_field("fullQueryPath", &self.full_query_path)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryMethodDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "name", - "full_query_path", - "fullQueryPath", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Name, - FullQueryPath, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "name" => Ok(GeneratedField::Name), - "fullQueryPath" | "full_query_path" => Ok(GeneratedField::FullQueryPath), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryMethodDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.QueryMethodDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut name__ = None; - let mut full_query_path__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - GeneratedField::FullQueryPath => { - if full_query_path__.is_some() { - return Err(serde::de::Error::duplicate_field("fullQueryPath")); - } - full_query_path__ = Some(map_.next_value()?); - } - } - } - Ok(QueryMethodDescriptor { - name: name__.unwrap_or_default(), - full_query_path: full_query_path__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.QueryMethodDescriptor", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryServiceDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.QueryServiceDescriptor", len)?; - if true { - struct_ser.serialize_field("fullname", &self.fullname)?; - } - if true { - struct_ser.serialize_field("isModule", &self.is_module)?; - } - if true { - struct_ser.serialize_field("methods", &self.methods)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryServiceDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "fullname", - "is_module", - "isModule", - "methods", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Fullname, - IsModule, - Methods, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "fullname" => Ok(GeneratedField::Fullname), - "isModule" | "is_module" => Ok(GeneratedField::IsModule), - "methods" => Ok(GeneratedField::Methods), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryServiceDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.QueryServiceDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut fullname__ = None; - let mut is_module__ = None; - let mut methods__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Fullname => { - if fullname__.is_some() { - return Err(serde::de::Error::duplicate_field("fullname")); - } - fullname__ = Some(map_.next_value()?); - } - GeneratedField::IsModule => { - if is_module__.is_some() { - return Err(serde::de::Error::duplicate_field("isModule")); - } - is_module__ = Some(map_.next_value()?); - } - GeneratedField::Methods => { - if methods__.is_some() { - return Err(serde::de::Error::duplicate_field("methods")); - } - methods__ = Some(map_.next_value()?); - } - } - } - Ok(QueryServiceDescriptor { - fullname: fullname__.unwrap_or_default(), - is_module: is_module__.unwrap_or_default(), - methods: methods__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.QueryServiceDescriptor", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryServicesDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.QueryServicesDescriptor", len)?; - if true { - struct_ser.serialize_field("queryServices", &self.query_services)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryServicesDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "query_services", - "queryServices", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - QueryServices, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "queryServices" | "query_services" => Ok(GeneratedField::QueryServices), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryServicesDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.QueryServicesDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut query_services__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::QueryServices => { - if query_services__.is_some() { - return Err(serde::de::Error::duplicate_field("queryServices")); - } - query_services__ = Some(map_.next_value()?); - } - } - } - Ok(QueryServicesDescriptor { - query_services: query_services__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.QueryServicesDescriptor", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SigningModeDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.SigningModeDescriptor", len)?; - if true { - struct_ser.serialize_field("name", &self.name)?; - } - if true { - struct_ser.serialize_field("number", &self.number)?; - } - if true { - struct_ser.serialize_field("authnInfoProviderMethodFullname", &self.authn_info_provider_method_fullname)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SigningModeDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "name", - "number", - "authn_info_provider_method_fullname", - "authnInfoProviderMethodFullname", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Name, - Number, - AuthnInfoProviderMethodFullname, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "name" => Ok(GeneratedField::Name), - "number" => Ok(GeneratedField::Number), - "authnInfoProviderMethodFullname" | "authn_info_provider_method_fullname" => Ok(GeneratedField::AuthnInfoProviderMethodFullname), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SigningModeDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.SigningModeDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut name__ = None; - let mut number__ = None; - let mut authn_info_provider_method_fullname__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - GeneratedField::Number => { - if number__.is_some() { - return Err(serde::de::Error::duplicate_field("number")); - } - number__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::AuthnInfoProviderMethodFullname => { - if authn_info_provider_method_fullname__.is_some() { - return Err(serde::de::Error::duplicate_field("authnInfoProviderMethodFullname")); - } - authn_info_provider_method_fullname__ = Some(map_.next_value()?); - } - } - } - Ok(SigningModeDescriptor { - name: name__.unwrap_or_default(), - number: number__.unwrap_or_default(), - authn_info_provider_method_fullname: authn_info_provider_method_fullname__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.SigningModeDescriptor", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for TxDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.reflection.v2alpha1.TxDescriptor", len)?; - if true { - struct_ser.serialize_field("fullname", &self.fullname)?; - } - if true { - struct_ser.serialize_field("msgs", &self.msgs)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for TxDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "fullname", - "msgs", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Fullname, - Msgs, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "fullname" => Ok(GeneratedField::Fullname), - "msgs" => Ok(GeneratedField::Msgs), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = TxDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.reflection.v2alpha1.TxDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut fullname__ = None; - let mut msgs__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Fullname => { - if fullname__.is_some() { - return Err(serde::de::Error::duplicate_field("fullname")); - } - fullname__ = Some(map_.next_value()?); - } - GeneratedField::Msgs => { - if msgs__.is_some() { - return Err(serde::de::Error::duplicate_field("msgs")); - } - msgs__ = Some(map_.next_value()?); - } - } - } - Ok(TxDescriptor { - fullname: fullname__.unwrap_or_default(), - msgs: msgs__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.reflection.v2alpha1.TxDescriptor", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.base.snapshots.v1beta1.rs b/src/prost/cosmos.base.snapshots.v1beta1.rs deleted file mode 100644 index 614c936c..00000000 --- a/src/prost/cosmos.base.snapshots.v1beta1.rs +++ /dev/null @@ -1,184 +0,0 @@ -/// Snapshot contains Tendermint state sync snapshot info. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Snapshot { - #[prost(uint64, tag = "1")] - pub height: u64, - #[prost(uint32, tag = "2")] - pub format: u32, - #[prost(uint32, tag = "3")] - pub chunks: u32, - #[prost(bytes = "vec", tag = "4")] - pub hash: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "5")] - pub metadata: ::core::option::Option, -} -impl ::prost::Name for Snapshot { - const NAME: &'static str = "Snapshot"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// Metadata contains SDK-specific snapshot metadata. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Metadata { - /// SHA-256 chunk hashes - #[prost(bytes = "vec", repeated, tag = "1")] - pub chunk_hashes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -impl ::prost::Name for Metadata { - const NAME: &'static str = "Metadata"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// SnapshotItem is an item contained in a rootmulti.Store snapshot. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotItem { - /// item is the specific type of snapshot item. - #[prost(oneof = "snapshot_item::Item", tags = "1, 2, 3, 4, 5, 6")] - pub item: ::core::option::Option, -} -/// Nested message and enum types in `SnapshotItem`. -pub mod snapshot_item { - /// item is the specific type of snapshot item. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Item { - #[prost(message, tag = "1")] - Store(super::SnapshotStoreItem), - #[prost(message, tag = "2")] - Iavl(super::SnapshotIavlItem), - #[prost(message, tag = "3")] - Extension(super::SnapshotExtensionMeta), - #[prost(message, tag = "4")] - ExtensionPayload(super::SnapshotExtensionPayload), - #[prost(message, tag = "5")] - Kv(super::SnapshotKvItem), - #[prost(message, tag = "6")] - Schema(super::SnapshotSchema), - } -} -impl ::prost::Name for SnapshotItem { - const NAME: &'static str = "SnapshotItem"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// SnapshotStoreItem contains metadata about a snapshotted store. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotStoreItem { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, -} -impl ::prost::Name for SnapshotStoreItem { - const NAME: &'static str = "SnapshotStoreItem"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// SnapshotIAVLItem is an exported IAVL node. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotIavlItem { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - pub value: ::prost::alloc::vec::Vec, - /// version is block height - #[prost(int64, tag = "3")] - pub version: i64, - /// height is depth of the tree. - #[prost(int32, tag = "4")] - pub height: i32, -} -impl ::prost::Name for SnapshotIavlItem { - const NAME: &'static str = "SnapshotIAVLItem"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// SnapshotExtensionMeta contains metadata about an external snapshotter. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotExtensionMeta { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - #[prost(uint32, tag = "2")] - pub format: u32, -} -impl ::prost::Name for SnapshotExtensionMeta { - const NAME: &'static str = "SnapshotExtensionMeta"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// SnapshotExtensionPayload contains payloads of an external snapshotter. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotExtensionPayload { - #[prost(bytes = "vec", tag = "1")] - pub payload: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for SnapshotExtensionPayload { - const NAME: &'static str = "SnapshotExtensionPayload"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// SnapshotKVItem is an exported Key/Value Pair -/// -/// Since: cosmos-sdk 0.46 -/// Deprecated: This message was part of store/v2alpha1 which has been deleted from v0.47. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotKvItem { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - pub value: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for SnapshotKvItem { - const NAME: &'static str = "SnapshotKVItem"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// SnapshotSchema is an exported schema of smt store -/// -/// Since: cosmos-sdk 0.46 -/// Deprecated: This message was part of store/v2alpha1 which has been deleted from v0.47. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotSchema { - #[prost(bytes = "vec", repeated, tag = "1")] - pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -impl ::prost::Name for SnapshotSchema { - const NAME: &'static str = "SnapshotSchema"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.base.snapshots.v1beta1.serde.rs b/src/prost/cosmos.base.snapshots.v1beta1.serde.rs deleted file mode 100644 index f28fcfed..00000000 --- a/src/prost/cosmos.base.snapshots.v1beta1.serde.rs +++ /dev/null @@ -1,1082 +0,0 @@ -impl serde::Serialize for Metadata { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.Metadata", len)?; - if true { - struct_ser.serialize_field("chunkHashes", &self.chunk_hashes.iter().map(pbjson::private::base64::encode).collect::<::alloc::vec::Vec<_>>())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Metadata { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "chunk_hashes", - "chunkHashes", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ChunkHashes, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "chunkHashes" | "chunk_hashes" => Ok(GeneratedField::ChunkHashes), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Metadata; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.Metadata") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut chunk_hashes__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ChunkHashes => { - if chunk_hashes__.is_some() { - return Err(serde::de::Error::duplicate_field("chunkHashes")); - } - chunk_hashes__ = - Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::BytesDeserialize<_>>>()? - .into_iter().map(|x| x.0).collect()) - ; - } - } - } - Ok(Metadata { - chunk_hashes: chunk_hashes__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.Metadata", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Snapshot { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.Snapshot", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("height", ::alloc::string::ToString::to_string(&self.height).as_str())?; - } - if true { - struct_ser.serialize_field("format", &self.format)?; - } - if true { - struct_ser.serialize_field("chunks", &self.chunks)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("hash", pbjson::private::base64::encode(&self.hash).as_str())?; - } - if let Some(v) = self.metadata.as_ref() { - struct_ser.serialize_field("metadata", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Snapshot { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "height", - "format", - "chunks", - "hash", - "metadata", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Height, - Format, - Chunks, - Hash, - Metadata, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "height" => Ok(GeneratedField::Height), - "format" => Ok(GeneratedField::Format), - "chunks" => Ok(GeneratedField::Chunks), - "hash" => Ok(GeneratedField::Hash), - "metadata" => Ok(GeneratedField::Metadata), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Snapshot; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.Snapshot") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut height__ = None; - let mut format__ = None; - let mut chunks__ = None; - let mut hash__ = None; - let mut metadata__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); - } - height__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Format => { - if format__.is_some() { - return Err(serde::de::Error::duplicate_field("format")); - } - format__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Chunks => { - if chunks__.is_some() { - return Err(serde::de::Error::duplicate_field("chunks")); - } - chunks__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Hash => { - if hash__.is_some() { - return Err(serde::de::Error::duplicate_field("hash")); - } - hash__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Metadata => { - if metadata__.is_some() { - return Err(serde::de::Error::duplicate_field("metadata")); - } - metadata__ = map_.next_value()?; - } - } - } - Ok(Snapshot { - height: height__.unwrap_or_default(), - format: format__.unwrap_or_default(), - chunks: chunks__.unwrap_or_default(), - hash: hash__.unwrap_or_default(), - metadata: metadata__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.Snapshot", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SnapshotExtensionMeta { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta", len)?; - if true { - struct_ser.serialize_field("name", &self.name)?; - } - if true { - struct_ser.serialize_field("format", &self.format)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SnapshotExtensionMeta { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "name", - "format", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Name, - Format, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "name" => Ok(GeneratedField::Name), - "format" => Ok(GeneratedField::Format), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SnapshotExtensionMeta; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut name__ = None; - let mut format__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - GeneratedField::Format => { - if format__.is_some() { - return Err(serde::de::Error::duplicate_field("format")); - } - format__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(SnapshotExtensionMeta { - name: name__.unwrap_or_default(), - format: format__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SnapshotExtensionPayload { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("payload", pbjson::private::base64::encode(&self.payload).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SnapshotExtensionPayload { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "payload", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Payload, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "payload" => Ok(GeneratedField::Payload), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SnapshotExtensionPayload; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut payload__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Payload => { - if payload__.is_some() { - return Err(serde::de::Error::duplicate_field("payload")); - } - payload__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(SnapshotExtensionPayload { - payload: payload__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SnapshotIavlItem { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotIAVLItem", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("value", pbjson::private::base64::encode(&self.value).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("version", ::alloc::string::ToString::to_string(&self.version).as_str())?; - } - if true { - struct_ser.serialize_field("height", &self.height)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SnapshotIavlItem { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - "value", - "version", - "height", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - Value, - Version, - Height, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - "value" => Ok(GeneratedField::Value), - "version" => Ok(GeneratedField::Version), - "height" => Ok(GeneratedField::Height), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SnapshotIavlItem; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotIAVLItem") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - let mut value__ = None; - let mut version__ = None; - let mut height__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); - } - value__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Version => { - if version__.is_some() { - return Err(serde::de::Error::duplicate_field("version")); - } - version__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); - } - height__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(SnapshotIavlItem { - key: key__.unwrap_or_default(), - value: value__.unwrap_or_default(), - version: version__.unwrap_or_default(), - height: height__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.SnapshotIAVLItem", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SnapshotItem { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.item.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotItem", len)?; - if let Some(v) = self.item.as_ref() { - match v { - snapshot_item::Item::Store(v) => { - struct_ser.serialize_field("store", v)?; - } - snapshot_item::Item::Iavl(v) => { - struct_ser.serialize_field("iavl", v)?; - } - snapshot_item::Item::Extension(v) => { - struct_ser.serialize_field("extension", v)?; - } - snapshot_item::Item::ExtensionPayload(v) => { - struct_ser.serialize_field("extensionPayload", v)?; - } - snapshot_item::Item::Kv(v) => { - struct_ser.serialize_field("kv", v)?; - } - snapshot_item::Item::Schema(v) => { - struct_ser.serialize_field("schema", v)?; - } - } - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SnapshotItem { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "store", - "iavl", - "extension", - "extension_payload", - "extensionPayload", - "kv", - "schema", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Store, - Iavl, - Extension, - ExtensionPayload, - Kv, - Schema, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "store" => Ok(GeneratedField::Store), - "iavl" => Ok(GeneratedField::Iavl), - "extension" => Ok(GeneratedField::Extension), - "extensionPayload" | "extension_payload" => Ok(GeneratedField::ExtensionPayload), - "kv" => Ok(GeneratedField::Kv), - "schema" => Ok(GeneratedField::Schema), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SnapshotItem; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotItem") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut item__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Store => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("store")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(snapshot_item::Item::Store) -; - } - GeneratedField::Iavl => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("iavl")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(snapshot_item::Item::Iavl) -; - } - GeneratedField::Extension => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("extension")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(snapshot_item::Item::Extension) -; - } - GeneratedField::ExtensionPayload => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("extensionPayload")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(snapshot_item::Item::ExtensionPayload) -; - } - GeneratedField::Kv => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("kv")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(snapshot_item::Item::Kv) -; - } - GeneratedField::Schema => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("schema")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(snapshot_item::Item::Schema) -; - } - } - } - Ok(SnapshotItem { - item: item__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.SnapshotItem", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SnapshotKvItem { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotKVItem", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("value", pbjson::private::base64::encode(&self.value).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SnapshotKvItem { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - "value", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - Value, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - "value" => Ok(GeneratedField::Value), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SnapshotKvItem; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotKVItem") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - let mut value__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); - } - value__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(SnapshotKvItem { - key: key__.unwrap_or_default(), - value: value__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.SnapshotKVItem", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SnapshotSchema { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotSchema", len)?; - if true { - struct_ser.serialize_field("keys", &self.keys.iter().map(pbjson::private::base64::encode).collect::<::alloc::vec::Vec<_>>())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SnapshotSchema { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "keys", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Keys, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "keys" => Ok(GeneratedField::Keys), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SnapshotSchema; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotSchema") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut keys__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Keys => { - if keys__.is_some() { - return Err(serde::de::Error::duplicate_field("keys")); - } - keys__ = - Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::BytesDeserialize<_>>>()? - .into_iter().map(|x| x.0).collect()) - ; - } - } - } - Ok(SnapshotSchema { - keys: keys__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.SnapshotSchema", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SnapshotStoreItem { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotStoreItem", len)?; - if true { - struct_ser.serialize_field("name", &self.name)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SnapshotStoreItem { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "name", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Name, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "name" => Ok(GeneratedField::Name), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SnapshotStoreItem; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotStoreItem") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut name__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - } - } - Ok(SnapshotStoreItem { - name: name__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.SnapshotStoreItem", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.base.store.v1beta1.serde.rs b/src/prost/cosmos.base.store.v1beta1.serde.rs deleted file mode 100644 index 2916d33c..00000000 --- a/src/prost/cosmos.base.store.v1beta1.serde.rs +++ /dev/null @@ -1,791 +0,0 @@ -impl serde::Serialize for BlockMetadata { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.store.v1beta1.BlockMetadata", len)?; - if let Some(v) = self.request_begin_block.as_ref() { - struct_ser.serialize_field("requestBeginBlock", v)?; - } - if let Some(v) = self.response_begin_block.as_ref() { - struct_ser.serialize_field("responseBeginBlock", v)?; - } - if true { - struct_ser.serialize_field("deliverTxs", &self.deliver_txs)?; - } - if let Some(v) = self.request_end_block.as_ref() { - struct_ser.serialize_field("requestEndBlock", v)?; - } - if let Some(v) = self.response_end_block.as_ref() { - struct_ser.serialize_field("responseEndBlock", v)?; - } - if let Some(v) = self.response_commit.as_ref() { - struct_ser.serialize_field("responseCommit", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for BlockMetadata { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "request_begin_block", - "requestBeginBlock", - "response_begin_block", - "responseBeginBlock", - "deliver_txs", - "deliverTxs", - "request_end_block", - "requestEndBlock", - "response_end_block", - "responseEndBlock", - "response_commit", - "responseCommit", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - RequestBeginBlock, - ResponseBeginBlock, - DeliverTxs, - RequestEndBlock, - ResponseEndBlock, - ResponseCommit, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "requestBeginBlock" | "request_begin_block" => Ok(GeneratedField::RequestBeginBlock), - "responseBeginBlock" | "response_begin_block" => Ok(GeneratedField::ResponseBeginBlock), - "deliverTxs" | "deliver_txs" => Ok(GeneratedField::DeliverTxs), - "requestEndBlock" | "request_end_block" => Ok(GeneratedField::RequestEndBlock), - "responseEndBlock" | "response_end_block" => Ok(GeneratedField::ResponseEndBlock), - "responseCommit" | "response_commit" => Ok(GeneratedField::ResponseCommit), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = BlockMetadata; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.store.v1beta1.BlockMetadata") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut request_begin_block__ = None; - let mut response_begin_block__ = None; - let mut deliver_txs__ = None; - let mut request_end_block__ = None; - let mut response_end_block__ = None; - let mut response_commit__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::RequestBeginBlock => { - if request_begin_block__.is_some() { - return Err(serde::de::Error::duplicate_field("requestBeginBlock")); - } - request_begin_block__ = map_.next_value()?; - } - GeneratedField::ResponseBeginBlock => { - if response_begin_block__.is_some() { - return Err(serde::de::Error::duplicate_field("responseBeginBlock")); - } - response_begin_block__ = map_.next_value()?; - } - GeneratedField::DeliverTxs => { - if deliver_txs__.is_some() { - return Err(serde::de::Error::duplicate_field("deliverTxs")); - } - deliver_txs__ = Some(map_.next_value()?); - } - GeneratedField::RequestEndBlock => { - if request_end_block__.is_some() { - return Err(serde::de::Error::duplicate_field("requestEndBlock")); - } - request_end_block__ = map_.next_value()?; - } - GeneratedField::ResponseEndBlock => { - if response_end_block__.is_some() { - return Err(serde::de::Error::duplicate_field("responseEndBlock")); - } - response_end_block__ = map_.next_value()?; - } - GeneratedField::ResponseCommit => { - if response_commit__.is_some() { - return Err(serde::de::Error::duplicate_field("responseCommit")); - } - response_commit__ = map_.next_value()?; - } - } - } - Ok(BlockMetadata { - request_begin_block: request_begin_block__, - response_begin_block: response_begin_block__, - deliver_txs: deliver_txs__.unwrap_or_default(), - request_end_block: request_end_block__, - response_end_block: response_end_block__, - response_commit: response_commit__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.store.v1beta1.BlockMetadata", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for block_metadata::DeliverTx { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.store.v1beta1.BlockMetadata.DeliverTx", len)?; - if let Some(v) = self.request.as_ref() { - struct_ser.serialize_field("request", v)?; - } - if let Some(v) = self.response.as_ref() { - struct_ser.serialize_field("response", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for block_metadata::DeliverTx { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "request", - "response", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Request, - Response, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "request" => Ok(GeneratedField::Request), - "response" => Ok(GeneratedField::Response), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = block_metadata::DeliverTx; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.store.v1beta1.BlockMetadata.DeliverTx") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut request__ = None; - let mut response__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Request => { - if request__.is_some() { - return Err(serde::de::Error::duplicate_field("request")); - } - request__ = map_.next_value()?; - } - GeneratedField::Response => { - if response__.is_some() { - return Err(serde::de::Error::duplicate_field("response")); - } - response__ = map_.next_value()?; - } - } - } - Ok(block_metadata::DeliverTx { - request: request__, - response: response__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.store.v1beta1.BlockMetadata.DeliverTx", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CommitId { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.store.v1beta1.CommitID", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("version", ::alloc::string::ToString::to_string(&self.version).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("hash", pbjson::private::base64::encode(&self.hash).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CommitId { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "version", - "hash", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Version, - Hash, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "version" => Ok(GeneratedField::Version), - "hash" => Ok(GeneratedField::Hash), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CommitId; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.store.v1beta1.CommitID") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut version__ = None; - let mut hash__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Version => { - if version__.is_some() { - return Err(serde::de::Error::duplicate_field("version")); - } - version__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Hash => { - if hash__.is_some() { - return Err(serde::de::Error::duplicate_field("hash")); - } - hash__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(CommitId { - version: version__.unwrap_or_default(), - hash: hash__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.store.v1beta1.CommitID", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CommitInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.store.v1beta1.CommitInfo", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("version", ::alloc::string::ToString::to_string(&self.version).as_str())?; - } - if true { - struct_ser.serialize_field("storeInfos", &self.store_infos)?; - } - if let Some(v) = self.timestamp.as_ref() { - struct_ser.serialize_field("timestamp", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CommitInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "version", - "store_infos", - "storeInfos", - "timestamp", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Version, - StoreInfos, - Timestamp, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "version" => Ok(GeneratedField::Version), - "storeInfos" | "store_infos" => Ok(GeneratedField::StoreInfos), - "timestamp" => Ok(GeneratedField::Timestamp), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CommitInfo; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.store.v1beta1.CommitInfo") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut version__ = None; - let mut store_infos__ = None; - let mut timestamp__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Version => { - if version__.is_some() { - return Err(serde::de::Error::duplicate_field("version")); - } - version__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::StoreInfos => { - if store_infos__.is_some() { - return Err(serde::de::Error::duplicate_field("storeInfos")); - } - store_infos__ = Some(map_.next_value()?); - } - GeneratedField::Timestamp => { - if timestamp__.is_some() { - return Err(serde::de::Error::duplicate_field("timestamp")); - } - timestamp__ = map_.next_value()?; - } - } - } - Ok(CommitInfo { - version: version__.unwrap_or_default(), - store_infos: store_infos__.unwrap_or_default(), - timestamp: timestamp__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.store.v1beta1.CommitInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for StoreInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.store.v1beta1.StoreInfo", len)?; - if true { - struct_ser.serialize_field("name", &self.name)?; - } - if let Some(v) = self.commit_id.as_ref() { - struct_ser.serialize_field("commitId", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for StoreInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "name", - "commit_id", - "commitId", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Name, - CommitId, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "name" => Ok(GeneratedField::Name), - "commitId" | "commit_id" => Ok(GeneratedField::CommitId), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = StoreInfo; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.store.v1beta1.StoreInfo") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut name__ = None; - let mut commit_id__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - GeneratedField::CommitId => { - if commit_id__.is_some() { - return Err(serde::de::Error::duplicate_field("commitId")); - } - commit_id__ = map_.next_value()?; - } - } - } - Ok(StoreInfo { - name: name__.unwrap_or_default(), - commit_id: commit_id__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.store.v1beta1.StoreInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for StoreKvPair { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.store.v1beta1.StoreKVPair", len)?; - if true { - struct_ser.serialize_field("storeKey", &self.store_key)?; - } - if true { - struct_ser.serialize_field("delete", &self.delete)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("value", pbjson::private::base64::encode(&self.value).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for StoreKvPair { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "store_key", - "storeKey", - "delete", - "key", - "value", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - StoreKey, - Delete, - Key, - Value, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "storeKey" | "store_key" => Ok(GeneratedField::StoreKey), - "delete" => Ok(GeneratedField::Delete), - "key" => Ok(GeneratedField::Key), - "value" => Ok(GeneratedField::Value), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = StoreKvPair; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.store.v1beta1.StoreKVPair") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut store_key__ = None; - let mut delete__ = None; - let mut key__ = None; - let mut value__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::StoreKey => { - if store_key__.is_some() { - return Err(serde::de::Error::duplicate_field("storeKey")); - } - store_key__ = Some(map_.next_value()?); - } - GeneratedField::Delete => { - if delete__.is_some() { - return Err(serde::de::Error::duplicate_field("delete")); - } - delete__ = Some(map_.next_value()?); - } - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); - } - value__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(StoreKvPair { - store_key: store_key__.unwrap_or_default(), - delete: delete__.unwrap_or_default(), - key: key__.unwrap_or_default(), - value: value__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.store.v1beta1.StoreKVPair", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.base.tendermint.v1beta1.rs b/src/prost/cosmos.base.tendermint.v1beta1.rs deleted file mode 100644 index 82dd22d6..00000000 --- a/src/prost/cosmos.base.tendermint.v1beta1.rs +++ /dev/null @@ -1,1262 +0,0 @@ -/// Block is tendermint type Block, with the Header proposer address -/// field converted to bech32 string. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Block { - #[prost(message, optional, tag = "1")] - pub header: ::core::option::Option
, - #[prost(message, optional, tag = "2")] - pub data: ::core::option::Option<::tendermint_proto::types::Data>, - #[prost(message, optional, tag = "3")] - pub evidence: ::core::option::Option<::tendermint_proto::types::EvidenceList>, - #[prost(message, optional, tag = "4")] - pub last_commit: ::core::option::Option<::tendermint_proto::types::Commit>, -} -impl ::prost::Name for Block { - const NAME: &'static str = "Block"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// Header defines the structure of a Tendermint block header. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Header { - /// basic block info - #[prost(message, optional, tag = "1")] - pub version: ::core::option::Option<::tendermint_proto::version::Consensus>, - #[prost(string, tag = "2")] - pub chain_id: ::prost::alloc::string::String, - #[prost(int64, tag = "3")] - pub height: i64, - #[prost(message, optional, tag = "4")] - pub time: ::core::option::Option< - super::super::super::super::google::protobuf::Timestamp, - >, - /// prev block info - #[prost(message, optional, tag = "5")] - pub last_block_id: ::core::option::Option<::tendermint_proto::types::BlockId>, - /// hashes of block data - /// - /// commit from validators from the last block - #[prost(bytes = "vec", tag = "6")] - pub last_commit_hash: ::prost::alloc::vec::Vec, - /// transactions - #[prost(bytes = "vec", tag = "7")] - pub data_hash: ::prost::alloc::vec::Vec, - /// hashes from the app output from the prev block - /// - /// validators for the current block - #[prost(bytes = "vec", tag = "8")] - pub validators_hash: ::prost::alloc::vec::Vec, - /// validators for the next block - #[prost(bytes = "vec", tag = "9")] - pub next_validators_hash: ::prost::alloc::vec::Vec, - /// consensus params for current block - #[prost(bytes = "vec", tag = "10")] - pub consensus_hash: ::prost::alloc::vec::Vec, - /// state after txs from the previous block - #[prost(bytes = "vec", tag = "11")] - pub app_hash: ::prost::alloc::vec::Vec, - /// root hash of all results from the txs from the previous block - #[prost(bytes = "vec", tag = "12")] - pub last_results_hash: ::prost::alloc::vec::Vec, - /// consensus info - /// - /// evidence included in the block - #[prost(bytes = "vec", tag = "13")] - pub evidence_hash: ::prost::alloc::vec::Vec, - /// proposer_address is the original block proposer address, formatted as a Bech32 string. - /// In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string - /// for better UX. - /// - /// original proposer of the block - #[prost(string, tag = "14")] - pub proposer_address: ::prost::alloc::string::String, -} -impl ::prost::Name for Header { - const NAME: &'static str = "Header"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetValidatorSetByHeightRequest { - #[prost(int64, tag = "1")] - pub height: i64, - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for GetValidatorSetByHeightRequest { - const NAME: &'static str = "GetValidatorSetByHeightRequest"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetValidatorSetByHeightResponse { - #[prost(int64, tag = "1")] - pub block_height: i64, - #[prost(message, repeated, tag = "2")] - pub validators: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for GetValidatorSetByHeightResponse { - const NAME: &'static str = "GetValidatorSetByHeightResponse"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetLatestValidatorSetRequest { - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for GetLatestValidatorSetRequest { - const NAME: &'static str = "GetLatestValidatorSetRequest"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetLatestValidatorSetResponse { - #[prost(int64, tag = "1")] - pub block_height: i64, - #[prost(message, repeated, tag = "2")] - pub validators: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option, -} -impl ::prost::Name for GetLatestValidatorSetResponse { - const NAME: &'static str = "GetLatestValidatorSetResponse"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// Validator is the type for the validator-set. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Validator { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option< - super::super::super::super::google::protobuf::Any, - >, - #[prost(int64, tag = "3")] - pub voting_power: i64, - #[prost(int64, tag = "4")] - pub proposer_priority: i64, -} -impl ::prost::Name for Validator { - const NAME: &'static str = "Validator"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetBlockByHeightRequest { - #[prost(int64, tag = "1")] - pub height: i64, -} -impl ::prost::Name for GetBlockByHeightRequest { - const NAME: &'static str = "GetBlockByHeightRequest"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetBlockByHeightResponse { - #[prost(message, optional, tag = "1")] - pub block_id: ::core::option::Option<::tendermint_proto::types::BlockId>, - /// Deprecated: please use `sdk_block` instead - #[prost(message, optional, tag = "2")] - pub block: ::core::option::Option<::tendermint_proto::types::Block>, - /// Since: cosmos-sdk 0.47 - #[prost(message, optional, tag = "3")] - pub sdk_block: ::core::option::Option, -} -impl ::prost::Name for GetBlockByHeightResponse { - const NAME: &'static str = "GetBlockByHeightResponse"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetLatestBlockRequest {} -impl ::prost::Name for GetLatestBlockRequest { - const NAME: &'static str = "GetLatestBlockRequest"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetLatestBlockResponse { - #[prost(message, optional, tag = "1")] - pub block_id: ::core::option::Option<::tendermint_proto::types::BlockId>, - /// Deprecated: please use `sdk_block` instead - #[prost(message, optional, tag = "2")] - pub block: ::core::option::Option<::tendermint_proto::types::Block>, - /// Since: cosmos-sdk 0.47 - #[prost(message, optional, tag = "3")] - pub sdk_block: ::core::option::Option, -} -impl ::prost::Name for GetLatestBlockResponse { - const NAME: &'static str = "GetLatestBlockResponse"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// GetSyncingRequest is the request type for the Query/GetSyncing RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetSyncingRequest {} -impl ::prost::Name for GetSyncingRequest { - const NAME: &'static str = "GetSyncingRequest"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// GetSyncingResponse is the response type for the Query/GetSyncing RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetSyncingResponse { - #[prost(bool, tag = "1")] - pub syncing: bool, -} -impl ::prost::Name for GetSyncingResponse { - const NAME: &'static str = "GetSyncingResponse"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetNodeInfoRequest {} -impl ::prost::Name for GetNodeInfoRequest { - const NAME: &'static str = "GetNodeInfoRequest"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetNodeInfoResponse { - #[prost(message, optional, tag = "1")] - pub default_node_info: ::core::option::Option< - ::tendermint_proto::p2p::DefaultNodeInfo, - >, - #[prost(message, optional, tag = "2")] - pub application_version: ::core::option::Option, -} -impl ::prost::Name for GetNodeInfoResponse { - const NAME: &'static str = "GetNodeInfoResponse"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// VersionInfo is the type for the GetNodeInfoResponse message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct VersionInfo { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub app_name: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub version: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub git_commit: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub build_tags: ::prost::alloc::string::String, - #[prost(string, tag = "6")] - pub go_version: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "7")] - pub build_deps: ::prost::alloc::vec::Vec, - /// Since: cosmos-sdk 0.43 - #[prost(string, tag = "8")] - pub cosmos_sdk_version: ::prost::alloc::string::String, -} -impl ::prost::Name for VersionInfo { - const NAME: &'static str = "VersionInfo"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// Module is the type for VersionInfo -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Module { - /// module path - #[prost(string, tag = "1")] - pub path: ::prost::alloc::string::String, - /// module version - #[prost(string, tag = "2")] - pub version: ::prost::alloc::string::String, - /// checksum - #[prost(string, tag = "3")] - pub sum: ::prost::alloc::string::String, -} -impl ::prost::Name for Module { - const NAME: &'static str = "Module"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// ABCIQueryRequest defines the request structure for the ABCIQuery gRPC query. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AbciQueryRequest { - #[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 AbciQueryRequest { - const NAME: &'static str = "ABCIQueryRequest"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query. -/// -/// Note: This type is a duplicate of the ResponseQuery proto type defined in -/// Tendermint. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AbciQueryResponse { - #[prost(uint32, tag = "1")] - pub code: u32, - /// 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 AbciQueryResponse { - const NAME: &'static str = "ABCIQueryResponse"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// ProofOp defines an operation used for calculating Merkle root. The data could -/// be arbitrary format, providing necessary data for example neighbouring node -/// hash. -/// -/// Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ProofOp { - #[prost(string, tag = "1")] - pub r#type: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "2")] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - pub data: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for ProofOp { - const NAME: &'static str = "ProofOp"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// ProofOps is Merkle proof defined by the list of ProofOps. -/// -/// Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ProofOps { - #[prost(message, repeated, tag = "1")] - pub ops: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for ProofOps { - const NAME: &'static str = "ProofOps"; - const PACKAGE: &'static str = "cosmos.base.tendermint.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.tendermint.v1beta1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -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 the gRPC querier service for tendermint queries. - #[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 - } - /// GetNodeInfo queries the current node info. - pub async fn get_node_info( - &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.base.tendermint.v1beta1.Service/GetNodeInfo", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.base.tendermint.v1beta1.Service", - "GetNodeInfo", - ), - ); - self.inner.unary(req, path, codec).await - } - /// GetSyncing queries node syncing. - pub async fn get_syncing( - &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.base.tendermint.v1beta1.Service/GetSyncing", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.base.tendermint.v1beta1.Service", - "GetSyncing", - ), - ); - self.inner.unary(req, path, codec).await - } - /// GetLatestBlock returns the latest block. - pub async fn get_latest_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( - "/cosmos.base.tendermint.v1beta1.Service/GetLatestBlock", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.base.tendermint.v1beta1.Service", - "GetLatestBlock", - ), - ); - self.inner.unary(req, path, codec).await - } - /// GetBlockByHeight queries block for given height. - pub async fn get_block_by_height( - &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.base.tendermint.v1beta1.Service/GetBlockByHeight", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.base.tendermint.v1beta1.Service", - "GetBlockByHeight", - ), - ); - self.inner.unary(req, path, codec).await - } - /// GetLatestValidatorSet queries latest validator-set. - pub async fn get_latest_validator_set( - &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.base.tendermint.v1beta1.Service/GetLatestValidatorSet", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.base.tendermint.v1beta1.Service", - "GetLatestValidatorSet", - ), - ); - self.inner.unary(req, path, codec).await - } - /// GetValidatorSetByHeight queries validator-set at a given height. - pub async fn get_validator_set_by_height( - &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.base.tendermint.v1beta1.Service/GetValidatorSetByHeight", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.base.tendermint.v1beta1.Service", - "GetValidatorSetByHeight", - ), - ); - self.inner.unary(req, path, codec).await - } - /// ABCIQuery defines a query handler that supports ABCI queries directly to the - /// application, bypassing Tendermint completely. The ABCI query must contain - /// a valid and supported path, including app, custom, p2p, and store. - /// - /// Since: cosmos-sdk 0.46 - pub async fn abci_query( - &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.base.tendermint.v1beta1.Service/ABCIQuery", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.base.tendermint.v1beta1.Service", - "ABCIQuery", - ), - ); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -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 { - /// GetNodeInfo queries the current node info. - async fn get_node_info( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// GetSyncing queries node syncing. - async fn get_syncing( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// GetLatestBlock returns the latest block. - async fn get_latest_block( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// GetBlockByHeight queries block for given height. - async fn get_block_by_height( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// GetLatestValidatorSet queries latest validator-set. - async fn get_latest_validator_set( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// GetValidatorSetByHeight queries validator-set at a given height. - async fn get_validator_set_by_height( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ABCIQuery defines a query handler that supports ABCI queries directly to the - /// application, bypassing Tendermint completely. The ABCI query must contain - /// a valid and supported path, including app, custom, p2p, and store. - /// - /// Since: cosmos-sdk 0.46 - async fn abci_query( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Service defines the gRPC querier service for tendermint queries. - #[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.base.tendermint.v1beta1.Service/GetNodeInfo" => { - #[allow(non_camel_case_types)] - struct GetNodeInfoSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for GetNodeInfoSvc { - type Response = super::GetNodeInfoResponse; - 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_node_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 = GetNodeInfoSvc(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.base.tendermint.v1beta1.Service/GetSyncing" => { - #[allow(non_camel_case_types)] - struct GetSyncingSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for GetSyncingSvc { - type Response = super::GetSyncingResponse; - 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_syncing(&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 = GetSyncingSvc(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.base.tendermint.v1beta1.Service/GetLatestBlock" => { - #[allow(non_camel_case_types)] - struct GetLatestBlockSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for GetLatestBlockSvc { - type Response = super::GetLatestBlockResponse; - 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_latest_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 = GetLatestBlockSvc(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.base.tendermint.v1beta1.Service/GetBlockByHeight" => { - #[allow(non_camel_case_types)] - struct GetBlockByHeightSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for GetBlockByHeightSvc { - type Response = super::GetBlockByHeightResponse; - 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_by_height(&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 = GetBlockByHeightSvc(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.base.tendermint.v1beta1.Service/GetLatestValidatorSet" => { - #[allow(non_camel_case_types)] - struct GetLatestValidatorSetSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for GetLatestValidatorSetSvc { - type Response = super::GetLatestValidatorSetResponse; - 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_latest_validator_set(&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 = GetLatestValidatorSetSvc(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.base.tendermint.v1beta1.Service/GetValidatorSetByHeight" => { - #[allow(non_camel_case_types)] - struct GetValidatorSetByHeightSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for GetValidatorSetByHeightSvc { - type Response = super::GetValidatorSetByHeightResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::GetValidatorSetByHeightRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::get_validator_set_by_height(&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 = GetValidatorSetByHeightSvc(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.base.tendermint.v1beta1.Service/ABCIQuery" => { - #[allow(non_camel_case_types)] - struct ABCIQuerySvc(pub Arc); - impl tonic::server::UnaryService - for ABCIQuerySvc { - type Response = super::AbciQueryResponse; - 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 { - ::abci_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 = ABCIQuerySvc(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.base.tendermint.v1beta1.Service"; - } -} diff --git a/src/prost/cosmos.base.v1beta1.rs b/src/prost/cosmos.base.v1beta1.rs deleted file mode 100644 index e3497310..00000000 --- a/src/prost/cosmos.base.v1beta1.rs +++ /dev/null @@ -1,66 +0,0 @@ -/// Coin defines a token with a denomination and an amount. -/// -/// NOTE: The amount field is an Int which implements the custom method -/// signatures required by gogoproto. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Coin { - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub amount: ::prost::alloc::string::String, -} -impl ::prost::Name for Coin { - const NAME: &'static str = "Coin"; - const PACKAGE: &'static str = "cosmos.base.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME) - } -} -/// DecCoin defines a token with a denomination and a decimal amount. -/// -/// NOTE: The amount field is an Dec which implements the custom method -/// signatures required by gogoproto. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DecCoin { - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub amount: ::prost::alloc::string::String, -} -impl ::prost::Name for DecCoin { - const NAME: &'static str = "DecCoin"; - const PACKAGE: &'static str = "cosmos.base.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME) - } -} -/// IntProto defines a Protobuf wrapper around an Int object. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct IntProto { - #[prost(string, tag = "1")] - pub int: ::prost::alloc::string::String, -} -impl ::prost::Name for IntProto { - const NAME: &'static str = "IntProto"; - const PACKAGE: &'static str = "cosmos.base.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME) - } -} -/// DecProto defines a Protobuf wrapper around a Dec object. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DecProto { - #[prost(string, tag = "1")] - pub dec: ::prost::alloc::string::String, -} -impl ::prost::Name for DecProto { - const NAME: &'static str = "DecProto"; - const PACKAGE: &'static str = "cosmos.base.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.base.v1beta1.serde.rs b/src/prost/cosmos.base.v1beta1.serde.rs deleted file mode 100644 index 91566588..00000000 --- a/src/prost/cosmos.base.v1beta1.serde.rs +++ /dev/null @@ -1,398 +0,0 @@ -impl serde::Serialize for Coin { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.v1beta1.Coin", len)?; - if true { - struct_ser.serialize_field("denom", &self.denom)?; - } - if true { - struct_ser.serialize_field("amount", &self.amount)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Coin { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "denom", - "amount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Denom, - Amount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "denom" => Ok(GeneratedField::Denom), - "amount" => Ok(GeneratedField::Amount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Coin; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.v1beta1.Coin") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut denom__ = None; - let mut amount__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Denom => { - if denom__.is_some() { - return Err(serde::de::Error::duplicate_field("denom")); - } - denom__ = Some(map_.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = Some(map_.next_value()?); - } - } - } - Ok(Coin { - denom: denom__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.v1beta1.Coin", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for DecCoin { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.v1beta1.DecCoin", len)?; - if true { - struct_ser.serialize_field("denom", &self.denom)?; - } - if true { - struct_ser.serialize_field("amount", &self.amount)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for DecCoin { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "denom", - "amount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Denom, - Amount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "denom" => Ok(GeneratedField::Denom), - "amount" => Ok(GeneratedField::Amount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DecCoin; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.v1beta1.DecCoin") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut denom__ = None; - let mut amount__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Denom => { - if denom__.is_some() { - return Err(serde::de::Error::duplicate_field("denom")); - } - denom__ = Some(map_.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = Some(map_.next_value()?); - } - } - } - Ok(DecCoin { - denom: denom__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.v1beta1.DecCoin", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for DecProto { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.v1beta1.DecProto", len)?; - if true { - struct_ser.serialize_field("dec", &self.dec)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for DecProto { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "dec", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Dec, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "dec" => Ok(GeneratedField::Dec), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DecProto; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.v1beta1.DecProto") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut dec__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Dec => { - if dec__.is_some() { - return Err(serde::de::Error::duplicate_field("dec")); - } - dec__ = Some(map_.next_value()?); - } - } - } - Ok(DecProto { - dec: dec__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.v1beta1.DecProto", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for IntProto { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.v1beta1.IntProto", len)?; - if true { - struct_ser.serialize_field("int", &self.int)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for IntProto { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "int", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Int, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "int" => Ok(GeneratedField::Int), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = IntProto; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.v1beta1.IntProto") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut int__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Int => { - if int__.is_some() { - return Err(serde::de::Error::duplicate_field("int")); - } - int__ = Some(map_.next_value()?); - } - } - } - Ok(IntProto { - int: int__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.v1beta1.IntProto", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.crypto.ed25519.rs b/src/prost/cosmos.crypto.ed25519.rs deleted file mode 100644 index 4195c048..00000000 --- a/src/prost/cosmos.crypto.ed25519.rs +++ /dev/null @@ -1,33 +0,0 @@ -/// PubKey is an ed25519 public key for handling Tendermint keys in SDK. -/// It's needed for Any serialization and SDK compatibility. -/// It must not be used in a non Tendermint key context because it doesn't implement -/// ADR-28. Nevertheless, you will like to use ed25519 in app user level -/// then you must create a new proto message and follow ADR-28 for Address construction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PubKey { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for PubKey { - const NAME: &'static str = "PubKey"; - const PACKAGE: &'static str = "cosmos.crypto.ed25519"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.crypto.ed25519.{}", Self::NAME) - } -} -/// Deprecated: PrivKey defines a ed25519 private key. -/// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PrivKey { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for PrivKey { - const NAME: &'static str = "PrivKey"; - const PACKAGE: &'static str = "cosmos.crypto.ed25519"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.crypto.ed25519.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.crypto.ed25519.serde.rs b/src/prost/cosmos.crypto.ed25519.serde.rs deleted file mode 100644 index 5d4a3dc7..00000000 --- a/src/prost/cosmos.crypto.ed25519.serde.rs +++ /dev/null @@ -1,188 +0,0 @@ -impl serde::Serialize for PrivKey { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.crypto.ed25519.PrivKey", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PrivKey { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PrivKey; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.crypto.ed25519.PrivKey") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(PrivKey { - key: key__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.crypto.ed25519.PrivKey", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for PubKey { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.crypto.ed25519.PubKey", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PubKey { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PubKey; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.crypto.ed25519.PubKey") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(PubKey { - key: key__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.crypto.ed25519.PubKey", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.crypto.hd.v1.rs b/src/prost/cosmos.crypto.hd.v1.rs deleted file mode 100644 index 0561b040..00000000 --- a/src/prost/cosmos.crypto.hd.v1.rs +++ /dev/null @@ -1,28 +0,0 @@ -/// BIP44Params is used as path field in ledger item in Record. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Bip44Params { - /// purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation - #[prost(uint32, tag = "1")] - pub purpose: u32, - /// coin_type is a constant that improves privacy - #[prost(uint32, tag = "2")] - pub coin_type: u32, - /// account splits the key space into independent user identities - #[prost(uint32, tag = "3")] - pub account: u32, - /// change is a constant used for public derivation. Constant 0 is used for external chain and constant 1 for internal - /// chain. - #[prost(bool, tag = "4")] - pub change: bool, - /// address_index is used as child index in BIP32 derivation - #[prost(uint32, tag = "5")] - pub address_index: u32, -} -impl ::prost::Name for Bip44Params { - const NAME: &'static str = "BIP44Params"; - const PACKAGE: &'static str = "cosmos.crypto.hd.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.crypto.hd.v1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.crypto.hd.v1.serde.rs b/src/prost/cosmos.crypto.hd.v1.serde.rs deleted file mode 100644 index 1e466886..00000000 --- a/src/prost/cosmos.crypto.hd.v1.serde.rs +++ /dev/null @@ -1,169 +0,0 @@ -impl serde::Serialize for Bip44Params { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.crypto.hd.v1.BIP44Params", len)?; - if true { - struct_ser.serialize_field("purpose", &self.purpose)?; - } - if true { - struct_ser.serialize_field("coinType", &self.coin_type)?; - } - if true { - struct_ser.serialize_field("account", &self.account)?; - } - if true { - struct_ser.serialize_field("change", &self.change)?; - } - if true { - struct_ser.serialize_field("addressIndex", &self.address_index)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Bip44Params { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "purpose", - "coin_type", - "coinType", - "account", - "change", - "address_index", - "addressIndex", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Purpose, - CoinType, - Account, - Change, - AddressIndex, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "purpose" => Ok(GeneratedField::Purpose), - "coinType" | "coin_type" => Ok(GeneratedField::CoinType), - "account" => Ok(GeneratedField::Account), - "change" => Ok(GeneratedField::Change), - "addressIndex" | "address_index" => Ok(GeneratedField::AddressIndex), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Bip44Params; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.crypto.hd.v1.BIP44Params") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut purpose__ = None; - let mut coin_type__ = None; - let mut account__ = None; - let mut change__ = None; - let mut address_index__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Purpose => { - if purpose__.is_some() { - return Err(serde::de::Error::duplicate_field("purpose")); - } - purpose__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::CoinType => { - if coin_type__.is_some() { - return Err(serde::de::Error::duplicate_field("coinType")); - } - coin_type__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Account => { - if account__.is_some() { - return Err(serde::de::Error::duplicate_field("account")); - } - account__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Change => { - if change__.is_some() { - return Err(serde::de::Error::duplicate_field("change")); - } - change__ = Some(map_.next_value()?); - } - GeneratedField::AddressIndex => { - if address_index__.is_some() { - return Err(serde::de::Error::duplicate_field("addressIndex")); - } - address_index__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(Bip44Params { - purpose: purpose__.unwrap_or_default(), - coin_type: coin_type__.unwrap_or_default(), - account: account__.unwrap_or_default(), - change: change__.unwrap_or_default(), - address_index: address_index__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.crypto.hd.v1.BIP44Params", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.crypto.keyring.v1.rs b/src/prost/cosmos.crypto.keyring.v1.rs deleted file mode 100644 index 1990225d..00000000 --- a/src/prost/cosmos.crypto.keyring.v1.rs +++ /dev/null @@ -1,96 +0,0 @@ -/// Record is used for representing a key in the keyring. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Record { - /// name represents a name of Record - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// pub_key represents a public key in any format - #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option< - super::super::super::super::google::protobuf::Any, - >, - /// Record contains one of the following items - #[prost(oneof = "record::Item", tags = "3, 4, 5, 6")] - pub item: ::core::option::Option, -} -/// Nested message and enum types in `Record`. -pub mod record { - /// Item is a keyring item stored in a keyring backend. - /// Local item - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Local { - #[prost(message, optional, tag = "1")] - pub priv_key: ::core::option::Option< - super::super::super::super::super::google::protobuf::Any, - >, - } - impl ::prost::Name for Local { - const NAME: &'static str = "Local"; - const PACKAGE: &'static str = "cosmos.crypto.keyring.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.crypto.keyring.v1.Record.{}", Self::NAME) - } - } - /// Ledger item - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Ledger { - #[prost(message, optional, tag = "1")] - pub path: ::core::option::Option, - } - impl ::prost::Name for Ledger { - const NAME: &'static str = "Ledger"; - const PACKAGE: &'static str = "cosmos.crypto.keyring.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.crypto.keyring.v1.Record.{}", Self::NAME) - } - } - /// Multi item - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Multi {} - impl ::prost::Name for Multi { - const NAME: &'static str = "Multi"; - const PACKAGE: &'static str = "cosmos.crypto.keyring.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.crypto.keyring.v1.Record.{}", Self::NAME) - } - } - /// Offline item - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Offline {} - impl ::prost::Name for Offline { - const NAME: &'static str = "Offline"; - const PACKAGE: &'static str = "cosmos.crypto.keyring.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.crypto.keyring.v1.Record.{}", Self::NAME) - } - } - /// Record contains one of the following items - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Item { - /// local stores the private key locally. - #[prost(message, tag = "3")] - Local(Local), - /// ledger stores the information about a Ledger key. - #[prost(message, tag = "4")] - Ledger(Ledger), - /// Multi does not store any other information. - #[prost(message, tag = "5")] - Multi(Multi), - /// Offline does not store any other information. - #[prost(message, tag = "6")] - Offline(Offline), - } -} -impl ::prost::Name for Record { - const NAME: &'static str = "Record"; - const PACKAGE: &'static str = "cosmos.crypto.keyring.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.crypto.keyring.v1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.crypto.keyring.v1.serde.rs b/src/prost/cosmos.crypto.keyring.v1.serde.rs deleted file mode 100644 index 1141663a..00000000 --- a/src/prost/cosmos.crypto.keyring.v1.serde.rs +++ /dev/null @@ -1,495 +0,0 @@ -impl serde::Serialize for Record { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if self.item.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.crypto.keyring.v1.Record", len)?; - if true { - struct_ser.serialize_field("name", &self.name)?; - } - if let Some(v) = self.pub_key.as_ref() { - struct_ser.serialize_field("pubKey", v)?; - } - if let Some(v) = self.item.as_ref() { - match v { - record::Item::Local(v) => { - struct_ser.serialize_field("local", v)?; - } - record::Item::Ledger(v) => { - struct_ser.serialize_field("ledger", v)?; - } - record::Item::Multi(v) => { - struct_ser.serialize_field("multi", v)?; - } - record::Item::Offline(v) => { - struct_ser.serialize_field("offline", v)?; - } - } - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Record { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "name", - "pub_key", - "pubKey", - "local", - "ledger", - "multi", - "offline", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Name, - PubKey, - Local, - Ledger, - Multi, - Offline, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "name" => Ok(GeneratedField::Name), - "pubKey" | "pub_key" => Ok(GeneratedField::PubKey), - "local" => Ok(GeneratedField::Local), - "ledger" => Ok(GeneratedField::Ledger), - "multi" => Ok(GeneratedField::Multi), - "offline" => Ok(GeneratedField::Offline), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Record; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.crypto.keyring.v1.Record") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut name__ = None; - let mut pub_key__ = None; - let mut item__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - GeneratedField::PubKey => { - if pub_key__.is_some() { - return Err(serde::de::Error::duplicate_field("pubKey")); - } - pub_key__ = map_.next_value()?; - } - GeneratedField::Local => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("local")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(record::Item::Local) -; - } - GeneratedField::Ledger => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("ledger")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(record::Item::Ledger) -; - } - GeneratedField::Multi => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("multi")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(record::Item::Multi) -; - } - GeneratedField::Offline => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("offline")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(record::Item::Offline) -; - } - } - } - Ok(Record { - name: name__.unwrap_or_default(), - pub_key: pub_key__, - item: item__, - }) - } - } - deserializer.deserialize_struct("cosmos.crypto.keyring.v1.Record", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for record::Ledger { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.crypto.keyring.v1.Record.Ledger", len)?; - if let Some(v) = self.path.as_ref() { - struct_ser.serialize_field("path", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for record::Ledger { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "path", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Path, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "path" => Ok(GeneratedField::Path), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = record::Ledger; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.crypto.keyring.v1.Record.Ledger") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut path__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Path => { - if path__.is_some() { - return Err(serde::de::Error::duplicate_field("path")); - } - path__ = map_.next_value()?; - } - } - } - Ok(record::Ledger { - path: path__, - }) - } - } - deserializer.deserialize_struct("cosmos.crypto.keyring.v1.Record.Ledger", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for record::Local { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.crypto.keyring.v1.Record.Local", len)?; - if let Some(v) = self.priv_key.as_ref() { - struct_ser.serialize_field("privKey", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for record::Local { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "priv_key", - "privKey", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - PrivKey, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "privKey" | "priv_key" => Ok(GeneratedField::PrivKey), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = record::Local; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.crypto.keyring.v1.Record.Local") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut priv_key__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::PrivKey => { - if priv_key__.is_some() { - return Err(serde::de::Error::duplicate_field("privKey")); - } - priv_key__ = map_.next_value()?; - } - } - } - Ok(record::Local { - priv_key: priv_key__, - }) - } - } - deserializer.deserialize_struct("cosmos.crypto.keyring.v1.Record.Local", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for record::Multi { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.crypto.keyring.v1.Record.Multi", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for record::Multi { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = record::Multi; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.crypto.keyring.v1.Record.Multi") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(record::Multi { - }) - } - } - deserializer.deserialize_struct("cosmos.crypto.keyring.v1.Record.Multi", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for record::Offline { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.crypto.keyring.v1.Record.Offline", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for record::Offline { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = record::Offline; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.crypto.keyring.v1.Record.Offline") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(record::Offline { - }) - } - } - deserializer.deserialize_struct("cosmos.crypto.keyring.v1.Record.Offline", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.crypto.multisig.rs b/src/prost/cosmos.crypto.multisig.rs deleted file mode 100644 index 6455fb3d..00000000 --- a/src/prost/cosmos.crypto.multisig.rs +++ /dev/null @@ -1,20 +0,0 @@ -/// LegacyAminoPubKey specifies a public key type -/// which nests multiple public keys and a threshold, -/// it uses legacy amino address rules. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct LegacyAminoPubKey { - #[prost(uint32, tag = "1")] - pub threshold: u32, - #[prost(message, repeated, tag = "2")] - pub public_keys: ::prost::alloc::vec::Vec< - super::super::super::google::protobuf::Any, - >, -} -impl ::prost::Name for LegacyAminoPubKey { - const NAME: &'static str = "LegacyAminoPubKey"; - const PACKAGE: &'static str = "cosmos.crypto.multisig"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.crypto.multisig.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.crypto.multisig.serde.rs b/src/prost/cosmos.crypto.multisig.serde.rs deleted file mode 100644 index f535b553..00000000 --- a/src/prost/cosmos.crypto.multisig.serde.rs +++ /dev/null @@ -1,111 +0,0 @@ -impl serde::Serialize for LegacyAminoPubKey { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.crypto.multisig.LegacyAminoPubKey", len)?; - if true { - struct_ser.serialize_field("threshold", &self.threshold)?; - } - if true { - struct_ser.serialize_field("publicKeys", &self.public_keys)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for LegacyAminoPubKey { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "threshold", - "public_keys", - "publicKeys", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Threshold, - PublicKeys, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "threshold" => Ok(GeneratedField::Threshold), - "publicKeys" | "public_keys" => Ok(GeneratedField::PublicKeys), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = LegacyAminoPubKey; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.crypto.multisig.LegacyAminoPubKey") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut threshold__ = None; - let mut public_keys__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Threshold => { - if threshold__.is_some() { - return Err(serde::de::Error::duplicate_field("threshold")); - } - threshold__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::PublicKeys => { - if public_keys__.is_some() { - return Err(serde::de::Error::duplicate_field("publicKeys")); - } - public_keys__ = Some(map_.next_value()?); - } - } - } - Ok(LegacyAminoPubKey { - threshold: threshold__.unwrap_or_default(), - public_keys: public_keys__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.crypto.multisig.LegacyAminoPubKey", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.crypto.multisig.v1beta1.rs b/src/prost/cosmos.crypto.multisig.v1beta1.rs deleted file mode 100644 index 1d784f69..00000000 --- a/src/prost/cosmos.crypto.multisig.v1beta1.rs +++ /dev/null @@ -1,35 +0,0 @@ -/// 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/src/prost/cosmos.crypto.multisig.v1beta1.serde.rs b/src/prost/cosmos.crypto.multisig.v1beta1.serde.rs deleted file mode 100644 index 3a12dfe6..00000000 --- a/src/prost/cosmos.crypto.multisig.v1beta1.serde.rs +++ /dev/null @@ -1,208 +0,0 @@ -impl serde::Serialize for CompactBitArray { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.crypto.multisig.v1beta1.CompactBitArray", len)?; - if true { - struct_ser.serialize_field("extraBitsStored", &self.extra_bits_stored)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("elems", pbjson::private::base64::encode(&self.elems).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CompactBitArray { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "extra_bits_stored", - "extraBitsStored", - "elems", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ExtraBitsStored, - Elems, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "extraBitsStored" | "extra_bits_stored" => Ok(GeneratedField::ExtraBitsStored), - "elems" => Ok(GeneratedField::Elems), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CompactBitArray; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.crypto.multisig.v1beta1.CompactBitArray") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut extra_bits_stored__ = None; - let mut elems__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ExtraBitsStored => { - if extra_bits_stored__.is_some() { - return Err(serde::de::Error::duplicate_field("extraBitsStored")); - } - extra_bits_stored__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Elems => { - if elems__.is_some() { - return Err(serde::de::Error::duplicate_field("elems")); - } - elems__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(CompactBitArray { - extra_bits_stored: extra_bits_stored__.unwrap_or_default(), - elems: elems__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.crypto.multisig.v1beta1.CompactBitArray", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MultiSignature { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.crypto.multisig.v1beta1.MultiSignature", len)?; - if true { - struct_ser.serialize_field("signatures", &self.signatures.iter().map(pbjson::private::base64::encode).collect::<::alloc::vec::Vec<_>>())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MultiSignature { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "signatures", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Signatures, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "signatures" => Ok(GeneratedField::Signatures), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MultiSignature; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.crypto.multisig.v1beta1.MultiSignature") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut signatures__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Signatures => { - if signatures__.is_some() { - return Err(serde::de::Error::duplicate_field("signatures")); - } - signatures__ = - Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::BytesDeserialize<_>>>()? - .into_iter().map(|x| x.0).collect()) - ; - } - } - } - Ok(MultiSignature { - signatures: signatures__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.crypto.multisig.v1beta1.MultiSignature", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.crypto.secp256k1.rs b/src/prost/cosmos.crypto.secp256k1.rs deleted file mode 100644 index cafdb65e..00000000 --- a/src/prost/cosmos.crypto.secp256k1.rs +++ /dev/null @@ -1,32 +0,0 @@ -/// PubKey defines a secp256k1 public key -/// Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte -/// if the y-coordinate is the lexicographically largest of the two associated with -/// the x-coordinate. Otherwise the first byte is a 0x03. -/// This prefix is followed with the x-coordinate. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PubKey { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for PubKey { - const NAME: &'static str = "PubKey"; - const PACKAGE: &'static str = "cosmos.crypto.secp256k1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.crypto.secp256k1.{}", Self::NAME) - } -} -/// PrivKey defines a secp256k1 private key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PrivKey { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for PrivKey { - const NAME: &'static str = "PrivKey"; - const PACKAGE: &'static str = "cosmos.crypto.secp256k1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.crypto.secp256k1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.crypto.secp256k1.serde.rs b/src/prost/cosmos.crypto.secp256k1.serde.rs deleted file mode 100644 index aaea5af5..00000000 --- a/src/prost/cosmos.crypto.secp256k1.serde.rs +++ /dev/null @@ -1,188 +0,0 @@ -impl serde::Serialize for PrivKey { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.crypto.secp256k1.PrivKey", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PrivKey { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PrivKey; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.crypto.secp256k1.PrivKey") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(PrivKey { - key: key__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.crypto.secp256k1.PrivKey", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for PubKey { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.crypto.secp256k1.PubKey", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PubKey { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PubKey; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.crypto.secp256k1.PubKey") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(PubKey { - key: key__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.crypto.secp256k1.PubKey", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.crypto.secp256r1.rs b/src/prost/cosmos.crypto.secp256r1.rs deleted file mode 100644 index 067eef4b..00000000 --- a/src/prost/cosmos.crypto.secp256r1.rs +++ /dev/null @@ -1,31 +0,0 @@ -/// PubKey defines a secp256r1 ECDSA public key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PubKey { - /// Point on secp256r1 curve in a compressed representation as specified in section - /// 4.3.6 of ANSI X9.62: - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for PubKey { - const NAME: &'static str = "PubKey"; - const PACKAGE: &'static str = "cosmos.crypto.secp256r1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.crypto.secp256r1.{}", Self::NAME) - } -} -/// PrivKey defines a secp256r1 ECDSA private key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PrivKey { - /// secret number serialized using big-endian encoding - #[prost(bytes = "vec", tag = "1")] - pub secret: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for PrivKey { - const NAME: &'static str = "PrivKey"; - const PACKAGE: &'static str = "cosmos.crypto.secp256r1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.crypto.secp256r1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.crypto.secp256r1.serde.rs b/src/prost/cosmos.crypto.secp256r1.serde.rs deleted file mode 100644 index f1cca10b..00000000 --- a/src/prost/cosmos.crypto.secp256r1.serde.rs +++ /dev/null @@ -1,188 +0,0 @@ -impl serde::Serialize for PrivKey { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.crypto.secp256r1.PrivKey", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("secret", pbjson::private::base64::encode(&self.secret).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PrivKey { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "secret", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Secret, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "secret" => Ok(GeneratedField::Secret), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PrivKey; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.crypto.secp256r1.PrivKey") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut secret__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Secret => { - if secret__.is_some() { - return Err(serde::de::Error::duplicate_field("secret")); - } - secret__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(PrivKey { - secret: secret__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.crypto.secp256r1.PrivKey", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for PubKey { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.crypto.secp256r1.PubKey", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PubKey { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PubKey; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.crypto.secp256r1.PubKey") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(PubKey { - key: key__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.crypto.secp256r1.PubKey", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.gov.module.v1.rs b/src/prost/cosmos.gov.module.v1.rs deleted file mode 100644 index 9a066d49..00000000 --- a/src/prost/cosmos.gov.module.v1.rs +++ /dev/null @@ -1,19 +0,0 @@ -/// Module is the config object of the gov module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Module { - /// max_metadata_len defines the maximum proposal metadata length. - /// Defaults to 255 if not explicitly set. - #[prost(uint64, tag = "1")] - pub max_metadata_len: u64, - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} -impl ::prost::Name for Module { - const NAME: &'static str = "Module"; - const PACKAGE: &'static str = "cosmos.gov.module.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.module.v1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.gov.module.v1.serde.rs b/src/prost/cosmos.gov.module.v1.serde.rs deleted file mode 100644 index 88377721..00000000 --- a/src/prost/cosmos.gov.module.v1.serde.rs +++ /dev/null @@ -1,112 +0,0 @@ -impl serde::Serialize for Module { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.module.v1.Module", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("maxMetadataLen", ::alloc::string::ToString::to_string(&self.max_metadata_len).as_str())?; - } - if true { - struct_ser.serialize_field("authority", &self.authority)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Module { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "max_metadata_len", - "maxMetadataLen", - "authority", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - MaxMetadataLen, - Authority, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "maxMetadataLen" | "max_metadata_len" => Ok(GeneratedField::MaxMetadataLen), - "authority" => Ok(GeneratedField::Authority), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Module; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.module.v1.Module") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut max_metadata_len__ = None; - let mut authority__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::MaxMetadataLen => { - if max_metadata_len__.is_some() { - return Err(serde::de::Error::duplicate_field("maxMetadataLen")); - } - max_metadata_len__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); - } - authority__ = Some(map_.next_value()?); - } - } - } - Ok(Module { - max_metadata_len: max_metadata_len__.unwrap_or_default(), - authority: authority__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.module.v1.Module", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.gov.v1.rs b/src/prost/cosmos.gov.v1.rs deleted file mode 100644 index feb0a17d..00000000 --- a/src/prost/cosmos.gov.v1.rs +++ /dev/null @@ -1,2459 +0,0 @@ -/// WeightedVoteOption defines a unit of vote for vote split. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct WeightedVoteOption { - /// option defines the valid vote options, it must not contain duplicate vote options. - #[prost(enumeration = "VoteOption", tag = "1")] - pub option: i32, - /// weight is the vote weight associated with the vote option. - #[prost(string, tag = "2")] - pub weight: ::prost::alloc::string::String, -} -impl ::prost::Name for WeightedVoteOption { - const NAME: &'static str = "WeightedVoteOption"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// Deposit defines an amount deposited by an account address to an active -/// proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Deposit { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, - /// amount to be deposited by depositor. - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Deposit { - const NAME: &'static str = "Deposit"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// Proposal defines the core field members of a governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Proposal { - /// id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub id: u64, - /// messages are the arbitrary messages to be executed if the proposal passes. - #[prost(message, repeated, tag = "2")] - pub messages: ::prost::alloc::vec::Vec, - /// status defines the proposal status. - #[prost(enumeration = "ProposalStatus", tag = "3")] - pub status: i32, - /// final_tally_result is the final tally result of the proposal. When - /// querying a proposal via gRPC, this field is not populated until the - /// proposal's voting period has ended. - #[prost(message, optional, tag = "4")] - pub final_tally_result: ::core::option::Option, - /// submit_time is the time of proposal submission. - #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, - /// deposit_end_time is the end time for deposition. - #[prost(message, optional, tag = "6")] - pub deposit_end_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, - /// total_deposit is the total deposit on the proposal. - #[prost(message, repeated, tag = "7")] - pub total_deposit: ::prost::alloc::vec::Vec, - /// voting_start_time is the starting time to vote on a proposal. - #[prost(message, optional, tag = "8")] - pub voting_start_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, - /// voting_end_time is the end time of voting on a proposal. - #[prost(message, optional, tag = "9")] - pub voting_end_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, - /// metadata is any arbitrary metadata attached to the proposal. - #[prost(string, tag = "10")] - pub metadata: ::prost::alloc::string::String, - /// title is the title of the proposal - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "11")] - pub title: ::prost::alloc::string::String, - /// summary is a short summary of the proposal - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "12")] - pub summary: ::prost::alloc::string::String, - /// Proposer is the address of the proposal sumbitter - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "13")] - pub proposer: ::prost::alloc::string::String, -} -impl ::prost::Name for Proposal { - const NAME: &'static str = "Proposal"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// TallyResult defines a standard tally for a governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TallyResult { - /// yes_count is the number of yes votes on a proposal. - #[prost(string, tag = "1")] - pub yes_count: ::prost::alloc::string::String, - /// abstain_count is the number of abstain votes on a proposal. - #[prost(string, tag = "2")] - pub abstain_count: ::prost::alloc::string::String, - /// no_count is the number of no votes on a proposal. - #[prost(string, tag = "3")] - pub no_count: ::prost::alloc::string::String, - /// no_with_veto_count is the number of no with veto votes on a proposal. - #[prost(string, tag = "4")] - pub no_with_veto_count: ::prost::alloc::string::String, -} -impl ::prost::Name for TallyResult { - const NAME: &'static str = "TallyResult"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// Vote defines a vote on a governance proposal. -/// A Vote consists of a proposal ID, the voter, and the vote option. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Vote { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter is the voter address of the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// options is the weighted vote options. - #[prost(message, repeated, tag = "4")] - pub options: ::prost::alloc::vec::Vec, - /// metadata is any arbitrary metadata to attached to the vote. - #[prost(string, tag = "5")] - pub metadata: ::prost::alloc::string::String, -} -impl ::prost::Name for Vote { - const NAME: &'static str = "Vote"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// DepositParams defines the params for deposits on governance proposals. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DepositParams { - /// Minimum deposit for a proposal to enter voting period. - #[prost(message, repeated, tag = "1")] - pub min_deposit: ::prost::alloc::vec::Vec, - /// Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - /// months. - #[prost(message, optional, tag = "2")] - pub max_deposit_period: ::core::option::Option< - super::super::super::google::protobuf::Duration, - >, -} -impl ::prost::Name for DepositParams { - const NAME: &'static str = "DepositParams"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// VotingParams defines the params for voting on governance proposals. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct VotingParams { - /// Duration of the voting period. - #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option< - super::super::super::google::protobuf::Duration, - >, -} -impl ::prost::Name for VotingParams { - const NAME: &'static str = "VotingParams"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// TallyParams defines the params for tallying votes on governance proposals. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TallyParams { - /// Minimum percentage of total stake needed to vote for a result to be - /// considered valid. - #[prost(string, tag = "1")] - pub quorum: ::prost::alloc::string::String, - /// Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - #[prost(string, tag = "2")] - pub threshold: ::prost::alloc::string::String, - /// Minimum value of Veto votes to Total votes ratio for proposal to be - /// vetoed. Default value: 1/3. - #[prost(string, tag = "3")] - pub veto_threshold: ::prost::alloc::string::String, -} -impl ::prost::Name for TallyParams { - const NAME: &'static str = "TallyParams"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// Params defines the parameters for the x/gov module. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// Minimum deposit for a proposal to enter voting period. - #[prost(message, repeated, tag = "1")] - pub min_deposit: ::prost::alloc::vec::Vec, - /// Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - /// months. - #[prost(message, optional, tag = "2")] - pub max_deposit_period: ::core::option::Option< - super::super::super::google::protobuf::Duration, - >, - /// Duration of the voting period. - #[prost(message, optional, tag = "3")] - pub voting_period: ::core::option::Option< - super::super::super::google::protobuf::Duration, - >, - /// Minimum percentage of total stake needed to vote for a result to be - /// considered valid. - #[prost(string, tag = "4")] - pub quorum: ::prost::alloc::string::String, - /// Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - #[prost(string, tag = "5")] - pub threshold: ::prost::alloc::string::String, - /// Minimum value of Veto votes to Total votes ratio for proposal to be - /// vetoed. Default value: 1/3. - #[prost(string, tag = "6")] - pub veto_threshold: ::prost::alloc::string::String, - /// The ratio representing the proportion of the deposit value that must be paid at proposal submission. - #[prost(string, tag = "7")] - pub min_initial_deposit_ratio: ::prost::alloc::string::String, - /// burn deposits if a proposal does not meet quorum - #[prost(bool, tag = "13")] - pub burn_vote_quorum: bool, - /// burn deposits if the proposal does not enter voting period - #[prost(bool, tag = "14")] - pub burn_proposal_deposit_prevote: bool, - /// burn deposits if quorum with vote type no_veto is met - #[prost(bool, tag = "15")] - pub burn_vote_veto: bool, -} -impl ::prost::Name for Params { - const NAME: &'static str = "Params"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// VoteOption enumerates the valid vote options for a given governance proposal. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum VoteOption { - /// VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - Unspecified = 0, - /// VOTE_OPTION_YES defines a yes vote option. - Yes = 1, - /// VOTE_OPTION_ABSTAIN defines an abstain vote option. - Abstain = 2, - /// VOTE_OPTION_NO defines a no vote option. - No = 3, - /// VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - NoWithVeto = 4, -} -impl VoteOption { - /// 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 { - VoteOption::Unspecified => "VOTE_OPTION_UNSPECIFIED", - VoteOption::Yes => "VOTE_OPTION_YES", - VoteOption::Abstain => "VOTE_OPTION_ABSTAIN", - VoteOption::No => "VOTE_OPTION_NO", - VoteOption::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "VOTE_OPTION_UNSPECIFIED" => Some(Self::Unspecified), - "VOTE_OPTION_YES" => Some(Self::Yes), - "VOTE_OPTION_ABSTAIN" => Some(Self::Abstain), - "VOTE_OPTION_NO" => Some(Self::No), - "VOTE_OPTION_NO_WITH_VETO" => Some(Self::NoWithVeto), - _ => None, - } - } -} -/// ProposalStatus enumerates the valid statuses of a proposal. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum ProposalStatus { - /// PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - Unspecified = 0, - /// PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - /// period. - DepositPeriod = 1, - /// PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - /// period. - VotingPeriod = 2, - /// PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - /// passed. - Passed = 3, - /// PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - /// been rejected. - Rejected = 4, - /// PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - /// failed. - Failed = 5, -} -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::Unspecified => "PROPOSAL_STATUS_UNSPECIFIED", - ProposalStatus::DepositPeriod => "PROPOSAL_STATUS_DEPOSIT_PERIOD", - ProposalStatus::VotingPeriod => "PROPOSAL_STATUS_VOTING_PERIOD", - ProposalStatus::Passed => "PROPOSAL_STATUS_PASSED", - ProposalStatus::Rejected => "PROPOSAL_STATUS_REJECTED", - ProposalStatus::Failed => "PROPOSAL_STATUS_FAILED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "PROPOSAL_STATUS_UNSPECIFIED" => Some(Self::Unspecified), - "PROPOSAL_STATUS_DEPOSIT_PERIOD" => Some(Self::DepositPeriod), - "PROPOSAL_STATUS_VOTING_PERIOD" => Some(Self::VotingPeriod), - "PROPOSAL_STATUS_PASSED" => Some(Self::Passed), - "PROPOSAL_STATUS_REJECTED" => Some(Self::Rejected), - "PROPOSAL_STATUS_FAILED" => Some(Self::Failed), - _ => None, - } - } -} -/// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -/// proposal Content. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposal { - /// messages are the arbitrary messages to be executed if proposal passes. - #[prost(message, repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec, - /// initial_deposit is the deposit value that must be paid at proposal submission. - #[prost(message, repeated, tag = "2")] - pub initial_deposit: ::prost::alloc::vec::Vec, - /// proposer is the account address of the proposer. - #[prost(string, tag = "3")] - pub proposer: ::prost::alloc::string::String, - /// metadata is any arbitrary metadata attached to the proposal. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, - /// title is the title of the proposal. - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "5")] - pub title: ::prost::alloc::string::String, - /// summary is the summary of the proposal - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "6")] - pub summary: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgSubmitProposal { - const NAME: &'static str = "MsgSubmitProposal"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposalResponse { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -impl ::prost::Name for MsgSubmitProposalResponse { - const NAME: &'static str = "MsgSubmitProposalResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// MsgExecLegacyContent is used to wrap the legacy content field into a message. -/// This ensures backwards compatibility with v1beta1.MsgSubmitProposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecLegacyContent { - /// content is the proposal's content. - #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option, - /// authority must be the gov module address. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgExecLegacyContent { - const NAME: &'static str = "MsgExecLegacyContent"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecLegacyContentResponse {} -impl ::prost::Name for MsgExecLegacyContentResponse { - const NAME: &'static str = "MsgExecLegacyContentResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// MsgVote defines a message to cast a vote. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVote { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter is the voter address for the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// option defines the vote option. - #[prost(enumeration = "VoteOption", tag = "3")] - pub option: i32, - /// metadata is any arbitrary metadata attached to the Vote. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgVote { - const NAME: &'static str = "MsgVote"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// MsgVoteResponse defines the Msg/Vote response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteResponse {} -impl ::prost::Name for MsgVoteResponse { - const NAME: &'static str = "MsgVoteResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// MsgVoteWeighted defines a message to cast a vote. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeighted { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter is the voter address for the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// options defines the weighted vote options. - #[prost(message, repeated, tag = "3")] - pub options: ::prost::alloc::vec::Vec, - /// metadata is any arbitrary metadata attached to the VoteWeighted. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgVoteWeighted { - const NAME: &'static str = "MsgVoteWeighted"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeightedResponse {} -impl ::prost::Name for MsgVoteWeightedResponse { - const NAME: &'static str = "MsgVoteWeightedResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// MsgDeposit defines a message to submit a deposit to an existing proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDeposit { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, - /// amount to be deposited by depositor. - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgDeposit { - const NAME: &'static str = "MsgDeposit"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// MsgDepositResponse defines the Msg/Deposit response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDepositResponse {} -impl ::prost::Name for MsgDepositResponse { - const NAME: &'static str = "MsgDepositResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/gov parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Msg defines the gov Msg service. - #[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 - } - /// SubmitProposal defines a method to create new proposal given the messages. - pub async fn submit_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( - "/cosmos.gov.v1.Msg/SubmitProposal", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "SubmitProposal")); - self.inner.unary(req, path, codec).await - } - /// ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal - /// to execute a legacy content-based proposal. - pub async fn exec_legacy_content( - &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.gov.v1.Msg/ExecLegacyContent", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "ExecLegacyContent")); - self.inner.unary(req, path, codec).await - } - /// Vote defines a method to add a vote on a specific proposal. - pub async fn vote( - &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.gov.v1.Msg/Vote"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new("cosmos.gov.v1.Msg", "Vote")); - self.inner.unary(req, path, codec).await - } - /// VoteWeighted defines a method to add a weighted vote on a specific proposal. - pub async fn vote_weighted( - &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.gov.v1.Msg/VoteWeighted", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "VoteWeighted")); - self.inner.unary(req, path, codec).await - } - /// Deposit defines a method to add deposit on a specific proposal. - pub async fn deposit( - &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.gov.v1.Msg/Deposit", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new("cosmos.gov.v1.Msg", "Deposit")); - self.inner.unary(req, path, codec).await - } - /// UpdateParams defines a governance operation for updating the x/gov module - /// parameters. The authority is defined in the keeper. - /// - /// Since: cosmos-sdk 0.47 - pub async fn update_params( - &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.gov.v1.Msg/UpdateParams", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "UpdateParams")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -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 { - /// SubmitProposal defines a method to create new proposal given the messages. - async fn submit_proposal( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal - /// to execute a legacy content-based proposal. - async fn exec_legacy_content( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Vote defines a method to add a vote on a specific proposal. - async fn vote( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - /// VoteWeighted defines a method to add a weighted vote on a specific proposal. - async fn vote_weighted( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Deposit defines a method to add deposit on a specific proposal. - async fn deposit( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// UpdateParams defines a governance operation for updating the x/gov module - /// parameters. The authority is defined in the keeper. - /// - /// Since: cosmos-sdk 0.47 - async fn update_params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Msg defines the gov Msg service. - #[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() { - "/cosmos.gov.v1.Msg/SubmitProposal" => { - #[allow(non_camel_case_types)] - struct SubmitProposalSvc(pub Arc); - impl tonic::server::UnaryService - for SubmitProposalSvc { - type Response = super::MsgSubmitProposalResponse; - 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 { - ::submit_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 = SubmitProposalSvc(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.gov.v1.Msg/ExecLegacyContent" => { - #[allow(non_camel_case_types)] - struct ExecLegacyContentSvc(pub Arc); - impl tonic::server::UnaryService - for ExecLegacyContentSvc { - type Response = super::MsgExecLegacyContentResponse; - 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 { - ::exec_legacy_content(&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 = ExecLegacyContentSvc(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.gov.v1.Msg/Vote" => { - #[allow(non_camel_case_types)] - struct VoteSvc(pub Arc); - impl tonic::server::UnaryService - for VoteSvc { - type Response = super::MsgVoteResponse; - 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 { - ::vote(&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 = VoteSvc(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.gov.v1.Msg/VoteWeighted" => { - #[allow(non_camel_case_types)] - struct VoteWeightedSvc(pub Arc); - impl tonic::server::UnaryService - for VoteWeightedSvc { - type Response = super::MsgVoteWeightedResponse; - 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 { - ::vote_weighted(&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 = VoteWeightedSvc(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.gov.v1.Msg/Deposit" => { - #[allow(non_camel_case_types)] - struct DepositSvc(pub Arc); - impl tonic::server::UnaryService - for DepositSvc { - type Response = super::MsgDepositResponse; - 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 { - ::deposit(&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 = DepositSvc(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.gov.v1.Msg/UpdateParams" => { - #[allow(non_camel_case_types)] - struct UpdateParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateParamsSvc { - type Response = super::MsgUpdateParamsResponse; - 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 { - ::update_params(&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 = UpdateParamsSvc(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 = "cosmos.gov.v1.Msg"; - } -} -/// QueryProposalRequest is the request type for the Query/Proposal RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -impl ::prost::Name for QueryProposalRequest { - const NAME: &'static str = "QueryProposalRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryProposalResponse is the response type for the Query/Proposal RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalResponse { - /// proposal is the requested governance proposal. - #[prost(message, optional, tag = "1")] - pub proposal: ::core::option::Option, -} -impl ::prost::Name for QueryProposalResponse { - const NAME: &'static str = "QueryProposalResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryProposalsRequest is the request type for the Query/Proposals RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsRequest { - /// proposal_status defines the status of the proposals. - #[prost(enumeration = "ProposalStatus", tag = "1")] - pub proposal_status: i32, - /// voter defines the voter address for the proposals. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "3")] - pub depositor: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "4")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryProposalsRequest { - const NAME: &'static str = "QueryProposalsRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryProposalsResponse is the response type for the Query/Proposals RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsResponse { - /// proposals defines all the requested governance proposals. - #[prost(message, repeated, tag = "1")] - pub proposals: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryProposalsResponse { - const NAME: &'static str = "QueryProposalsResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryVoteRequest is the request type for the Query/Vote RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter defines the voter address for the proposals. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryVoteRequest { - const NAME: &'static str = "QueryVoteRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryVoteResponse is the response type for the Query/Vote RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteResponse { - /// vote defines the queried vote. - #[prost(message, optional, tag = "1")] - pub vote: ::core::option::Option, -} -impl ::prost::Name for QueryVoteResponse { - const NAME: &'static str = "QueryVoteResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryVotesRequest is the request type for the Query/Votes RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryVotesRequest { - const NAME: &'static str = "QueryVotesRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryVotesResponse is the response type for the Query/Votes RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesResponse { - /// votes defines the queried votes. - #[prost(message, repeated, tag = "1")] - pub votes: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryVotesResponse { - const NAME: &'static str = "QueryVotesResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest { - /// params_type defines which parameters to query for, can be one of "voting", - /// "tallying" or "deposit". - #[prost(string, tag = "1")] - pub params_type: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// Deprecated: Prefer to use `params` instead. - /// voting_params defines the parameters related to voting. - #[deprecated] - #[prost(message, optional, tag = "1")] - pub voting_params: ::core::option::Option, - /// Deprecated: Prefer to use `params` instead. - /// deposit_params defines the parameters related to deposit. - #[deprecated] - #[prost(message, optional, tag = "2")] - pub deposit_params: ::core::option::Option, - /// Deprecated: Prefer to use `params` instead. - /// tally_params defines the parameters related to tally. - #[deprecated] - #[prost(message, optional, tag = "3")] - pub tally_params: ::core::option::Option, - /// params defines all the paramaters of x/gov module. - /// - /// Since: cosmos-sdk 0.47 - #[prost(message, optional, tag = "4")] - pub params: ::core::option::Option, -} -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryDepositRequest is the request type for the Query/Deposit RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryDepositRequest { - const NAME: &'static str = "QueryDepositRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryDepositResponse is the response type for the Query/Deposit RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositResponse { - /// deposit defines the requested deposit. - #[prost(message, optional, tag = "1")] - pub deposit: ::core::option::Option, -} -impl ::prost::Name for QueryDepositResponse { - const NAME: &'static str = "QueryDepositResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryDepositsRequest is the request type for the Query/Deposits RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositsRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryDepositsRequest { - const NAME: &'static str = "QueryDepositsRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositsResponse { - /// deposits defines the requested deposits. - #[prost(message, repeated, tag = "1")] - pub deposits: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryDepositsResponse { - const NAME: &'static str = "QueryDepositsResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryTallyResultRequest is the request type for the Query/Tally RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -impl ::prost::Name for QueryTallyResultRequest { - const NAME: &'static str = "QueryTallyResultRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultResponse { - /// tally defines the requested tally. - #[prost(message, optional, tag = "1")] - pub tally: ::core::option::Option, -} -impl ::prost::Name for QueryTallyResultResponse { - const NAME: &'static str = "QueryTallyResultResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Query defines the gRPC querier service for gov module - #[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 - } - /// Proposal queries proposal details based on ProposalID. - pub async fn 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( - "/cosmos.gov.v1.Query/Proposal", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Proposal")); - self.inner.unary(req, path, codec).await - } - /// Proposals queries all proposals based on given status. - pub async fn proposals( - &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.gov.v1.Query/Proposals", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Proposals")); - self.inner.unary(req, path, codec).await - } - /// Vote queries voted information based on proposalID, voterAddr. - pub async fn vote( - &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.gov.v1.Query/Vote"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new("cosmos.gov.v1.Query", "Vote")); - self.inner.unary(req, path, codec).await - } - /// Votes queries votes of a given proposal. - pub async fn votes( - &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.gov.v1.Query/Votes", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new("cosmos.gov.v1.Query", "Votes")); - self.inner.unary(req, path, codec).await - } - /// Params queries all parameters of the gov module. - pub async fn params( - &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.gov.v1.Query/Params", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Params")); - self.inner.unary(req, path, codec).await - } - /// Deposit queries single deposit information based proposalID, depositAddr. - pub async fn deposit( - &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.gov.v1.Query/Deposit", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Deposit")); - self.inner.unary(req, path, codec).await - } - /// Deposits queries all deposits of a single proposal. - pub async fn deposits( - &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.gov.v1.Query/Deposits", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Deposits")); - self.inner.unary(req, path, codec).await - } - /// TallyResult queries the tally of a proposal vote. - pub async fn tally_result( - &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.gov.v1.Query/TallyResult", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "TallyResult")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -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 { - /// Proposal queries proposal details based on ProposalID. - async fn proposal( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Proposals queries all proposals based on given status. - async fn proposals( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Vote queries voted information based on proposalID, voterAddr. - async fn vote( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Votes queries votes of a given proposal. - async fn votes( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Params queries all parameters of the gov module. - async fn params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Deposit queries single deposit information based proposalID, depositAddr. - async fn deposit( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Deposits queries all deposits of a single proposal. - async fn deposits( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// TallyResult queries the tally of a proposal vote. - async fn tally_result( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Query defines the gRPC querier service for gov module - #[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() { - "/cosmos.gov.v1.Query/Proposal" => { - #[allow(non_camel_case_types)] - struct ProposalSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ProposalSvc { - type Response = super::QueryProposalResponse; - 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 { - ::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 = ProposalSvc(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.gov.v1.Query/Proposals" => { - #[allow(non_camel_case_types)] - struct ProposalsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ProposalsSvc { - type Response = super::QueryProposalsResponse; - 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 { - ::proposals(&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 = ProposalsSvc(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.gov.v1.Query/Vote" => { - #[allow(non_camel_case_types)] - struct VoteSvc(pub Arc); - impl tonic::server::UnaryService - for VoteSvc { - type Response = super::QueryVoteResponse; - 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 { - ::vote(&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 = VoteSvc(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.gov.v1.Query/Votes" => { - #[allow(non_camel_case_types)] - struct VotesSvc(pub Arc); - impl tonic::server::UnaryService - for VotesSvc { - type Response = super::QueryVotesResponse; - 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 { - ::votes(&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 = VotesSvc(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.gov.v1.Query/Params" => { - #[allow(non_camel_case_types)] - struct ParamsSvc(pub Arc); - impl tonic::server::UnaryService - for ParamsSvc { - type Response = super::QueryParamsResponse; - 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 { - ::params(&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 = ParamsSvc(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.gov.v1.Query/Deposit" => { - #[allow(non_camel_case_types)] - struct DepositSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DepositSvc { - type Response = super::QueryDepositResponse; - 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 { - ::deposit(&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 = DepositSvc(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.gov.v1.Query/Deposits" => { - #[allow(non_camel_case_types)] - struct DepositsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DepositsSvc { - type Response = super::QueryDepositsResponse; - 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 { - ::deposits(&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 = DepositsSvc(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.gov.v1.Query/TallyResult" => { - #[allow(non_camel_case_types)] - struct TallyResultSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for TallyResultSvc { - type Response = super::QueryTallyResultResponse; - 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 { - ::tally_result(&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 = TallyResultSvc(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 = "cosmos.gov.v1.Query"; - } -} -/// GenesisState defines the gov module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// starting_proposal_id is the ID of the starting proposal. - #[prost(uint64, tag = "1")] - pub starting_proposal_id: u64, - /// deposits defines all the deposits present at genesis. - #[prost(message, repeated, tag = "2")] - pub deposits: ::prost::alloc::vec::Vec, - /// votes defines all the votes present at genesis. - #[prost(message, repeated, tag = "3")] - pub votes: ::prost::alloc::vec::Vec, - /// proposals defines all the proposals present at genesis. - #[prost(message, repeated, tag = "4")] - pub proposals: ::prost::alloc::vec::Vec, - /// Deprecated: Prefer to use `params` instead. - /// deposit_params defines all the paramaters of related to deposit. - #[deprecated] - #[prost(message, optional, tag = "5")] - pub deposit_params: ::core::option::Option, - /// Deprecated: Prefer to use `params` instead. - /// voting_params defines all the paramaters of related to voting. - #[deprecated] - #[prost(message, optional, tag = "6")] - pub voting_params: ::core::option::Option, - /// Deprecated: Prefer to use `params` instead. - /// tally_params defines all the paramaters of related to tally. - #[deprecated] - #[prost(message, optional, tag = "7")] - pub tally_params: ::core::option::Option, - /// params defines all the paramaters of x/gov module. - /// - /// Since: cosmos-sdk 0.47 - #[prost(message, optional, tag = "8")] - pub params: ::core::option::Option, -} -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.gov.v1.serde.rs b/src/prost/cosmos.gov.v1.serde.rs deleted file mode 100644 index 82932543..00000000 --- a/src/prost/cosmos.gov.v1.serde.rs +++ /dev/null @@ -1,4771 +0,0 @@ -impl serde::Serialize for Deposit { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.Deposit", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("depositor", &self.depositor)?; - } - if true { - struct_ser.serialize_field("amount", &self.amount)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Deposit { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "depositor", - "amount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Depositor, - Amount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "depositor" => Ok(GeneratedField::Depositor), - "amount" => Ok(GeneratedField::Amount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Deposit; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.Deposit") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut depositor__ = None; - let mut amount__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Depositor => { - if depositor__.is_some() { - return Err(serde::de::Error::duplicate_field("depositor")); - } - depositor__ = Some(map_.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = Some(map_.next_value()?); - } - } - } - Ok(Deposit { - proposal_id: proposal_id__.unwrap_or_default(), - depositor: depositor__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.Deposit", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for DepositParams { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.DepositParams", len)?; - if true { - struct_ser.serialize_field("minDeposit", &self.min_deposit)?; - } - if let Some(v) = self.max_deposit_period.as_ref() { - struct_ser.serialize_field("maxDepositPeriod", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for DepositParams { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "min_deposit", - "minDeposit", - "max_deposit_period", - "maxDepositPeriod", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - MinDeposit, - MaxDepositPeriod, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "minDeposit" | "min_deposit" => Ok(GeneratedField::MinDeposit), - "maxDepositPeriod" | "max_deposit_period" => Ok(GeneratedField::MaxDepositPeriod), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DepositParams; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.DepositParams") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut min_deposit__ = None; - let mut max_deposit_period__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::MinDeposit => { - if min_deposit__.is_some() { - return Err(serde::de::Error::duplicate_field("minDeposit")); - } - min_deposit__ = Some(map_.next_value()?); - } - GeneratedField::MaxDepositPeriod => { - if max_deposit_period__.is_some() { - return Err(serde::de::Error::duplicate_field("maxDepositPeriod")); - } - max_deposit_period__ = map_.next_value()?; - } - } - } - Ok(DepositParams { - min_deposit: min_deposit__.unwrap_or_default(), - max_deposit_period: max_deposit_period__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.DepositParams", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GenesisState { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.GenesisState", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("startingProposalId", ::alloc::string::ToString::to_string(&self.starting_proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("deposits", &self.deposits)?; - } - if true { - struct_ser.serialize_field("votes", &self.votes)?; - } - if true { - struct_ser.serialize_field("proposals", &self.proposals)?; - } - if let Some(v) = self.deposit_params.as_ref() { - struct_ser.serialize_field("depositParams", v)?; - } - if let Some(v) = self.voting_params.as_ref() { - struct_ser.serialize_field("votingParams", v)?; - } - if let Some(v) = self.tally_params.as_ref() { - struct_ser.serialize_field("tallyParams", v)?; - } - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GenesisState { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "starting_proposal_id", - "startingProposalId", - "deposits", - "votes", - "proposals", - "deposit_params", - "depositParams", - "voting_params", - "votingParams", - "tally_params", - "tallyParams", - "params", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - StartingProposalId, - Deposits, - Votes, - Proposals, - DepositParams, - VotingParams, - TallyParams, - Params, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "startingProposalId" | "starting_proposal_id" => Ok(GeneratedField::StartingProposalId), - "deposits" => Ok(GeneratedField::Deposits), - "votes" => Ok(GeneratedField::Votes), - "proposals" => Ok(GeneratedField::Proposals), - "depositParams" | "deposit_params" => Ok(GeneratedField::DepositParams), - "votingParams" | "voting_params" => Ok(GeneratedField::VotingParams), - "tallyParams" | "tally_params" => Ok(GeneratedField::TallyParams), - "params" => Ok(GeneratedField::Params), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GenesisState; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.GenesisState") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut starting_proposal_id__ = None; - let mut deposits__ = None; - let mut votes__ = None; - let mut proposals__ = None; - let mut deposit_params__ = None; - let mut voting_params__ = None; - let mut tally_params__ = None; - let mut params__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::StartingProposalId => { - if starting_proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("startingProposalId")); - } - starting_proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Deposits => { - if deposits__.is_some() { - return Err(serde::de::Error::duplicate_field("deposits")); - } - deposits__ = Some(map_.next_value()?); - } - GeneratedField::Votes => { - if votes__.is_some() { - return Err(serde::de::Error::duplicate_field("votes")); - } - votes__ = Some(map_.next_value()?); - } - GeneratedField::Proposals => { - if proposals__.is_some() { - return Err(serde::de::Error::duplicate_field("proposals")); - } - proposals__ = Some(map_.next_value()?); - } - GeneratedField::DepositParams => { - if deposit_params__.is_some() { - return Err(serde::de::Error::duplicate_field("depositParams")); - } - deposit_params__ = map_.next_value()?; - } - GeneratedField::VotingParams => { - if voting_params__.is_some() { - return Err(serde::de::Error::duplicate_field("votingParams")); - } - voting_params__ = map_.next_value()?; - } - GeneratedField::TallyParams => { - if tally_params__.is_some() { - return Err(serde::de::Error::duplicate_field("tallyParams")); - } - tally_params__ = map_.next_value()?; - } - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); - } - params__ = map_.next_value()?; - } - } - } - Ok(GenesisState { - starting_proposal_id: starting_proposal_id__.unwrap_or_default(), - deposits: deposits__.unwrap_or_default(), - votes: votes__.unwrap_or_default(), - proposals: proposals__.unwrap_or_default(), - deposit_params: deposit_params__, - voting_params: voting_params__, - tally_params: tally_params__, - params: params__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.GenesisState", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgDeposit { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgDeposit", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("depositor", &self.depositor)?; - } - if true { - struct_ser.serialize_field("amount", &self.amount)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgDeposit { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "depositor", - "amount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Depositor, - Amount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "depositor" => Ok(GeneratedField::Depositor), - "amount" => Ok(GeneratedField::Amount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgDeposit; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.MsgDeposit") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut depositor__ = None; - let mut amount__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Depositor => { - if depositor__.is_some() { - return Err(serde::de::Error::duplicate_field("depositor")); - } - depositor__ = Some(map_.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = Some(map_.next_value()?); - } - } - } - Ok(MsgDeposit { - proposal_id: proposal_id__.unwrap_or_default(), - depositor: depositor__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.MsgDeposit", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgDepositResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgDepositResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgDepositResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgDepositResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.MsgDepositResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgDepositResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.MsgDepositResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgExecLegacyContent { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgExecLegacyContent", len)?; - if let Some(v) = self.content.as_ref() { - struct_ser.serialize_field("content", v)?; - } - if true { - struct_ser.serialize_field("authority", &self.authority)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgExecLegacyContent { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "content", - "authority", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Content, - Authority, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "content" => Ok(GeneratedField::Content), - "authority" => Ok(GeneratedField::Authority), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgExecLegacyContent; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.MsgExecLegacyContent") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut content__ = None; - let mut authority__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Content => { - if content__.is_some() { - return Err(serde::de::Error::duplicate_field("content")); - } - content__ = map_.next_value()?; - } - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); - } - authority__ = Some(map_.next_value()?); - } - } - } - Ok(MsgExecLegacyContent { - content: content__, - authority: authority__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.MsgExecLegacyContent", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgExecLegacyContentResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgExecLegacyContentResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgExecLegacyContentResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgExecLegacyContentResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.MsgExecLegacyContentResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgExecLegacyContentResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.MsgExecLegacyContentResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgSubmitProposal { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgSubmitProposal", len)?; - if true { - struct_ser.serialize_field("messages", &self.messages)?; - } - if true { - struct_ser.serialize_field("initialDeposit", &self.initial_deposit)?; - } - if true { - struct_ser.serialize_field("proposer", &self.proposer)?; - } - if true { - struct_ser.serialize_field("metadata", &self.metadata)?; - } - if true { - struct_ser.serialize_field("title", &self.title)?; - } - if true { - struct_ser.serialize_field("summary", &self.summary)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "messages", - "initial_deposit", - "initialDeposit", - "proposer", - "metadata", - "title", - "summary", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Messages, - InitialDeposit, - Proposer, - Metadata, - Title, - Summary, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "messages" => Ok(GeneratedField::Messages), - "initialDeposit" | "initial_deposit" => Ok(GeneratedField::InitialDeposit), - "proposer" => Ok(GeneratedField::Proposer), - "metadata" => Ok(GeneratedField::Metadata), - "title" => Ok(GeneratedField::Title), - "summary" => Ok(GeneratedField::Summary), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgSubmitProposal; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.MsgSubmitProposal") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut messages__ = None; - let mut initial_deposit__ = None; - let mut proposer__ = None; - let mut metadata__ = None; - let mut title__ = None; - let mut summary__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Messages => { - if messages__.is_some() { - return Err(serde::de::Error::duplicate_field("messages")); - } - messages__ = Some(map_.next_value()?); - } - GeneratedField::InitialDeposit => { - if initial_deposit__.is_some() { - return Err(serde::de::Error::duplicate_field("initialDeposit")); - } - initial_deposit__ = Some(map_.next_value()?); - } - GeneratedField::Proposer => { - if proposer__.is_some() { - return Err(serde::de::Error::duplicate_field("proposer")); - } - proposer__ = Some(map_.next_value()?); - } - GeneratedField::Metadata => { - if metadata__.is_some() { - return Err(serde::de::Error::duplicate_field("metadata")); - } - metadata__ = Some(map_.next_value()?); - } - GeneratedField::Title => { - if title__.is_some() { - return Err(serde::de::Error::duplicate_field("title")); - } - title__ = Some(map_.next_value()?); - } - GeneratedField::Summary => { - if summary__.is_some() { - return Err(serde::de::Error::duplicate_field("summary")); - } - summary__ = Some(map_.next_value()?); - } - } - } - Ok(MsgSubmitProposal { - messages: messages__.unwrap_or_default(), - initial_deposit: initial_deposit__.unwrap_or_default(), - proposer: proposer__.unwrap_or_default(), - metadata: metadata__.unwrap_or_default(), - title: title__.unwrap_or_default(), - summary: summary__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.MsgSubmitProposal", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgSubmitProposalResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgSubmitProposalResponse", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgSubmitProposalResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.MsgSubmitProposalResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(MsgSubmitProposalResponse { - proposal_id: proposal_id__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.MsgSubmitProposalResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgUpdateParams { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgUpdateParams", len)?; - if true { - struct_ser.serialize_field("authority", &self.authority)?; - } - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgUpdateParams { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "authority", - "params", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authority, - Params, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "authority" => Ok(GeneratedField::Authority), - "params" => Ok(GeneratedField::Params), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateParams; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.MsgUpdateParams") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut authority__ = None; - let mut params__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); - } - authority__ = Some(map_.next_value()?); - } - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); - } - params__ = map_.next_value()?; - } - } - } - Ok(MsgUpdateParams { - authority: authority__.unwrap_or_default(), - params: params__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.MsgUpdateParams", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgUpdateParamsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgUpdateParamsResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgUpdateParamsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateParamsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.MsgUpdateParamsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgUpdateParamsResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.MsgUpdateParamsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgVote { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgVote", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("voter", &self.voter)?; - } - if true { - let v = VoteOption::try_from(self.option) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.option)))?; - struct_ser.serialize_field("option", &v)?; - } - if true { - struct_ser.serialize_field("metadata", &self.metadata)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgVote { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "voter", - "option", - "metadata", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Voter, - Option, - Metadata, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "voter" => Ok(GeneratedField::Voter), - "option" => Ok(GeneratedField::Option), - "metadata" => Ok(GeneratedField::Metadata), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgVote; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.MsgVote") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut voter__ = None; - let mut option__ = None; - let mut metadata__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Voter => { - if voter__.is_some() { - return Err(serde::de::Error::duplicate_field("voter")); - } - voter__ = Some(map_.next_value()?); - } - GeneratedField::Option => { - if option__.is_some() { - return Err(serde::de::Error::duplicate_field("option")); - } - option__ = Some(map_.next_value::()? as i32); - } - GeneratedField::Metadata => { - if metadata__.is_some() { - return Err(serde::de::Error::duplicate_field("metadata")); - } - metadata__ = Some(map_.next_value()?); - } - } - } - Ok(MsgVote { - proposal_id: proposal_id__.unwrap_or_default(), - voter: voter__.unwrap_or_default(), - option: option__.unwrap_or_default(), - metadata: metadata__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.MsgVote", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgVoteResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgVoteResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgVoteResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgVoteResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.MsgVoteResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgVoteResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.MsgVoteResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgVoteWeighted { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgVoteWeighted", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("voter", &self.voter)?; - } - if true { - struct_ser.serialize_field("options", &self.options)?; - } - if true { - struct_ser.serialize_field("metadata", &self.metadata)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "voter", - "options", - "metadata", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Voter, - Options, - Metadata, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "voter" => Ok(GeneratedField::Voter), - "options" => Ok(GeneratedField::Options), - "metadata" => Ok(GeneratedField::Metadata), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgVoteWeighted; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.MsgVoteWeighted") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut voter__ = None; - let mut options__ = None; - let mut metadata__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Voter => { - if voter__.is_some() { - return Err(serde::de::Error::duplicate_field("voter")); - } - voter__ = Some(map_.next_value()?); - } - GeneratedField::Options => { - if options__.is_some() { - return Err(serde::de::Error::duplicate_field("options")); - } - options__ = Some(map_.next_value()?); - } - GeneratedField::Metadata => { - if metadata__.is_some() { - return Err(serde::de::Error::duplicate_field("metadata")); - } - metadata__ = Some(map_.next_value()?); - } - } - } - Ok(MsgVoteWeighted { - proposal_id: proposal_id__.unwrap_or_default(), - voter: voter__.unwrap_or_default(), - options: options__.unwrap_or_default(), - metadata: metadata__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.MsgVoteWeighted", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgVoteWeightedResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgVoteWeightedResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgVoteWeightedResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.MsgVoteWeightedResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgVoteWeightedResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.MsgVoteWeightedResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Params { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.Params", len)?; - if true { - struct_ser.serialize_field("minDeposit", &self.min_deposit)?; - } - if let Some(v) = self.max_deposit_period.as_ref() { - struct_ser.serialize_field("maxDepositPeriod", v)?; - } - if let Some(v) = self.voting_period.as_ref() { - struct_ser.serialize_field("votingPeriod", v)?; - } - if true { - struct_ser.serialize_field("quorum", &self.quorum)?; - } - if true { - struct_ser.serialize_field("threshold", &self.threshold)?; - } - if true { - struct_ser.serialize_field("vetoThreshold", &self.veto_threshold)?; - } - if true { - struct_ser.serialize_field("minInitialDepositRatio", &self.min_initial_deposit_ratio)?; - } - if true { - struct_ser.serialize_field("burnVoteQuorum", &self.burn_vote_quorum)?; - } - if true { - struct_ser.serialize_field("burnProposalDepositPrevote", &self.burn_proposal_deposit_prevote)?; - } - if true { - struct_ser.serialize_field("burnVoteVeto", &self.burn_vote_veto)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Params { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "min_deposit", - "minDeposit", - "max_deposit_period", - "maxDepositPeriod", - "voting_period", - "votingPeriod", - "quorum", - "threshold", - "veto_threshold", - "vetoThreshold", - "min_initial_deposit_ratio", - "minInitialDepositRatio", - "burn_vote_quorum", - "burnVoteQuorum", - "burn_proposal_deposit_prevote", - "burnProposalDepositPrevote", - "burn_vote_veto", - "burnVoteVeto", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - MinDeposit, - MaxDepositPeriod, - VotingPeriod, - Quorum, - Threshold, - VetoThreshold, - MinInitialDepositRatio, - BurnVoteQuorum, - BurnProposalDepositPrevote, - BurnVoteVeto, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "minDeposit" | "min_deposit" => Ok(GeneratedField::MinDeposit), - "maxDepositPeriod" | "max_deposit_period" => Ok(GeneratedField::MaxDepositPeriod), - "votingPeriod" | "voting_period" => Ok(GeneratedField::VotingPeriod), - "quorum" => Ok(GeneratedField::Quorum), - "threshold" => Ok(GeneratedField::Threshold), - "vetoThreshold" | "veto_threshold" => Ok(GeneratedField::VetoThreshold), - "minInitialDepositRatio" | "min_initial_deposit_ratio" => Ok(GeneratedField::MinInitialDepositRatio), - "burnVoteQuorum" | "burn_vote_quorum" => Ok(GeneratedField::BurnVoteQuorum), - "burnProposalDepositPrevote" | "burn_proposal_deposit_prevote" => Ok(GeneratedField::BurnProposalDepositPrevote), - "burnVoteVeto" | "burn_vote_veto" => Ok(GeneratedField::BurnVoteVeto), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Params; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.Params") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut min_deposit__ = None; - let mut max_deposit_period__ = None; - let mut voting_period__ = None; - let mut quorum__ = None; - let mut threshold__ = None; - let mut veto_threshold__ = None; - let mut min_initial_deposit_ratio__ = None; - let mut burn_vote_quorum__ = None; - let mut burn_proposal_deposit_prevote__ = None; - let mut burn_vote_veto__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::MinDeposit => { - if min_deposit__.is_some() { - return Err(serde::de::Error::duplicate_field("minDeposit")); - } - min_deposit__ = Some(map_.next_value()?); - } - GeneratedField::MaxDepositPeriod => { - if max_deposit_period__.is_some() { - return Err(serde::de::Error::duplicate_field("maxDepositPeriod")); - } - max_deposit_period__ = map_.next_value()?; - } - GeneratedField::VotingPeriod => { - if voting_period__.is_some() { - return Err(serde::de::Error::duplicate_field("votingPeriod")); - } - voting_period__ = map_.next_value()?; - } - GeneratedField::Quorum => { - if quorum__.is_some() { - return Err(serde::de::Error::duplicate_field("quorum")); - } - quorum__ = Some(map_.next_value()?); - } - GeneratedField::Threshold => { - if threshold__.is_some() { - return Err(serde::de::Error::duplicate_field("threshold")); - } - threshold__ = Some(map_.next_value()?); - } - GeneratedField::VetoThreshold => { - if veto_threshold__.is_some() { - return Err(serde::de::Error::duplicate_field("vetoThreshold")); - } - veto_threshold__ = Some(map_.next_value()?); - } - GeneratedField::MinInitialDepositRatio => { - if min_initial_deposit_ratio__.is_some() { - return Err(serde::de::Error::duplicate_field("minInitialDepositRatio")); - } - min_initial_deposit_ratio__ = Some(map_.next_value()?); - } - GeneratedField::BurnVoteQuorum => { - if burn_vote_quorum__.is_some() { - return Err(serde::de::Error::duplicate_field("burnVoteQuorum")); - } - burn_vote_quorum__ = Some(map_.next_value()?); - } - GeneratedField::BurnProposalDepositPrevote => { - if burn_proposal_deposit_prevote__.is_some() { - return Err(serde::de::Error::duplicate_field("burnProposalDepositPrevote")); - } - burn_proposal_deposit_prevote__ = Some(map_.next_value()?); - } - GeneratedField::BurnVoteVeto => { - if burn_vote_veto__.is_some() { - return Err(serde::de::Error::duplicate_field("burnVoteVeto")); - } - burn_vote_veto__ = Some(map_.next_value()?); - } - } - } - Ok(Params { - min_deposit: min_deposit__.unwrap_or_default(), - max_deposit_period: max_deposit_period__, - voting_period: voting_period__, - quorum: quorum__.unwrap_or_default(), - threshold: threshold__.unwrap_or_default(), - veto_threshold: veto_threshold__.unwrap_or_default(), - min_initial_deposit_ratio: min_initial_deposit_ratio__.unwrap_or_default(), - burn_vote_quorum: burn_vote_quorum__.unwrap_or_default(), - burn_proposal_deposit_prevote: burn_proposal_deposit_prevote__.unwrap_or_default(), - burn_vote_veto: burn_vote_veto__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.Params", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Proposal { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.Proposal", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("id", ::alloc::string::ToString::to_string(&self.id).as_str())?; - } - if true { - struct_ser.serialize_field("messages", &self.messages)?; - } - if true { - let v = ProposalStatus::try_from(self.status) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.status)))?; - struct_ser.serialize_field("status", &v)?; - } - if let Some(v) = self.final_tally_result.as_ref() { - struct_ser.serialize_field("finalTallyResult", v)?; - } - if let Some(v) = self.submit_time.as_ref() { - struct_ser.serialize_field("submitTime", v)?; - } - if let Some(v) = self.deposit_end_time.as_ref() { - struct_ser.serialize_field("depositEndTime", v)?; - } - if true { - struct_ser.serialize_field("totalDeposit", &self.total_deposit)?; - } - if let Some(v) = self.voting_start_time.as_ref() { - struct_ser.serialize_field("votingStartTime", v)?; - } - if let Some(v) = self.voting_end_time.as_ref() { - struct_ser.serialize_field("votingEndTime", v)?; - } - if true { - struct_ser.serialize_field("metadata", &self.metadata)?; - } - if true { - struct_ser.serialize_field("title", &self.title)?; - } - if true { - struct_ser.serialize_field("summary", &self.summary)?; - } - if true { - struct_ser.serialize_field("proposer", &self.proposer)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Proposal { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "id", - "messages", - "status", - "final_tally_result", - "finalTallyResult", - "submit_time", - "submitTime", - "deposit_end_time", - "depositEndTime", - "total_deposit", - "totalDeposit", - "voting_start_time", - "votingStartTime", - "voting_end_time", - "votingEndTime", - "metadata", - "title", - "summary", - "proposer", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Id, - Messages, - Status, - FinalTallyResult, - SubmitTime, - DepositEndTime, - TotalDeposit, - VotingStartTime, - VotingEndTime, - Metadata, - Title, - Summary, - Proposer, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "id" => Ok(GeneratedField::Id), - "messages" => Ok(GeneratedField::Messages), - "status" => Ok(GeneratedField::Status), - "finalTallyResult" | "final_tally_result" => Ok(GeneratedField::FinalTallyResult), - "submitTime" | "submit_time" => Ok(GeneratedField::SubmitTime), - "depositEndTime" | "deposit_end_time" => Ok(GeneratedField::DepositEndTime), - "totalDeposit" | "total_deposit" => Ok(GeneratedField::TotalDeposit), - "votingStartTime" | "voting_start_time" => Ok(GeneratedField::VotingStartTime), - "votingEndTime" | "voting_end_time" => Ok(GeneratedField::VotingEndTime), - "metadata" => Ok(GeneratedField::Metadata), - "title" => Ok(GeneratedField::Title), - "summary" => Ok(GeneratedField::Summary), - "proposer" => Ok(GeneratedField::Proposer), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Proposal; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.Proposal") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut id__ = None; - let mut messages__ = None; - let mut status__ = None; - let mut final_tally_result__ = None; - let mut submit_time__ = None; - let mut deposit_end_time__ = None; - let mut total_deposit__ = None; - let mut voting_start_time__ = None; - let mut voting_end_time__ = None; - let mut metadata__ = None; - let mut title__ = None; - let mut summary__ = None; - let mut proposer__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Id => { - if id__.is_some() { - return Err(serde::de::Error::duplicate_field("id")); - } - id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Messages => { - if messages__.is_some() { - return Err(serde::de::Error::duplicate_field("messages")); - } - messages__ = Some(map_.next_value()?); - } - GeneratedField::Status => { - if status__.is_some() { - return Err(serde::de::Error::duplicate_field("status")); - } - status__ = Some(map_.next_value::()? as i32); - } - GeneratedField::FinalTallyResult => { - if final_tally_result__.is_some() { - return Err(serde::de::Error::duplicate_field("finalTallyResult")); - } - final_tally_result__ = map_.next_value()?; - } - GeneratedField::SubmitTime => { - if submit_time__.is_some() { - return Err(serde::de::Error::duplicate_field("submitTime")); - } - submit_time__ = map_.next_value()?; - } - GeneratedField::DepositEndTime => { - if deposit_end_time__.is_some() { - return Err(serde::de::Error::duplicate_field("depositEndTime")); - } - deposit_end_time__ = map_.next_value()?; - } - GeneratedField::TotalDeposit => { - if total_deposit__.is_some() { - return Err(serde::de::Error::duplicate_field("totalDeposit")); - } - total_deposit__ = Some(map_.next_value()?); - } - GeneratedField::VotingStartTime => { - if voting_start_time__.is_some() { - return Err(serde::de::Error::duplicate_field("votingStartTime")); - } - voting_start_time__ = map_.next_value()?; - } - GeneratedField::VotingEndTime => { - if voting_end_time__.is_some() { - return Err(serde::de::Error::duplicate_field("votingEndTime")); - } - voting_end_time__ = map_.next_value()?; - } - GeneratedField::Metadata => { - if metadata__.is_some() { - return Err(serde::de::Error::duplicate_field("metadata")); - } - metadata__ = Some(map_.next_value()?); - } - GeneratedField::Title => { - if title__.is_some() { - return Err(serde::de::Error::duplicate_field("title")); - } - title__ = Some(map_.next_value()?); - } - GeneratedField::Summary => { - if summary__.is_some() { - return Err(serde::de::Error::duplicate_field("summary")); - } - summary__ = Some(map_.next_value()?); - } - GeneratedField::Proposer => { - if proposer__.is_some() { - return Err(serde::de::Error::duplicate_field("proposer")); - } - proposer__ = Some(map_.next_value()?); - } - } - } - Ok(Proposal { - id: id__.unwrap_or_default(), - messages: messages__.unwrap_or_default(), - status: status__.unwrap_or_default(), - final_tally_result: final_tally_result__, - submit_time: submit_time__, - deposit_end_time: deposit_end_time__, - total_deposit: total_deposit__.unwrap_or_default(), - voting_start_time: voting_start_time__, - voting_end_time: voting_end_time__, - metadata: metadata__.unwrap_or_default(), - title: title__.unwrap_or_default(), - summary: summary__.unwrap_or_default(), - proposer: proposer__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.Proposal", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ProposalStatus { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::Unspecified => "PROPOSAL_STATUS_UNSPECIFIED", - Self::DepositPeriod => "PROPOSAL_STATUS_DEPOSIT_PERIOD", - Self::VotingPeriod => "PROPOSAL_STATUS_VOTING_PERIOD", - Self::Passed => "PROPOSAL_STATUS_PASSED", - Self::Rejected => "PROPOSAL_STATUS_REJECTED", - Self::Failed => "PROPOSAL_STATUS_FAILED", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for ProposalStatus { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "PROPOSAL_STATUS_UNSPECIFIED", - "PROPOSAL_STATUS_DEPOSIT_PERIOD", - "PROPOSAL_STATUS_VOTING_PERIOD", - "PROPOSAL_STATUS_PASSED", - "PROPOSAL_STATUS_REJECTED", - "PROPOSAL_STATUS_FAILED", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ProposalStatus; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "PROPOSAL_STATUS_UNSPECIFIED" => Ok(ProposalStatus::Unspecified), - "PROPOSAL_STATUS_DEPOSIT_PERIOD" => Ok(ProposalStatus::DepositPeriod), - "PROPOSAL_STATUS_VOTING_PERIOD" => Ok(ProposalStatus::VotingPeriod), - "PROPOSAL_STATUS_PASSED" => Ok(ProposalStatus::Passed), - "PROPOSAL_STATUS_REJECTED" => Ok(ProposalStatus::Rejected), - "PROPOSAL_STATUS_FAILED" => Ok(ProposalStatus::Failed), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for QueryDepositRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryDepositRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("depositor", &self.depositor)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDepositRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "depositor", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Depositor, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "depositor" => Ok(GeneratedField::Depositor), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDepositRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryDepositRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut depositor__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Depositor => { - if depositor__.is_some() { - return Err(serde::de::Error::duplicate_field("depositor")); - } - depositor__ = Some(map_.next_value()?); - } - } - } - Ok(QueryDepositRequest { - proposal_id: proposal_id__.unwrap_or_default(), - depositor: depositor__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryDepositRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDepositResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryDepositResponse", len)?; - if let Some(v) = self.deposit.as_ref() { - struct_ser.serialize_field("deposit", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDepositResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "deposit", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Deposit, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "deposit" => Ok(GeneratedField::Deposit), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDepositResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryDepositResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut deposit__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Deposit => { - if deposit__.is_some() { - return Err(serde::de::Error::duplicate_field("deposit")); - } - deposit__ = map_.next_value()?; - } - } - } - Ok(QueryDepositResponse { - deposit: deposit__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryDepositResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDepositsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryDepositsRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDepositsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryDepositsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryDepositsRequest { - proposal_id: proposal_id__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryDepositsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDepositsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryDepositsResponse", len)?; - if true { - struct_ser.serialize_field("deposits", &self.deposits)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "deposits", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Deposits, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "deposits" => Ok(GeneratedField::Deposits), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDepositsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryDepositsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut deposits__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Deposits => { - if deposits__.is_some() { - return Err(serde::de::Error::duplicate_field("deposits")); - } - deposits__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryDepositsResponse { - deposits: deposits__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryDepositsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryParamsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryParamsRequest", len)?; - if true { - struct_ser.serialize_field("paramsType", &self.params_type)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryParamsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "params_type", - "paramsType", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ParamsType, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "paramsType" | "params_type" => Ok(GeneratedField::ParamsType), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryParamsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryParamsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut params_type__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ParamsType => { - if params_type__.is_some() { - return Err(serde::de::Error::duplicate_field("paramsType")); - } - params_type__ = Some(map_.next_value()?); - } - } - } - Ok(QueryParamsRequest { - params_type: params_type__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryParamsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryParamsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryParamsResponse", len)?; - if let Some(v) = self.voting_params.as_ref() { - struct_ser.serialize_field("votingParams", v)?; - } - if let Some(v) = self.deposit_params.as_ref() { - struct_ser.serialize_field("depositParams", v)?; - } - if let Some(v) = self.tally_params.as_ref() { - struct_ser.serialize_field("tallyParams", v)?; - } - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryParamsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "voting_params", - "votingParams", - "deposit_params", - "depositParams", - "tally_params", - "tallyParams", - "params", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - VotingParams, - DepositParams, - TallyParams, - Params, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "votingParams" | "voting_params" => Ok(GeneratedField::VotingParams), - "depositParams" | "deposit_params" => Ok(GeneratedField::DepositParams), - "tallyParams" | "tally_params" => Ok(GeneratedField::TallyParams), - "params" => Ok(GeneratedField::Params), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryParamsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryParamsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut voting_params__ = None; - let mut deposit_params__ = None; - let mut tally_params__ = None; - let mut params__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::VotingParams => { - if voting_params__.is_some() { - return Err(serde::de::Error::duplicate_field("votingParams")); - } - voting_params__ = map_.next_value()?; - } - GeneratedField::DepositParams => { - if deposit_params__.is_some() { - return Err(serde::de::Error::duplicate_field("depositParams")); - } - deposit_params__ = map_.next_value()?; - } - GeneratedField::TallyParams => { - if tally_params__.is_some() { - return Err(serde::de::Error::duplicate_field("tallyParams")); - } - tally_params__ = map_.next_value()?; - } - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); - } - params__ = map_.next_value()?; - } - } - } - Ok(QueryParamsResponse { - voting_params: voting_params__, - deposit_params: deposit_params__, - tally_params: tally_params__, - params: params__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryParamsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryProposalRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryProposalRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryProposalRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryProposalRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryProposalRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(QueryProposalRequest { - proposal_id: proposal_id__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryProposalRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryProposalResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryProposalResponse", len)?; - if let Some(v) = self.proposal.as_ref() { - struct_ser.serialize_field("proposal", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryProposalResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Proposal, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposal" => Ok(GeneratedField::Proposal), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryProposalResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryProposalResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Proposal => { - if proposal__.is_some() { - return Err(serde::de::Error::duplicate_field("proposal")); - } - proposal__ = map_.next_value()?; - } - } - } - Ok(QueryProposalResponse { - proposal: proposal__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryProposalResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryProposalsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryProposalsRequest", len)?; - if true { - let v = ProposalStatus::try_from(self.proposal_status) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.proposal_status)))?; - struct_ser.serialize_field("proposalStatus", &v)?; - } - if true { - struct_ser.serialize_field("voter", &self.voter)?; - } - if true { - struct_ser.serialize_field("depositor", &self.depositor)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_status", - "proposalStatus", - "voter", - "depositor", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalStatus, - Voter, - Depositor, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalStatus" | "proposal_status" => Ok(GeneratedField::ProposalStatus), - "voter" => Ok(GeneratedField::Voter), - "depositor" => Ok(GeneratedField::Depositor), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryProposalsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryProposalsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_status__ = None; - let mut voter__ = None; - let mut depositor__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalStatus => { - if proposal_status__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalStatus")); - } - proposal_status__ = Some(map_.next_value::()? as i32); - } - GeneratedField::Voter => { - if voter__.is_some() { - return Err(serde::de::Error::duplicate_field("voter")); - } - voter__ = Some(map_.next_value()?); - } - GeneratedField::Depositor => { - if depositor__.is_some() { - return Err(serde::de::Error::duplicate_field("depositor")); - } - depositor__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryProposalsRequest { - proposal_status: proposal_status__.unwrap_or_default(), - voter: voter__.unwrap_or_default(), - depositor: depositor__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryProposalsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryProposalsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryProposalsResponse", len)?; - if true { - struct_ser.serialize_field("proposals", &self.proposals)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposals", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Proposals, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposals" => Ok(GeneratedField::Proposals), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryProposalsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryProposalsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposals__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Proposals => { - if proposals__.is_some() { - return Err(serde::de::Error::duplicate_field("proposals")); - } - proposals__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryProposalsResponse { - proposals: proposals__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryProposalsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryTallyResultRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryTallyResultRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryTallyResultRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryTallyResultRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(QueryTallyResultRequest { - proposal_id: proposal_id__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryTallyResultRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryTallyResultResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryTallyResultResponse", len)?; - if let Some(v) = self.tally.as_ref() { - struct_ser.serialize_field("tally", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "tally", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Tally, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "tally" => Ok(GeneratedField::Tally), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryTallyResultResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryTallyResultResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut tally__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Tally => { - if tally__.is_some() { - return Err(serde::de::Error::duplicate_field("tally")); - } - tally__ = map_.next_value()?; - } - } - } - Ok(QueryTallyResultResponse { - tally: tally__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryTallyResultResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryVoteRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryVoteRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("voter", &self.voter)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryVoteRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "voter", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Voter, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "voter" => Ok(GeneratedField::Voter), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryVoteRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryVoteRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut voter__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Voter => { - if voter__.is_some() { - return Err(serde::de::Error::duplicate_field("voter")); - } - voter__ = Some(map_.next_value()?); - } - } - } - Ok(QueryVoteRequest { - proposal_id: proposal_id__.unwrap_or_default(), - voter: voter__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryVoteRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryVoteResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryVoteResponse", len)?; - if let Some(v) = self.vote.as_ref() { - struct_ser.serialize_field("vote", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryVoteResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "vote", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Vote, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "vote" => Ok(GeneratedField::Vote), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryVoteResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryVoteResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut vote__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Vote => { - if vote__.is_some() { - return Err(serde::de::Error::duplicate_field("vote")); - } - vote__ = map_.next_value()?; - } - } - } - Ok(QueryVoteResponse { - vote: vote__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryVoteResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryVotesRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryVotesRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryVotesRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryVotesRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryVotesRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryVotesRequest { - proposal_id: proposal_id__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryVotesRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryVotesResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryVotesResponse", len)?; - if true { - struct_ser.serialize_field("votes", &self.votes)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryVotesResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "votes", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Votes, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "votes" => Ok(GeneratedField::Votes), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryVotesResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.QueryVotesResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut votes__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Votes => { - if votes__.is_some() { - return Err(serde::de::Error::duplicate_field("votes")); - } - votes__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryVotesResponse { - votes: votes__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.QueryVotesResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for TallyParams { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.TallyParams", len)?; - if true { - struct_ser.serialize_field("quorum", &self.quorum)?; - } - if true { - struct_ser.serialize_field("threshold", &self.threshold)?; - } - if true { - struct_ser.serialize_field("vetoThreshold", &self.veto_threshold)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for TallyParams { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "quorum", - "threshold", - "veto_threshold", - "vetoThreshold", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Quorum, - Threshold, - VetoThreshold, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "quorum" => Ok(GeneratedField::Quorum), - "threshold" => Ok(GeneratedField::Threshold), - "vetoThreshold" | "veto_threshold" => Ok(GeneratedField::VetoThreshold), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = TallyParams; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.TallyParams") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut quorum__ = None; - let mut threshold__ = None; - let mut veto_threshold__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Quorum => { - if quorum__.is_some() { - return Err(serde::de::Error::duplicate_field("quorum")); - } - quorum__ = Some(map_.next_value()?); - } - GeneratedField::Threshold => { - if threshold__.is_some() { - return Err(serde::de::Error::duplicate_field("threshold")); - } - threshold__ = Some(map_.next_value()?); - } - GeneratedField::VetoThreshold => { - if veto_threshold__.is_some() { - return Err(serde::de::Error::duplicate_field("vetoThreshold")); - } - veto_threshold__ = Some(map_.next_value()?); - } - } - } - Ok(TallyParams { - quorum: quorum__.unwrap_or_default(), - threshold: threshold__.unwrap_or_default(), - veto_threshold: veto_threshold__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.TallyParams", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for TallyResult { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.TallyResult", len)?; - if true { - struct_ser.serialize_field("yesCount", &self.yes_count)?; - } - if true { - struct_ser.serialize_field("abstainCount", &self.abstain_count)?; - } - if true { - struct_ser.serialize_field("noCount", &self.no_count)?; - } - if true { - struct_ser.serialize_field("noWithVetoCount", &self.no_with_veto_count)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for TallyResult { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "yes_count", - "yesCount", - "abstain_count", - "abstainCount", - "no_count", - "noCount", - "no_with_veto_count", - "noWithVetoCount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - YesCount, - AbstainCount, - NoCount, - NoWithVetoCount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "yesCount" | "yes_count" => Ok(GeneratedField::YesCount), - "abstainCount" | "abstain_count" => Ok(GeneratedField::AbstainCount), - "noCount" | "no_count" => Ok(GeneratedField::NoCount), - "noWithVetoCount" | "no_with_veto_count" => Ok(GeneratedField::NoWithVetoCount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = TallyResult; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.TallyResult") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut yes_count__ = None; - let mut abstain_count__ = None; - let mut no_count__ = None; - let mut no_with_veto_count__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::YesCount => { - if yes_count__.is_some() { - return Err(serde::de::Error::duplicate_field("yesCount")); - } - yes_count__ = Some(map_.next_value()?); - } - GeneratedField::AbstainCount => { - if abstain_count__.is_some() { - return Err(serde::de::Error::duplicate_field("abstainCount")); - } - abstain_count__ = Some(map_.next_value()?); - } - GeneratedField::NoCount => { - if no_count__.is_some() { - return Err(serde::de::Error::duplicate_field("noCount")); - } - no_count__ = Some(map_.next_value()?); - } - GeneratedField::NoWithVetoCount => { - if no_with_veto_count__.is_some() { - return Err(serde::de::Error::duplicate_field("noWithVetoCount")); - } - no_with_veto_count__ = Some(map_.next_value()?); - } - } - } - Ok(TallyResult { - yes_count: yes_count__.unwrap_or_default(), - abstain_count: abstain_count__.unwrap_or_default(), - no_count: no_count__.unwrap_or_default(), - no_with_veto_count: no_with_veto_count__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.TallyResult", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Vote { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.Vote", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("voter", &self.voter)?; - } - if true { - struct_ser.serialize_field("options", &self.options)?; - } - if true { - struct_ser.serialize_field("metadata", &self.metadata)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Vote { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "voter", - "options", - "metadata", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Voter, - Options, - Metadata, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "voter" => Ok(GeneratedField::Voter), - "options" => Ok(GeneratedField::Options), - "metadata" => Ok(GeneratedField::Metadata), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Vote; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.Vote") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut voter__ = None; - let mut options__ = None; - let mut metadata__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Voter => { - if voter__.is_some() { - return Err(serde::de::Error::duplicate_field("voter")); - } - voter__ = Some(map_.next_value()?); - } - GeneratedField::Options => { - if options__.is_some() { - return Err(serde::de::Error::duplicate_field("options")); - } - options__ = Some(map_.next_value()?); - } - GeneratedField::Metadata => { - if metadata__.is_some() { - return Err(serde::de::Error::duplicate_field("metadata")); - } - metadata__ = Some(map_.next_value()?); - } - } - } - Ok(Vote { - proposal_id: proposal_id__.unwrap_or_default(), - voter: voter__.unwrap_or_default(), - options: options__.unwrap_or_default(), - metadata: metadata__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.Vote", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for VoteOption { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::Unspecified => "VOTE_OPTION_UNSPECIFIED", - Self::Yes => "VOTE_OPTION_YES", - Self::Abstain => "VOTE_OPTION_ABSTAIN", - Self::No => "VOTE_OPTION_NO", - Self::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for VoteOption { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "VOTE_OPTION_UNSPECIFIED", - "VOTE_OPTION_YES", - "VOTE_OPTION_ABSTAIN", - "VOTE_OPTION_NO", - "VOTE_OPTION_NO_WITH_VETO", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = VoteOption; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "VOTE_OPTION_UNSPECIFIED" => Ok(VoteOption::Unspecified), - "VOTE_OPTION_YES" => Ok(VoteOption::Yes), - "VOTE_OPTION_ABSTAIN" => Ok(VoteOption::Abstain), - "VOTE_OPTION_NO" => Ok(VoteOption::No), - "VOTE_OPTION_NO_WITH_VETO" => Ok(VoteOption::NoWithVeto), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for VotingParams { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.VotingParams", len)?; - if let Some(v) = self.voting_period.as_ref() { - struct_ser.serialize_field("votingPeriod", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for VotingParams { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "voting_period", - "votingPeriod", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - VotingPeriod, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "votingPeriod" | "voting_period" => Ok(GeneratedField::VotingPeriod), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = VotingParams; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.VotingParams") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut voting_period__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::VotingPeriod => { - if voting_period__.is_some() { - return Err(serde::de::Error::duplicate_field("votingPeriod")); - } - voting_period__ = map_.next_value()?; - } - } - } - Ok(VotingParams { - voting_period: voting_period__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.VotingParams", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for WeightedVoteOption { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.WeightedVoteOption", len)?; - if true { - let v = VoteOption::try_from(self.option) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.option)))?; - struct_ser.serialize_field("option", &v)?; - } - if true { - struct_ser.serialize_field("weight", &self.weight)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for WeightedVoteOption { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "option", - "weight", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Option, - Weight, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "option" => Ok(GeneratedField::Option), - "weight" => Ok(GeneratedField::Weight), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = WeightedVoteOption; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1.WeightedVoteOption") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut option__ = None; - let mut weight__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Option => { - if option__.is_some() { - return Err(serde::de::Error::duplicate_field("option")); - } - option__ = Some(map_.next_value::()? as i32); - } - GeneratedField::Weight => { - if weight__.is_some() { - return Err(serde::de::Error::duplicate_field("weight")); - } - weight__ = Some(map_.next_value()?); - } - } - } - Ok(WeightedVoteOption { - option: option__.unwrap_or_default(), - weight: weight__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1.WeightedVoteOption", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.gov.v1beta1.rs b/src/prost/cosmos.gov.v1beta1.rs deleted file mode 100644 index d421555b..00000000 --- a/src/prost/cosmos.gov.v1beta1.rs +++ /dev/null @@ -1,2160 +0,0 @@ -/// WeightedVoteOption defines a unit of vote for vote split. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct WeightedVoteOption { - /// option defines the valid vote options, it must not contain duplicate vote options. - #[prost(enumeration = "VoteOption", tag = "1")] - pub option: i32, - /// weight is the vote weight associated with the vote option. - #[prost(string, tag = "2")] - pub weight: ::prost::alloc::string::String, -} -impl ::prost::Name for WeightedVoteOption { - const NAME: &'static str = "WeightedVoteOption"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// TextProposal defines a standard text proposal whose changes need to be -/// manually updated in case of approval. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TextProposal { - /// title of the proposal. - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// description associated with the proposal. - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, -} -impl ::prost::Name for TextProposal { - const NAME: &'static str = "TextProposal"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// Deposit defines an amount deposited by an account address to an active -/// proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Deposit { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, - /// amount to be deposited by depositor. - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Deposit { - const NAME: &'static str = "Deposit"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// Proposal defines the core field members of a governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Proposal { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// content is the proposal's content. - #[prost(message, optional, tag = "2")] - pub content: ::core::option::Option, - /// status defines the proposal status. - #[prost(enumeration = "ProposalStatus", tag = "3")] - pub status: i32, - /// final_tally_result is the final tally result of the proposal. When - /// querying a proposal via gRPC, this field is not populated until the - /// proposal's voting period has ended. - #[prost(message, optional, tag = "4")] - pub final_tally_result: ::core::option::Option, - /// submit_time is the time of proposal submission. - #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, - /// deposit_end_time is the end time for deposition. - #[prost(message, optional, tag = "6")] - pub deposit_end_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, - /// total_deposit is the total deposit on the proposal. - #[prost(message, repeated, tag = "7")] - pub total_deposit: ::prost::alloc::vec::Vec, - /// voting_start_time is the starting time to vote on a proposal. - #[prost(message, optional, tag = "8")] - pub voting_start_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, - /// voting_end_time is the end time of voting on a proposal. - #[prost(message, optional, tag = "9")] - pub voting_end_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, -} -impl ::prost::Name for Proposal { - const NAME: &'static str = "Proposal"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// TallyResult defines a standard tally for a governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TallyResult { - /// yes is the number of yes votes on a proposal. - #[prost(string, tag = "1")] - pub yes: ::prost::alloc::string::String, - /// abstain is the number of abstain votes on a proposal. - #[prost(string, tag = "2")] - pub abstain: ::prost::alloc::string::String, - /// no is the number of no votes on a proposal. - #[prost(string, tag = "3")] - pub no: ::prost::alloc::string::String, - /// no_with_veto is the number of no with veto votes on a proposal. - #[prost(string, tag = "4")] - pub no_with_veto: ::prost::alloc::string::String, -} -impl ::prost::Name for TallyResult { - const NAME: &'static str = "TallyResult"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// Vote defines a vote on a governance proposal. -/// A Vote consists of a proposal ID, the voter, and the vote option. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Vote { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter is the voter address of the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// Deprecated: Prefer to use `options` instead. This field is set in queries - /// if and only if `len(options) == 1` and that option has weight 1. In all - /// other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - #[deprecated] - #[prost(enumeration = "VoteOption", tag = "3")] - pub option: i32, - /// options is the weighted vote options. - /// - /// Since: cosmos-sdk 0.43 - #[prost(message, repeated, tag = "4")] - pub options: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Vote { - const NAME: &'static str = "Vote"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// DepositParams defines the params for deposits on governance proposals. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DepositParams { - /// Minimum deposit for a proposal to enter voting period. - #[prost(message, repeated, tag = "1")] - pub min_deposit: ::prost::alloc::vec::Vec, - /// Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - /// months. - #[prost(message, optional, tag = "2")] - pub max_deposit_period: ::core::option::Option< - super::super::super::google::protobuf::Duration, - >, -} -impl ::prost::Name for DepositParams { - const NAME: &'static str = "DepositParams"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// VotingParams defines the params for voting on governance proposals. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct VotingParams { - /// Duration of the voting period. - #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option< - super::super::super::google::protobuf::Duration, - >, -} -impl ::prost::Name for VotingParams { - const NAME: &'static str = "VotingParams"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// TallyParams defines the params for tallying votes on governance proposals. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TallyParams { - /// Minimum percentage of total stake needed to vote for a result to be - /// considered valid. - #[prost(bytes = "vec", tag = "1")] - pub quorum: ::prost::alloc::vec::Vec, - /// Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - #[prost(bytes = "vec", tag = "2")] - pub threshold: ::prost::alloc::vec::Vec, - /// Minimum value of Veto votes to Total votes ratio for proposal to be - /// vetoed. Default value: 1/3. - #[prost(bytes = "vec", tag = "3")] - pub veto_threshold: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for TallyParams { - const NAME: &'static str = "TallyParams"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// VoteOption enumerates the valid vote options for a given governance proposal. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum VoteOption { - /// VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - Unspecified = 0, - /// VOTE_OPTION_YES defines a yes vote option. - Yes = 1, - /// VOTE_OPTION_ABSTAIN defines an abstain vote option. - Abstain = 2, - /// VOTE_OPTION_NO defines a no vote option. - No = 3, - /// VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - NoWithVeto = 4, -} -impl VoteOption { - /// 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 { - VoteOption::Unspecified => "VOTE_OPTION_UNSPECIFIED", - VoteOption::Yes => "VOTE_OPTION_YES", - VoteOption::Abstain => "VOTE_OPTION_ABSTAIN", - VoteOption::No => "VOTE_OPTION_NO", - VoteOption::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "VOTE_OPTION_UNSPECIFIED" => Some(Self::Unspecified), - "VOTE_OPTION_YES" => Some(Self::Yes), - "VOTE_OPTION_ABSTAIN" => Some(Self::Abstain), - "VOTE_OPTION_NO" => Some(Self::No), - "VOTE_OPTION_NO_WITH_VETO" => Some(Self::NoWithVeto), - _ => None, - } - } -} -/// ProposalStatus enumerates the valid statuses of a proposal. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum ProposalStatus { - /// PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - Unspecified = 0, - /// PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - /// period. - DepositPeriod = 1, - /// PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - /// period. - VotingPeriod = 2, - /// PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - /// passed. - Passed = 3, - /// PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - /// been rejected. - Rejected = 4, - /// PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - /// failed. - Failed = 5, -} -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::Unspecified => "PROPOSAL_STATUS_UNSPECIFIED", - ProposalStatus::DepositPeriod => "PROPOSAL_STATUS_DEPOSIT_PERIOD", - ProposalStatus::VotingPeriod => "PROPOSAL_STATUS_VOTING_PERIOD", - ProposalStatus::Passed => "PROPOSAL_STATUS_PASSED", - ProposalStatus::Rejected => "PROPOSAL_STATUS_REJECTED", - ProposalStatus::Failed => "PROPOSAL_STATUS_FAILED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "PROPOSAL_STATUS_UNSPECIFIED" => Some(Self::Unspecified), - "PROPOSAL_STATUS_DEPOSIT_PERIOD" => Some(Self::DepositPeriod), - "PROPOSAL_STATUS_VOTING_PERIOD" => Some(Self::VotingPeriod), - "PROPOSAL_STATUS_PASSED" => Some(Self::Passed), - "PROPOSAL_STATUS_REJECTED" => Some(Self::Rejected), - "PROPOSAL_STATUS_FAILED" => Some(Self::Failed), - _ => None, - } - } -} -/// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -/// proposal Content. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposal { - /// content is the proposal's content. - #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option, - /// initial_deposit is the deposit value that must be paid at proposal submission. - #[prost(message, repeated, tag = "2")] - pub initial_deposit: ::prost::alloc::vec::Vec, - /// proposer is the account address of the proposer. - #[prost(string, tag = "3")] - pub proposer: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgSubmitProposal { - const NAME: &'static str = "MsgSubmitProposal"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposalResponse { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -impl ::prost::Name for MsgSubmitProposalResponse { - const NAME: &'static str = "MsgSubmitProposalResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// MsgVote defines a message to cast a vote. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVote { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter is the voter address for the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// option defines the vote option. - #[prost(enumeration = "VoteOption", tag = "3")] - pub option: i32, -} -impl ::prost::Name for MsgVote { - const NAME: &'static str = "MsgVote"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// MsgVoteResponse defines the Msg/Vote response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteResponse {} -impl ::prost::Name for MsgVoteResponse { - const NAME: &'static str = "MsgVoteResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// MsgVoteWeighted defines a message to cast a vote. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeighted { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter is the voter address for the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// options defines the weighted vote options. - #[prost(message, repeated, tag = "3")] - pub options: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgVoteWeighted { - const NAME: &'static str = "MsgVoteWeighted"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeightedResponse {} -impl ::prost::Name for MsgVoteWeightedResponse { - const NAME: &'static str = "MsgVoteWeightedResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// MsgDeposit defines a message to submit a deposit to an existing proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDeposit { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, - /// amount to be deposited by depositor. - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for MsgDeposit { - const NAME: &'static str = "MsgDeposit"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// MsgDepositResponse defines the Msg/Deposit response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDepositResponse {} -impl ::prost::Name for MsgDepositResponse { - const NAME: &'static str = "MsgDepositResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Msg defines the bank Msg service. - #[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 - } - /// SubmitProposal defines a method to create new proposal given a content. - pub async fn submit_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( - "/cosmos.gov.v1beta1.Msg/SubmitProposal", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "SubmitProposal")); - self.inner.unary(req, path, codec).await - } - /// Vote defines a method to add a vote on a specific proposal. - pub async fn vote( - &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.gov.v1beta1.Msg/Vote", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "Vote")); - self.inner.unary(req, path, codec).await - } - /// VoteWeighted defines a method to add a weighted vote on a specific proposal. - /// - /// Since: cosmos-sdk 0.43 - pub async fn vote_weighted( - &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.gov.v1beta1.Msg/VoteWeighted", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "VoteWeighted")); - self.inner.unary(req, path, codec).await - } - /// Deposit defines a method to add deposit on a specific proposal. - pub async fn deposit( - &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.gov.v1beta1.Msg/Deposit", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "Deposit")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -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 { - /// SubmitProposal defines a method to create new proposal given a content. - async fn submit_proposal( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Vote defines a method to add a vote on a specific proposal. - async fn vote( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - /// VoteWeighted defines a method to add a weighted vote on a specific proposal. - /// - /// Since: cosmos-sdk 0.43 - async fn vote_weighted( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Deposit defines a method to add deposit on a specific proposal. - async fn deposit( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Msg defines the bank Msg service. - #[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() { - "/cosmos.gov.v1beta1.Msg/SubmitProposal" => { - #[allow(non_camel_case_types)] - struct SubmitProposalSvc(pub Arc); - impl tonic::server::UnaryService - for SubmitProposalSvc { - type Response = super::MsgSubmitProposalResponse; - 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 { - ::submit_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 = SubmitProposalSvc(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.gov.v1beta1.Msg/Vote" => { - #[allow(non_camel_case_types)] - struct VoteSvc(pub Arc); - impl tonic::server::UnaryService - for VoteSvc { - type Response = super::MsgVoteResponse; - 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 { - ::vote(&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 = VoteSvc(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.gov.v1beta1.Msg/VoteWeighted" => { - #[allow(non_camel_case_types)] - struct VoteWeightedSvc(pub Arc); - impl tonic::server::UnaryService - for VoteWeightedSvc { - type Response = super::MsgVoteWeightedResponse; - 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 { - ::vote_weighted(&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 = VoteWeightedSvc(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.gov.v1beta1.Msg/Deposit" => { - #[allow(non_camel_case_types)] - struct DepositSvc(pub Arc); - impl tonic::server::UnaryService - for DepositSvc { - type Response = super::MsgDepositResponse; - 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 { - ::deposit(&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 = DepositSvc(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 = "cosmos.gov.v1beta1.Msg"; - } -} -/// QueryProposalRequest is the request type for the Query/Proposal RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -impl ::prost::Name for QueryProposalRequest { - const NAME: &'static str = "QueryProposalRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryProposalResponse is the response type for the Query/Proposal RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalResponse { - #[prost(message, optional, tag = "1")] - pub proposal: ::core::option::Option, -} -impl ::prost::Name for QueryProposalResponse { - const NAME: &'static str = "QueryProposalResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryProposalsRequest is the request type for the Query/Proposals RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsRequest { - /// proposal_status defines the status of the proposals. - #[prost(enumeration = "ProposalStatus", tag = "1")] - pub proposal_status: i32, - /// voter defines the voter address for the proposals. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "3")] - pub depositor: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "4")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryProposalsRequest { - const NAME: &'static str = "QueryProposalsRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryProposalsResponse is the response type for the Query/Proposals RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsResponse { - /// proposals defines all the requested governance proposals. - #[prost(message, repeated, tag = "1")] - pub proposals: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryProposalsResponse { - const NAME: &'static str = "QueryProposalsResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryVoteRequest is the request type for the Query/Vote RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter defines the voter address for the proposals. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryVoteRequest { - const NAME: &'static str = "QueryVoteRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryVoteResponse is the response type for the Query/Vote RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteResponse { - /// vote defines the queried vote. - #[prost(message, optional, tag = "1")] - pub vote: ::core::option::Option, -} -impl ::prost::Name for QueryVoteResponse { - const NAME: &'static str = "QueryVoteResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryVotesRequest is the request type for the Query/Votes RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryVotesRequest { - const NAME: &'static str = "QueryVotesRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryVotesResponse is the response type for the Query/Votes RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesResponse { - /// votes defines the queried votes. - #[prost(message, repeated, tag = "1")] - pub votes: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryVotesResponse { - const NAME: &'static str = "QueryVotesResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest { - /// params_type defines which parameters to query for, can be one of "voting", - /// "tallying" or "deposit". - #[prost(string, tag = "1")] - pub params_type: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// voting_params defines the parameters related to voting. - #[prost(message, optional, tag = "1")] - pub voting_params: ::core::option::Option, - /// deposit_params defines the parameters related to deposit. - #[prost(message, optional, tag = "2")] - pub deposit_params: ::core::option::Option, - /// tally_params defines the parameters related to tally. - #[prost(message, optional, tag = "3")] - pub tally_params: ::core::option::Option, -} -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryDepositRequest is the request type for the Query/Deposit RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryDepositRequest { - const NAME: &'static str = "QueryDepositRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryDepositResponse is the response type for the Query/Deposit RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositResponse { - /// deposit defines the requested deposit. - #[prost(message, optional, tag = "1")] - pub deposit: ::core::option::Option, -} -impl ::prost::Name for QueryDepositResponse { - const NAME: &'static str = "QueryDepositResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryDepositsRequest is the request type for the Query/Deposits RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositsRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryDepositsRequest { - const NAME: &'static str = "QueryDepositsRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositsResponse { - /// deposits defines the requested deposits. - #[prost(message, repeated, tag = "1")] - pub deposits: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryDepositsResponse { - const NAME: &'static str = "QueryDepositsResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryTallyResultRequest is the request type for the Query/Tally RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -impl ::prost::Name for QueryTallyResultRequest { - const NAME: &'static str = "QueryTallyResultRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultResponse { - /// tally defines the requested tally. - #[prost(message, optional, tag = "1")] - pub tally: ::core::option::Option, -} -impl ::prost::Name for QueryTallyResultResponse { - const NAME: &'static str = "QueryTallyResultResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Query defines the gRPC querier service for gov module - #[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 - } - /// Proposal queries proposal details based on ProposalID. - pub async fn 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( - "/cosmos.gov.v1beta1.Query/Proposal", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Proposal")); - self.inner.unary(req, path, codec).await - } - /// Proposals queries all proposals based on given status. - pub async fn proposals( - &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.gov.v1beta1.Query/Proposals", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Proposals")); - self.inner.unary(req, path, codec).await - } - /// Vote queries voted information based on proposalID, voterAddr. - pub async fn vote( - &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.gov.v1beta1.Query/Vote", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Vote")); - self.inner.unary(req, path, codec).await - } - /// Votes queries votes of a given proposal. - pub async fn votes( - &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.gov.v1beta1.Query/Votes", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Votes")); - self.inner.unary(req, path, codec).await - } - /// Params queries all parameters of the gov module. - pub async fn params( - &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.gov.v1beta1.Query/Params", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Params")); - self.inner.unary(req, path, codec).await - } - /// Deposit queries single deposit information based proposalID, depositAddr. - pub async fn deposit( - &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.gov.v1beta1.Query/Deposit", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Deposit")); - self.inner.unary(req, path, codec).await - } - /// Deposits queries all deposits of a single proposal. - pub async fn deposits( - &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.gov.v1beta1.Query/Deposits", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Deposits")); - self.inner.unary(req, path, codec).await - } - /// TallyResult queries the tally of a proposal vote. - pub async fn tally_result( - &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.gov.v1beta1.Query/TallyResult", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "TallyResult")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -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 { - /// Proposal queries proposal details based on ProposalID. - async fn proposal( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Proposals queries all proposals based on given status. - async fn proposals( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Vote queries voted information based on proposalID, voterAddr. - async fn vote( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Votes queries votes of a given proposal. - async fn votes( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Params queries all parameters of the gov module. - async fn params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Deposit queries single deposit information based proposalID, depositAddr. - async fn deposit( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Deposits queries all deposits of a single proposal. - async fn deposits( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// TallyResult queries the tally of a proposal vote. - async fn tally_result( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Query defines the gRPC querier service for gov module - #[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() { - "/cosmos.gov.v1beta1.Query/Proposal" => { - #[allow(non_camel_case_types)] - struct ProposalSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ProposalSvc { - type Response = super::QueryProposalResponse; - 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 { - ::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 = ProposalSvc(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.gov.v1beta1.Query/Proposals" => { - #[allow(non_camel_case_types)] - struct ProposalsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ProposalsSvc { - type Response = super::QueryProposalsResponse; - 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 { - ::proposals(&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 = ProposalsSvc(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.gov.v1beta1.Query/Vote" => { - #[allow(non_camel_case_types)] - struct VoteSvc(pub Arc); - impl tonic::server::UnaryService - for VoteSvc { - type Response = super::QueryVoteResponse; - 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 { - ::vote(&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 = VoteSvc(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.gov.v1beta1.Query/Votes" => { - #[allow(non_camel_case_types)] - struct VotesSvc(pub Arc); - impl tonic::server::UnaryService - for VotesSvc { - type Response = super::QueryVotesResponse; - 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 { - ::votes(&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 = VotesSvc(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.gov.v1beta1.Query/Params" => { - #[allow(non_camel_case_types)] - struct ParamsSvc(pub Arc); - impl tonic::server::UnaryService - for ParamsSvc { - type Response = super::QueryParamsResponse; - 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 { - ::params(&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 = ParamsSvc(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.gov.v1beta1.Query/Deposit" => { - #[allow(non_camel_case_types)] - struct DepositSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DepositSvc { - type Response = super::QueryDepositResponse; - 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 { - ::deposit(&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 = DepositSvc(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.gov.v1beta1.Query/Deposits" => { - #[allow(non_camel_case_types)] - struct DepositsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DepositsSvc { - type Response = super::QueryDepositsResponse; - 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 { - ::deposits(&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 = DepositsSvc(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.gov.v1beta1.Query/TallyResult" => { - #[allow(non_camel_case_types)] - struct TallyResultSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for TallyResultSvc { - type Response = super::QueryTallyResultResponse; - 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 { - ::tally_result(&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 = TallyResultSvc(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 = "cosmos.gov.v1beta1.Query"; - } -} -/// GenesisState defines the gov module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// starting_proposal_id is the ID of the starting proposal. - #[prost(uint64, tag = "1")] - pub starting_proposal_id: u64, - /// deposits defines all the deposits present at genesis. - #[prost(message, repeated, tag = "2")] - pub deposits: ::prost::alloc::vec::Vec, - /// votes defines all the votes present at genesis. - #[prost(message, repeated, tag = "3")] - pub votes: ::prost::alloc::vec::Vec, - /// proposals defines all the proposals present at genesis. - #[prost(message, repeated, tag = "4")] - pub proposals: ::prost::alloc::vec::Vec, - /// params defines all the parameters of related to deposit. - #[prost(message, optional, tag = "5")] - pub deposit_params: ::core::option::Option, - /// params defines all the parameters of related to voting. - #[prost(message, optional, tag = "6")] - pub voting_params: ::core::option::Option, - /// params defines all the parameters of related to tally. - #[prost(message, optional, tag = "7")] - pub tally_params: ::core::option::Option, -} -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.gov.v1beta1.serde.rs b/src/prost/cosmos.gov.v1beta1.serde.rs deleted file mode 100644 index 1e738333..00000000 --- a/src/prost/cosmos.gov.v1beta1.serde.rs +++ /dev/null @@ -1,4091 +0,0 @@ -impl serde::Serialize for Deposit { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.Deposit", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("depositor", &self.depositor)?; - } - if true { - struct_ser.serialize_field("amount", &self.amount)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Deposit { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "depositor", - "amount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Depositor, - Amount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "depositor" => Ok(GeneratedField::Depositor), - "amount" => Ok(GeneratedField::Amount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Deposit; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.Deposit") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut depositor__ = None; - let mut amount__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Depositor => { - if depositor__.is_some() { - return Err(serde::de::Error::duplicate_field("depositor")); - } - depositor__ = Some(map_.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = Some(map_.next_value()?); - } - } - } - Ok(Deposit { - proposal_id: proposal_id__.unwrap_or_default(), - depositor: depositor__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.Deposit", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for DepositParams { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.DepositParams", len)?; - if true { - struct_ser.serialize_field("minDeposit", &self.min_deposit)?; - } - if let Some(v) = self.max_deposit_period.as_ref() { - struct_ser.serialize_field("maxDepositPeriod", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for DepositParams { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "min_deposit", - "minDeposit", - "max_deposit_period", - "maxDepositPeriod", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - MinDeposit, - MaxDepositPeriod, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "minDeposit" | "min_deposit" => Ok(GeneratedField::MinDeposit), - "maxDepositPeriod" | "max_deposit_period" => Ok(GeneratedField::MaxDepositPeriod), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DepositParams; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.DepositParams") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut min_deposit__ = None; - let mut max_deposit_period__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::MinDeposit => { - if min_deposit__.is_some() { - return Err(serde::de::Error::duplicate_field("minDeposit")); - } - min_deposit__ = Some(map_.next_value()?); - } - GeneratedField::MaxDepositPeriod => { - if max_deposit_period__.is_some() { - return Err(serde::de::Error::duplicate_field("maxDepositPeriod")); - } - max_deposit_period__ = map_.next_value()?; - } - } - } - Ok(DepositParams { - min_deposit: min_deposit__.unwrap_or_default(), - max_deposit_period: max_deposit_period__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.DepositParams", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GenesisState { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.GenesisState", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("startingProposalId", ::alloc::string::ToString::to_string(&self.starting_proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("deposits", &self.deposits)?; - } - if true { - struct_ser.serialize_field("votes", &self.votes)?; - } - if true { - struct_ser.serialize_field("proposals", &self.proposals)?; - } - if let Some(v) = self.deposit_params.as_ref() { - struct_ser.serialize_field("depositParams", v)?; - } - if let Some(v) = self.voting_params.as_ref() { - struct_ser.serialize_field("votingParams", v)?; - } - if let Some(v) = self.tally_params.as_ref() { - struct_ser.serialize_field("tallyParams", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GenesisState { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "starting_proposal_id", - "startingProposalId", - "deposits", - "votes", - "proposals", - "deposit_params", - "depositParams", - "voting_params", - "votingParams", - "tally_params", - "tallyParams", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - StartingProposalId, - Deposits, - Votes, - Proposals, - DepositParams, - VotingParams, - TallyParams, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "startingProposalId" | "starting_proposal_id" => Ok(GeneratedField::StartingProposalId), - "deposits" => Ok(GeneratedField::Deposits), - "votes" => Ok(GeneratedField::Votes), - "proposals" => Ok(GeneratedField::Proposals), - "depositParams" | "deposit_params" => Ok(GeneratedField::DepositParams), - "votingParams" | "voting_params" => Ok(GeneratedField::VotingParams), - "tallyParams" | "tally_params" => Ok(GeneratedField::TallyParams), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GenesisState; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.GenesisState") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut starting_proposal_id__ = None; - let mut deposits__ = None; - let mut votes__ = None; - let mut proposals__ = None; - let mut deposit_params__ = None; - let mut voting_params__ = None; - let mut tally_params__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::StartingProposalId => { - if starting_proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("startingProposalId")); - } - starting_proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Deposits => { - if deposits__.is_some() { - return Err(serde::de::Error::duplicate_field("deposits")); - } - deposits__ = Some(map_.next_value()?); - } - GeneratedField::Votes => { - if votes__.is_some() { - return Err(serde::de::Error::duplicate_field("votes")); - } - votes__ = Some(map_.next_value()?); - } - GeneratedField::Proposals => { - if proposals__.is_some() { - return Err(serde::de::Error::duplicate_field("proposals")); - } - proposals__ = Some(map_.next_value()?); - } - GeneratedField::DepositParams => { - if deposit_params__.is_some() { - return Err(serde::de::Error::duplicate_field("depositParams")); - } - deposit_params__ = map_.next_value()?; - } - GeneratedField::VotingParams => { - if voting_params__.is_some() { - return Err(serde::de::Error::duplicate_field("votingParams")); - } - voting_params__ = map_.next_value()?; - } - GeneratedField::TallyParams => { - if tally_params__.is_some() { - return Err(serde::de::Error::duplicate_field("tallyParams")); - } - tally_params__ = map_.next_value()?; - } - } - } - Ok(GenesisState { - starting_proposal_id: starting_proposal_id__.unwrap_or_default(), - deposits: deposits__.unwrap_or_default(), - votes: votes__.unwrap_or_default(), - proposals: proposals__.unwrap_or_default(), - deposit_params: deposit_params__, - voting_params: voting_params__, - tally_params: tally_params__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.GenesisState", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgDeposit { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.MsgDeposit", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("depositor", &self.depositor)?; - } - if true { - struct_ser.serialize_field("amount", &self.amount)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgDeposit { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "depositor", - "amount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Depositor, - Amount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "depositor" => Ok(GeneratedField::Depositor), - "amount" => Ok(GeneratedField::Amount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgDeposit; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.MsgDeposit") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut depositor__ = None; - let mut amount__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Depositor => { - if depositor__.is_some() { - return Err(serde::de::Error::duplicate_field("depositor")); - } - depositor__ = Some(map_.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = Some(map_.next_value()?); - } - } - } - Ok(MsgDeposit { - proposal_id: proposal_id__.unwrap_or_default(), - depositor: depositor__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.MsgDeposit", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgDepositResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.MsgDepositResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgDepositResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgDepositResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.MsgDepositResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgDepositResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.MsgDepositResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgSubmitProposal { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.MsgSubmitProposal", len)?; - if let Some(v) = self.content.as_ref() { - struct_ser.serialize_field("content", v)?; - } - if true { - struct_ser.serialize_field("initialDeposit", &self.initial_deposit)?; - } - if true { - struct_ser.serialize_field("proposer", &self.proposer)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "content", - "initial_deposit", - "initialDeposit", - "proposer", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Content, - InitialDeposit, - Proposer, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "content" => Ok(GeneratedField::Content), - "initialDeposit" | "initial_deposit" => Ok(GeneratedField::InitialDeposit), - "proposer" => Ok(GeneratedField::Proposer), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgSubmitProposal; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.MsgSubmitProposal") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut content__ = None; - let mut initial_deposit__ = None; - let mut proposer__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Content => { - if content__.is_some() { - return Err(serde::de::Error::duplicate_field("content")); - } - content__ = map_.next_value()?; - } - GeneratedField::InitialDeposit => { - if initial_deposit__.is_some() { - return Err(serde::de::Error::duplicate_field("initialDeposit")); - } - initial_deposit__ = Some(map_.next_value()?); - } - GeneratedField::Proposer => { - if proposer__.is_some() { - return Err(serde::de::Error::duplicate_field("proposer")); - } - proposer__ = Some(map_.next_value()?); - } - } - } - Ok(MsgSubmitProposal { - content: content__, - initial_deposit: initial_deposit__.unwrap_or_default(), - proposer: proposer__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.MsgSubmitProposal", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgSubmitProposalResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.MsgSubmitProposalResponse", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgSubmitProposalResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.MsgSubmitProposalResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(MsgSubmitProposalResponse { - proposal_id: proposal_id__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.MsgSubmitProposalResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgVote { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.MsgVote", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("voter", &self.voter)?; - } - if true { - let v = VoteOption::try_from(self.option) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.option)))?; - struct_ser.serialize_field("option", &v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgVote { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "voter", - "option", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Voter, - Option, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "voter" => Ok(GeneratedField::Voter), - "option" => Ok(GeneratedField::Option), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgVote; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.MsgVote") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut voter__ = None; - let mut option__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Voter => { - if voter__.is_some() { - return Err(serde::de::Error::duplicate_field("voter")); - } - voter__ = Some(map_.next_value()?); - } - GeneratedField::Option => { - if option__.is_some() { - return Err(serde::de::Error::duplicate_field("option")); - } - option__ = Some(map_.next_value::()? as i32); - } - } - } - Ok(MsgVote { - proposal_id: proposal_id__.unwrap_or_default(), - voter: voter__.unwrap_or_default(), - option: option__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.MsgVote", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgVoteResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.MsgVoteResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgVoteResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgVoteResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.MsgVoteResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgVoteResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.MsgVoteResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgVoteWeighted { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.MsgVoteWeighted", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("voter", &self.voter)?; - } - if true { - struct_ser.serialize_field("options", &self.options)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "voter", - "options", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Voter, - Options, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "voter" => Ok(GeneratedField::Voter), - "options" => Ok(GeneratedField::Options), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgVoteWeighted; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.MsgVoteWeighted") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut voter__ = None; - let mut options__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Voter => { - if voter__.is_some() { - return Err(serde::de::Error::duplicate_field("voter")); - } - voter__ = Some(map_.next_value()?); - } - GeneratedField::Options => { - if options__.is_some() { - return Err(serde::de::Error::duplicate_field("options")); - } - options__ = Some(map_.next_value()?); - } - } - } - Ok(MsgVoteWeighted { - proposal_id: proposal_id__.unwrap_or_default(), - voter: voter__.unwrap_or_default(), - options: options__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.MsgVoteWeighted", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgVoteWeightedResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.MsgVoteWeightedResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgVoteWeightedResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.MsgVoteWeightedResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgVoteWeightedResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.MsgVoteWeightedResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Proposal { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.Proposal", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if let Some(v) = self.content.as_ref() { - struct_ser.serialize_field("content", v)?; - } - if true { - let v = ProposalStatus::try_from(self.status) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.status)))?; - struct_ser.serialize_field("status", &v)?; - } - if let Some(v) = self.final_tally_result.as_ref() { - struct_ser.serialize_field("finalTallyResult", v)?; - } - if let Some(v) = self.submit_time.as_ref() { - struct_ser.serialize_field("submitTime", v)?; - } - if let Some(v) = self.deposit_end_time.as_ref() { - struct_ser.serialize_field("depositEndTime", v)?; - } - if true { - struct_ser.serialize_field("totalDeposit", &self.total_deposit)?; - } - if let Some(v) = self.voting_start_time.as_ref() { - struct_ser.serialize_field("votingStartTime", v)?; - } - if let Some(v) = self.voting_end_time.as_ref() { - struct_ser.serialize_field("votingEndTime", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Proposal { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "content", - "status", - "final_tally_result", - "finalTallyResult", - "submit_time", - "submitTime", - "deposit_end_time", - "depositEndTime", - "total_deposit", - "totalDeposit", - "voting_start_time", - "votingStartTime", - "voting_end_time", - "votingEndTime", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Content, - Status, - FinalTallyResult, - SubmitTime, - DepositEndTime, - TotalDeposit, - VotingStartTime, - VotingEndTime, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "content" => Ok(GeneratedField::Content), - "status" => Ok(GeneratedField::Status), - "finalTallyResult" | "final_tally_result" => Ok(GeneratedField::FinalTallyResult), - "submitTime" | "submit_time" => Ok(GeneratedField::SubmitTime), - "depositEndTime" | "deposit_end_time" => Ok(GeneratedField::DepositEndTime), - "totalDeposit" | "total_deposit" => Ok(GeneratedField::TotalDeposit), - "votingStartTime" | "voting_start_time" => Ok(GeneratedField::VotingStartTime), - "votingEndTime" | "voting_end_time" => Ok(GeneratedField::VotingEndTime), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Proposal; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.Proposal") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut content__ = None; - let mut status__ = None; - let mut final_tally_result__ = None; - let mut submit_time__ = None; - let mut deposit_end_time__ = None; - let mut total_deposit__ = None; - let mut voting_start_time__ = None; - let mut voting_end_time__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Content => { - if content__.is_some() { - return Err(serde::de::Error::duplicate_field("content")); - } - content__ = map_.next_value()?; - } - GeneratedField::Status => { - if status__.is_some() { - return Err(serde::de::Error::duplicate_field("status")); - } - status__ = Some(map_.next_value::()? as i32); - } - GeneratedField::FinalTallyResult => { - if final_tally_result__.is_some() { - return Err(serde::de::Error::duplicate_field("finalTallyResult")); - } - final_tally_result__ = map_.next_value()?; - } - GeneratedField::SubmitTime => { - if submit_time__.is_some() { - return Err(serde::de::Error::duplicate_field("submitTime")); - } - submit_time__ = map_.next_value()?; - } - GeneratedField::DepositEndTime => { - if deposit_end_time__.is_some() { - return Err(serde::de::Error::duplicate_field("depositEndTime")); - } - deposit_end_time__ = map_.next_value()?; - } - GeneratedField::TotalDeposit => { - if total_deposit__.is_some() { - return Err(serde::de::Error::duplicate_field("totalDeposit")); - } - total_deposit__ = Some(map_.next_value()?); - } - GeneratedField::VotingStartTime => { - if voting_start_time__.is_some() { - return Err(serde::de::Error::duplicate_field("votingStartTime")); - } - voting_start_time__ = map_.next_value()?; - } - GeneratedField::VotingEndTime => { - if voting_end_time__.is_some() { - return Err(serde::de::Error::duplicate_field("votingEndTime")); - } - voting_end_time__ = map_.next_value()?; - } - } - } - Ok(Proposal { - proposal_id: proposal_id__.unwrap_or_default(), - content: content__, - status: status__.unwrap_or_default(), - final_tally_result: final_tally_result__, - submit_time: submit_time__, - deposit_end_time: deposit_end_time__, - total_deposit: total_deposit__.unwrap_or_default(), - voting_start_time: voting_start_time__, - voting_end_time: voting_end_time__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.Proposal", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ProposalStatus { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::Unspecified => "PROPOSAL_STATUS_UNSPECIFIED", - Self::DepositPeriod => "PROPOSAL_STATUS_DEPOSIT_PERIOD", - Self::VotingPeriod => "PROPOSAL_STATUS_VOTING_PERIOD", - Self::Passed => "PROPOSAL_STATUS_PASSED", - Self::Rejected => "PROPOSAL_STATUS_REJECTED", - Self::Failed => "PROPOSAL_STATUS_FAILED", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for ProposalStatus { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "PROPOSAL_STATUS_UNSPECIFIED", - "PROPOSAL_STATUS_DEPOSIT_PERIOD", - "PROPOSAL_STATUS_VOTING_PERIOD", - "PROPOSAL_STATUS_PASSED", - "PROPOSAL_STATUS_REJECTED", - "PROPOSAL_STATUS_FAILED", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ProposalStatus; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "PROPOSAL_STATUS_UNSPECIFIED" => Ok(ProposalStatus::Unspecified), - "PROPOSAL_STATUS_DEPOSIT_PERIOD" => Ok(ProposalStatus::DepositPeriod), - "PROPOSAL_STATUS_VOTING_PERIOD" => Ok(ProposalStatus::VotingPeriod), - "PROPOSAL_STATUS_PASSED" => Ok(ProposalStatus::Passed), - "PROPOSAL_STATUS_REJECTED" => Ok(ProposalStatus::Rejected), - "PROPOSAL_STATUS_FAILED" => Ok(ProposalStatus::Failed), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for QueryDepositRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryDepositRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("depositor", &self.depositor)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDepositRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "depositor", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Depositor, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "depositor" => Ok(GeneratedField::Depositor), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDepositRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryDepositRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut depositor__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Depositor => { - if depositor__.is_some() { - return Err(serde::de::Error::duplicate_field("depositor")); - } - depositor__ = Some(map_.next_value()?); - } - } - } - Ok(QueryDepositRequest { - proposal_id: proposal_id__.unwrap_or_default(), - depositor: depositor__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryDepositRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDepositResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryDepositResponse", len)?; - if let Some(v) = self.deposit.as_ref() { - struct_ser.serialize_field("deposit", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDepositResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "deposit", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Deposit, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "deposit" => Ok(GeneratedField::Deposit), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDepositResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryDepositResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut deposit__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Deposit => { - if deposit__.is_some() { - return Err(serde::de::Error::duplicate_field("deposit")); - } - deposit__ = map_.next_value()?; - } - } - } - Ok(QueryDepositResponse { - deposit: deposit__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryDepositResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDepositsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryDepositsRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDepositsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryDepositsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryDepositsRequest { - proposal_id: proposal_id__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryDepositsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDepositsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryDepositsResponse", len)?; - if true { - struct_ser.serialize_field("deposits", &self.deposits)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "deposits", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Deposits, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "deposits" => Ok(GeneratedField::Deposits), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDepositsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryDepositsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut deposits__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Deposits => { - if deposits__.is_some() { - return Err(serde::de::Error::duplicate_field("deposits")); - } - deposits__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryDepositsResponse { - deposits: deposits__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryDepositsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryParamsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryParamsRequest", len)?; - if true { - struct_ser.serialize_field("paramsType", &self.params_type)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryParamsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "params_type", - "paramsType", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ParamsType, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "paramsType" | "params_type" => Ok(GeneratedField::ParamsType), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryParamsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryParamsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut params_type__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ParamsType => { - if params_type__.is_some() { - return Err(serde::de::Error::duplicate_field("paramsType")); - } - params_type__ = Some(map_.next_value()?); - } - } - } - Ok(QueryParamsRequest { - params_type: params_type__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryParamsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryParamsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryParamsResponse", len)?; - if let Some(v) = self.voting_params.as_ref() { - struct_ser.serialize_field("votingParams", v)?; - } - if let Some(v) = self.deposit_params.as_ref() { - struct_ser.serialize_field("depositParams", v)?; - } - if let Some(v) = self.tally_params.as_ref() { - struct_ser.serialize_field("tallyParams", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryParamsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "voting_params", - "votingParams", - "deposit_params", - "depositParams", - "tally_params", - "tallyParams", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - VotingParams, - DepositParams, - TallyParams, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "votingParams" | "voting_params" => Ok(GeneratedField::VotingParams), - "depositParams" | "deposit_params" => Ok(GeneratedField::DepositParams), - "tallyParams" | "tally_params" => Ok(GeneratedField::TallyParams), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryParamsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryParamsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut voting_params__ = None; - let mut deposit_params__ = None; - let mut tally_params__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::VotingParams => { - if voting_params__.is_some() { - return Err(serde::de::Error::duplicate_field("votingParams")); - } - voting_params__ = map_.next_value()?; - } - GeneratedField::DepositParams => { - if deposit_params__.is_some() { - return Err(serde::de::Error::duplicate_field("depositParams")); - } - deposit_params__ = map_.next_value()?; - } - GeneratedField::TallyParams => { - if tally_params__.is_some() { - return Err(serde::de::Error::duplicate_field("tallyParams")); - } - tally_params__ = map_.next_value()?; - } - } - } - Ok(QueryParamsResponse { - voting_params: voting_params__, - deposit_params: deposit_params__, - tally_params: tally_params__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryParamsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryProposalRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryProposalRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryProposalRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryProposalRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryProposalRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(QueryProposalRequest { - proposal_id: proposal_id__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryProposalRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryProposalResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryProposalResponse", len)?; - if let Some(v) = self.proposal.as_ref() { - struct_ser.serialize_field("proposal", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryProposalResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Proposal, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposal" => Ok(GeneratedField::Proposal), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryProposalResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryProposalResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Proposal => { - if proposal__.is_some() { - return Err(serde::de::Error::duplicate_field("proposal")); - } - proposal__ = map_.next_value()?; - } - } - } - Ok(QueryProposalResponse { - proposal: proposal__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryProposalResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryProposalsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryProposalsRequest", len)?; - if true { - let v = ProposalStatus::try_from(self.proposal_status) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.proposal_status)))?; - struct_ser.serialize_field("proposalStatus", &v)?; - } - if true { - struct_ser.serialize_field("voter", &self.voter)?; - } - if true { - struct_ser.serialize_field("depositor", &self.depositor)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_status", - "proposalStatus", - "voter", - "depositor", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalStatus, - Voter, - Depositor, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalStatus" | "proposal_status" => Ok(GeneratedField::ProposalStatus), - "voter" => Ok(GeneratedField::Voter), - "depositor" => Ok(GeneratedField::Depositor), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryProposalsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryProposalsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_status__ = None; - let mut voter__ = None; - let mut depositor__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalStatus => { - if proposal_status__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalStatus")); - } - proposal_status__ = Some(map_.next_value::()? as i32); - } - GeneratedField::Voter => { - if voter__.is_some() { - return Err(serde::de::Error::duplicate_field("voter")); - } - voter__ = Some(map_.next_value()?); - } - GeneratedField::Depositor => { - if depositor__.is_some() { - return Err(serde::de::Error::duplicate_field("depositor")); - } - depositor__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryProposalsRequest { - proposal_status: proposal_status__.unwrap_or_default(), - voter: voter__.unwrap_or_default(), - depositor: depositor__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryProposalsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryProposalsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryProposalsResponse", len)?; - if true { - struct_ser.serialize_field("proposals", &self.proposals)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposals", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Proposals, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposals" => Ok(GeneratedField::Proposals), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryProposalsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryProposalsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposals__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Proposals => { - if proposals__.is_some() { - return Err(serde::de::Error::duplicate_field("proposals")); - } - proposals__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryProposalsResponse { - proposals: proposals__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryProposalsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryTallyResultRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryTallyResultRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryTallyResultRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryTallyResultRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(QueryTallyResultRequest { - proposal_id: proposal_id__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryTallyResultRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryTallyResultResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryTallyResultResponse", len)?; - if let Some(v) = self.tally.as_ref() { - struct_ser.serialize_field("tally", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "tally", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Tally, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "tally" => Ok(GeneratedField::Tally), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryTallyResultResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryTallyResultResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut tally__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Tally => { - if tally__.is_some() { - return Err(serde::de::Error::duplicate_field("tally")); - } - tally__ = map_.next_value()?; - } - } - } - Ok(QueryTallyResultResponse { - tally: tally__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryTallyResultResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryVoteRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryVoteRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("voter", &self.voter)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryVoteRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "voter", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Voter, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "voter" => Ok(GeneratedField::Voter), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryVoteRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryVoteRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut voter__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Voter => { - if voter__.is_some() { - return Err(serde::de::Error::duplicate_field("voter")); - } - voter__ = Some(map_.next_value()?); - } - } - } - Ok(QueryVoteRequest { - proposal_id: proposal_id__.unwrap_or_default(), - voter: voter__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryVoteRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryVoteResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryVoteResponse", len)?; - if let Some(v) = self.vote.as_ref() { - struct_ser.serialize_field("vote", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryVoteResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "vote", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Vote, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "vote" => Ok(GeneratedField::Vote), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryVoteResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryVoteResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut vote__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Vote => { - if vote__.is_some() { - return Err(serde::de::Error::duplicate_field("vote")); - } - vote__ = map_.next_value()?; - } - } - } - Ok(QueryVoteResponse { - vote: vote__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryVoteResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryVotesRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryVotesRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryVotesRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryVotesRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryVotesRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryVotesRequest { - proposal_id: proposal_id__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryVotesRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryVotesResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryVotesResponse", len)?; - if true { - struct_ser.serialize_field("votes", &self.votes)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryVotesResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "votes", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Votes, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "votes" => Ok(GeneratedField::Votes), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryVotesResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.QueryVotesResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut votes__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Votes => { - if votes__.is_some() { - return Err(serde::de::Error::duplicate_field("votes")); - } - votes__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryVotesResponse { - votes: votes__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.QueryVotesResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for TallyParams { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.TallyParams", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("quorum", pbjson::private::base64::encode(&self.quorum).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("threshold", pbjson::private::base64::encode(&self.threshold).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("vetoThreshold", pbjson::private::base64::encode(&self.veto_threshold).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for TallyParams { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "quorum", - "threshold", - "veto_threshold", - "vetoThreshold", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Quorum, - Threshold, - VetoThreshold, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "quorum" => Ok(GeneratedField::Quorum), - "threshold" => Ok(GeneratedField::Threshold), - "vetoThreshold" | "veto_threshold" => Ok(GeneratedField::VetoThreshold), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = TallyParams; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.TallyParams") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut quorum__ = None; - let mut threshold__ = None; - let mut veto_threshold__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Quorum => { - if quorum__.is_some() { - return Err(serde::de::Error::duplicate_field("quorum")); - } - quorum__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Threshold => { - if threshold__.is_some() { - return Err(serde::de::Error::duplicate_field("threshold")); - } - threshold__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::VetoThreshold => { - if veto_threshold__.is_some() { - return Err(serde::de::Error::duplicate_field("vetoThreshold")); - } - veto_threshold__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(TallyParams { - quorum: quorum__.unwrap_or_default(), - threshold: threshold__.unwrap_or_default(), - veto_threshold: veto_threshold__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.TallyParams", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for TallyResult { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.TallyResult", len)?; - if true { - struct_ser.serialize_field("yes", &self.yes)?; - } - if true { - struct_ser.serialize_field("abstain", &self.abstain)?; - } - if true { - struct_ser.serialize_field("no", &self.no)?; - } - if true { - struct_ser.serialize_field("noWithVeto", &self.no_with_veto)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for TallyResult { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "yes", - "abstain", - "no", - "no_with_veto", - "noWithVeto", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Yes, - Abstain, - No, - NoWithVeto, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "yes" => Ok(GeneratedField::Yes), - "abstain" => Ok(GeneratedField::Abstain), - "no" => Ok(GeneratedField::No), - "noWithVeto" | "no_with_veto" => Ok(GeneratedField::NoWithVeto), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = TallyResult; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.TallyResult") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut yes__ = None; - let mut abstain__ = None; - let mut no__ = None; - let mut no_with_veto__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Yes => { - if yes__.is_some() { - return Err(serde::de::Error::duplicate_field("yes")); - } - yes__ = Some(map_.next_value()?); - } - GeneratedField::Abstain => { - if abstain__.is_some() { - return Err(serde::de::Error::duplicate_field("abstain")); - } - abstain__ = Some(map_.next_value()?); - } - GeneratedField::No => { - if no__.is_some() { - return Err(serde::de::Error::duplicate_field("no")); - } - no__ = Some(map_.next_value()?); - } - GeneratedField::NoWithVeto => { - if no_with_veto__.is_some() { - return Err(serde::de::Error::duplicate_field("noWithVeto")); - } - no_with_veto__ = Some(map_.next_value()?); - } - } - } - Ok(TallyResult { - yes: yes__.unwrap_or_default(), - abstain: abstain__.unwrap_or_default(), - no: no__.unwrap_or_default(), - no_with_veto: no_with_veto__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.TallyResult", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for TextProposal { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.TextProposal", len)?; - if true { - struct_ser.serialize_field("title", &self.title)?; - } - if true { - struct_ser.serialize_field("description", &self.description)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for TextProposal { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "title", - "description", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Title, - Description, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "title" => Ok(GeneratedField::Title), - "description" => Ok(GeneratedField::Description), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = TextProposal; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.TextProposal") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut title__ = None; - let mut description__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Title => { - if title__.is_some() { - return Err(serde::de::Error::duplicate_field("title")); - } - title__ = Some(map_.next_value()?); - } - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); - } - description__ = Some(map_.next_value()?); - } - } - } - Ok(TextProposal { - title: title__.unwrap_or_default(), - description: description__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.TextProposal", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Vote { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.Vote", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; - } - if true { - struct_ser.serialize_field("voter", &self.voter)?; - } - if true { - let v = VoteOption::try_from(self.option) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.option)))?; - struct_ser.serialize_field("option", &v)?; - } - if true { - struct_ser.serialize_field("options", &self.options)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Vote { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal_id", - "proposalId", - "voter", - "option", - "options", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ProposalId, - Voter, - Option, - Options, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), - "voter" => Ok(GeneratedField::Voter), - "option" => Ok(GeneratedField::Option), - "options" => Ok(GeneratedField::Options), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Vote; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.Vote") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal_id__ = None; - let mut voter__ = None; - let mut option__ = None; - let mut options__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ProposalId => { - if proposal_id__.is_some() { - return Err(serde::de::Error::duplicate_field("proposalId")); - } - proposal_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Voter => { - if voter__.is_some() { - return Err(serde::de::Error::duplicate_field("voter")); - } - voter__ = Some(map_.next_value()?); - } - GeneratedField::Option => { - if option__.is_some() { - return Err(serde::de::Error::duplicate_field("option")); - } - option__ = Some(map_.next_value::()? as i32); - } - GeneratedField::Options => { - if options__.is_some() { - return Err(serde::de::Error::duplicate_field("options")); - } - options__ = Some(map_.next_value()?); - } - } - } - Ok(Vote { - proposal_id: proposal_id__.unwrap_or_default(), - voter: voter__.unwrap_or_default(), - option: option__.unwrap_or_default(), - options: options__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.Vote", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for VoteOption { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::Unspecified => "VOTE_OPTION_UNSPECIFIED", - Self::Yes => "VOTE_OPTION_YES", - Self::Abstain => "VOTE_OPTION_ABSTAIN", - Self::No => "VOTE_OPTION_NO", - Self::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for VoteOption { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "VOTE_OPTION_UNSPECIFIED", - "VOTE_OPTION_YES", - "VOTE_OPTION_ABSTAIN", - "VOTE_OPTION_NO", - "VOTE_OPTION_NO_WITH_VETO", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = VoteOption; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "VOTE_OPTION_UNSPECIFIED" => Ok(VoteOption::Unspecified), - "VOTE_OPTION_YES" => Ok(VoteOption::Yes), - "VOTE_OPTION_ABSTAIN" => Ok(VoteOption::Abstain), - "VOTE_OPTION_NO" => Ok(VoteOption::No), - "VOTE_OPTION_NO_WITH_VETO" => Ok(VoteOption::NoWithVeto), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for VotingParams { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.VotingParams", len)?; - if let Some(v) = self.voting_period.as_ref() { - struct_ser.serialize_field("votingPeriod", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for VotingParams { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "voting_period", - "votingPeriod", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - VotingPeriod, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "votingPeriod" | "voting_period" => Ok(GeneratedField::VotingPeriod), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = VotingParams; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.VotingParams") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut voting_period__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::VotingPeriod => { - if voting_period__.is_some() { - return Err(serde::de::Error::duplicate_field("votingPeriod")); - } - voting_period__ = map_.next_value()?; - } - } - } - Ok(VotingParams { - voting_period: voting_period__, - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.VotingParams", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for WeightedVoteOption { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.WeightedVoteOption", len)?; - if true { - let v = VoteOption::try_from(self.option) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.option)))?; - struct_ser.serialize_field("option", &v)?; - } - if true { - struct_ser.serialize_field("weight", &self.weight)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for WeightedVoteOption { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "option", - "weight", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Option, - Weight, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "option" => Ok(GeneratedField::Option), - "weight" => Ok(GeneratedField::Weight), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = WeightedVoteOption; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.gov.v1beta1.WeightedVoteOption") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut option__ = None; - let mut weight__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Option => { - if option__.is_some() { - return Err(serde::de::Error::duplicate_field("option")); - } - option__ = Some(map_.next_value::()? as i32); - } - GeneratedField::Weight => { - if weight__.is_some() { - return Err(serde::de::Error::duplicate_field("weight")); - } - weight__ = Some(map_.next_value()?); - } - } - } - Ok(WeightedVoteOption { - option: option__.unwrap_or_default(), - weight: weight__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.gov.v1beta1.WeightedVoteOption", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.ics23.v1.serde.rs b/src/prost/cosmos.ics23.v1.serde.rs deleted file mode 100644 index 776025f5..00000000 --- a/src/prost/cosmos.ics23.v1.serde.rs +++ /dev/null @@ -1,1936 +0,0 @@ -impl serde::Serialize for BatchEntry { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.proof.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.ics23.v1.BatchEntry", len)?; - if let Some(v) = self.proof.as_ref() { - match v { - batch_entry::Proof::Exist(v) => { - struct_ser.serialize_field("exist", v)?; - } - batch_entry::Proof::Nonexist(v) => { - struct_ser.serialize_field("nonexist", v)?; - } - } - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for BatchEntry { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "exist", - "nonexist", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Exist, - Nonexist, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "exist" => Ok(GeneratedField::Exist), - "nonexist" => Ok(GeneratedField::Nonexist), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = BatchEntry; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.ics23.v1.BatchEntry") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proof__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Exist => { - if proof__.is_some() { - return Err(serde::de::Error::duplicate_field("exist")); - } - proof__ = map_.next_value::<::core::option::Option<_>>()?.map(batch_entry::Proof::Exist) -; - } - GeneratedField::Nonexist => { - if proof__.is_some() { - return Err(serde::de::Error::duplicate_field("nonexist")); - } - proof__ = map_.next_value::<::core::option::Option<_>>()?.map(batch_entry::Proof::Nonexist) -; - } - } - } - Ok(BatchEntry { - proof: proof__, - }) - } - } - deserializer.deserialize_struct("cosmos.ics23.v1.BatchEntry", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for BatchProof { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.ics23.v1.BatchProof", len)?; - if true { - struct_ser.serialize_field("entries", &self.entries)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for BatchProof { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "entries", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Entries, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "entries" => Ok(GeneratedField::Entries), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = BatchProof; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.ics23.v1.BatchProof") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut entries__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Entries => { - if entries__.is_some() { - return Err(serde::de::Error::duplicate_field("entries")); - } - entries__ = Some(map_.next_value()?); - } - } - } - Ok(BatchProof { - entries: entries__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.ics23.v1.BatchProof", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CommitmentProof { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.proof.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.ics23.v1.CommitmentProof", len)?; - if let Some(v) = self.proof.as_ref() { - match v { - commitment_proof::Proof::Exist(v) => { - struct_ser.serialize_field("exist", v)?; - } - commitment_proof::Proof::Nonexist(v) => { - struct_ser.serialize_field("nonexist", v)?; - } - commitment_proof::Proof::Batch(v) => { - struct_ser.serialize_field("batch", v)?; - } - commitment_proof::Proof::Compressed(v) => { - struct_ser.serialize_field("compressed", v)?; - } - } - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CommitmentProof { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "exist", - "nonexist", - "batch", - "compressed", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Exist, - Nonexist, - Batch, - Compressed, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "exist" => Ok(GeneratedField::Exist), - "nonexist" => Ok(GeneratedField::Nonexist), - "batch" => Ok(GeneratedField::Batch), - "compressed" => Ok(GeneratedField::Compressed), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CommitmentProof; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.ics23.v1.CommitmentProof") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proof__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Exist => { - if proof__.is_some() { - return Err(serde::de::Error::duplicate_field("exist")); - } - proof__ = map_.next_value::<::core::option::Option<_>>()?.map(commitment_proof::Proof::Exist) -; - } - GeneratedField::Nonexist => { - if proof__.is_some() { - return Err(serde::de::Error::duplicate_field("nonexist")); - } - proof__ = map_.next_value::<::core::option::Option<_>>()?.map(commitment_proof::Proof::Nonexist) -; - } - GeneratedField::Batch => { - if proof__.is_some() { - return Err(serde::de::Error::duplicate_field("batch")); - } - proof__ = map_.next_value::<::core::option::Option<_>>()?.map(commitment_proof::Proof::Batch) -; - } - GeneratedField::Compressed => { - if proof__.is_some() { - return Err(serde::de::Error::duplicate_field("compressed")); - } - proof__ = map_.next_value::<::core::option::Option<_>>()?.map(commitment_proof::Proof::Compressed) -; - } - } - } - Ok(CommitmentProof { - proof: proof__, - }) - } - } - deserializer.deserialize_struct("cosmos.ics23.v1.CommitmentProof", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CompressedBatchEntry { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.proof.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.ics23.v1.CompressedBatchEntry", len)?; - if let Some(v) = self.proof.as_ref() { - match v { - compressed_batch_entry::Proof::Exist(v) => { - struct_ser.serialize_field("exist", v)?; - } - compressed_batch_entry::Proof::Nonexist(v) => { - struct_ser.serialize_field("nonexist", v)?; - } - } - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CompressedBatchEntry { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "exist", - "nonexist", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Exist, - Nonexist, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "exist" => Ok(GeneratedField::Exist), - "nonexist" => Ok(GeneratedField::Nonexist), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CompressedBatchEntry; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.ics23.v1.CompressedBatchEntry") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proof__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Exist => { - if proof__.is_some() { - return Err(serde::de::Error::duplicate_field("exist")); - } - proof__ = map_.next_value::<::core::option::Option<_>>()?.map(compressed_batch_entry::Proof::Exist) -; - } - GeneratedField::Nonexist => { - if proof__.is_some() { - return Err(serde::de::Error::duplicate_field("nonexist")); - } - proof__ = map_.next_value::<::core::option::Option<_>>()?.map(compressed_batch_entry::Proof::Nonexist) -; - } - } - } - Ok(CompressedBatchEntry { - proof: proof__, - }) - } - } - deserializer.deserialize_struct("cosmos.ics23.v1.CompressedBatchEntry", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CompressedBatchProof { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.ics23.v1.CompressedBatchProof", len)?; - if true { - struct_ser.serialize_field("entries", &self.entries)?; - } - if true { - struct_ser.serialize_field("lookupInners", &self.lookup_inners)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CompressedBatchProof { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "entries", - "lookup_inners", - "lookupInners", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Entries, - LookupInners, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "entries" => Ok(GeneratedField::Entries), - "lookupInners" | "lookup_inners" => Ok(GeneratedField::LookupInners), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CompressedBatchProof; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.ics23.v1.CompressedBatchProof") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut entries__ = None; - let mut lookup_inners__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Entries => { - if entries__.is_some() { - return Err(serde::de::Error::duplicate_field("entries")); - } - entries__ = Some(map_.next_value()?); - } - GeneratedField::LookupInners => { - if lookup_inners__.is_some() { - return Err(serde::de::Error::duplicate_field("lookupInners")); - } - lookup_inners__ = Some(map_.next_value()?); - } - } - } - Ok(CompressedBatchProof { - entries: entries__.unwrap_or_default(), - lookup_inners: lookup_inners__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.ics23.v1.CompressedBatchProof", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CompressedExistenceProof { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.ics23.v1.CompressedExistenceProof", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("value", pbjson::private::base64::encode(&self.value).as_str())?; - } - if let Some(v) = self.leaf.as_ref() { - struct_ser.serialize_field("leaf", v)?; - } - if true { - struct_ser.serialize_field("path", &self.path)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CompressedExistenceProof { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - "value", - "leaf", - "path", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - Value, - Leaf, - Path, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - "value" => Ok(GeneratedField::Value), - "leaf" => Ok(GeneratedField::Leaf), - "path" => Ok(GeneratedField::Path), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CompressedExistenceProof; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.ics23.v1.CompressedExistenceProof") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - let mut value__ = None; - let mut leaf__ = None; - let mut path__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); - } - value__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Leaf => { - if leaf__.is_some() { - return Err(serde::de::Error::duplicate_field("leaf")); - } - leaf__ = map_.next_value()?; - } - GeneratedField::Path => { - if path__.is_some() { - return Err(serde::de::Error::duplicate_field("path")); - } - path__ = - Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::NumberDeserialize<_>>>()? - .into_iter().map(|x| x.0).collect()) - ; - } - } - } - Ok(CompressedExistenceProof { - key: key__.unwrap_or_default(), - value: value__.unwrap_or_default(), - leaf: leaf__, - path: path__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.ics23.v1.CompressedExistenceProof", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CompressedNonExistenceProof { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.ics23.v1.CompressedNonExistenceProof", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - if let Some(v) = self.left.as_ref() { - struct_ser.serialize_field("left", v)?; - } - if let Some(v) = self.right.as_ref() { - struct_ser.serialize_field("right", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CompressedNonExistenceProof { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - "left", - "right", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - Left, - Right, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - "left" => Ok(GeneratedField::Left), - "right" => Ok(GeneratedField::Right), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CompressedNonExistenceProof; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.ics23.v1.CompressedNonExistenceProof") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - let mut left__ = None; - let mut right__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Left => { - if left__.is_some() { - return Err(serde::de::Error::duplicate_field("left")); - } - left__ = map_.next_value()?; - } - GeneratedField::Right => { - if right__.is_some() { - return Err(serde::de::Error::duplicate_field("right")); - } - right__ = map_.next_value()?; - } - } - } - Ok(CompressedNonExistenceProof { - key: key__.unwrap_or_default(), - left: left__, - right: right__, - }) - } - } - deserializer.deserialize_struct("cosmos.ics23.v1.CompressedNonExistenceProof", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ExistenceProof { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.ics23.v1.ExistenceProof", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("value", pbjson::private::base64::encode(&self.value).as_str())?; - } - if let Some(v) = self.leaf.as_ref() { - struct_ser.serialize_field("leaf", v)?; - } - if true { - struct_ser.serialize_field("path", &self.path)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ExistenceProof { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - "value", - "leaf", - "path", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - Value, - Leaf, - Path, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - "value" => Ok(GeneratedField::Value), - "leaf" => Ok(GeneratedField::Leaf), - "path" => Ok(GeneratedField::Path), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ExistenceProof; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.ics23.v1.ExistenceProof") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - let mut value__ = None; - let mut leaf__ = None; - let mut path__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); - } - value__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Leaf => { - if leaf__.is_some() { - return Err(serde::de::Error::duplicate_field("leaf")); - } - leaf__ = map_.next_value()?; - } - GeneratedField::Path => { - if path__.is_some() { - return Err(serde::de::Error::duplicate_field("path")); - } - path__ = Some(map_.next_value()?); - } - } - } - Ok(ExistenceProof { - key: key__.unwrap_or_default(), - value: value__.unwrap_or_default(), - leaf: leaf__, - path: path__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.ics23.v1.ExistenceProof", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for HashOp { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::NoHash => "NO_HASH", - Self::Sha256 => "SHA256", - Self::Sha512 => "SHA512", - Self::Keccak => "KECCAK", - Self::Ripemd160 => "RIPEMD160", - Self::Bitcoin => "BITCOIN", - Self::Sha512256 => "SHA512_256", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for HashOp { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "NO_HASH", - "SHA256", - "SHA512", - "KECCAK", - "RIPEMD160", - "BITCOIN", - "SHA512_256", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = HashOp; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "NO_HASH" => Ok(HashOp::NoHash), - "SHA256" => Ok(HashOp::Sha256), - "SHA512" => Ok(HashOp::Sha512), - "KECCAK" => Ok(HashOp::Keccak), - "RIPEMD160" => Ok(HashOp::Ripemd160), - "BITCOIN" => Ok(HashOp::Bitcoin), - "SHA512_256" => Ok(HashOp::Sha512256), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for InnerOp { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.ics23.v1.InnerOp", len)?; - if true { - let v = HashOp::try_from(self.hash) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.hash)))?; - struct_ser.serialize_field("hash", &v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("prefix", pbjson::private::base64::encode(&self.prefix).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("suffix", pbjson::private::base64::encode(&self.suffix).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for InnerOp { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "hash", - "prefix", - "suffix", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Hash, - Prefix, - Suffix, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "hash" => Ok(GeneratedField::Hash), - "prefix" => Ok(GeneratedField::Prefix), - "suffix" => Ok(GeneratedField::Suffix), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = InnerOp; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.ics23.v1.InnerOp") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut hash__ = None; - let mut prefix__ = None; - let mut suffix__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Hash => { - if hash__.is_some() { - return Err(serde::de::Error::duplicate_field("hash")); - } - hash__ = Some(map_.next_value::()? as i32); - } - GeneratedField::Prefix => { - if prefix__.is_some() { - return Err(serde::de::Error::duplicate_field("prefix")); - } - prefix__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Suffix => { - if suffix__.is_some() { - return Err(serde::de::Error::duplicate_field("suffix")); - } - suffix__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(InnerOp { - hash: hash__.unwrap_or_default(), - prefix: prefix__.unwrap_or_default(), - suffix: suffix__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.ics23.v1.InnerOp", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for InnerSpec { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.ics23.v1.InnerSpec", len)?; - if true { - struct_ser.serialize_field("childOrder", &self.child_order)?; - } - if true { - struct_ser.serialize_field("childSize", &self.child_size)?; - } - if true { - struct_ser.serialize_field("minPrefixLength", &self.min_prefix_length)?; - } - if true { - struct_ser.serialize_field("maxPrefixLength", &self.max_prefix_length)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("emptyChild", pbjson::private::base64::encode(&self.empty_child).as_str())?; - } - if true { - let v = HashOp::try_from(self.hash) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.hash)))?; - struct_ser.serialize_field("hash", &v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for InnerSpec { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "child_order", - "childOrder", - "child_size", - "childSize", - "min_prefix_length", - "minPrefixLength", - "max_prefix_length", - "maxPrefixLength", - "empty_child", - "emptyChild", - "hash", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ChildOrder, - ChildSize, - MinPrefixLength, - MaxPrefixLength, - EmptyChild, - Hash, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "childOrder" | "child_order" => Ok(GeneratedField::ChildOrder), - "childSize" | "child_size" => Ok(GeneratedField::ChildSize), - "minPrefixLength" | "min_prefix_length" => Ok(GeneratedField::MinPrefixLength), - "maxPrefixLength" | "max_prefix_length" => Ok(GeneratedField::MaxPrefixLength), - "emptyChild" | "empty_child" => Ok(GeneratedField::EmptyChild), - "hash" => Ok(GeneratedField::Hash), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = InnerSpec; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.ics23.v1.InnerSpec") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut child_order__ = None; - let mut child_size__ = None; - let mut min_prefix_length__ = None; - let mut max_prefix_length__ = None; - let mut empty_child__ = None; - let mut hash__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ChildOrder => { - if child_order__.is_some() { - return Err(serde::de::Error::duplicate_field("childOrder")); - } - child_order__ = - Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::NumberDeserialize<_>>>()? - .into_iter().map(|x| x.0).collect()) - ; - } - GeneratedField::ChildSize => { - if child_size__.is_some() { - return Err(serde::de::Error::duplicate_field("childSize")); - } - child_size__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::MinPrefixLength => { - if min_prefix_length__.is_some() { - return Err(serde::de::Error::duplicate_field("minPrefixLength")); - } - min_prefix_length__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::MaxPrefixLength => { - if max_prefix_length__.is_some() { - return Err(serde::de::Error::duplicate_field("maxPrefixLength")); - } - max_prefix_length__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::EmptyChild => { - if empty_child__.is_some() { - return Err(serde::de::Error::duplicate_field("emptyChild")); - } - empty_child__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Hash => { - if hash__.is_some() { - return Err(serde::de::Error::duplicate_field("hash")); - } - hash__ = Some(map_.next_value::()? as i32); - } - } - } - Ok(InnerSpec { - child_order: child_order__.unwrap_or_default(), - child_size: child_size__.unwrap_or_default(), - min_prefix_length: min_prefix_length__.unwrap_or_default(), - max_prefix_length: max_prefix_length__.unwrap_or_default(), - empty_child: empty_child__.unwrap_or_default(), - hash: hash__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.ics23.v1.InnerSpec", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for LeafOp { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.ics23.v1.LeafOp", len)?; - if true { - let v = HashOp::try_from(self.hash) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.hash)))?; - struct_ser.serialize_field("hash", &v)?; - } - if true { - let v = HashOp::try_from(self.prehash_key) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.prehash_key)))?; - struct_ser.serialize_field("prehashKey", &v)?; - } - if true { - let v = HashOp::try_from(self.prehash_value) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.prehash_value)))?; - struct_ser.serialize_field("prehashValue", &v)?; - } - if true { - let v = LengthOp::try_from(self.length) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.length)))?; - struct_ser.serialize_field("length", &v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("prefix", pbjson::private::base64::encode(&self.prefix).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for LeafOp { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "hash", - "prehash_key", - "prehashKey", - "prehash_value", - "prehashValue", - "length", - "prefix", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Hash, - PrehashKey, - PrehashValue, - Length, - Prefix, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "hash" => Ok(GeneratedField::Hash), - "prehashKey" | "prehash_key" => Ok(GeneratedField::PrehashKey), - "prehashValue" | "prehash_value" => Ok(GeneratedField::PrehashValue), - "length" => Ok(GeneratedField::Length), - "prefix" => Ok(GeneratedField::Prefix), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = LeafOp; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.ics23.v1.LeafOp") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut hash__ = None; - let mut prehash_key__ = None; - let mut prehash_value__ = None; - let mut length__ = None; - let mut prefix__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Hash => { - if hash__.is_some() { - return Err(serde::de::Error::duplicate_field("hash")); - } - hash__ = Some(map_.next_value::()? as i32); - } - GeneratedField::PrehashKey => { - if prehash_key__.is_some() { - return Err(serde::de::Error::duplicate_field("prehashKey")); - } - prehash_key__ = Some(map_.next_value::()? as i32); - } - GeneratedField::PrehashValue => { - if prehash_value__.is_some() { - return Err(serde::de::Error::duplicate_field("prehashValue")); - } - prehash_value__ = Some(map_.next_value::()? as i32); - } - GeneratedField::Length => { - if length__.is_some() { - return Err(serde::de::Error::duplicate_field("length")); - } - length__ = Some(map_.next_value::()? as i32); - } - GeneratedField::Prefix => { - if prefix__.is_some() { - return Err(serde::de::Error::duplicate_field("prefix")); - } - prefix__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(LeafOp { - hash: hash__.unwrap_or_default(), - prehash_key: prehash_key__.unwrap_or_default(), - prehash_value: prehash_value__.unwrap_or_default(), - length: length__.unwrap_or_default(), - prefix: prefix__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.ics23.v1.LeafOp", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for LengthOp { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::NoPrefix => "NO_PREFIX", - Self::VarProto => "VAR_PROTO", - Self::VarRlp => "VAR_RLP", - Self::Fixed32Big => "FIXED32_BIG", - Self::Fixed32Little => "FIXED32_LITTLE", - Self::Fixed64Big => "FIXED64_BIG", - Self::Fixed64Little => "FIXED64_LITTLE", - Self::Require32Bytes => "REQUIRE_32_BYTES", - Self::Require64Bytes => "REQUIRE_64_BYTES", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for LengthOp { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "NO_PREFIX", - "VAR_PROTO", - "VAR_RLP", - "FIXED32_BIG", - "FIXED32_LITTLE", - "FIXED64_BIG", - "FIXED64_LITTLE", - "REQUIRE_32_BYTES", - "REQUIRE_64_BYTES", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = LengthOp; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "NO_PREFIX" => Ok(LengthOp::NoPrefix), - "VAR_PROTO" => Ok(LengthOp::VarProto), - "VAR_RLP" => Ok(LengthOp::VarRlp), - "FIXED32_BIG" => Ok(LengthOp::Fixed32Big), - "FIXED32_LITTLE" => Ok(LengthOp::Fixed32Little), - "FIXED64_BIG" => Ok(LengthOp::Fixed64Big), - "FIXED64_LITTLE" => Ok(LengthOp::Fixed64Little), - "REQUIRE_32_BYTES" => Ok(LengthOp::Require32Bytes), - "REQUIRE_64_BYTES" => Ok(LengthOp::Require64Bytes), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for NonExistenceProof { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.ics23.v1.NonExistenceProof", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - if let Some(v) = self.left.as_ref() { - struct_ser.serialize_field("left", v)?; - } - if let Some(v) = self.right.as_ref() { - struct_ser.serialize_field("right", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for NonExistenceProof { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - "left", - "right", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - Left, - Right, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - "left" => Ok(GeneratedField::Left), - "right" => Ok(GeneratedField::Right), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = NonExistenceProof; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.ics23.v1.NonExistenceProof") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - let mut left__ = None; - let mut right__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Left => { - if left__.is_some() { - return Err(serde::de::Error::duplicate_field("left")); - } - left__ = map_.next_value()?; - } - GeneratedField::Right => { - if right__.is_some() { - return Err(serde::de::Error::duplicate_field("right")); - } - right__ = map_.next_value()?; - } - } - } - Ok(NonExistenceProof { - key: key__.unwrap_or_default(), - left: left__, - right: right__, - }) - } - } - deserializer.deserialize_struct("cosmos.ics23.v1.NonExistenceProof", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ProofSpec { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.ics23.v1.ProofSpec", len)?; - if let Some(v) = self.leaf_spec.as_ref() { - struct_ser.serialize_field("leafSpec", v)?; - } - if let Some(v) = self.inner_spec.as_ref() { - struct_ser.serialize_field("innerSpec", v)?; - } - if true { - struct_ser.serialize_field("maxDepth", &self.max_depth)?; - } - if true { - struct_ser.serialize_field("minDepth", &self.min_depth)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ProofSpec { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "leaf_spec", - "leafSpec", - "inner_spec", - "innerSpec", - "max_depth", - "maxDepth", - "min_depth", - "minDepth", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - LeafSpec, - InnerSpec, - MaxDepth, - MinDepth, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "leafSpec" | "leaf_spec" => Ok(GeneratedField::LeafSpec), - "innerSpec" | "inner_spec" => Ok(GeneratedField::InnerSpec), - "maxDepth" | "max_depth" => Ok(GeneratedField::MaxDepth), - "minDepth" | "min_depth" => Ok(GeneratedField::MinDepth), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ProofSpec; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.ics23.v1.ProofSpec") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut leaf_spec__ = None; - let mut inner_spec__ = None; - let mut max_depth__ = None; - let mut min_depth__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::LeafSpec => { - if leaf_spec__.is_some() { - return Err(serde::de::Error::duplicate_field("leafSpec")); - } - leaf_spec__ = map_.next_value()?; - } - GeneratedField::InnerSpec => { - if inner_spec__.is_some() { - return Err(serde::de::Error::duplicate_field("innerSpec")); - } - inner_spec__ = map_.next_value()?; - } - GeneratedField::MaxDepth => { - if max_depth__.is_some() { - return Err(serde::de::Error::duplicate_field("maxDepth")); - } - max_depth__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::MinDepth => { - if min_depth__.is_some() { - return Err(serde::de::Error::duplicate_field("minDepth")); - } - min_depth__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(ProofSpec { - leaf_spec: leaf_spec__, - inner_spec: inner_spec__, - max_depth: max_depth__.unwrap_or_default(), - min_depth: min_depth__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.ics23.v1.ProofSpec", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.staking.module.v1.rs b/src/prost/cosmos.staking.module.v1.rs deleted file mode 100644 index 2a8d086b..00000000 --- a/src/prost/cosmos.staking.module.v1.rs +++ /dev/null @@ -1,20 +0,0 @@ -/// Module is the config object of the staking module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Module { - /// hooks_order specifies the order of staking hooks and should be a list - /// of module names which provide a staking hooks instance. If no order is - /// provided, then hooks will be applied in alphabetical order of module names. - #[prost(string, repeated, tag = "1")] - pub hooks_order: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} -impl ::prost::Name for Module { - const NAME: &'static str = "Module"; - const PACKAGE: &'static str = "cosmos.staking.module.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.module.v1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.staking.module.v1.serde.rs b/src/prost/cosmos.staking.module.v1.serde.rs deleted file mode 100644 index f9224074..00000000 --- a/src/prost/cosmos.staking.module.v1.serde.rs +++ /dev/null @@ -1,109 +0,0 @@ -impl serde::Serialize for Module { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.module.v1.Module", len)?; - if true { - struct_ser.serialize_field("hooksOrder", &self.hooks_order)?; - } - if true { - struct_ser.serialize_field("authority", &self.authority)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Module { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "hooks_order", - "hooksOrder", - "authority", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - HooksOrder, - Authority, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "hooksOrder" | "hooks_order" => Ok(GeneratedField::HooksOrder), - "authority" => Ok(GeneratedField::Authority), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Module; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.module.v1.Module") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut hooks_order__ = None; - let mut authority__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::HooksOrder => { - if hooks_order__.is_some() { - return Err(serde::de::Error::duplicate_field("hooksOrder")); - } - hooks_order__ = Some(map_.next_value()?); - } - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); - } - authority__ = Some(map_.next_value()?); - } - } - } - Ok(Module { - hooks_order: hooks_order__.unwrap_or_default(), - authority: authority__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.module.v1.Module", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.staking.v1beta1.rs b/src/prost/cosmos.staking.v1beta1.rs deleted file mode 100644 index 2c2c1b8d..00000000 --- a/src/prost/cosmos.staking.v1beta1.rs +++ /dev/null @@ -1,3742 +0,0 @@ -/// HistoricalInfo contains header and validator information for a given block. -/// It is stored as part of staking module's state, which persists the `n` most -/// recent HistoricalInfo -/// (`n` is set by the staking module's `historical_entries` parameter). -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct HistoricalInfo { - #[prost(message, optional, tag = "1")] - pub header: ::core::option::Option<::tendermint_proto::types::Header>, - #[prost(message, repeated, tag = "2")] - pub valset: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for HistoricalInfo { - const NAME: &'static str = "HistoricalInfo"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// CommissionRates defines the initial commission rates to be used for creating -/// a validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CommissionRates { - /// rate is the commission rate charged to delegators, as a fraction. - #[prost(string, tag = "1")] - pub rate: ::prost::alloc::string::String, - /// max_rate defines the maximum commission rate which validator can ever charge, as a fraction. - #[prost(string, tag = "2")] - pub max_rate: ::prost::alloc::string::String, - /// max_change_rate defines the maximum daily increase of the validator commission, as a fraction. - #[prost(string, tag = "3")] - pub max_change_rate: ::prost::alloc::string::String, -} -impl ::prost::Name for CommissionRates { - const NAME: &'static str = "CommissionRates"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// Commission defines commission parameters for a given validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Commission { - /// commission_rates defines the initial commission rates to be used for creating a validator. - #[prost(message, optional, tag = "1")] - pub commission_rates: ::core::option::Option, - /// update_time is the last time the commission rate was changed. - #[prost(message, optional, tag = "2")] - pub update_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, -} -impl ::prost::Name for Commission { - const NAME: &'static str = "Commission"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// Description defines a validator description. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Description { - /// moniker defines a human-readable name for the validator. - #[prost(string, tag = "1")] - pub moniker: ::prost::alloc::string::String, - /// identity defines an optional identity signature (ex. UPort or Keybase). - #[prost(string, tag = "2")] - pub identity: ::prost::alloc::string::String, - /// website defines an optional website link. - #[prost(string, tag = "3")] - pub website: ::prost::alloc::string::String, - /// security_contact defines an optional email for security contact. - #[prost(string, tag = "4")] - pub security_contact: ::prost::alloc::string::String, - /// details define other optional details. - #[prost(string, tag = "5")] - pub details: ::prost::alloc::string::String, -} -impl ::prost::Name for Description { - const NAME: &'static str = "Description"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// Validator defines a validator, together with the total amount of the -/// Validator's bond shares and their exchange rate to coins. Slashing results in -/// a decrease in the exchange rate, allowing correct calculation of future -/// undelegations without iterating over delegators. When coins are delegated to -/// this validator, the validator is credited with a delegation whose number of -/// bond shares is based on the amount of coins delegated divided by the current -/// exchange rate. Voting power can be calculated as total bonded shares -/// multiplied by exchange rate. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Validator { - /// operator_address defines the address of the validator's operator; bech encoded in JSON. - #[prost(string, tag = "1")] - pub operator_address: ::prost::alloc::string::String, - /// consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. - #[prost(message, optional, tag = "2")] - pub consensus_pubkey: ::core::option::Option< - super::super::super::google::protobuf::Any, - >, - /// jailed defined whether the validator has been jailed from bonded status or not. - #[prost(bool, tag = "3")] - pub jailed: bool, - /// status is the validator status (bonded/unbonding/unbonded). - #[prost(enumeration = "BondStatus", tag = "4")] - pub status: i32, - /// tokens define the delegated tokens (incl. self-delegation). - #[prost(string, tag = "5")] - pub tokens: ::prost::alloc::string::String, - /// delegator_shares defines total shares issued to a validator's delegators. - #[prost(string, tag = "6")] - pub delegator_shares: ::prost::alloc::string::String, - /// description defines the description terms for the validator. - #[prost(message, optional, tag = "7")] - pub description: ::core::option::Option, - /// unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. - #[prost(int64, tag = "8")] - pub unbonding_height: i64, - /// unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. - #[prost(message, optional, tag = "9")] - pub unbonding_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, - /// commission defines the commission parameters. - #[prost(message, optional, tag = "10")] - pub commission: ::core::option::Option, - /// min_self_delegation is the validator's self declared minimum self delegation. - /// - /// Since: cosmos-sdk 0.46 - #[prost(string, tag = "11")] - pub min_self_delegation: ::prost::alloc::string::String, - /// strictly positive if this validator's unbonding has been stopped by external modules - #[prost(int64, tag = "12")] - pub unbonding_on_hold_ref_count: i64, - /// list of unbonding ids, each uniquely identifing an unbonding of this validator - #[prost(uint64, repeated, tag = "13")] - pub unbonding_ids: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Validator { - const NAME: &'static str = "Validator"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// ValAddresses defines a repeated set of validator addresses. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValAddresses { - #[prost(string, repeated, tag = "1")] - pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for ValAddresses { - const NAME: &'static str = "ValAddresses"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// DVPair is struct that just has a delegator-validator pair with no other data. -/// It is intended to be used as a marshalable pointer. For example, a DVPair can -/// be used to construct the key to getting an UnbondingDelegation from state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DvPair { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, -} -impl ::prost::Name for DvPair { - const NAME: &'static str = "DVPair"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// DVPairs defines an array of DVPair objects. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DvPairs { - #[prost(message, repeated, tag = "1")] - pub pairs: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for DvPairs { - const NAME: &'static str = "DVPairs"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// DVVTriplet is struct that just has a delegator-validator-validator triplet -/// with no other data. It is intended to be used as a marshalable pointer. For -/// example, a DVVTriplet can be used to construct the key to getting a -/// Redelegation from state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DvvTriplet { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_src_address: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub validator_dst_address: ::prost::alloc::string::String, -} -impl ::prost::Name for DvvTriplet { - const NAME: &'static str = "DVVTriplet"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// DVVTriplets defines an array of DVVTriplet objects. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DvvTriplets { - #[prost(message, repeated, tag = "1")] - pub triplets: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for DvvTriplets { - const NAME: &'static str = "DVVTriplets"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// Delegation represents the bond with tokens held by an account. It is -/// owned by one delegator, and is associated with the voting power of one -/// validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Delegation { - /// delegator_address is the bech32-encoded address of the delegator. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - /// validator_address is the bech32-encoded address of the validator. - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// shares define the delegation shares received. - #[prost(string, tag = "3")] - pub shares: ::prost::alloc::string::String, -} -impl ::prost::Name for Delegation { - const NAME: &'static str = "Delegation"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// UnbondingDelegation stores all of a single delegator's unbonding bonds -/// for a single validator in an time-ordered list. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UnbondingDelegation { - /// delegator_address is the bech32-encoded address of the delegator. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - /// validator_address is the bech32-encoded address of the validator. - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// entries are the unbonding delegation entries. - /// - /// unbonding delegation entries - #[prost(message, repeated, tag = "3")] - pub entries: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for UnbondingDelegation { - const NAME: &'static str = "UnbondingDelegation"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// UnbondingDelegationEntry defines an unbonding object with relevant metadata. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UnbondingDelegationEntry { - /// creation_height is the height which the unbonding took place. - #[prost(int64, tag = "1")] - pub creation_height: i64, - /// completion_time is the unix time for unbonding completion. - #[prost(message, optional, tag = "2")] - pub completion_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, - /// initial_balance defines the tokens initially scheduled to receive at completion. - #[prost(string, tag = "3")] - pub initial_balance: ::prost::alloc::string::String, - /// balance defines the tokens to receive at completion. - #[prost(string, tag = "4")] - pub balance: ::prost::alloc::string::String, - /// Incrementing id that uniquely identifies this entry - #[prost(uint64, tag = "5")] - pub unbonding_id: u64, - /// Strictly positive if this entry's unbonding has been stopped by external modules - #[prost(int64, tag = "6")] - pub unbonding_on_hold_ref_count: i64, -} -impl ::prost::Name for UnbondingDelegationEntry { - const NAME: &'static str = "UnbondingDelegationEntry"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// RedelegationEntry defines a redelegation object with relevant metadata. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct RedelegationEntry { - /// creation_height defines the height which the redelegation took place. - #[prost(int64, tag = "1")] - pub creation_height: i64, - /// completion_time defines the unix time for redelegation completion. - #[prost(message, optional, tag = "2")] - pub completion_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, - /// initial_balance defines the initial balance when redelegation started. - #[prost(string, tag = "3")] - pub initial_balance: ::prost::alloc::string::String, - /// shares_dst is the amount of destination-validator shares created by redelegation. - #[prost(string, tag = "4")] - pub shares_dst: ::prost::alloc::string::String, - /// Incrementing id that uniquely identifies this entry - #[prost(uint64, tag = "5")] - pub unbonding_id: u64, - /// Strictly positive if this entry's unbonding has been stopped by external modules - #[prost(int64, tag = "6")] - pub unbonding_on_hold_ref_count: i64, -} -impl ::prost::Name for RedelegationEntry { - const NAME: &'static str = "RedelegationEntry"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// Redelegation contains the list of a particular delegator's redelegating bonds -/// from a particular source validator to a particular destination validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Redelegation { - /// delegator_address is the bech32-encoded address of the delegator. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - /// validator_src_address is the validator redelegation source operator address. - #[prost(string, tag = "2")] - pub validator_src_address: ::prost::alloc::string::String, - /// validator_dst_address is the validator redelegation destination operator address. - #[prost(string, tag = "3")] - pub validator_dst_address: ::prost::alloc::string::String, - /// entries are the redelegation entries. - /// - /// redelegation entries - #[prost(message, repeated, tag = "4")] - pub entries: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Redelegation { - const NAME: &'static str = "Redelegation"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// Params defines the parameters for the x/staking module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// unbonding_time is the time duration of unbonding. - #[prost(message, optional, tag = "1")] - pub unbonding_time: ::core::option::Option< - super::super::super::google::protobuf::Duration, - >, - /// max_validators is the maximum number of validators. - #[prost(uint32, tag = "2")] - pub max_validators: u32, - /// max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). - #[prost(uint32, tag = "3")] - pub max_entries: u32, - /// historical_entries is the number of historical entries to persist. - #[prost(uint32, tag = "4")] - pub historical_entries: u32, - /// bond_denom defines the bondable coin denomination. - #[prost(string, tag = "5")] - pub bond_denom: ::prost::alloc::string::String, - /// min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators - #[prost(string, tag = "6")] - pub min_commission_rate: ::prost::alloc::string::String, -} -impl ::prost::Name for Params { - const NAME: &'static str = "Params"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// DelegationResponse is equivalent to Delegation except that it contains a -/// balance in addition to shares which is more suitable for client responses. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DelegationResponse { - #[prost(message, optional, tag = "1")] - pub delegation: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub balance: ::core::option::Option, -} -impl ::prost::Name for DelegationResponse { - const NAME: &'static str = "DelegationResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it -/// contains a balance in addition to shares which is more suitable for client -/// responses. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct RedelegationEntryResponse { - #[prost(message, optional, tag = "1")] - pub redelegation_entry: ::core::option::Option, - #[prost(string, tag = "4")] - pub balance: ::prost::alloc::string::String, -} -impl ::prost::Name for RedelegationEntryResponse { - const NAME: &'static str = "RedelegationEntryResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// RedelegationResponse is equivalent to a Redelegation except that its entries -/// contain a balance in addition to shares which is more suitable for client -/// responses. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct RedelegationResponse { - #[prost(message, optional, tag = "1")] - pub redelegation: ::core::option::Option, - #[prost(message, repeated, tag = "2")] - pub entries: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for RedelegationResponse { - const NAME: &'static str = "RedelegationResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// Pool is used for tracking bonded and not-bonded token supply of the bond -/// denomination. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Pool { - #[prost(string, tag = "1")] - pub not_bonded_tokens: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub bonded_tokens: ::prost::alloc::string::String, -} -impl ::prost::Name for Pool { - const NAME: &'static str = "Pool"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// ValidatorUpdates defines an array of abci.ValidatorUpdate objects. -/// TODO: explore moving this to proto/cosmos/base to separate modules from tendermint dependence -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorUpdates { - #[prost(message, repeated, tag = "1")] - pub updates: ::prost::alloc::vec::Vec<::tendermint_proto::abci::ValidatorUpdate>, -} -impl ::prost::Name for ValidatorUpdates { - const NAME: &'static str = "ValidatorUpdates"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// BondStatus is the status of a validator. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum BondStatus { - /// UNSPECIFIED defines an invalid validator status. - Unspecified = 0, - /// UNBONDED defines a validator that is not bonded. - Unbonded = 1, - /// UNBONDING defines a validator that is unbonding. - Unbonding = 2, - /// BONDED defines a validator that is bonded. - Bonded = 3, -} -impl BondStatus { - /// 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 { - BondStatus::Unspecified => "BOND_STATUS_UNSPECIFIED", - BondStatus::Unbonded => "BOND_STATUS_UNBONDED", - BondStatus::Unbonding => "BOND_STATUS_UNBONDING", - BondStatus::Bonded => "BOND_STATUS_BONDED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "BOND_STATUS_UNSPECIFIED" => Some(Self::Unspecified), - "BOND_STATUS_UNBONDED" => Some(Self::Unbonded), - "BOND_STATUS_UNBONDING" => Some(Self::Unbonding), - "BOND_STATUS_BONDED" => Some(Self::Bonded), - _ => None, - } - } -} -/// Infraction indicates the infraction a validator commited. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum Infraction { - /// UNSPECIFIED defines an empty infraction. - Unspecified = 0, - /// DOUBLE_SIGN defines a validator that double-signs a block. - DoubleSign = 1, - /// DOWNTIME defines a validator that missed signing too many blocks. - Downtime = 2, -} -impl Infraction { - /// 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 { - Infraction::Unspecified => "INFRACTION_UNSPECIFIED", - Infraction::DoubleSign => "INFRACTION_DOUBLE_SIGN", - Infraction::Downtime => "INFRACTION_DOWNTIME", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "INFRACTION_UNSPECIFIED" => Some(Self::Unspecified), - "INFRACTION_DOUBLE_SIGN" => Some(Self::DoubleSign), - "INFRACTION_DOWNTIME" => Some(Self::Downtime), - _ => None, - } - } -} -/// InfractionType indicates the infraction type a validator commited. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum InfractionType { - /// UNSPECIFIED defines an empty infraction type. - Unspecified = 0, - /// DOUBLE_SIGN defines a validator that double-signs a block. - DoubleSign = 1, - /// DOWNTIME defines a validator that missed signing too many blocks. - Downtime = 2, -} -impl InfractionType { - /// 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 { - InfractionType::Unspecified => "INFRACTION_TYPE_UNSPECIFIED", - InfractionType::DoubleSign => "INFRACTION_TYPE_DOUBLE_SIGN", - InfractionType::Downtime => "INFRACTION_TYPE_DOWNTIME", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "INFRACTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "INFRACTION_TYPE_DOUBLE_SIGN" => Some(Self::DoubleSign), - "INFRACTION_TYPE_DOWNTIME" => Some(Self::Downtime), - _ => None, - } - } -} -/// MsgCreateValidator defines a SDK message for creating a new validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateValidator { - #[prost(message, optional, tag = "1")] - pub description: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub commission: ::core::option::Option, - #[prost(string, tag = "3")] - pub min_self_delegation: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "6")] - pub pubkey: ::core::option::Option, - #[prost(message, optional, tag = "7")] - pub value: ::core::option::Option, -} -impl ::prost::Name for MsgCreateValidator { - const NAME: &'static str = "MsgCreateValidator"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateValidatorResponse {} -impl ::prost::Name for MsgCreateValidatorResponse { - const NAME: &'static str = "MsgCreateValidatorResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgEditValidator defines a SDK message for editing an existing validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgEditValidator { - #[prost(message, optional, tag = "1")] - pub description: ::core::option::Option, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// We pass a reference to the new commission rate and min self delegation as - /// it's not mandatory to update. If not updated, the deserialized rate will be - /// zero with no way to distinguish if an update was intended. - /// REF: #2373 - #[prost(string, tag = "3")] - pub commission_rate: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub min_self_delegation: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgEditValidator { - const NAME: &'static str = "MsgEditValidator"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgEditValidatorResponse defines the Msg/EditValidator response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgEditValidatorResponse {} -impl ::prost::Name for MsgEditValidatorResponse { - const NAME: &'static str = "MsgEditValidatorResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgDelegate defines a SDK message for performing a delegation of coins -/// from a delegator to a validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDelegate { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub amount: ::core::option::Option, -} -impl ::prost::Name for MsgDelegate { - const NAME: &'static str = "MsgDelegate"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgDelegateResponse defines the Msg/Delegate response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDelegateResponse {} -impl ::prost::Name for MsgDelegateResponse { - const NAME: &'static str = "MsgDelegateResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgBeginRedelegate defines a SDK message for performing a redelegation -/// of coins from a delegator and source validator to a destination validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgBeginRedelegate { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_src_address: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub validator_dst_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "4")] - pub amount: ::core::option::Option, -} -impl ::prost::Name for MsgBeginRedelegate { - const NAME: &'static str = "MsgBeginRedelegate"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgBeginRedelegateResponse { - #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, -} -impl ::prost::Name for MsgBeginRedelegateResponse { - const NAME: &'static str = "MsgBeginRedelegateResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgUndelegate defines a SDK message for performing an undelegation from a -/// delegate and a validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUndelegate { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub amount: ::core::option::Option, -} -impl ::prost::Name for MsgUndelegate { - const NAME: &'static str = "MsgUndelegate"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgUndelegateResponse defines the Msg/Undelegate response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUndelegateResponse { - #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, -} -impl ::prost::Name for MsgUndelegateResponse { - const NAME: &'static str = "MsgUndelegateResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelUnbondingDelegation { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// amount is always less than or equal to unbonding delegation entry balance - #[prost(message, optional, tag = "3")] - pub amount: ::core::option::Option, - /// creation_height is the height which the unbonding took place. - #[prost(int64, tag = "4")] - pub creation_height: i64, -} -impl ::prost::Name for MsgCancelUnbondingDelegation { - const NAME: &'static str = "MsgCancelUnbondingDelegation"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgCancelUnbondingDelegationResponse -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelUnbondingDelegationResponse {} -impl ::prost::Name for MsgCancelUnbondingDelegationResponse { - const NAME: &'static str = "MsgCancelUnbondingDelegationResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/staking parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Msg defines the staking Msg service. - #[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 - } - /// CreateValidator defines a method for creating a new validator. - pub async fn create_validator( - &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.staking.v1beta1.Msg/CreateValidator", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.staking.v1beta1.Msg", "CreateValidator"), - ); - self.inner.unary(req, path, codec).await - } - /// EditValidator defines a method for editing an existing validator. - pub async fn edit_validator( - &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.staking.v1beta1.Msg/EditValidator", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "EditValidator")); - self.inner.unary(req, path, codec).await - } - /// Delegate defines a method for performing a delegation of coins - /// from a delegator to a validator. - pub async fn delegate( - &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.staking.v1beta1.Msg/Delegate", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "Delegate")); - self.inner.unary(req, path, codec).await - } - /// BeginRedelegate defines a method for performing a redelegation - /// of coins from a delegator and source validator to a destination validator. - pub async fn begin_redelegate( - &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.staking.v1beta1.Msg/BeginRedelegate", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.staking.v1beta1.Msg", "BeginRedelegate"), - ); - self.inner.unary(req, path, codec).await - } - /// Undelegate defines a method for performing an undelegation from a - /// delegate and a validator. - pub async fn undelegate( - &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.staking.v1beta1.Msg/Undelegate", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "Undelegate")); - self.inner.unary(req, path, codec).await - } - /// CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation - /// and delegate back to previous validator. - /// - /// Since: cosmos-sdk 0.46 - pub async fn cancel_unbonding_delegation( - &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.staking.v1beta1.Msg/CancelUnbondingDelegation", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.staking.v1beta1.Msg", - "CancelUnbondingDelegation", - ), - ); - self.inner.unary(req, path, codec).await - } - /// UpdateParams defines an operation for updating the x/staking module - /// parameters. - /// Since: cosmos-sdk 0.47 - pub async fn update_params( - &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.staking.v1beta1.Msg/UpdateParams", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "UpdateParams")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -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 { - /// CreateValidator defines a method for creating a new validator. - async fn create_validator( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// EditValidator defines a method for editing an existing validator. - async fn edit_validator( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Delegate defines a method for performing a delegation of coins - /// from a delegator to a validator. - async fn delegate( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// BeginRedelegate defines a method for performing a redelegation - /// of coins from a delegator and source validator to a destination validator. - async fn begin_redelegate( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Undelegate defines a method for performing an undelegation from a - /// delegate and a validator. - async fn undelegate( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation - /// and delegate back to previous validator. - /// - /// Since: cosmos-sdk 0.46 - async fn cancel_unbonding_delegation( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// UpdateParams defines an operation for updating the x/staking module - /// parameters. - /// Since: cosmos-sdk 0.47 - async fn update_params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Msg defines the staking Msg service. - #[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() { - "/cosmos.staking.v1beta1.Msg/CreateValidator" => { - #[allow(non_camel_case_types)] - struct CreateValidatorSvc(pub Arc); - impl tonic::server::UnaryService - for CreateValidatorSvc { - type Response = super::MsgCreateValidatorResponse; - 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 { - ::create_validator(&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 = CreateValidatorSvc(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.staking.v1beta1.Msg/EditValidator" => { - #[allow(non_camel_case_types)] - struct EditValidatorSvc(pub Arc); - impl tonic::server::UnaryService - for EditValidatorSvc { - type Response = super::MsgEditValidatorResponse; - 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 { - ::edit_validator(&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 = EditValidatorSvc(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.staking.v1beta1.Msg/Delegate" => { - #[allow(non_camel_case_types)] - struct DelegateSvc(pub Arc); - impl tonic::server::UnaryService - for DelegateSvc { - type Response = super::MsgDelegateResponse; - 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 { - ::delegate(&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 = DelegateSvc(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.staking.v1beta1.Msg/BeginRedelegate" => { - #[allow(non_camel_case_types)] - struct BeginRedelegateSvc(pub Arc); - impl tonic::server::UnaryService - for BeginRedelegateSvc { - type Response = super::MsgBeginRedelegateResponse; - 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_redelegate(&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 = BeginRedelegateSvc(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.staking.v1beta1.Msg/Undelegate" => { - #[allow(non_camel_case_types)] - struct UndelegateSvc(pub Arc); - impl tonic::server::UnaryService - for UndelegateSvc { - type Response = super::MsgUndelegateResponse; - 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 { - ::undelegate(&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 = UndelegateSvc(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.staking.v1beta1.Msg/CancelUnbondingDelegation" => { - #[allow(non_camel_case_types)] - struct CancelUnbondingDelegationSvc(pub Arc); - impl< - T: Msg, - > tonic::server::UnaryService - for CancelUnbondingDelegationSvc { - type Response = super::MsgCancelUnbondingDelegationResponse; - 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 { - ::cancel_unbonding_delegation(&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 = CancelUnbondingDelegationSvc(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.staking.v1beta1.Msg/UpdateParams" => { - #[allow(non_camel_case_types)] - struct UpdateParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateParamsSvc { - type Response = super::MsgUpdateParamsResponse; - 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 { - ::update_params(&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 = UpdateParamsSvc(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 = "cosmos.staking.v1beta1.Msg"; - } -} -/// QueryValidatorsRequest is request type for Query/Validators RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorsRequest { - /// status enables to query for validators matching a given status. - #[prost(string, tag = "1")] - pub status: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryValidatorsRequest { - const NAME: &'static str = "QueryValidatorsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryValidatorsResponse is response type for the Query/Validators RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorsResponse { - /// validators contains all the queried validators. - #[prost(message, repeated, tag = "1")] - pub validators: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryValidatorsResponse { - const NAME: &'static str = "QueryValidatorsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryValidatorRequest is response type for the Query/Validator RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorRequest { - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_addr: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryValidatorRequest { - const NAME: &'static str = "QueryValidatorRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryValidatorResponse is response type for the Query/Validator RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorResponse { - /// validator defines the validator info. - #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option, -} -impl ::prost::Name for QueryValidatorResponse { - const NAME: &'static str = "QueryValidatorResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryValidatorDelegationsRequest is request type for the -/// Query/ValidatorDelegations RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorDelegationsRequest { - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryValidatorDelegationsRequest { - const NAME: &'static str = "QueryValidatorDelegationsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryValidatorDelegationsResponse is response type for the -/// Query/ValidatorDelegations RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorDelegationsResponse { - #[prost(message, repeated, tag = "1")] - pub delegation_responses: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryValidatorDelegationsResponse { - const NAME: &'static str = "QueryValidatorDelegationsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryValidatorUnbondingDelegationsRequest is required type for the -/// Query/ValidatorUnbondingDelegations RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorUnbondingDelegationsRequest { - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryValidatorUnbondingDelegationsRequest { - const NAME: &'static str = "QueryValidatorUnbondingDelegationsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryValidatorUnbondingDelegationsResponse is response type for the -/// Query/ValidatorUnbondingDelegations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorUnbondingDelegationsResponse { - #[prost(message, repeated, tag = "1")] - pub unbonding_responses: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryValidatorUnbondingDelegationsResponse { - const NAME: &'static str = "QueryValidatorUnbondingDelegationsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegationRequest is request type for the Query/Delegation RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegationRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "2")] - pub validator_addr: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryDelegationRequest { - const NAME: &'static str = "QueryDelegationRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegationResponse is response type for the Query/Delegation RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegationResponse { - /// delegation_responses defines the delegation info of a delegation. - #[prost(message, optional, tag = "1")] - pub delegation_response: ::core::option::Option, -} -impl ::prost::Name for QueryDelegationResponse { - const NAME: &'static str = "QueryDelegationResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryUnbondingDelegationRequest is request type for the -/// Query/UnbondingDelegation RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnbondingDelegationRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "2")] - pub validator_addr: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryUnbondingDelegationRequest { - const NAME: &'static str = "QueryUnbondingDelegationRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegationResponse is response type for the Query/UnbondingDelegation -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnbondingDelegationResponse { - /// unbond defines the unbonding information of a delegation. - #[prost(message, optional, tag = "1")] - pub unbond: ::core::option::Option, -} -impl ::prost::Name for QueryUnbondingDelegationResponse { - const NAME: &'static str = "QueryUnbondingDelegationResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegatorDelegationsRequest is request type for the -/// Query/DelegatorDelegations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorDelegationsRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryDelegatorDelegationsRequest { - const NAME: &'static str = "QueryDelegatorDelegationsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegatorDelegationsResponse is response type for the -/// Query/DelegatorDelegations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorDelegationsResponse { - /// delegation_responses defines all the delegations' info of a delegator. - #[prost(message, repeated, tag = "1")] - pub delegation_responses: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryDelegatorDelegationsResponse { - const NAME: &'static str = "QueryDelegatorDelegationsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegatorUnbondingDelegationsRequest is request type for the -/// Query/DelegatorUnbondingDelegations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorUnbondingDelegationsRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryDelegatorUnbondingDelegationsRequest { - const NAME: &'static str = "QueryDelegatorUnbondingDelegationsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryUnbondingDelegatorDelegationsResponse is response type for the -/// Query/UnbondingDelegatorDelegations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorUnbondingDelegationsResponse { - #[prost(message, repeated, tag = "1")] - pub unbonding_responses: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryDelegatorUnbondingDelegationsResponse { - const NAME: &'static str = "QueryDelegatorUnbondingDelegationsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryRedelegationsRequest is request type for the Query/Redelegations RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryRedelegationsRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// src_validator_addr defines the validator address to redelegate from. - #[prost(string, tag = "2")] - pub src_validator_addr: ::prost::alloc::string::String, - /// dst_validator_addr defines the validator address to redelegate to. - #[prost(string, tag = "3")] - pub dst_validator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "4")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryRedelegationsRequest { - const NAME: &'static str = "QueryRedelegationsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryRedelegationsResponse is response type for the Query/Redelegations RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryRedelegationsResponse { - #[prost(message, repeated, tag = "1")] - pub redelegation_responses: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryRedelegationsResponse { - const NAME: &'static str = "QueryRedelegationsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegatorValidatorsRequest is request type for the -/// Query/DelegatorValidators RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorValidatorsRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryDelegatorValidatorsRequest { - const NAME: &'static str = "QueryDelegatorValidatorsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegatorValidatorsResponse is response type for the -/// Query/DelegatorValidators RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorValidatorsResponse { - /// validators defines the validators' info of a delegator. - #[prost(message, repeated, tag = "1")] - pub validators: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryDelegatorValidatorsResponse { - const NAME: &'static str = "QueryDelegatorValidatorsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegatorValidatorRequest is request type for the -/// Query/DelegatorValidator RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorValidatorRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "2")] - pub validator_addr: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryDelegatorValidatorRequest { - const NAME: &'static str = "QueryDelegatorValidatorRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegatorValidatorResponse response type for the -/// Query/DelegatorValidator RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorValidatorResponse { - /// validator defines the validator info. - #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option, -} -impl ::prost::Name for QueryDelegatorValidatorResponse { - const NAME: &'static str = "QueryDelegatorValidatorResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryHistoricalInfoRequest { - /// height defines at which height to query the historical info. - #[prost(int64, tag = "1")] - pub height: i64, -} -impl ::prost::Name for QueryHistoricalInfoRequest { - const NAME: &'static str = "QueryHistoricalInfoRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryHistoricalInfoResponse { - /// hist defines the historical info at the given height. - #[prost(message, optional, tag = "1")] - pub hist: ::core::option::Option, -} -impl ::prost::Name for QueryHistoricalInfoResponse { - const NAME: &'static str = "QueryHistoricalInfoResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryPoolRequest is request type for the Query/Pool RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPoolRequest {} -impl ::prost::Name for QueryPoolRequest { - const NAME: &'static str = "QueryPoolRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryPoolResponse is response type for the Query/Pool RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPoolResponse { - /// pool defines the pool info. - #[prost(message, optional, tag = "1")] - pub pool: ::core::option::Option, -} -impl ::prost::Name for QueryPoolResponse { - const NAME: &'static str = "QueryPoolResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryParamsRequest is request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryParamsResponse is response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// params holds all the parameters of this module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Query defines the gRPC querier service. - #[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 - } - /// Validators queries all validators that match the given status. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn validators( - &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.staking.v1beta1.Query/Validators", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Validators")); - self.inner.unary(req, path, codec).await - } - /// Validator queries validator info for given validator address. - pub async fn validator( - &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.staking.v1beta1.Query/Validator", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Validator")); - self.inner.unary(req, path, codec).await - } - /// ValidatorDelegations queries delegate info for given validator. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn validator_delegations( - &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.staking.v1beta1.Query/ValidatorDelegations", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.staking.v1beta1.Query", - "ValidatorDelegations", - ), - ); - self.inner.unary(req, path, codec).await - } - /// ValidatorUnbondingDelegations queries unbonding delegations of a validator. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn validator_unbonding_delegations( - &mut self, - request: impl tonic::IntoRequest< - super::QueryValidatorUnbondingDelegationsRequest, - >, - ) -> 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.staking.v1beta1.Query/ValidatorUnbondingDelegations", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.staking.v1beta1.Query", - "ValidatorUnbondingDelegations", - ), - ); - self.inner.unary(req, path, codec).await - } - /// Delegation queries delegate info for given validator delegator pair. - pub async fn delegation( - &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.staking.v1beta1.Query/Delegation", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Delegation")); - self.inner.unary(req, path, codec).await - } - /// UnbondingDelegation queries unbonding info for given validator delegator - /// pair. - pub async fn unbonding_delegation( - &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.staking.v1beta1.Query/UnbondingDelegation", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.staking.v1beta1.Query", - "UnbondingDelegation", - ), - ); - self.inner.unary(req, path, codec).await - } - /// DelegatorDelegations queries all delegations of a given delegator address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn delegator_delegations( - &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.staking.v1beta1.Query/DelegatorDelegations", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.staking.v1beta1.Query", - "DelegatorDelegations", - ), - ); - self.inner.unary(req, path, codec).await - } - /// DelegatorUnbondingDelegations queries all unbonding delegations of a given - /// delegator address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn delegator_unbonding_delegations( - &mut self, - request: impl tonic::IntoRequest< - super::QueryDelegatorUnbondingDelegationsRequest, - >, - ) -> 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.staking.v1beta1.Query/DelegatorUnbondingDelegations", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.staking.v1beta1.Query", - "DelegatorUnbondingDelegations", - ), - ); - self.inner.unary(req, path, codec).await - } - /// Redelegations queries redelegations of given address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn redelegations( - &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.staking.v1beta1.Query/Redelegations", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.staking.v1beta1.Query", "Redelegations"), - ); - self.inner.unary(req, path, codec).await - } - /// DelegatorValidators queries all validators info for given delegator - /// address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn delegator_validators( - &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.staking.v1beta1.Query/DelegatorValidators", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.staking.v1beta1.Query", - "DelegatorValidators", - ), - ); - self.inner.unary(req, path, codec).await - } - /// DelegatorValidator queries validator info for given delegator validator - /// pair. - pub async fn delegator_validator( - &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.staking.v1beta1.Query/DelegatorValidator", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.staking.v1beta1.Query", "DelegatorValidator"), - ); - self.inner.unary(req, path, codec).await - } - /// HistoricalInfo queries the historical info for given height. - pub async fn historical_info( - &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.staking.v1beta1.Query/HistoricalInfo", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.staking.v1beta1.Query", "HistoricalInfo"), - ); - self.inner.unary(req, path, codec).await - } - /// Pool queries the pool info. - pub async fn pool( - &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.staking.v1beta1.Query/Pool", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Pool")); - self.inner.unary(req, path, codec).await - } - /// Parameters queries the staking parameters. - pub async fn params( - &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.staking.v1beta1.Query/Params", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Params")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -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 { - /// Validators queries all validators that match the given status. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn validators( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Validator queries validator info for given validator address. - async fn validator( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ValidatorDelegations queries delegate info for given validator. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn validator_delegations( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ValidatorUnbondingDelegations queries unbonding delegations of a validator. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn validator_unbonding_delegations( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Delegation queries delegate info for given validator delegator pair. - async fn delegation( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// UnbondingDelegation queries unbonding info for given validator delegator - /// pair. - async fn unbonding_delegation( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// DelegatorDelegations queries all delegations of a given delegator address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn delegator_delegations( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// DelegatorUnbondingDelegations queries all unbonding delegations of a given - /// delegator address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn delegator_unbonding_delegations( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Redelegations queries redelegations of given address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn redelegations( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// DelegatorValidators queries all validators info for given delegator - /// address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn delegator_validators( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// DelegatorValidator queries validator info for given delegator validator - /// pair. - async fn delegator_validator( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// HistoricalInfo queries the historical info for given height. - async fn historical_info( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Pool queries the pool info. - async fn pool( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Parameters queries the staking parameters. - async fn params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Query defines the gRPC querier service. - #[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() { - "/cosmos.staking.v1beta1.Query/Validators" => { - #[allow(non_camel_case_types)] - struct ValidatorsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ValidatorsSvc { - type Response = super::QueryValidatorsResponse; - 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 { - ::validators(&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 = ValidatorsSvc(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.staking.v1beta1.Query/Validator" => { - #[allow(non_camel_case_types)] - struct ValidatorSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ValidatorSvc { - type Response = super::QueryValidatorResponse; - 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 { - ::validator(&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 = ValidatorSvc(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.staking.v1beta1.Query/ValidatorDelegations" => { - #[allow(non_camel_case_types)] - struct ValidatorDelegationsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService< - super::QueryValidatorDelegationsRequest, - > for ValidatorDelegationsSvc { - type Response = super::QueryValidatorDelegationsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::QueryValidatorDelegationsRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::validator_delegations(&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 = ValidatorDelegationsSvc(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.staking.v1beta1.Query/ValidatorUnbondingDelegations" => { - #[allow(non_camel_case_types)] - struct ValidatorUnbondingDelegationsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService< - super::QueryValidatorUnbondingDelegationsRequest, - > for ValidatorUnbondingDelegationsSvc { - type Response = super::QueryValidatorUnbondingDelegationsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::QueryValidatorUnbondingDelegationsRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::validator_unbonding_delegations( - &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 = ValidatorUnbondingDelegationsSvc(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.staking.v1beta1.Query/Delegation" => { - #[allow(non_camel_case_types)] - struct DelegationSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DelegationSvc { - type Response = super::QueryDelegationResponse; - 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 { - ::delegation(&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 = DelegationSvc(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.staking.v1beta1.Query/UnbondingDelegation" => { - #[allow(non_camel_case_types)] - struct UnbondingDelegationSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for UnbondingDelegationSvc { - type Response = super::QueryUnbondingDelegationResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::QueryUnbondingDelegationRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::unbonding_delegation(&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 = UnbondingDelegationSvc(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.staking.v1beta1.Query/DelegatorDelegations" => { - #[allow(non_camel_case_types)] - struct DelegatorDelegationsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService< - super::QueryDelegatorDelegationsRequest, - > for DelegatorDelegationsSvc { - type Response = super::QueryDelegatorDelegationsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::QueryDelegatorDelegationsRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::delegator_delegations(&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 = DelegatorDelegationsSvc(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.staking.v1beta1.Query/DelegatorUnbondingDelegations" => { - #[allow(non_camel_case_types)] - struct DelegatorUnbondingDelegationsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService< - super::QueryDelegatorUnbondingDelegationsRequest, - > for DelegatorUnbondingDelegationsSvc { - type Response = super::QueryDelegatorUnbondingDelegationsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::QueryDelegatorUnbondingDelegationsRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::delegator_unbonding_delegations( - &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 = DelegatorUnbondingDelegationsSvc(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.staking.v1beta1.Query/Redelegations" => { - #[allow(non_camel_case_types)] - struct RedelegationsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for RedelegationsSvc { - type Response = super::QueryRedelegationsResponse; - 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 { - ::redelegations(&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 = RedelegationsSvc(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.staking.v1beta1.Query/DelegatorValidators" => { - #[allow(non_camel_case_types)] - struct DelegatorValidatorsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DelegatorValidatorsSvc { - type Response = super::QueryDelegatorValidatorsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::QueryDelegatorValidatorsRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::delegator_validators(&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 = DelegatorValidatorsSvc(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.staking.v1beta1.Query/DelegatorValidator" => { - #[allow(non_camel_case_types)] - struct DelegatorValidatorSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DelegatorValidatorSvc { - type Response = super::QueryDelegatorValidatorResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::QueryDelegatorValidatorRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::delegator_validator(&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 = DelegatorValidatorSvc(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.staking.v1beta1.Query/HistoricalInfo" => { - #[allow(non_camel_case_types)] - struct HistoricalInfoSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for HistoricalInfoSvc { - type Response = super::QueryHistoricalInfoResponse; - 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 { - ::historical_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 = HistoricalInfoSvc(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.staking.v1beta1.Query/Pool" => { - #[allow(non_camel_case_types)] - struct PoolSvc(pub Arc); - impl tonic::server::UnaryService - for PoolSvc { - type Response = super::QueryPoolResponse; - 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 { - ::pool(&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 = PoolSvc(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.staking.v1beta1.Query/Params" => { - #[allow(non_camel_case_types)] - struct ParamsSvc(pub Arc); - impl tonic::server::UnaryService - for ParamsSvc { - type Response = super::QueryParamsResponse; - 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 { - ::params(&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 = ParamsSvc(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 = "cosmos.staking.v1beta1.Query"; - } -} -/// StakeAuthorization defines authorization for delegate/undelegate/redelegate. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StakeAuthorization { - /// max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is - /// empty, there is no spend limit and any amount of coins can be delegated. - #[prost(message, optional, tag = "1")] - pub max_tokens: ::core::option::Option, - /// authorization_type defines one of AuthorizationType. - #[prost(enumeration = "AuthorizationType", tag = "4")] - pub authorization_type: i32, - /// validators is the oneof that represents either allow_list or deny_list - #[prost(oneof = "stake_authorization::Validators", tags = "2, 3")] - pub validators: ::core::option::Option, -} -/// Nested message and enum types in `StakeAuthorization`. -pub mod stake_authorization { - /// Validators defines list of validator addresses. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ValidatorsVec { - #[prost(string, repeated, tag = "1")] - pub address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - } - impl ::prost::Name for ValidatorsVec { - const NAME: &'static str = "Validators"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!( - "cosmos.staking.v1beta1.StakeAuthorization.{}", Self::NAME - ) - } - } - /// validators is the oneof that represents either allow_list or deny_list - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Validators { - /// allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - /// account. - #[prost(message, tag = "2")] - AllowList(ValidatorsVec), - /// deny_list specifies list of validator addresses to whom grantee can not delegate tokens. - #[prost(message, tag = "3")] - DenyList(ValidatorsVec), - } -} -impl ::prost::Name for StakeAuthorization { - const NAME: &'static str = "StakeAuthorization"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// AuthorizationType defines the type of staking module authorization type -/// -/// Since: cosmos-sdk 0.43 -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum AuthorizationType { - /// AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type - Unspecified = 0, - /// AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate - Delegate = 1, - /// AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate - Undelegate = 2, - /// AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate - Redelegate = 3, -} -impl AuthorizationType { - /// 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 { - AuthorizationType::Unspecified => "AUTHORIZATION_TYPE_UNSPECIFIED", - AuthorizationType::Delegate => "AUTHORIZATION_TYPE_DELEGATE", - AuthorizationType::Undelegate => "AUTHORIZATION_TYPE_UNDELEGATE", - AuthorizationType::Redelegate => "AUTHORIZATION_TYPE_REDELEGATE", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "AUTHORIZATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "AUTHORIZATION_TYPE_DELEGATE" => Some(Self::Delegate), - "AUTHORIZATION_TYPE_UNDELEGATE" => Some(Self::Undelegate), - "AUTHORIZATION_TYPE_REDELEGATE" => Some(Self::Redelegate), - _ => None, - } - } -} -/// GenesisState defines the staking module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// params defines all the parameters of related to deposit. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// last_total_power tracks the total amounts of bonded tokens recorded during - /// the previous end block. - #[prost(bytes = "vec", tag = "2")] - pub last_total_power: ::prost::alloc::vec::Vec, - /// last_validator_powers is a special index that provides a historical list - /// of the last-block's bonded validators. - #[prost(message, repeated, tag = "3")] - pub last_validator_powers: ::prost::alloc::vec::Vec, - /// delegations defines the validator set at genesis. - #[prost(message, repeated, tag = "4")] - pub validators: ::prost::alloc::vec::Vec, - /// delegations defines the delegations active at genesis. - #[prost(message, repeated, tag = "5")] - pub delegations: ::prost::alloc::vec::Vec, - /// unbonding_delegations defines the unbonding delegations active at genesis. - #[prost(message, repeated, tag = "6")] - pub unbonding_delegations: ::prost::alloc::vec::Vec, - /// redelegations defines the redelegations active at genesis. - #[prost(message, repeated, tag = "7")] - pub redelegations: ::prost::alloc::vec::Vec, - #[prost(bool, tag = "8")] - pub exported: bool, -} -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// LastValidatorPower required for validator set update logic. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct LastValidatorPower { - /// address is the address of the validator. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// power defines the power of the validator. - #[prost(int64, tag = "2")] - pub power: i64, -} -impl ::prost::Name for LastValidatorPower { - const NAME: &'static str = "LastValidatorPower"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.staking.v1beta1.serde.rs b/src/prost/cosmos.staking.v1beta1.serde.rs deleted file mode 100644 index 38ca4a23..00000000 --- a/src/prost/cosmos.staking.v1beta1.serde.rs +++ /dev/null @@ -1,7752 +0,0 @@ -impl serde::Serialize for AuthorizationType { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::Unspecified => "AUTHORIZATION_TYPE_UNSPECIFIED", - Self::Delegate => "AUTHORIZATION_TYPE_DELEGATE", - Self::Undelegate => "AUTHORIZATION_TYPE_UNDELEGATE", - Self::Redelegate => "AUTHORIZATION_TYPE_REDELEGATE", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for AuthorizationType { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "AUTHORIZATION_TYPE_UNSPECIFIED", - "AUTHORIZATION_TYPE_DELEGATE", - "AUTHORIZATION_TYPE_UNDELEGATE", - "AUTHORIZATION_TYPE_REDELEGATE", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = AuthorizationType; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "AUTHORIZATION_TYPE_UNSPECIFIED" => Ok(AuthorizationType::Unspecified), - "AUTHORIZATION_TYPE_DELEGATE" => Ok(AuthorizationType::Delegate), - "AUTHORIZATION_TYPE_UNDELEGATE" => Ok(AuthorizationType::Undelegate), - "AUTHORIZATION_TYPE_REDELEGATE" => Ok(AuthorizationType::Redelegate), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for BondStatus { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::Unspecified => "BOND_STATUS_UNSPECIFIED", - Self::Unbonded => "BOND_STATUS_UNBONDED", - Self::Unbonding => "BOND_STATUS_UNBONDING", - Self::Bonded => "BOND_STATUS_BONDED", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for BondStatus { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "BOND_STATUS_UNSPECIFIED", - "BOND_STATUS_UNBONDED", - "BOND_STATUS_UNBONDING", - "BOND_STATUS_BONDED", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = BondStatus; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "BOND_STATUS_UNSPECIFIED" => Ok(BondStatus::Unspecified), - "BOND_STATUS_UNBONDED" => Ok(BondStatus::Unbonded), - "BOND_STATUS_UNBONDING" => Ok(BondStatus::Unbonding), - "BOND_STATUS_BONDED" => Ok(BondStatus::Bonded), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for Commission { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.Commission", len)?; - if let Some(v) = self.commission_rates.as_ref() { - struct_ser.serialize_field("commissionRates", v)?; - } - if let Some(v) = self.update_time.as_ref() { - struct_ser.serialize_field("updateTime", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Commission { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "commission_rates", - "commissionRates", - "update_time", - "updateTime", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - CommissionRates, - UpdateTime, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "commissionRates" | "commission_rates" => Ok(GeneratedField::CommissionRates), - "updateTime" | "update_time" => Ok(GeneratedField::UpdateTime), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Commission; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.Commission") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut commission_rates__ = None; - let mut update_time__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::CommissionRates => { - if commission_rates__.is_some() { - return Err(serde::de::Error::duplicate_field("commissionRates")); - } - commission_rates__ = map_.next_value()?; - } - GeneratedField::UpdateTime => { - if update_time__.is_some() { - return Err(serde::de::Error::duplicate_field("updateTime")); - } - update_time__ = map_.next_value()?; - } - } - } - Ok(Commission { - commission_rates: commission_rates__, - update_time: update_time__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.Commission", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CommissionRates { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.CommissionRates", len)?; - if true { - struct_ser.serialize_field("rate", &self.rate)?; - } - if true { - struct_ser.serialize_field("maxRate", &self.max_rate)?; - } - if true { - struct_ser.serialize_field("maxChangeRate", &self.max_change_rate)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CommissionRates { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "rate", - "max_rate", - "maxRate", - "max_change_rate", - "maxChangeRate", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Rate, - MaxRate, - MaxChangeRate, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "rate" => Ok(GeneratedField::Rate), - "maxRate" | "max_rate" => Ok(GeneratedField::MaxRate), - "maxChangeRate" | "max_change_rate" => Ok(GeneratedField::MaxChangeRate), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CommissionRates; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.CommissionRates") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut rate__ = None; - let mut max_rate__ = None; - let mut max_change_rate__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Rate => { - if rate__.is_some() { - return Err(serde::de::Error::duplicate_field("rate")); - } - rate__ = Some(map_.next_value()?); - } - GeneratedField::MaxRate => { - if max_rate__.is_some() { - return Err(serde::de::Error::duplicate_field("maxRate")); - } - max_rate__ = Some(map_.next_value()?); - } - GeneratedField::MaxChangeRate => { - if max_change_rate__.is_some() { - return Err(serde::de::Error::duplicate_field("maxChangeRate")); - } - max_change_rate__ = Some(map_.next_value()?); - } - } - } - Ok(CommissionRates { - rate: rate__.unwrap_or_default(), - max_rate: max_rate__.unwrap_or_default(), - max_change_rate: max_change_rate__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.CommissionRates", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for DvPair { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.DVPair", len)?; - if true { - struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; - } - if true { - struct_ser.serialize_field("validatorAddress", &self.validator_address)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for DvPair { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_address", - "delegatorAddress", - "validator_address", - "validatorAddress", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddress, - ValidatorAddress, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddress" | "delegator_address" => Ok(GeneratedField::DelegatorAddress), - "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DvPair; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.DVPair") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_address__ = None; - let mut validator_address__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddress => { - if delegator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddress")); - } - delegator_address__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorAddress => { - if validator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddress")); - } - validator_address__ = Some(map_.next_value()?); - } - } - } - Ok(DvPair { - delegator_address: delegator_address__.unwrap_or_default(), - validator_address: validator_address__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.DVPair", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for DvPairs { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.DVPairs", len)?; - if true { - struct_ser.serialize_field("pairs", &self.pairs)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for DvPairs { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "pairs", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Pairs, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "pairs" => Ok(GeneratedField::Pairs), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DvPairs; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.DVPairs") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut pairs__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Pairs => { - if pairs__.is_some() { - return Err(serde::de::Error::duplicate_field("pairs")); - } - pairs__ = Some(map_.next_value()?); - } - } - } - Ok(DvPairs { - pairs: pairs__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.DVPairs", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for DvvTriplet { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.DVVTriplet", len)?; - if true { - struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; - } - if true { - struct_ser.serialize_field("validatorSrcAddress", &self.validator_src_address)?; - } - if true { - struct_ser.serialize_field("validatorDstAddress", &self.validator_dst_address)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for DvvTriplet { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_address", - "delegatorAddress", - "validator_src_address", - "validatorSrcAddress", - "validator_dst_address", - "validatorDstAddress", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddress, - ValidatorSrcAddress, - ValidatorDstAddress, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddress" | "delegator_address" => Ok(GeneratedField::DelegatorAddress), - "validatorSrcAddress" | "validator_src_address" => Ok(GeneratedField::ValidatorSrcAddress), - "validatorDstAddress" | "validator_dst_address" => Ok(GeneratedField::ValidatorDstAddress), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DvvTriplet; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.DVVTriplet") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_address__ = None; - let mut validator_src_address__ = None; - let mut validator_dst_address__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddress => { - if delegator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddress")); - } - delegator_address__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorSrcAddress => { - if validator_src_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorSrcAddress")); - } - validator_src_address__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorDstAddress => { - if validator_dst_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorDstAddress")); - } - validator_dst_address__ = Some(map_.next_value()?); - } - } - } - Ok(DvvTriplet { - delegator_address: delegator_address__.unwrap_or_default(), - validator_src_address: validator_src_address__.unwrap_or_default(), - validator_dst_address: validator_dst_address__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.DVVTriplet", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for DvvTriplets { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.DVVTriplets", len)?; - if true { - struct_ser.serialize_field("triplets", &self.triplets)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for DvvTriplets { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "triplets", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Triplets, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "triplets" => Ok(GeneratedField::Triplets), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DvvTriplets; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.DVVTriplets") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut triplets__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Triplets => { - if triplets__.is_some() { - return Err(serde::de::Error::duplicate_field("triplets")); - } - triplets__ = Some(map_.next_value()?); - } - } - } - Ok(DvvTriplets { - triplets: triplets__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.DVVTriplets", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Delegation { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.Delegation", len)?; - if true { - struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; - } - if true { - struct_ser.serialize_field("validatorAddress", &self.validator_address)?; - } - if true { - struct_ser.serialize_field("shares", &self.shares)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Delegation { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_address", - "delegatorAddress", - "validator_address", - "validatorAddress", - "shares", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddress, - ValidatorAddress, - Shares, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddress" | "delegator_address" => Ok(GeneratedField::DelegatorAddress), - "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), - "shares" => Ok(GeneratedField::Shares), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Delegation; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.Delegation") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_address__ = None; - let mut validator_address__ = None; - let mut shares__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddress => { - if delegator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddress")); - } - delegator_address__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorAddress => { - if validator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddress")); - } - validator_address__ = Some(map_.next_value()?); - } - GeneratedField::Shares => { - if shares__.is_some() { - return Err(serde::de::Error::duplicate_field("shares")); - } - shares__ = Some(map_.next_value()?); - } - } - } - Ok(Delegation { - delegator_address: delegator_address__.unwrap_or_default(), - validator_address: validator_address__.unwrap_or_default(), - shares: shares__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.Delegation", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for DelegationResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.DelegationResponse", len)?; - if let Some(v) = self.delegation.as_ref() { - struct_ser.serialize_field("delegation", v)?; - } - if let Some(v) = self.balance.as_ref() { - struct_ser.serialize_field("balance", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for DelegationResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegation", - "balance", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Delegation, - Balance, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegation" => Ok(GeneratedField::Delegation), - "balance" => Ok(GeneratedField::Balance), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DelegationResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.DelegationResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegation__ = None; - let mut balance__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Delegation => { - if delegation__.is_some() { - return Err(serde::de::Error::duplicate_field("delegation")); - } - delegation__ = map_.next_value()?; - } - GeneratedField::Balance => { - if balance__.is_some() { - return Err(serde::de::Error::duplicate_field("balance")); - } - balance__ = map_.next_value()?; - } - } - } - Ok(DelegationResponse { - delegation: delegation__, - balance: balance__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.DelegationResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Description { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.Description", len)?; - if true { - struct_ser.serialize_field("moniker", &self.moniker)?; - } - if true { - struct_ser.serialize_field("identity", &self.identity)?; - } - if true { - struct_ser.serialize_field("website", &self.website)?; - } - if true { - struct_ser.serialize_field("securityContact", &self.security_contact)?; - } - if true { - struct_ser.serialize_field("details", &self.details)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Description { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "moniker", - "identity", - "website", - "security_contact", - "securityContact", - "details", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Moniker, - Identity, - Website, - SecurityContact, - Details, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "moniker" => Ok(GeneratedField::Moniker), - "identity" => Ok(GeneratedField::Identity), - "website" => Ok(GeneratedField::Website), - "securityContact" | "security_contact" => Ok(GeneratedField::SecurityContact), - "details" => Ok(GeneratedField::Details), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Description; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.Description") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut moniker__ = None; - let mut identity__ = None; - let mut website__ = None; - let mut security_contact__ = None; - let mut details__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Moniker => { - if moniker__.is_some() { - return Err(serde::de::Error::duplicate_field("moniker")); - } - moniker__ = Some(map_.next_value()?); - } - GeneratedField::Identity => { - if identity__.is_some() { - return Err(serde::de::Error::duplicate_field("identity")); - } - identity__ = Some(map_.next_value()?); - } - GeneratedField::Website => { - if website__.is_some() { - return Err(serde::de::Error::duplicate_field("website")); - } - website__ = Some(map_.next_value()?); - } - GeneratedField::SecurityContact => { - if security_contact__.is_some() { - return Err(serde::de::Error::duplicate_field("securityContact")); - } - security_contact__ = Some(map_.next_value()?); - } - GeneratedField::Details => { - if details__.is_some() { - return Err(serde::de::Error::duplicate_field("details")); - } - details__ = Some(map_.next_value()?); - } - } - } - Ok(Description { - moniker: moniker__.unwrap_or_default(), - identity: identity__.unwrap_or_default(), - website: website__.unwrap_or_default(), - security_contact: security_contact__.unwrap_or_default(), - details: details__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.Description", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GenesisState { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.GenesisState", len)?; - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("lastTotalPower", pbjson::private::base64::encode(&self.last_total_power).as_str())?; - } - if true { - struct_ser.serialize_field("lastValidatorPowers", &self.last_validator_powers)?; - } - if true { - struct_ser.serialize_field("validators", &self.validators)?; - } - if true { - struct_ser.serialize_field("delegations", &self.delegations)?; - } - if true { - struct_ser.serialize_field("unbondingDelegations", &self.unbonding_delegations)?; - } - if true { - struct_ser.serialize_field("redelegations", &self.redelegations)?; - } - if true { - struct_ser.serialize_field("exported", &self.exported)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GenesisState { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "params", - "last_total_power", - "lastTotalPower", - "last_validator_powers", - "lastValidatorPowers", - "validators", - "delegations", - "unbonding_delegations", - "unbondingDelegations", - "redelegations", - "exported", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Params, - LastTotalPower, - LastValidatorPowers, - Validators, - Delegations, - UnbondingDelegations, - Redelegations, - Exported, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "params" => Ok(GeneratedField::Params), - "lastTotalPower" | "last_total_power" => Ok(GeneratedField::LastTotalPower), - "lastValidatorPowers" | "last_validator_powers" => Ok(GeneratedField::LastValidatorPowers), - "validators" => Ok(GeneratedField::Validators), - "delegations" => Ok(GeneratedField::Delegations), - "unbondingDelegations" | "unbonding_delegations" => Ok(GeneratedField::UnbondingDelegations), - "redelegations" => Ok(GeneratedField::Redelegations), - "exported" => Ok(GeneratedField::Exported), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GenesisState; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.GenesisState") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut params__ = None; - let mut last_total_power__ = None; - let mut last_validator_powers__ = None; - let mut validators__ = None; - let mut delegations__ = None; - let mut unbonding_delegations__ = None; - let mut redelegations__ = None; - let mut exported__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); - } - params__ = map_.next_value()?; - } - GeneratedField::LastTotalPower => { - if last_total_power__.is_some() { - return Err(serde::de::Error::duplicate_field("lastTotalPower")); - } - last_total_power__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::LastValidatorPowers => { - if last_validator_powers__.is_some() { - return Err(serde::de::Error::duplicate_field("lastValidatorPowers")); - } - last_validator_powers__ = Some(map_.next_value()?); - } - GeneratedField::Validators => { - if validators__.is_some() { - return Err(serde::de::Error::duplicate_field("validators")); - } - validators__ = Some(map_.next_value()?); - } - GeneratedField::Delegations => { - if delegations__.is_some() { - return Err(serde::de::Error::duplicate_field("delegations")); - } - delegations__ = Some(map_.next_value()?); - } - GeneratedField::UnbondingDelegations => { - if unbonding_delegations__.is_some() { - return Err(serde::de::Error::duplicate_field("unbondingDelegations")); - } - unbonding_delegations__ = Some(map_.next_value()?); - } - GeneratedField::Redelegations => { - if redelegations__.is_some() { - return Err(serde::de::Error::duplicate_field("redelegations")); - } - redelegations__ = Some(map_.next_value()?); - } - GeneratedField::Exported => { - if exported__.is_some() { - return Err(serde::de::Error::duplicate_field("exported")); - } - exported__ = Some(map_.next_value()?); - } - } - } - Ok(GenesisState { - params: params__, - last_total_power: last_total_power__.unwrap_or_default(), - last_validator_powers: last_validator_powers__.unwrap_or_default(), - validators: validators__.unwrap_or_default(), - delegations: delegations__.unwrap_or_default(), - unbonding_delegations: unbonding_delegations__.unwrap_or_default(), - redelegations: redelegations__.unwrap_or_default(), - exported: exported__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.GenesisState", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for HistoricalInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.HistoricalInfo", len)?; - if let Some(v) = self.header.as_ref() { - struct_ser.serialize_field("header", v)?; - } - if true { - struct_ser.serialize_field("valset", &self.valset)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for HistoricalInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "header", - "valset", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Header, - Valset, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "header" => Ok(GeneratedField::Header), - "valset" => Ok(GeneratedField::Valset), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = HistoricalInfo; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.HistoricalInfo") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut header__ = None; - let mut valset__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Header => { - if header__.is_some() { - return Err(serde::de::Error::duplicate_field("header")); - } - header__ = map_.next_value()?; - } - GeneratedField::Valset => { - if valset__.is_some() { - return Err(serde::de::Error::duplicate_field("valset")); - } - valset__ = Some(map_.next_value()?); - } - } - } - Ok(HistoricalInfo { - header: header__, - valset: valset__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.HistoricalInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Infraction { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::Unspecified => "INFRACTION_UNSPECIFIED", - Self::DoubleSign => "INFRACTION_DOUBLE_SIGN", - Self::Downtime => "INFRACTION_DOWNTIME", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for Infraction { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "INFRACTION_UNSPECIFIED", - "INFRACTION_DOUBLE_SIGN", - "INFRACTION_DOWNTIME", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Infraction; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "INFRACTION_UNSPECIFIED" => Ok(Infraction::Unspecified), - "INFRACTION_DOUBLE_SIGN" => Ok(Infraction::DoubleSign), - "INFRACTION_DOWNTIME" => Ok(Infraction::Downtime), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for InfractionType { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::Unspecified => "INFRACTION_TYPE_UNSPECIFIED", - Self::DoubleSign => "INFRACTION_TYPE_DOUBLE_SIGN", - Self::Downtime => "INFRACTION_TYPE_DOWNTIME", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for InfractionType { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "INFRACTION_TYPE_UNSPECIFIED", - "INFRACTION_TYPE_DOUBLE_SIGN", - "INFRACTION_TYPE_DOWNTIME", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = InfractionType; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "INFRACTION_TYPE_UNSPECIFIED" => Ok(InfractionType::Unspecified), - "INFRACTION_TYPE_DOUBLE_SIGN" => Ok(InfractionType::DoubleSign), - "INFRACTION_TYPE_DOWNTIME" => Ok(InfractionType::Downtime), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for LastValidatorPower { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.LastValidatorPower", len)?; - if true { - struct_ser.serialize_field("address", &self.address)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("power", ::alloc::string::ToString::to_string(&self.power).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for LastValidatorPower { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - "power", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - Power, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "power" => Ok(GeneratedField::Power), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = LastValidatorPower; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.LastValidatorPower") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut power__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } - GeneratedField::Power => { - if power__.is_some() { - return Err(serde::de::Error::duplicate_field("power")); - } - power__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(LastValidatorPower { - address: address__.unwrap_or_default(), - power: power__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.LastValidatorPower", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgBeginRedelegate { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.MsgBeginRedelegate", len)?; - if true { - struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; - } - if true { - struct_ser.serialize_field("validatorSrcAddress", &self.validator_src_address)?; - } - if true { - struct_ser.serialize_field("validatorDstAddress", &self.validator_dst_address)?; - } - if let Some(v) = self.amount.as_ref() { - struct_ser.serialize_field("amount", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgBeginRedelegate { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_address", - "delegatorAddress", - "validator_src_address", - "validatorSrcAddress", - "validator_dst_address", - "validatorDstAddress", - "amount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddress, - ValidatorSrcAddress, - ValidatorDstAddress, - Amount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddress" | "delegator_address" => Ok(GeneratedField::DelegatorAddress), - "validatorSrcAddress" | "validator_src_address" => Ok(GeneratedField::ValidatorSrcAddress), - "validatorDstAddress" | "validator_dst_address" => Ok(GeneratedField::ValidatorDstAddress), - "amount" => Ok(GeneratedField::Amount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgBeginRedelegate; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.MsgBeginRedelegate") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_address__ = None; - let mut validator_src_address__ = None; - let mut validator_dst_address__ = None; - let mut amount__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddress => { - if delegator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddress")); - } - delegator_address__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorSrcAddress => { - if validator_src_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorSrcAddress")); - } - validator_src_address__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorDstAddress => { - if validator_dst_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorDstAddress")); - } - validator_dst_address__ = Some(map_.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = map_.next_value()?; - } - } - } - Ok(MsgBeginRedelegate { - delegator_address: delegator_address__.unwrap_or_default(), - validator_src_address: validator_src_address__.unwrap_or_default(), - validator_dst_address: validator_dst_address__.unwrap_or_default(), - amount: amount__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.MsgBeginRedelegate", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgBeginRedelegateResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.MsgBeginRedelegateResponse", len)?; - if let Some(v) = self.completion_time.as_ref() { - struct_ser.serialize_field("completionTime", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgBeginRedelegateResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "completion_time", - "completionTime", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - CompletionTime, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "completionTime" | "completion_time" => Ok(GeneratedField::CompletionTime), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgBeginRedelegateResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.MsgBeginRedelegateResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut completion_time__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::CompletionTime => { - if completion_time__.is_some() { - return Err(serde::de::Error::duplicate_field("completionTime")); - } - completion_time__ = map_.next_value()?; - } - } - } - Ok(MsgBeginRedelegateResponse { - completion_time: completion_time__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.MsgBeginRedelegateResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgCancelUnbondingDelegation { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", len)?; - if true { - struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; - } - if true { - struct_ser.serialize_field("validatorAddress", &self.validator_address)?; - } - if let Some(v) = self.amount.as_ref() { - struct_ser.serialize_field("amount", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("creationHeight", ::alloc::string::ToString::to_string(&self.creation_height).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegation { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_address", - "delegatorAddress", - "validator_address", - "validatorAddress", - "amount", - "creation_height", - "creationHeight", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddress, - ValidatorAddress, - Amount, - CreationHeight, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddress" | "delegator_address" => Ok(GeneratedField::DelegatorAddress), - "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), - "amount" => Ok(GeneratedField::Amount), - "creationHeight" | "creation_height" => Ok(GeneratedField::CreationHeight), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgCancelUnbondingDelegation; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.MsgCancelUnbondingDelegation") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_address__ = None; - let mut validator_address__ = None; - let mut amount__ = None; - let mut creation_height__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddress => { - if delegator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddress")); - } - delegator_address__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorAddress => { - if validator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddress")); - } - validator_address__ = Some(map_.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = map_.next_value()?; - } - GeneratedField::CreationHeight => { - if creation_height__.is_some() { - return Err(serde::de::Error::duplicate_field("creationHeight")); - } - creation_height__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(MsgCancelUnbondingDelegation { - delegator_address: delegator_address__.unwrap_or_default(), - validator_address: validator_address__.unwrap_or_default(), - amount: amount__, - creation_height: creation_height__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgCancelUnbondingDelegationResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegationResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgCancelUnbondingDelegationResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgCancelUnbondingDelegationResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgCreateValidator { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.MsgCreateValidator", len)?; - if let Some(v) = self.description.as_ref() { - struct_ser.serialize_field("description", v)?; - } - if let Some(v) = self.commission.as_ref() { - struct_ser.serialize_field("commission", v)?; - } - if true { - struct_ser.serialize_field("minSelfDelegation", &self.min_self_delegation)?; - } - if true { - struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; - } - if true { - struct_ser.serialize_field("validatorAddress", &self.validator_address)?; - } - if let Some(v) = self.pubkey.as_ref() { - struct_ser.serialize_field("pubkey", v)?; - } - if let Some(v) = self.value.as_ref() { - struct_ser.serialize_field("value", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgCreateValidator { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "description", - "commission", - "min_self_delegation", - "minSelfDelegation", - "delegator_address", - "delegatorAddress", - "validator_address", - "validatorAddress", - "pubkey", - "value", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Description, - Commission, - MinSelfDelegation, - DelegatorAddress, - ValidatorAddress, - Pubkey, - Value, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "description" => Ok(GeneratedField::Description), - "commission" => Ok(GeneratedField::Commission), - "minSelfDelegation" | "min_self_delegation" => Ok(GeneratedField::MinSelfDelegation), - "delegatorAddress" | "delegator_address" => Ok(GeneratedField::DelegatorAddress), - "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), - "pubkey" => Ok(GeneratedField::Pubkey), - "value" => Ok(GeneratedField::Value), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgCreateValidator; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.MsgCreateValidator") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut description__ = None; - let mut commission__ = None; - let mut min_self_delegation__ = None; - let mut delegator_address__ = None; - let mut validator_address__ = None; - let mut pubkey__ = None; - let mut value__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); - } - description__ = map_.next_value()?; - } - GeneratedField::Commission => { - if commission__.is_some() { - return Err(serde::de::Error::duplicate_field("commission")); - } - commission__ = map_.next_value()?; - } - GeneratedField::MinSelfDelegation => { - if min_self_delegation__.is_some() { - return Err(serde::de::Error::duplicate_field("minSelfDelegation")); - } - min_self_delegation__ = Some(map_.next_value()?); - } - GeneratedField::DelegatorAddress => { - if delegator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddress")); - } - delegator_address__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorAddress => { - if validator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddress")); - } - validator_address__ = Some(map_.next_value()?); - } - GeneratedField::Pubkey => { - if pubkey__.is_some() { - return Err(serde::de::Error::duplicate_field("pubkey")); - } - pubkey__ = map_.next_value()?; - } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); - } - value__ = map_.next_value()?; - } - } - } - Ok(MsgCreateValidator { - description: description__, - commission: commission__, - min_self_delegation: min_self_delegation__.unwrap_or_default(), - delegator_address: delegator_address__.unwrap_or_default(), - validator_address: validator_address__.unwrap_or_default(), - pubkey: pubkey__, - value: value__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.MsgCreateValidator", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgCreateValidatorResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.MsgCreateValidatorResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgCreateValidatorResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgCreateValidatorResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.MsgCreateValidatorResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgCreateValidatorResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.MsgCreateValidatorResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgDelegate { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.MsgDelegate", len)?; - if true { - struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; - } - if true { - struct_ser.serialize_field("validatorAddress", &self.validator_address)?; - } - if let Some(v) = self.amount.as_ref() { - struct_ser.serialize_field("amount", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgDelegate { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_address", - "delegatorAddress", - "validator_address", - "validatorAddress", - "amount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddress, - ValidatorAddress, - Amount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddress" | "delegator_address" => Ok(GeneratedField::DelegatorAddress), - "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), - "amount" => Ok(GeneratedField::Amount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgDelegate; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.MsgDelegate") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_address__ = None; - let mut validator_address__ = None; - let mut amount__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddress => { - if delegator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddress")); - } - delegator_address__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorAddress => { - if validator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddress")); - } - validator_address__ = Some(map_.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = map_.next_value()?; - } - } - } - Ok(MsgDelegate { - delegator_address: delegator_address__.unwrap_or_default(), - validator_address: validator_address__.unwrap_or_default(), - amount: amount__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.MsgDelegate", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgDelegateResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.MsgDelegateResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgDelegateResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgDelegateResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.MsgDelegateResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgDelegateResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.MsgDelegateResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgEditValidator { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.MsgEditValidator", len)?; - if let Some(v) = self.description.as_ref() { - struct_ser.serialize_field("description", v)?; - } - if true { - struct_ser.serialize_field("validatorAddress", &self.validator_address)?; - } - if true { - struct_ser.serialize_field("commissionRate", &self.commission_rate)?; - } - if true { - struct_ser.serialize_field("minSelfDelegation", &self.min_self_delegation)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgEditValidator { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "description", - "validator_address", - "validatorAddress", - "commission_rate", - "commissionRate", - "min_self_delegation", - "minSelfDelegation", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Description, - ValidatorAddress, - CommissionRate, - MinSelfDelegation, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "description" => Ok(GeneratedField::Description), - "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), - "commissionRate" | "commission_rate" => Ok(GeneratedField::CommissionRate), - "minSelfDelegation" | "min_self_delegation" => Ok(GeneratedField::MinSelfDelegation), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgEditValidator; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.MsgEditValidator") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut description__ = None; - let mut validator_address__ = None; - let mut commission_rate__ = None; - let mut min_self_delegation__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); - } - description__ = map_.next_value()?; - } - GeneratedField::ValidatorAddress => { - if validator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddress")); - } - validator_address__ = Some(map_.next_value()?); - } - GeneratedField::CommissionRate => { - if commission_rate__.is_some() { - return Err(serde::de::Error::duplicate_field("commissionRate")); - } - commission_rate__ = Some(map_.next_value()?); - } - GeneratedField::MinSelfDelegation => { - if min_self_delegation__.is_some() { - return Err(serde::de::Error::duplicate_field("minSelfDelegation")); - } - min_self_delegation__ = Some(map_.next_value()?); - } - } - } - Ok(MsgEditValidator { - description: description__, - validator_address: validator_address__.unwrap_or_default(), - commission_rate: commission_rate__.unwrap_or_default(), - min_self_delegation: min_self_delegation__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.MsgEditValidator", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgEditValidatorResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.MsgEditValidatorResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgEditValidatorResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgEditValidatorResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.MsgEditValidatorResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgEditValidatorResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.MsgEditValidatorResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgUndelegate { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.MsgUndelegate", len)?; - if true { - struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; - } - if true { - struct_ser.serialize_field("validatorAddress", &self.validator_address)?; - } - if let Some(v) = self.amount.as_ref() { - struct_ser.serialize_field("amount", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgUndelegate { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_address", - "delegatorAddress", - "validator_address", - "validatorAddress", - "amount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddress, - ValidatorAddress, - Amount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddress" | "delegator_address" => Ok(GeneratedField::DelegatorAddress), - "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), - "amount" => Ok(GeneratedField::Amount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUndelegate; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.MsgUndelegate") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_address__ = None; - let mut validator_address__ = None; - let mut amount__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddress => { - if delegator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddress")); - } - delegator_address__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorAddress => { - if validator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddress")); - } - validator_address__ = Some(map_.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = map_.next_value()?; - } - } - } - Ok(MsgUndelegate { - delegator_address: delegator_address__.unwrap_or_default(), - validator_address: validator_address__.unwrap_or_default(), - amount: amount__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.MsgUndelegate", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgUndelegateResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.MsgUndelegateResponse", len)?; - if let Some(v) = self.completion_time.as_ref() { - struct_ser.serialize_field("completionTime", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgUndelegateResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "completion_time", - "completionTime", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - CompletionTime, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "completionTime" | "completion_time" => Ok(GeneratedField::CompletionTime), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUndelegateResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.MsgUndelegateResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut completion_time__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::CompletionTime => { - if completion_time__.is_some() { - return Err(serde::de::Error::duplicate_field("completionTime")); - } - completion_time__ = map_.next_value()?; - } - } - } - Ok(MsgUndelegateResponse { - completion_time: completion_time__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.MsgUndelegateResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgUpdateParams { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.MsgUpdateParams", len)?; - if true { - struct_ser.serialize_field("authority", &self.authority)?; - } - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgUpdateParams { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "authority", - "params", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authority, - Params, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "authority" => Ok(GeneratedField::Authority), - "params" => Ok(GeneratedField::Params), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateParams; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.MsgUpdateParams") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut authority__ = None; - let mut params__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); - } - authority__ = Some(map_.next_value()?); - } - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); - } - params__ = map_.next_value()?; - } - } - } - Ok(MsgUpdateParams { - authority: authority__.unwrap_or_default(), - params: params__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.MsgUpdateParams", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgUpdateParamsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.MsgUpdateParamsResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgUpdateParamsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateParamsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.MsgUpdateParamsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgUpdateParamsResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.MsgUpdateParamsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Params { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.Params", len)?; - if let Some(v) = self.unbonding_time.as_ref() { - struct_ser.serialize_field("unbondingTime", v)?; - } - if true { - struct_ser.serialize_field("maxValidators", &self.max_validators)?; - } - if true { - struct_ser.serialize_field("maxEntries", &self.max_entries)?; - } - if true { - struct_ser.serialize_field("historicalEntries", &self.historical_entries)?; - } - if true { - struct_ser.serialize_field("bondDenom", &self.bond_denom)?; - } - if true { - struct_ser.serialize_field("minCommissionRate", &self.min_commission_rate)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Params { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "unbonding_time", - "unbondingTime", - "max_validators", - "maxValidators", - "max_entries", - "maxEntries", - "historical_entries", - "historicalEntries", - "bond_denom", - "bondDenom", - "min_commission_rate", - "minCommissionRate", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - UnbondingTime, - MaxValidators, - MaxEntries, - HistoricalEntries, - BondDenom, - MinCommissionRate, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "unbondingTime" | "unbonding_time" => Ok(GeneratedField::UnbondingTime), - "maxValidators" | "max_validators" => Ok(GeneratedField::MaxValidators), - "maxEntries" | "max_entries" => Ok(GeneratedField::MaxEntries), - "historicalEntries" | "historical_entries" => Ok(GeneratedField::HistoricalEntries), - "bondDenom" | "bond_denom" => Ok(GeneratedField::BondDenom), - "minCommissionRate" | "min_commission_rate" => Ok(GeneratedField::MinCommissionRate), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Params; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.Params") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut unbonding_time__ = None; - let mut max_validators__ = None; - let mut max_entries__ = None; - let mut historical_entries__ = None; - let mut bond_denom__ = None; - let mut min_commission_rate__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::UnbondingTime => { - if unbonding_time__.is_some() { - return Err(serde::de::Error::duplicate_field("unbondingTime")); - } - unbonding_time__ = map_.next_value()?; - } - GeneratedField::MaxValidators => { - if max_validators__.is_some() { - return Err(serde::de::Error::duplicate_field("maxValidators")); - } - max_validators__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::MaxEntries => { - if max_entries__.is_some() { - return Err(serde::de::Error::duplicate_field("maxEntries")); - } - max_entries__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::HistoricalEntries => { - if historical_entries__.is_some() { - return Err(serde::de::Error::duplicate_field("historicalEntries")); - } - historical_entries__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::BondDenom => { - if bond_denom__.is_some() { - return Err(serde::de::Error::duplicate_field("bondDenom")); - } - bond_denom__ = Some(map_.next_value()?); - } - GeneratedField::MinCommissionRate => { - if min_commission_rate__.is_some() { - return Err(serde::de::Error::duplicate_field("minCommissionRate")); - } - min_commission_rate__ = Some(map_.next_value()?); - } - } - } - Ok(Params { - unbonding_time: unbonding_time__, - max_validators: max_validators__.unwrap_or_default(), - max_entries: max_entries__.unwrap_or_default(), - historical_entries: historical_entries__.unwrap_or_default(), - bond_denom: bond_denom__.unwrap_or_default(), - min_commission_rate: min_commission_rate__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.Params", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Pool { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.Pool", len)?; - if true { - struct_ser.serialize_field("notBondedTokens", &self.not_bonded_tokens)?; - } - if true { - struct_ser.serialize_field("bondedTokens", &self.bonded_tokens)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Pool { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "not_bonded_tokens", - "notBondedTokens", - "bonded_tokens", - "bondedTokens", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - NotBondedTokens, - BondedTokens, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "notBondedTokens" | "not_bonded_tokens" => Ok(GeneratedField::NotBondedTokens), - "bondedTokens" | "bonded_tokens" => Ok(GeneratedField::BondedTokens), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Pool; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.Pool") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut not_bonded_tokens__ = None; - let mut bonded_tokens__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::NotBondedTokens => { - if not_bonded_tokens__.is_some() { - return Err(serde::de::Error::duplicate_field("notBondedTokens")); - } - not_bonded_tokens__ = Some(map_.next_value()?); - } - GeneratedField::BondedTokens => { - if bonded_tokens__.is_some() { - return Err(serde::de::Error::duplicate_field("bondedTokens")); - } - bonded_tokens__ = Some(map_.next_value()?); - } - } - } - Ok(Pool { - not_bonded_tokens: not_bonded_tokens__.unwrap_or_default(), - bonded_tokens: bonded_tokens__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.Pool", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDelegationRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryDelegationRequest", len)?; - if true { - struct_ser.serialize_field("delegatorAddr", &self.delegator_addr)?; - } - if true { - struct_ser.serialize_field("validatorAddr", &self.validator_addr)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDelegationRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_addr", - "delegatorAddr", - "validator_addr", - "validatorAddr", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddr, - ValidatorAddr, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddr" | "delegator_addr" => Ok(GeneratedField::DelegatorAddr), - "validatorAddr" | "validator_addr" => Ok(GeneratedField::ValidatorAddr), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDelegationRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryDelegationRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_addr__ = None; - let mut validator_addr__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddr => { - if delegator_addr__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddr")); - } - delegator_addr__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorAddr => { - if validator_addr__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddr")); - } - validator_addr__ = Some(map_.next_value()?); - } - } - } - Ok(QueryDelegationRequest { - delegator_addr: delegator_addr__.unwrap_or_default(), - validator_addr: validator_addr__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryDelegationRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDelegationResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryDelegationResponse", len)?; - if let Some(v) = self.delegation_response.as_ref() { - struct_ser.serialize_field("delegationResponse", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDelegationResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegation_response", - "delegationResponse", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegationResponse, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegationResponse" | "delegation_response" => Ok(GeneratedField::DelegationResponse), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDelegationResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryDelegationResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegation_response__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegationResponse => { - if delegation_response__.is_some() { - return Err(serde::de::Error::duplicate_field("delegationResponse")); - } - delegation_response__ = map_.next_value()?; - } - } - } - Ok(QueryDelegationResponse { - delegation_response: delegation_response__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryDelegationResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDelegatorDelegationsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest", len)?; - if true { - struct_ser.serialize_field("delegatorAddr", &self.delegator_addr)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_addr", - "delegatorAddr", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddr, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddr" | "delegator_addr" => Ok(GeneratedField::DelegatorAddr), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDelegatorDelegationsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_addr__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddr => { - if delegator_addr__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddr")); - } - delegator_addr__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryDelegatorDelegationsRequest { - delegator_addr: delegator_addr__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDelegatorDelegationsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse", len)?; - if true { - struct_ser.serialize_field("delegationResponses", &self.delegation_responses)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegation_responses", - "delegationResponses", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegationResponses, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegationResponses" | "delegation_responses" => Ok(GeneratedField::DelegationResponses), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDelegatorDelegationsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegation_responses__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegationResponses => { - if delegation_responses__.is_some() { - return Err(serde::de::Error::duplicate_field("delegationResponses")); - } - delegation_responses__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryDelegatorDelegationsResponse { - delegation_responses: delegation_responses__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDelegatorUnbondingDelegationsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest", len)?; - if true { - struct_ser.serialize_field("delegatorAddr", &self.delegator_addr)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_addr", - "delegatorAddr", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddr, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddr" | "delegator_addr" => Ok(GeneratedField::DelegatorAddr), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDelegatorUnbondingDelegationsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_addr__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddr => { - if delegator_addr__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddr")); - } - delegator_addr__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryDelegatorUnbondingDelegationsRequest { - delegator_addr: delegator_addr__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDelegatorUnbondingDelegationsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse", len)?; - if true { - struct_ser.serialize_field("unbondingResponses", &self.unbonding_responses)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "unbonding_responses", - "unbondingResponses", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - UnbondingResponses, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "unbondingResponses" | "unbonding_responses" => Ok(GeneratedField::UnbondingResponses), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDelegatorUnbondingDelegationsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut unbonding_responses__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::UnbondingResponses => { - if unbonding_responses__.is_some() { - return Err(serde::de::Error::duplicate_field("unbondingResponses")); - } - unbonding_responses__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryDelegatorUnbondingDelegationsResponse { - unbonding_responses: unbonding_responses__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDelegatorValidatorRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryDelegatorValidatorRequest", len)?; - if true { - struct_ser.serialize_field("delegatorAddr", &self.delegator_addr)?; - } - if true { - struct_ser.serialize_field("validatorAddr", &self.validator_addr)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_addr", - "delegatorAddr", - "validator_addr", - "validatorAddr", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddr, - ValidatorAddr, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddr" | "delegator_addr" => Ok(GeneratedField::DelegatorAddr), - "validatorAddr" | "validator_addr" => Ok(GeneratedField::ValidatorAddr), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDelegatorValidatorRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryDelegatorValidatorRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_addr__ = None; - let mut validator_addr__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddr => { - if delegator_addr__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddr")); - } - delegator_addr__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorAddr => { - if validator_addr__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddr")); - } - validator_addr__ = Some(map_.next_value()?); - } - } - } - Ok(QueryDelegatorValidatorRequest { - delegator_addr: delegator_addr__.unwrap_or_default(), - validator_addr: validator_addr__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryDelegatorValidatorRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDelegatorValidatorResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryDelegatorValidatorResponse", len)?; - if let Some(v) = self.validator.as_ref() { - struct_ser.serialize_field("validator", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "validator", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Validator, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "validator" => Ok(GeneratedField::Validator), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDelegatorValidatorResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryDelegatorValidatorResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut validator__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Validator => { - if validator__.is_some() { - return Err(serde::de::Error::duplicate_field("validator")); - } - validator__ = map_.next_value()?; - } - } - } - Ok(QueryDelegatorValidatorResponse { - validator: validator__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryDelegatorValidatorResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDelegatorValidatorsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest", len)?; - if true { - struct_ser.serialize_field("delegatorAddr", &self.delegator_addr)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_addr", - "delegatorAddr", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddr, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddr" | "delegator_addr" => Ok(GeneratedField::DelegatorAddr), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDelegatorValidatorsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_addr__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddr => { - if delegator_addr__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddr")); - } - delegator_addr__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryDelegatorValidatorsRequest { - delegator_addr: delegator_addr__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryDelegatorValidatorsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse", len)?; - if true { - struct_ser.serialize_field("validators", &self.validators)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "validators", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Validators, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "validators" => Ok(GeneratedField::Validators), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryDelegatorValidatorsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut validators__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Validators => { - if validators__.is_some() { - return Err(serde::de::Error::duplicate_field("validators")); - } - validators__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryDelegatorValidatorsResponse { - validators: validators__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryHistoricalInfoRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryHistoricalInfoRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("height", ::alloc::string::ToString::to_string(&self.height).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "height", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Height, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "height" => Ok(GeneratedField::Height), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryHistoricalInfoRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryHistoricalInfoRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut height__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); - } - height__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(QueryHistoricalInfoRequest { - height: height__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryHistoricalInfoRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryHistoricalInfoResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryHistoricalInfoResponse", len)?; - if let Some(v) = self.hist.as_ref() { - struct_ser.serialize_field("hist", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "hist", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Hist, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "hist" => Ok(GeneratedField::Hist), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryHistoricalInfoResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryHistoricalInfoResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut hist__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Hist => { - if hist__.is_some() { - return Err(serde::de::Error::duplicate_field("hist")); - } - hist__ = map_.next_value()?; - } - } - } - Ok(QueryHistoricalInfoResponse { - hist: hist__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryHistoricalInfoResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryParamsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryParamsRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryParamsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryParamsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryParamsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(QueryParamsRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryParamsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryParamsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryParamsResponse", len)?; - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryParamsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "params", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Params, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "params" => Ok(GeneratedField::Params), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryParamsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryParamsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut params__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); - } - params__ = map_.next_value()?; - } - } - } - Ok(QueryParamsResponse { - params: params__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryParamsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryPoolRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryPoolRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryPoolRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPoolRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryPoolRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(QueryPoolRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryPoolRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryPoolResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryPoolResponse", len)?; - if let Some(v) = self.pool.as_ref() { - struct_ser.serialize_field("pool", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryPoolResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "pool", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Pool, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "pool" => Ok(GeneratedField::Pool), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPoolResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryPoolResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut pool__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Pool => { - if pool__.is_some() { - return Err(serde::de::Error::duplicate_field("pool")); - } - pool__ = map_.next_value()?; - } - } - } - Ok(QueryPoolResponse { - pool: pool__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryPoolResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryRedelegationsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryRedelegationsRequest", len)?; - if true { - struct_ser.serialize_field("delegatorAddr", &self.delegator_addr)?; - } - if true { - struct_ser.serialize_field("srcValidatorAddr", &self.src_validator_addr)?; - } - if true { - struct_ser.serialize_field("dstValidatorAddr", &self.dst_validator_addr)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryRedelegationsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_addr", - "delegatorAddr", - "src_validator_addr", - "srcValidatorAddr", - "dst_validator_addr", - "dstValidatorAddr", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddr, - SrcValidatorAddr, - DstValidatorAddr, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddr" | "delegator_addr" => Ok(GeneratedField::DelegatorAddr), - "srcValidatorAddr" | "src_validator_addr" => Ok(GeneratedField::SrcValidatorAddr), - "dstValidatorAddr" | "dst_validator_addr" => Ok(GeneratedField::DstValidatorAddr), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryRedelegationsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryRedelegationsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_addr__ = None; - let mut src_validator_addr__ = None; - let mut dst_validator_addr__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddr => { - if delegator_addr__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddr")); - } - delegator_addr__ = Some(map_.next_value()?); - } - GeneratedField::SrcValidatorAddr => { - if src_validator_addr__.is_some() { - return Err(serde::de::Error::duplicate_field("srcValidatorAddr")); - } - src_validator_addr__ = Some(map_.next_value()?); - } - GeneratedField::DstValidatorAddr => { - if dst_validator_addr__.is_some() { - return Err(serde::de::Error::duplicate_field("dstValidatorAddr")); - } - dst_validator_addr__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryRedelegationsRequest { - delegator_addr: delegator_addr__.unwrap_or_default(), - src_validator_addr: src_validator_addr__.unwrap_or_default(), - dst_validator_addr: dst_validator_addr__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryRedelegationsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryRedelegationsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryRedelegationsResponse", len)?; - if true { - struct_ser.serialize_field("redelegationResponses", &self.redelegation_responses)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryRedelegationsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "redelegation_responses", - "redelegationResponses", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - RedelegationResponses, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "redelegationResponses" | "redelegation_responses" => Ok(GeneratedField::RedelegationResponses), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryRedelegationsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryRedelegationsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut redelegation_responses__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::RedelegationResponses => { - if redelegation_responses__.is_some() { - return Err(serde::de::Error::duplicate_field("redelegationResponses")); - } - redelegation_responses__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryRedelegationsResponse { - redelegation_responses: redelegation_responses__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryRedelegationsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryUnbondingDelegationRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryUnbondingDelegationRequest", len)?; - if true { - struct_ser.serialize_field("delegatorAddr", &self.delegator_addr)?; - } - if true { - struct_ser.serialize_field("validatorAddr", &self.validator_addr)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_addr", - "delegatorAddr", - "validator_addr", - "validatorAddr", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddr, - ValidatorAddr, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddr" | "delegator_addr" => Ok(GeneratedField::DelegatorAddr), - "validatorAddr" | "validator_addr" => Ok(GeneratedField::ValidatorAddr), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryUnbondingDelegationRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryUnbondingDelegationRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_addr__ = None; - let mut validator_addr__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddr => { - if delegator_addr__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddr")); - } - delegator_addr__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorAddr => { - if validator_addr__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddr")); - } - validator_addr__ = Some(map_.next_value()?); - } - } - } - Ok(QueryUnbondingDelegationRequest { - delegator_addr: delegator_addr__.unwrap_or_default(), - validator_addr: validator_addr__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryUnbondingDelegationRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryUnbondingDelegationResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryUnbondingDelegationResponse", len)?; - if let Some(v) = self.unbond.as_ref() { - struct_ser.serialize_field("unbond", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "unbond", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Unbond, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "unbond" => Ok(GeneratedField::Unbond), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryUnbondingDelegationResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryUnbondingDelegationResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut unbond__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Unbond => { - if unbond__.is_some() { - return Err(serde::de::Error::duplicate_field("unbond")); - } - unbond__ = map_.next_value()?; - } - } - } - Ok(QueryUnbondingDelegationResponse { - unbond: unbond__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryUnbondingDelegationResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryValidatorDelegationsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryValidatorDelegationsRequest", len)?; - if true { - struct_ser.serialize_field("validatorAddr", &self.validator_addr)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "validator_addr", - "validatorAddr", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ValidatorAddr, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "validatorAddr" | "validator_addr" => Ok(GeneratedField::ValidatorAddr), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryValidatorDelegationsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryValidatorDelegationsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut validator_addr__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ValidatorAddr => { - if validator_addr__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddr")); - } - validator_addr__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryValidatorDelegationsRequest { - validator_addr: validator_addr__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryValidatorDelegationsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryValidatorDelegationsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryValidatorDelegationsResponse", len)?; - if true { - struct_ser.serialize_field("delegationResponses", &self.delegation_responses)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegation_responses", - "delegationResponses", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegationResponses, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegationResponses" | "delegation_responses" => Ok(GeneratedField::DelegationResponses), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryValidatorDelegationsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryValidatorDelegationsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegation_responses__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegationResponses => { - if delegation_responses__.is_some() { - return Err(serde::de::Error::duplicate_field("delegationResponses")); - } - delegation_responses__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryValidatorDelegationsResponse { - delegation_responses: delegation_responses__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryValidatorDelegationsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryValidatorRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryValidatorRequest", len)?; - if true { - struct_ser.serialize_field("validatorAddr", &self.validator_addr)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryValidatorRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "validator_addr", - "validatorAddr", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ValidatorAddr, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "validatorAddr" | "validator_addr" => Ok(GeneratedField::ValidatorAddr), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryValidatorRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryValidatorRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut validator_addr__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ValidatorAddr => { - if validator_addr__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddr")); - } - validator_addr__ = Some(map_.next_value()?); - } - } - } - Ok(QueryValidatorRequest { - validator_addr: validator_addr__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryValidatorRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryValidatorResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryValidatorResponse", len)?; - if let Some(v) = self.validator.as_ref() { - struct_ser.serialize_field("validator", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryValidatorResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "validator", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Validator, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "validator" => Ok(GeneratedField::Validator), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryValidatorResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryValidatorResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut validator__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Validator => { - if validator__.is_some() { - return Err(serde::de::Error::duplicate_field("validator")); - } - validator__ = map_.next_value()?; - } - } - } - Ok(QueryValidatorResponse { - validator: validator__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryValidatorResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryValidatorUnbondingDelegationsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest", len)?; - if true { - struct_ser.serialize_field("validatorAddr", &self.validator_addr)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "validator_addr", - "validatorAddr", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ValidatorAddr, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "validatorAddr" | "validator_addr" => Ok(GeneratedField::ValidatorAddr), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryValidatorUnbondingDelegationsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut validator_addr__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ValidatorAddr => { - if validator_addr__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddr")); - } - validator_addr__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryValidatorUnbondingDelegationsRequest { - validator_addr: validator_addr__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryValidatorUnbondingDelegationsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse", len)?; - if true { - struct_ser.serialize_field("unbondingResponses", &self.unbonding_responses)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "unbonding_responses", - "unbondingResponses", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - UnbondingResponses, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "unbondingResponses" | "unbonding_responses" => Ok(GeneratedField::UnbondingResponses), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryValidatorUnbondingDelegationsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut unbonding_responses__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::UnbondingResponses => { - if unbonding_responses__.is_some() { - return Err(serde::de::Error::duplicate_field("unbondingResponses")); - } - unbonding_responses__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryValidatorUnbondingDelegationsResponse { - unbonding_responses: unbonding_responses__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryValidatorsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryValidatorsRequest", len)?; - if true { - struct_ser.serialize_field("status", &self.status)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryValidatorsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "status", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Status, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "status" => Ok(GeneratedField::Status), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryValidatorsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryValidatorsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut status__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Status => { - if status__.is_some() { - return Err(serde::de::Error::duplicate_field("status")); - } - status__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryValidatorsRequest { - status: status__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryValidatorsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryValidatorsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.QueryValidatorsResponse", len)?; - if true { - struct_ser.serialize_field("validators", &self.validators)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryValidatorsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "validators", - "pagination", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Validators, - Pagination, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "validators" => Ok(GeneratedField::Validators), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryValidatorsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.QueryValidatorsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut validators__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Validators => { - if validators__.is_some() { - return Err(serde::de::Error::duplicate_field("validators")); - } - validators__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } - } - Ok(QueryValidatorsResponse { - validators: validators__.unwrap_or_default(), - pagination: pagination__, - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.QueryValidatorsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Redelegation { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.Redelegation", len)?; - if true { - struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; - } - if true { - struct_ser.serialize_field("validatorSrcAddress", &self.validator_src_address)?; - } - if true { - struct_ser.serialize_field("validatorDstAddress", &self.validator_dst_address)?; - } - if true { - struct_ser.serialize_field("entries", &self.entries)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Redelegation { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_address", - "delegatorAddress", - "validator_src_address", - "validatorSrcAddress", - "validator_dst_address", - "validatorDstAddress", - "entries", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddress, - ValidatorSrcAddress, - ValidatorDstAddress, - Entries, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddress" | "delegator_address" => Ok(GeneratedField::DelegatorAddress), - "validatorSrcAddress" | "validator_src_address" => Ok(GeneratedField::ValidatorSrcAddress), - "validatorDstAddress" | "validator_dst_address" => Ok(GeneratedField::ValidatorDstAddress), - "entries" => Ok(GeneratedField::Entries), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Redelegation; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.Redelegation") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_address__ = None; - let mut validator_src_address__ = None; - let mut validator_dst_address__ = None; - let mut entries__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddress => { - if delegator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddress")); - } - delegator_address__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorSrcAddress => { - if validator_src_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorSrcAddress")); - } - validator_src_address__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorDstAddress => { - if validator_dst_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorDstAddress")); - } - validator_dst_address__ = Some(map_.next_value()?); - } - GeneratedField::Entries => { - if entries__.is_some() { - return Err(serde::de::Error::duplicate_field("entries")); - } - entries__ = Some(map_.next_value()?); - } - } - } - Ok(Redelegation { - delegator_address: delegator_address__.unwrap_or_default(), - validator_src_address: validator_src_address__.unwrap_or_default(), - validator_dst_address: validator_dst_address__.unwrap_or_default(), - entries: entries__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.Redelegation", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for RedelegationEntry { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.RedelegationEntry", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("creationHeight", ::alloc::string::ToString::to_string(&self.creation_height).as_str())?; - } - if let Some(v) = self.completion_time.as_ref() { - struct_ser.serialize_field("completionTime", v)?; - } - if true { - struct_ser.serialize_field("initialBalance", &self.initial_balance)?; - } - if true { - struct_ser.serialize_field("sharesDst", &self.shares_dst)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("unbondingId", ::alloc::string::ToString::to_string(&self.unbonding_id).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("unbondingOnHoldRefCount", ::alloc::string::ToString::to_string(&self.unbonding_on_hold_ref_count).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for RedelegationEntry { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "creation_height", - "creationHeight", - "completion_time", - "completionTime", - "initial_balance", - "initialBalance", - "shares_dst", - "sharesDst", - "unbonding_id", - "unbondingId", - "unbonding_on_hold_ref_count", - "unbondingOnHoldRefCount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - CreationHeight, - CompletionTime, - InitialBalance, - SharesDst, - UnbondingId, - UnbondingOnHoldRefCount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "creationHeight" | "creation_height" => Ok(GeneratedField::CreationHeight), - "completionTime" | "completion_time" => Ok(GeneratedField::CompletionTime), - "initialBalance" | "initial_balance" => Ok(GeneratedField::InitialBalance), - "sharesDst" | "shares_dst" => Ok(GeneratedField::SharesDst), - "unbondingId" | "unbonding_id" => Ok(GeneratedField::UnbondingId), - "unbondingOnHoldRefCount" | "unbonding_on_hold_ref_count" => Ok(GeneratedField::UnbondingOnHoldRefCount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RedelegationEntry; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.RedelegationEntry") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut creation_height__ = None; - let mut completion_time__ = None; - let mut initial_balance__ = None; - let mut shares_dst__ = None; - let mut unbonding_id__ = None; - let mut unbonding_on_hold_ref_count__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::CreationHeight => { - if creation_height__.is_some() { - return Err(serde::de::Error::duplicate_field("creationHeight")); - } - creation_height__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::CompletionTime => { - if completion_time__.is_some() { - return Err(serde::de::Error::duplicate_field("completionTime")); - } - completion_time__ = map_.next_value()?; - } - GeneratedField::InitialBalance => { - if initial_balance__.is_some() { - return Err(serde::de::Error::duplicate_field("initialBalance")); - } - initial_balance__ = Some(map_.next_value()?); - } - GeneratedField::SharesDst => { - if shares_dst__.is_some() { - return Err(serde::de::Error::duplicate_field("sharesDst")); - } - shares_dst__ = Some(map_.next_value()?); - } - GeneratedField::UnbondingId => { - if unbonding_id__.is_some() { - return Err(serde::de::Error::duplicate_field("unbondingId")); - } - unbonding_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::UnbondingOnHoldRefCount => { - if unbonding_on_hold_ref_count__.is_some() { - return Err(serde::de::Error::duplicate_field("unbondingOnHoldRefCount")); - } - unbonding_on_hold_ref_count__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(RedelegationEntry { - creation_height: creation_height__.unwrap_or_default(), - completion_time: completion_time__, - initial_balance: initial_balance__.unwrap_or_default(), - shares_dst: shares_dst__.unwrap_or_default(), - unbonding_id: unbonding_id__.unwrap_or_default(), - unbonding_on_hold_ref_count: unbonding_on_hold_ref_count__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.RedelegationEntry", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for RedelegationEntryResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.RedelegationEntryResponse", len)?; - if let Some(v) = self.redelegation_entry.as_ref() { - struct_ser.serialize_field("redelegationEntry", v)?; - } - if true { - struct_ser.serialize_field("balance", &self.balance)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for RedelegationEntryResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "redelegation_entry", - "redelegationEntry", - "balance", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - RedelegationEntry, - Balance, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "redelegationEntry" | "redelegation_entry" => Ok(GeneratedField::RedelegationEntry), - "balance" => Ok(GeneratedField::Balance), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RedelegationEntryResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.RedelegationEntryResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut redelegation_entry__ = None; - let mut balance__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::RedelegationEntry => { - if redelegation_entry__.is_some() { - return Err(serde::de::Error::duplicate_field("redelegationEntry")); - } - redelegation_entry__ = map_.next_value()?; - } - GeneratedField::Balance => { - if balance__.is_some() { - return Err(serde::de::Error::duplicate_field("balance")); - } - balance__ = Some(map_.next_value()?); - } - } - } - Ok(RedelegationEntryResponse { - redelegation_entry: redelegation_entry__, - balance: balance__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.RedelegationEntryResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for RedelegationResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.RedelegationResponse", len)?; - if let Some(v) = self.redelegation.as_ref() { - struct_ser.serialize_field("redelegation", v)?; - } - if true { - struct_ser.serialize_field("entries", &self.entries)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for RedelegationResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "redelegation", - "entries", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Redelegation, - Entries, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "redelegation" => Ok(GeneratedField::Redelegation), - "entries" => Ok(GeneratedField::Entries), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RedelegationResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.RedelegationResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut redelegation__ = None; - let mut entries__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Redelegation => { - if redelegation__.is_some() { - return Err(serde::de::Error::duplicate_field("redelegation")); - } - redelegation__ = map_.next_value()?; - } - GeneratedField::Entries => { - if entries__.is_some() { - return Err(serde::de::Error::duplicate_field("entries")); - } - entries__ = Some(map_.next_value()?); - } - } - } - Ok(RedelegationResponse { - redelegation: redelegation__, - entries: entries__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.RedelegationResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for UnbondingDelegation { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.UnbondingDelegation", len)?; - if true { - struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; - } - if true { - struct_ser.serialize_field("validatorAddress", &self.validator_address)?; - } - if true { - struct_ser.serialize_field("entries", &self.entries)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for UnbondingDelegation { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "delegator_address", - "delegatorAddress", - "validator_address", - "validatorAddress", - "entries", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - DelegatorAddress, - ValidatorAddress, - Entries, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "delegatorAddress" | "delegator_address" => Ok(GeneratedField::DelegatorAddress), - "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), - "entries" => Ok(GeneratedField::Entries), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = UnbondingDelegation; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.UnbondingDelegation") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut delegator_address__ = None; - let mut validator_address__ = None; - let mut entries__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::DelegatorAddress => { - if delegator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorAddress")); - } - delegator_address__ = Some(map_.next_value()?); - } - GeneratedField::ValidatorAddress => { - if validator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddress")); - } - validator_address__ = Some(map_.next_value()?); - } - GeneratedField::Entries => { - if entries__.is_some() { - return Err(serde::de::Error::duplicate_field("entries")); - } - entries__ = Some(map_.next_value()?); - } - } - } - Ok(UnbondingDelegation { - delegator_address: delegator_address__.unwrap_or_default(), - validator_address: validator_address__.unwrap_or_default(), - entries: entries__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.UnbondingDelegation", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for UnbondingDelegationEntry { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.UnbondingDelegationEntry", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("creationHeight", ::alloc::string::ToString::to_string(&self.creation_height).as_str())?; - } - if let Some(v) = self.completion_time.as_ref() { - struct_ser.serialize_field("completionTime", v)?; - } - if true { - struct_ser.serialize_field("initialBalance", &self.initial_balance)?; - } - if true { - struct_ser.serialize_field("balance", &self.balance)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("unbondingId", ::alloc::string::ToString::to_string(&self.unbonding_id).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("unbondingOnHoldRefCount", ::alloc::string::ToString::to_string(&self.unbonding_on_hold_ref_count).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for UnbondingDelegationEntry { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "creation_height", - "creationHeight", - "completion_time", - "completionTime", - "initial_balance", - "initialBalance", - "balance", - "unbonding_id", - "unbondingId", - "unbonding_on_hold_ref_count", - "unbondingOnHoldRefCount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - CreationHeight, - CompletionTime, - InitialBalance, - Balance, - UnbondingId, - UnbondingOnHoldRefCount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "creationHeight" | "creation_height" => Ok(GeneratedField::CreationHeight), - "completionTime" | "completion_time" => Ok(GeneratedField::CompletionTime), - "initialBalance" | "initial_balance" => Ok(GeneratedField::InitialBalance), - "balance" => Ok(GeneratedField::Balance), - "unbondingId" | "unbonding_id" => Ok(GeneratedField::UnbondingId), - "unbondingOnHoldRefCount" | "unbonding_on_hold_ref_count" => Ok(GeneratedField::UnbondingOnHoldRefCount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = UnbondingDelegationEntry; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.UnbondingDelegationEntry") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut creation_height__ = None; - let mut completion_time__ = None; - let mut initial_balance__ = None; - let mut balance__ = None; - let mut unbonding_id__ = None; - let mut unbonding_on_hold_ref_count__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::CreationHeight => { - if creation_height__.is_some() { - return Err(serde::de::Error::duplicate_field("creationHeight")); - } - creation_height__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::CompletionTime => { - if completion_time__.is_some() { - return Err(serde::de::Error::duplicate_field("completionTime")); - } - completion_time__ = map_.next_value()?; - } - GeneratedField::InitialBalance => { - if initial_balance__.is_some() { - return Err(serde::de::Error::duplicate_field("initialBalance")); - } - initial_balance__ = Some(map_.next_value()?); - } - GeneratedField::Balance => { - if balance__.is_some() { - return Err(serde::de::Error::duplicate_field("balance")); - } - balance__ = Some(map_.next_value()?); - } - GeneratedField::UnbondingId => { - if unbonding_id__.is_some() { - return Err(serde::de::Error::duplicate_field("unbondingId")); - } - unbonding_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::UnbondingOnHoldRefCount => { - if unbonding_on_hold_ref_count__.is_some() { - return Err(serde::de::Error::duplicate_field("unbondingOnHoldRefCount")); - } - unbonding_on_hold_ref_count__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(UnbondingDelegationEntry { - creation_height: creation_height__.unwrap_or_default(), - completion_time: completion_time__, - initial_balance: initial_balance__.unwrap_or_default(), - balance: balance__.unwrap_or_default(), - unbonding_id: unbonding_id__.unwrap_or_default(), - unbonding_on_hold_ref_count: unbonding_on_hold_ref_count__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.UnbondingDelegationEntry", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ValAddresses { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.ValAddresses", len)?; - if true { - struct_ser.serialize_field("addresses", &self.addresses)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ValAddresses { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "addresses", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Addresses, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "addresses" => Ok(GeneratedField::Addresses), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ValAddresses; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.ValAddresses") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut addresses__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Addresses => { - if addresses__.is_some() { - return Err(serde::de::Error::duplicate_field("addresses")); - } - addresses__ = Some(map_.next_value()?); - } - } - } - Ok(ValAddresses { - addresses: addresses__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.ValAddresses", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Validator { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.Validator", len)?; - if true { - struct_ser.serialize_field("operatorAddress", &self.operator_address)?; - } - if let Some(v) = self.consensus_pubkey.as_ref() { - struct_ser.serialize_field("consensusPubkey", v)?; - } - if true { - struct_ser.serialize_field("jailed", &self.jailed)?; - } - if true { - let v = BondStatus::try_from(self.status) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.status)))?; - struct_ser.serialize_field("status", &v)?; - } - if true { - struct_ser.serialize_field("tokens", &self.tokens)?; - } - if true { - struct_ser.serialize_field("delegatorShares", &self.delegator_shares)?; - } - if let Some(v) = self.description.as_ref() { - struct_ser.serialize_field("description", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("unbondingHeight", ::alloc::string::ToString::to_string(&self.unbonding_height).as_str())?; - } - if let Some(v) = self.unbonding_time.as_ref() { - struct_ser.serialize_field("unbondingTime", v)?; - } - if let Some(v) = self.commission.as_ref() { - struct_ser.serialize_field("commission", v)?; - } - if true { - struct_ser.serialize_field("minSelfDelegation", &self.min_self_delegation)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("unbondingOnHoldRefCount", ::alloc::string::ToString::to_string(&self.unbonding_on_hold_ref_count).as_str())?; - } - if true { - struct_ser.serialize_field("unbondingIds", &self.unbonding_ids.iter().map(::alloc::string::ToString::to_string).collect::<::alloc::vec::Vec<_>>())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Validator { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "operator_address", - "operatorAddress", - "consensus_pubkey", - "consensusPubkey", - "jailed", - "status", - "tokens", - "delegator_shares", - "delegatorShares", - "description", - "unbonding_height", - "unbondingHeight", - "unbonding_time", - "unbondingTime", - "commission", - "min_self_delegation", - "minSelfDelegation", - "unbonding_on_hold_ref_count", - "unbondingOnHoldRefCount", - "unbonding_ids", - "unbondingIds", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - OperatorAddress, - ConsensusPubkey, - Jailed, - Status, - Tokens, - DelegatorShares, - Description, - UnbondingHeight, - UnbondingTime, - Commission, - MinSelfDelegation, - UnbondingOnHoldRefCount, - UnbondingIds, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "operatorAddress" | "operator_address" => Ok(GeneratedField::OperatorAddress), - "consensusPubkey" | "consensus_pubkey" => Ok(GeneratedField::ConsensusPubkey), - "jailed" => Ok(GeneratedField::Jailed), - "status" => Ok(GeneratedField::Status), - "tokens" => Ok(GeneratedField::Tokens), - "delegatorShares" | "delegator_shares" => Ok(GeneratedField::DelegatorShares), - "description" => Ok(GeneratedField::Description), - "unbondingHeight" | "unbonding_height" => Ok(GeneratedField::UnbondingHeight), - "unbondingTime" | "unbonding_time" => Ok(GeneratedField::UnbondingTime), - "commission" => Ok(GeneratedField::Commission), - "minSelfDelegation" | "min_self_delegation" => Ok(GeneratedField::MinSelfDelegation), - "unbondingOnHoldRefCount" | "unbonding_on_hold_ref_count" => Ok(GeneratedField::UnbondingOnHoldRefCount), - "unbondingIds" | "unbonding_ids" => Ok(GeneratedField::UnbondingIds), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Validator; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.staking.v1beta1.Validator") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut operator_address__ = None; - let mut consensus_pubkey__ = None; - let mut jailed__ = None; - let mut status__ = None; - let mut tokens__ = None; - let mut delegator_shares__ = None; - let mut description__ = None; - let mut unbonding_height__ = None; - let mut unbonding_time__ = None; - let mut commission__ = None; - let mut min_self_delegation__ = None; - let mut unbonding_on_hold_ref_count__ = None; - let mut unbonding_ids__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::OperatorAddress => { - if operator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("operatorAddress")); - } - operator_address__ = Some(map_.next_value()?); - } - GeneratedField::ConsensusPubkey => { - if consensus_pubkey__.is_some() { - return Err(serde::de::Error::duplicate_field("consensusPubkey")); - } - consensus_pubkey__ = map_.next_value()?; - } - GeneratedField::Jailed => { - if jailed__.is_some() { - return Err(serde::de::Error::duplicate_field("jailed")); - } - jailed__ = Some(map_.next_value()?); - } - GeneratedField::Status => { - if status__.is_some() { - return Err(serde::de::Error::duplicate_field("status")); - } - status__ = Some(map_.next_value::()? as i32); - } - GeneratedField::Tokens => { - if tokens__.is_some() { - return Err(serde::de::Error::duplicate_field("tokens")); - } - tokens__ = Some(map_.next_value()?); - } - GeneratedField::DelegatorShares => { - if delegator_shares__.is_some() { - return Err(serde::de::Error::duplicate_field("delegatorShares")); - } - delegator_shares__ = Some(map_.next_value()?); - } - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); - } - description__ = map_.next_value()?; - } - GeneratedField::UnbondingHeight => { - if unbonding_height__.is_some() { - return Err(serde::de::Error::duplicate_field("unbondingHeight")); - } - unbonding_height__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::UnbondingTime => { - if unbonding_time__.is_some() { - return Err(serde::de::Error::duplicate_field("unbondingTime")); - } - unbonding_time__ = map_.next_value()?; - } - GeneratedField::Commission => { - if commission__.is_some() { - return Err(serde::de::Error::duplicate_field("commission")); - } - commission__ = map_.next_value()?; - } - GeneratedField::MinSelfDelegation => { - if min_self_delegation__.is_some() { - return Err(serde::de::Error::duplicate_field("minSelfDelegation")); - } - min_self_delegation__ = Some(map_.next_value()?); - } - GeneratedField::UnbondingOnHoldRefCount => { - if unbonding_on_hold_ref_count__.is_some() { - return Err(serde::de::Error::duplicate_field("unbondingOnHoldRefCount")); - } - unbonding_on_hold_ref_count__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::UnbondingIds => { - if unbonding_ids__.is_some() { - return Err(serde::de::Error::duplicate_field("unbondingIds")); - } - unbonding_ids__ = - Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::NumberDeserialize<_>>>()? - .into_iter().map(|x| x.0).collect()) - ; - } - } - } - Ok(Validator { - operator_address: operator_address__.unwrap_or_default(), - consensus_pubkey: consensus_pubkey__, - jailed: jailed__.unwrap_or_default(), - status: status__.unwrap_or_default(), - tokens: tokens__.unwrap_or_default(), - delegator_shares: delegator_shares__.unwrap_or_default(), - description: description__, - unbonding_height: unbonding_height__.unwrap_or_default(), - unbonding_time: unbonding_time__, - commission: commission__, - min_self_delegation: min_self_delegation__.unwrap_or_default(), - unbonding_on_hold_ref_count: unbonding_on_hold_ref_count__.unwrap_or_default(), - unbonding_ids: unbonding_ids__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.staking.v1beta1.Validator", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.tx.config.v1.rs b/src/prost/cosmos.tx.config.v1.rs deleted file mode 100644 index b79ab2e0..00000000 --- a/src/prost/cosmos.tx.config.v1.rs +++ /dev/null @@ -1,20 +0,0 @@ -/// 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/src/prost/cosmos.tx.config.v1.serde.rs b/src/prost/cosmos.tx.config.v1.serde.rs deleted file mode 100644 index d4283484..00000000 --- a/src/prost/cosmos.tx.config.v1.serde.rs +++ /dev/null @@ -1,110 +0,0 @@ -impl serde::Serialize for Config { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.tx.config.v1.Config", len)?; - if true { - struct_ser.serialize_field("skipAnteHandler", &self.skip_ante_handler)?; - } - if true { - struct_ser.serialize_field("skipPostHandler", &self.skip_post_handler)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Config { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "skip_ante_handler", - "skipAnteHandler", - "skip_post_handler", - "skipPostHandler", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - SkipAnteHandler, - SkipPostHandler, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "skipAnteHandler" | "skip_ante_handler" => Ok(GeneratedField::SkipAnteHandler), - "skipPostHandler" | "skip_post_handler" => Ok(GeneratedField::SkipPostHandler), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Config; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.tx.config.v1.Config") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut skip_ante_handler__ = None; - let mut skip_post_handler__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::SkipAnteHandler => { - if skip_ante_handler__.is_some() { - return Err(serde::de::Error::duplicate_field("skipAnteHandler")); - } - skip_ante_handler__ = Some(map_.next_value()?); - } - GeneratedField::SkipPostHandler => { - if skip_post_handler__.is_some() { - return Err(serde::de::Error::duplicate_field("skipPostHandler")); - } - skip_post_handler__ = Some(map_.next_value()?); - } - } - } - Ok(Config { - skip_ante_handler: skip_ante_handler__.unwrap_or_default(), - skip_post_handler: skip_post_handler__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.tx.config.v1.Config", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.tx.signing.v1beta1.rs b/src/prost/cosmos.tx.signing.v1beta1.rs deleted file mode 100644 index 4685364f..00000000 --- a/src/prost/cosmos.tx.signing.v1beta1.rs +++ /dev/null @@ -1,189 +0,0 @@ -/// 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< - super::super::super::super::google::protobuf::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 not supported. - 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/src/prost/cosmos.tx.signing.v1beta1.serde.rs b/src/prost/cosmos.tx.signing.v1beta1.serde.rs deleted file mode 100644 index 0a8c385c..00000000 --- a/src/prost/cosmos.tx.signing.v1beta1.serde.rs +++ /dev/null @@ -1,633 +0,0 @@ -impl serde::Serialize for SignMode { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::Unspecified => "SIGN_MODE_UNSPECIFIED", - Self::Direct => "SIGN_MODE_DIRECT", - Self::Textual => "SIGN_MODE_TEXTUAL", - Self::DirectAux => "SIGN_MODE_DIRECT_AUX", - Self::LegacyAminoJson => "SIGN_MODE_LEGACY_AMINO_JSON", - Self::Eip191 => "SIGN_MODE_EIP_191", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for SignMode { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "SIGN_MODE_UNSPECIFIED", - "SIGN_MODE_DIRECT", - "SIGN_MODE_TEXTUAL", - "SIGN_MODE_DIRECT_AUX", - "SIGN_MODE_LEGACY_AMINO_JSON", - "SIGN_MODE_EIP_191", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SignMode; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "SIGN_MODE_UNSPECIFIED" => Ok(SignMode::Unspecified), - "SIGN_MODE_DIRECT" => Ok(SignMode::Direct), - "SIGN_MODE_TEXTUAL" => Ok(SignMode::Textual), - "SIGN_MODE_DIRECT_AUX" => Ok(SignMode::DirectAux), - "SIGN_MODE_LEGACY_AMINO_JSON" => Ok(SignMode::LegacyAminoJson), - "SIGN_MODE_EIP_191" => Ok(SignMode::Eip191), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for SignatureDescriptor { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.tx.signing.v1beta1.SignatureDescriptor", len)?; - if let Some(v) = self.public_key.as_ref() { - struct_ser.serialize_field("publicKey", v)?; - } - if let Some(v) = self.data.as_ref() { - struct_ser.serialize_field("data", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("sequence", ::alloc::string::ToString::to_string(&self.sequence).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SignatureDescriptor { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "public_key", - "publicKey", - "data", - "sequence", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - PublicKey, - Data, - Sequence, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), - "data" => Ok(GeneratedField::Data), - "sequence" => Ok(GeneratedField::Sequence), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SignatureDescriptor; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.tx.signing.v1beta1.SignatureDescriptor") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut public_key__ = None; - let mut data__ = None; - let mut sequence__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::PublicKey => { - if public_key__.is_some() { - return Err(serde::de::Error::duplicate_field("publicKey")); - } - public_key__ = map_.next_value()?; - } - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); - } - data__ = map_.next_value()?; - } - GeneratedField::Sequence => { - if sequence__.is_some() { - return Err(serde::de::Error::duplicate_field("sequence")); - } - sequence__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(SignatureDescriptor { - public_key: public_key__, - data: data__, - sequence: sequence__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.tx.signing.v1beta1.SignatureDescriptor", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for signature_descriptor::Data { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.sum.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.tx.signing.v1beta1.SignatureDescriptor.Data", len)?; - if let Some(v) = self.sum.as_ref() { - match v { - signature_descriptor::data::Sum::Single(v) => { - struct_ser.serialize_field("single", v)?; - } - signature_descriptor::data::Sum::Multi(v) => { - struct_ser.serialize_field("multi", v)?; - } - } - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for signature_descriptor::Data { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "single", - "multi", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Single, - Multi, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "single" => Ok(GeneratedField::Single), - "multi" => Ok(GeneratedField::Multi), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = signature_descriptor::Data; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.tx.signing.v1beta1.SignatureDescriptor.Data") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sum__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Single => { - if sum__.is_some() { - return Err(serde::de::Error::duplicate_field("single")); - } - sum__ = map_.next_value::<::core::option::Option<_>>()?.map(signature_descriptor::data::Sum::Single) -; - } - GeneratedField::Multi => { - if sum__.is_some() { - return Err(serde::de::Error::duplicate_field("multi")); - } - sum__ = map_.next_value::<::core::option::Option<_>>()?.map(signature_descriptor::data::Sum::Multi) -; - } - } - } - Ok(signature_descriptor::Data { - sum: sum__, - }) - } - } - deserializer.deserialize_struct("cosmos.tx.signing.v1beta1.SignatureDescriptor.Data", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for signature_descriptor::data::Multi { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi", len)?; - if let Some(v) = self.bitarray.as_ref() { - struct_ser.serialize_field("bitarray", v)?; - } - if true { - struct_ser.serialize_field("signatures", &self.signatures)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Multi { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "bitarray", - "signatures", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Bitarray, - Signatures, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "bitarray" => Ok(GeneratedField::Bitarray), - "signatures" => Ok(GeneratedField::Signatures), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = signature_descriptor::data::Multi; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut bitarray__ = None; - let mut signatures__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Bitarray => { - if bitarray__.is_some() { - return Err(serde::de::Error::duplicate_field("bitarray")); - } - bitarray__ = map_.next_value()?; - } - GeneratedField::Signatures => { - if signatures__.is_some() { - return Err(serde::de::Error::duplicate_field("signatures")); - } - signatures__ = Some(map_.next_value()?); - } - } - } - Ok(signature_descriptor::data::Multi { - bitarray: bitarray__, - signatures: signatures__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for signature_descriptor::data::Single { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single", len)?; - if true { - let v = SignMode::try_from(self.mode) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.mode)))?; - struct_ser.serialize_field("mode", &v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("signature", pbjson::private::base64::encode(&self.signature).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Single { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "mode", - "signature", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Mode, - Signature, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "mode" => Ok(GeneratedField::Mode), - "signature" => Ok(GeneratedField::Signature), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = signature_descriptor::data::Single; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut mode__ = None; - let mut signature__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Mode => { - if mode__.is_some() { - return Err(serde::de::Error::duplicate_field("mode")); - } - mode__ = Some(map_.next_value::()? as i32); - } - GeneratedField::Signature => { - if signature__.is_some() { - return Err(serde::de::Error::duplicate_field("signature")); - } - signature__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(signature_descriptor::data::Single { - mode: mode__.unwrap_or_default(), - signature: signature__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SignatureDescriptors { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.tx.signing.v1beta1.SignatureDescriptors", len)?; - if true { - struct_ser.serialize_field("signatures", &self.signatures)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SignatureDescriptors { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "signatures", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Signatures, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "signatures" => Ok(GeneratedField::Signatures), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SignatureDescriptors; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.tx.signing.v1beta1.SignatureDescriptors") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut signatures__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Signatures => { - if signatures__.is_some() { - return Err(serde::de::Error::duplicate_field("signatures")); - } - signatures__ = Some(map_.next_value()?); - } - } - } - Ok(SignatureDescriptors { - signatures: signatures__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.tx.signing.v1beta1.SignatureDescriptors", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.tx.v1beta1.rs b/src/prost/cosmos.tx.v1beta1.rs deleted file mode 100644 index 403722eb..00000000 --- a/src/prost/cosmos.tx.v1beta1.rs +++ /dev/null @@ -1,1763 +0,0 @@ -/// 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, - /// 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, - /// 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< - super::super::super::google::protobuf::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< - super::super::super::google::protobuf::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, - /// 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. - #[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, -} -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<::tendermint_proto::types::BlockId>, - #[prost(message, optional, tag = "3")] - pub block: ::core::option::Option<::tendermint_proto::types::Block>, - /// 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 = "client")] -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 = "server")] -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/src/prost/cosmos.upgrade.module.v1.rs b/src/prost/cosmos.upgrade.module.v1.rs deleted file mode 100644 index 198df468..00000000 --- a/src/prost/cosmos.upgrade.module.v1.rs +++ /dev/null @@ -1,15 +0,0 @@ -/// Module is the config object of the upgrade module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Module { - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} -impl ::prost::Name for Module { - const NAME: &'static str = "Module"; - const PACKAGE: &'static str = "cosmos.upgrade.module.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.module.v1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.upgrade.module.v1.serde.rs b/src/prost/cosmos.upgrade.module.v1.serde.rs deleted file mode 100644 index 7aee8176..00000000 --- a/src/prost/cosmos.upgrade.module.v1.serde.rs +++ /dev/null @@ -1,91 +0,0 @@ -impl serde::Serialize for Module { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.module.v1.Module", len)?; - if true { - struct_ser.serialize_field("authority", &self.authority)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Module { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "authority", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authority, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "authority" => Ok(GeneratedField::Authority), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Module; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.module.v1.Module") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut authority__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); - } - authority__ = Some(map_.next_value()?); - } - } - } - Ok(Module { - authority: authority__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.module.v1.Module", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.upgrade.v1beta1.rs b/src/prost/cosmos.upgrade.v1beta1.rs deleted file mode 100644 index 2bb5cab7..00000000 --- a/src/prost/cosmos.upgrade.v1beta1.rs +++ /dev/null @@ -1,1365 +0,0 @@ -/// Plan specifies information about a planned upgrade and when it should occur. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Plan { - /// Sets the name for the upgrade. This name will be used by the upgraded - /// version of the software to apply any special "on-upgrade" commands during - /// the first BeginBlock method after the upgrade is applied. It is also used - /// to detect whether a software version can handle a given upgrade. If no - /// upgrade handler with this name has been set in the software, it will be - /// assumed that the software is out-of-date when the upgrade Time or Height is - /// reached and the software will exit. - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// Deprecated: Time based upgrades have been deprecated. Time based upgrade logic - /// has been removed from the SDK. - /// If this field is not empty, an error will be thrown. - #[deprecated] - #[prost(message, optional, tag = "2")] - pub time: ::core::option::Option, - /// The height at which the upgrade must be performed. - #[prost(int64, tag = "3")] - pub height: i64, - /// Any application specific upgrade info to be included on-chain - /// such as a git commit that validators could automatically upgrade to - #[prost(string, tag = "4")] - pub info: ::prost::alloc::string::String, - /// Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been - /// moved to the IBC module in the sub module 02-client. - /// If this field is not empty, an error will be thrown. - #[deprecated] - #[prost(message, optional, tag = "5")] - pub upgraded_client_state: ::core::option::Option< - super::super::super::google::protobuf::Any, - >, -} -impl ::prost::Name for Plan { - const NAME: &'static str = "Plan"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// SoftwareUpgradeProposal is a gov Content type for initiating a software -/// upgrade. -/// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov -/// proposals, see MsgSoftwareUpgrade. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SoftwareUpgradeProposal { - /// title of the proposal - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// description of the proposal - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// plan of the proposal - #[prost(message, optional, tag = "3")] - pub plan: ::core::option::Option, -} -impl ::prost::Name for SoftwareUpgradeProposal { - const NAME: &'static str = "SoftwareUpgradeProposal"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software -/// upgrade. -/// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov -/// proposals, see MsgCancelUpgrade. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CancelSoftwareUpgradeProposal { - /// title of the proposal - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// description of the proposal - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, -} -impl ::prost::Name for CancelSoftwareUpgradeProposal { - const NAME: &'static str = "CancelSoftwareUpgradeProposal"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// ModuleVersion specifies a module and its consensus version. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ModuleVersion { - /// name of the app module - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// consensus version of the app module - #[prost(uint64, tag = "2")] - pub version: u64, -} -impl ::prost::Name for ModuleVersion { - const NAME: &'static str = "ModuleVersion"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSoftwareUpgrade { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// plan is the upgrade plan. - #[prost(message, optional, tag = "2")] - pub plan: ::core::option::Option, -} -impl ::prost::Name for MsgSoftwareUpgrade { - const NAME: &'static str = "MsgSoftwareUpgrade"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSoftwareUpgradeResponse {} -impl ::prost::Name for MsgSoftwareUpgradeResponse { - const NAME: &'static str = "MsgSoftwareUpgradeResponse"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// MsgCancelUpgrade is the Msg/CancelUpgrade request type. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelUpgrade { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgCancelUpgrade { - const NAME: &'static str = "MsgCancelUpgrade"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelUpgradeResponse {} -impl ::prost::Name for MsgCancelUpgradeResponse { - const NAME: &'static str = "MsgCancelUpgradeResponse"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Msg defines the upgrade Msg service. - #[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 - } - /// SoftwareUpgrade is a governance operation for initiating a software upgrade. - /// - /// Since: cosmos-sdk 0.46 - pub async fn software_upgrade( - &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.upgrade.v1beta1.Msg/SoftwareUpgrade", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.upgrade.v1beta1.Msg", "SoftwareUpgrade"), - ); - self.inner.unary(req, path, codec).await - } - /// CancelUpgrade is a governance operation for cancelling a previously - /// approved software upgrade. - /// - /// Since: cosmos-sdk 0.46 - pub async fn cancel_upgrade( - &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.upgrade.v1beta1.Msg/CancelUpgrade", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.upgrade.v1beta1.Msg", "CancelUpgrade")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -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 { - /// SoftwareUpgrade is a governance operation for initiating a software upgrade. - /// - /// Since: cosmos-sdk 0.46 - async fn software_upgrade( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// CancelUpgrade is a governance operation for cancelling a previously - /// approved software upgrade. - /// - /// Since: cosmos-sdk 0.46 - async fn cancel_upgrade( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Msg defines the upgrade Msg service. - #[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() { - "/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade" => { - #[allow(non_camel_case_types)] - struct SoftwareUpgradeSvc(pub Arc); - impl tonic::server::UnaryService - for SoftwareUpgradeSvc { - type Response = super::MsgSoftwareUpgradeResponse; - 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 { - ::software_upgrade(&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 = SoftwareUpgradeSvc(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.upgrade.v1beta1.Msg/CancelUpgrade" => { - #[allow(non_camel_case_types)] - struct CancelUpgradeSvc(pub Arc); - impl tonic::server::UnaryService - for CancelUpgradeSvc { - type Response = super::MsgCancelUpgradeResponse; - 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 { - ::cancel_upgrade(&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 = CancelUpgradeSvc(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 = "cosmos.upgrade.v1beta1.Msg"; - } -} -/// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCurrentPlanRequest {} -impl ::prost::Name for QueryCurrentPlanRequest { - const NAME: &'static str = "QueryCurrentPlanRequest"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCurrentPlanResponse { - /// plan is the current upgrade plan. - #[prost(message, optional, tag = "1")] - pub plan: ::core::option::Option, -} -impl ::prost::Name for QueryCurrentPlanResponse { - const NAME: &'static str = "QueryCurrentPlanResponse"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAppliedPlanRequest { - /// name is the name of the applied plan to query for. - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryAppliedPlanRequest { - const NAME: &'static str = "QueryAppliedPlanRequest"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAppliedPlanResponse { - /// height is the block height at which the plan was applied. - #[prost(int64, tag = "1")] - pub height: i64, -} -impl ::prost::Name for QueryAppliedPlanResponse { - const NAME: &'static str = "QueryAppliedPlanResponse"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradedConsensusStateRequest { - /// last height of the current chain must be sent in request - /// as this is the height under which next consensus state is stored - #[prost(int64, tag = "1")] - pub last_height: i64, -} -impl ::prost::Name for QueryUpgradedConsensusStateRequest { - const NAME: &'static str = "QueryUpgradedConsensusStateRequest"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradedConsensusStateResponse { - /// Since: cosmos-sdk 0.43 - #[prost(bytes = "vec", tag = "2")] - pub upgraded_consensus_state: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for QueryUpgradedConsensusStateResponse { - const NAME: &'static str = "QueryUpgradedConsensusStateResponse"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// QueryModuleVersionsRequest is the request type for the Query/ModuleVersions -/// RPC method. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryModuleVersionsRequest { - /// module_name is a field to query a specific module - /// consensus version from state. Leaving this empty will - /// fetch the full list of module versions from state - #[prost(string, tag = "1")] - pub module_name: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryModuleVersionsRequest { - const NAME: &'static str = "QueryModuleVersionsRequest"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// QueryModuleVersionsResponse is the response type for the Query/ModuleVersions -/// RPC method. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryModuleVersionsResponse { - /// module_versions is a list of module names with their consensus versions. - #[prost(message, repeated, tag = "1")] - pub module_versions: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for QueryModuleVersionsResponse { - const NAME: &'static str = "QueryModuleVersionsResponse"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// QueryAuthorityRequest is the request type for Query/Authority -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAuthorityRequest {} -impl ::prost::Name for QueryAuthorityRequest { - const NAME: &'static str = "QueryAuthorityRequest"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// QueryAuthorityResponse is the response type for Query/Authority -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAuthorityResponse { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryAuthorityResponse { - const NAME: &'static str = "QueryAuthorityResponse"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Query defines the gRPC upgrade querier service. - #[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 - } - /// CurrentPlan queries the current upgrade plan. - pub async fn current_plan( - &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.upgrade.v1beta1.Query/CurrentPlan", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.upgrade.v1beta1.Query", "CurrentPlan")); - self.inner.unary(req, path, codec).await - } - /// AppliedPlan queries a previously applied upgrade plan by its name. - pub async fn applied_plan( - &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.upgrade.v1beta1.Query/AppliedPlan", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.upgrade.v1beta1.Query", "AppliedPlan")); - self.inner.unary(req, path, codec).await - } - /// UpgradedConsensusState queries the consensus state that will serve - /// as a trusted kernel for the next version of this chain. It will only be - /// stored at the last height of this chain. - /// UpgradedConsensusState RPC not supported with legacy querier - /// This rpc is deprecated now that IBC has its own replacement - /// (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - pub async fn upgraded_consensus_state( - &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.upgrade.v1beta1.Query/UpgradedConsensusState", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.upgrade.v1beta1.Query", - "UpgradedConsensusState", - ), - ); - self.inner.unary(req, path, codec).await - } - /// ModuleVersions queries the list of module versions from state. - /// - /// Since: cosmos-sdk 0.43 - pub async fn module_versions( - &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.upgrade.v1beta1.Query/ModuleVersions", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.upgrade.v1beta1.Query", "ModuleVersions"), - ); - self.inner.unary(req, path, codec).await - } - /// Returns the account with authority to conduct upgrades - /// - /// Since: cosmos-sdk 0.46 - pub async fn authority( - &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.upgrade.v1beta1.Query/Authority", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.upgrade.v1beta1.Query", "Authority")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -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 { - /// CurrentPlan queries the current upgrade plan. - async fn current_plan( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// AppliedPlan queries a previously applied upgrade plan by its name. - async fn applied_plan( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// UpgradedConsensusState queries the consensus state that will serve - /// as a trusted kernel for the next version of this chain. It will only be - /// stored at the last height of this chain. - /// UpgradedConsensusState RPC not supported with legacy querier - /// This rpc is deprecated now that IBC has its own replacement - /// (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - async fn upgraded_consensus_state( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ModuleVersions queries the list of module versions from state. - /// - /// Since: cosmos-sdk 0.43 - async fn module_versions( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Returns the account with authority to conduct upgrades - /// - /// Since: cosmos-sdk 0.46 - async fn authority( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Query defines the gRPC upgrade querier service. - #[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() { - "/cosmos.upgrade.v1beta1.Query/CurrentPlan" => { - #[allow(non_camel_case_types)] - struct CurrentPlanSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for CurrentPlanSvc { - type Response = super::QueryCurrentPlanResponse; - 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 { - ::current_plan(&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 = CurrentPlanSvc(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.upgrade.v1beta1.Query/AppliedPlan" => { - #[allow(non_camel_case_types)] - struct AppliedPlanSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for AppliedPlanSvc { - type Response = super::QueryAppliedPlanResponse; - 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 { - ::applied_plan(&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 = AppliedPlanSvc(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.upgrade.v1beta1.Query/UpgradedConsensusState" => { - #[allow(non_camel_case_types)] - struct UpgradedConsensusStateSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService< - super::QueryUpgradedConsensusStateRequest, - > for UpgradedConsensusStateSvc { - type Response = super::QueryUpgradedConsensusStateResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::QueryUpgradedConsensusStateRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::upgraded_consensus_state(&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 = UpgradedConsensusStateSvc(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.upgrade.v1beta1.Query/ModuleVersions" => { - #[allow(non_camel_case_types)] - struct ModuleVersionsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ModuleVersionsSvc { - type Response = super::QueryModuleVersionsResponse; - 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 { - ::module_versions(&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 = ModuleVersionsSvc(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.upgrade.v1beta1.Query/Authority" => { - #[allow(non_camel_case_types)] - struct AuthoritySvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for AuthoritySvc { - type Response = super::QueryAuthorityResponse; - 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 { - ::authority(&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 = AuthoritySvc(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 = "cosmos.upgrade.v1beta1.Query"; - } -} diff --git a/src/prost/cosmos.upgrade.v1beta1.serde.rs b/src/prost/cosmos.upgrade.v1beta1.serde.rs deleted file mode 100644 index de744724..00000000 --- a/src/prost/cosmos.upgrade.v1beta1.serde.rs +++ /dev/null @@ -1,1731 +0,0 @@ -impl serde::Serialize for CancelSoftwareUpgradeProposal { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", len)?; - if true { - struct_ser.serialize_field("title", &self.title)?; - } - if true { - struct_ser.serialize_field("description", &self.description)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CancelSoftwareUpgradeProposal { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "title", - "description", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Title, - Description, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "title" => Ok(GeneratedField::Title), - "description" => Ok(GeneratedField::Description), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CancelSoftwareUpgradeProposal; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut title__ = None; - let mut description__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Title => { - if title__.is_some() { - return Err(serde::de::Error::duplicate_field("title")); - } - title__ = Some(map_.next_value()?); - } - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); - } - description__ = Some(map_.next_value()?); - } - } - } - Ok(CancelSoftwareUpgradeProposal { - title: title__.unwrap_or_default(), - description: description__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ModuleVersion { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.ModuleVersion", len)?; - if true { - struct_ser.serialize_field("name", &self.name)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("version", ::alloc::string::ToString::to_string(&self.version).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ModuleVersion { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "name", - "version", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Name, - Version, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "name" => Ok(GeneratedField::Name), - "version" => Ok(GeneratedField::Version), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ModuleVersion; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.ModuleVersion") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut name__ = None; - let mut version__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - GeneratedField::Version => { - if version__.is_some() { - return Err(serde::de::Error::duplicate_field("version")); - } - version__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(ModuleVersion { - name: name__.unwrap_or_default(), - version: version__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.ModuleVersion", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgCancelUpgrade { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.MsgCancelUpgrade", len)?; - if true { - struct_ser.serialize_field("authority", &self.authority)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgCancelUpgrade { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "authority", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authority, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "authority" => Ok(GeneratedField::Authority), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgCancelUpgrade; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.MsgCancelUpgrade") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut authority__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); - } - authority__ = Some(map_.next_value()?); - } - } - } - Ok(MsgCancelUpgrade { - authority: authority__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.MsgCancelUpgrade", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgCancelUpgradeResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgCancelUpgradeResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgCancelUpgradeResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgCancelUpgradeResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgSoftwareUpgrade { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", len)?; - if true { - struct_ser.serialize_field("authority", &self.authority)?; - } - if let Some(v) = self.plan.as_ref() { - struct_ser.serialize_field("plan", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgrade { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "authority", - "plan", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authority, - Plan, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "authority" => Ok(GeneratedField::Authority), - "plan" => Ok(GeneratedField::Plan), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgSoftwareUpgrade; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.MsgSoftwareUpgrade") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut authority__ = None; - let mut plan__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); - } - authority__ = Some(map_.next_value()?); - } - GeneratedField::Plan => { - if plan__.is_some() { - return Err(serde::de::Error::duplicate_field("plan")); - } - plan__ = map_.next_value()?; - } - } - } - Ok(MsgSoftwareUpgrade { - authority: authority__.unwrap_or_default(), - plan: plan__, - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgSoftwareUpgradeResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgradeResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgSoftwareUpgradeResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgSoftwareUpgradeResponse { - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Plan { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.Plan", len)?; - if true { - struct_ser.serialize_field("name", &self.name)?; - } - if let Some(v) = self.time.as_ref() { - struct_ser.serialize_field("time", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("height", ::alloc::string::ToString::to_string(&self.height).as_str())?; - } - if true { - struct_ser.serialize_field("info", &self.info)?; - } - if let Some(v) = self.upgraded_client_state.as_ref() { - struct_ser.serialize_field("upgradedClientState", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Plan { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "name", - "time", - "height", - "info", - "upgraded_client_state", - "upgradedClientState", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Name, - Time, - Height, - Info, - UpgradedClientState, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "name" => Ok(GeneratedField::Name), - "time" => Ok(GeneratedField::Time), - "height" => Ok(GeneratedField::Height), - "info" => Ok(GeneratedField::Info), - "upgradedClientState" | "upgraded_client_state" => Ok(GeneratedField::UpgradedClientState), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Plan; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.Plan") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut name__ = None; - let mut time__ = None; - let mut height__ = None; - let mut info__ = None; - let mut upgraded_client_state__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - GeneratedField::Time => { - if time__.is_some() { - return Err(serde::de::Error::duplicate_field("time")); - } - time__ = map_.next_value()?; - } - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); - } - height__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Info => { - if info__.is_some() { - return Err(serde::de::Error::duplicate_field("info")); - } - info__ = Some(map_.next_value()?); - } - GeneratedField::UpgradedClientState => { - if upgraded_client_state__.is_some() { - return Err(serde::de::Error::duplicate_field("upgradedClientState")); - } - upgraded_client_state__ = map_.next_value()?; - } - } - } - Ok(Plan { - name: name__.unwrap_or_default(), - time: time__, - height: height__.unwrap_or_default(), - info: info__.unwrap_or_default(), - upgraded_client_state: upgraded_client_state__, - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.Plan", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryAppliedPlanRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryAppliedPlanRequest", len)?; - if true { - struct_ser.serialize_field("name", &self.name)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryAppliedPlanRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "name", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Name, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "name" => Ok(GeneratedField::Name), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAppliedPlanRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.QueryAppliedPlanRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut name__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - } - } - Ok(QueryAppliedPlanRequest { - name: name__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.QueryAppliedPlanRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryAppliedPlanResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryAppliedPlanResponse", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("height", ::alloc::string::ToString::to_string(&self.height).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryAppliedPlanResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "height", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Height, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "height" => Ok(GeneratedField::Height), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAppliedPlanResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.QueryAppliedPlanResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut height__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); - } - height__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(QueryAppliedPlanResponse { - height: height__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.QueryAppliedPlanResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryAuthorityRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryAuthorityRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryAuthorityRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAuthorityRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.QueryAuthorityRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(QueryAuthorityRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.QueryAuthorityRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryAuthorityResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryAuthorityResponse", len)?; - if true { - struct_ser.serialize_field("address", &self.address)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryAuthorityResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAuthorityResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.QueryAuthorityResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } - } - } - Ok(QueryAuthorityResponse { - address: address__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.QueryAuthorityResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryCurrentPlanRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryCurrentPlanRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryCurrentPlanRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryCurrentPlanRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.QueryCurrentPlanRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(QueryCurrentPlanRequest { - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.QueryCurrentPlanRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryCurrentPlanResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryCurrentPlanResponse", len)?; - if let Some(v) = self.plan.as_ref() { - struct_ser.serialize_field("plan", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryCurrentPlanResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "plan", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Plan, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "plan" => Ok(GeneratedField::Plan), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryCurrentPlanResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.QueryCurrentPlanResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut plan__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Plan => { - if plan__.is_some() { - return Err(serde::de::Error::duplicate_field("plan")); - } - plan__ = map_.next_value()?; - } - } - } - Ok(QueryCurrentPlanResponse { - plan: plan__, - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.QueryCurrentPlanResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryModuleVersionsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryModuleVersionsRequest", len)?; - if true { - struct_ser.serialize_field("moduleName", &self.module_name)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryModuleVersionsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "module_name", - "moduleName", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ModuleName, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "moduleName" | "module_name" => Ok(GeneratedField::ModuleName), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryModuleVersionsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.QueryModuleVersionsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut module_name__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ModuleName => { - if module_name__.is_some() { - return Err(serde::de::Error::duplicate_field("moduleName")); - } - module_name__ = Some(map_.next_value()?); - } - } - } - Ok(QueryModuleVersionsRequest { - module_name: module_name__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.QueryModuleVersionsRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryModuleVersionsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryModuleVersionsResponse", len)?; - if true { - struct_ser.serialize_field("moduleVersions", &self.module_versions)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryModuleVersionsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "module_versions", - "moduleVersions", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ModuleVersions, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "moduleVersions" | "module_versions" => Ok(GeneratedField::ModuleVersions), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryModuleVersionsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.QueryModuleVersionsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut module_versions__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ModuleVersions => { - if module_versions__.is_some() { - return Err(serde::de::Error::duplicate_field("moduleVersions")); - } - module_versions__ = Some(map_.next_value()?); - } - } - } - Ok(QueryModuleVersionsResponse { - module_versions: module_versions__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.QueryModuleVersionsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryUpgradedConsensusStateRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("lastHeight", ::alloc::string::ToString::to_string(&self.last_height).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "last_height", - "lastHeight", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - LastHeight, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "lastHeight" | "last_height" => Ok(GeneratedField::LastHeight), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryUpgradedConsensusStateRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut last_height__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::LastHeight => { - if last_height__.is_some() { - return Err(serde::de::Error::duplicate_field("lastHeight")); - } - last_height__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(QueryUpgradedConsensusStateRequest { - last_height: last_height__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryUpgradedConsensusStateResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("upgradedConsensusState", pbjson::private::base64::encode(&self.upgraded_consensus_state).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "upgraded_consensus_state", - "upgradedConsensusState", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - UpgradedConsensusState, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "upgradedConsensusState" | "upgraded_consensus_state" => Ok(GeneratedField::UpgradedConsensusState), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryUpgradedConsensusStateResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut upgraded_consensus_state__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::UpgradedConsensusState => { - if upgraded_consensus_state__.is_some() { - return Err(serde::de::Error::duplicate_field("upgradedConsensusState")); - } - upgraded_consensus_state__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(QueryUpgradedConsensusStateResponse { - upgraded_consensus_state: upgraded_consensus_state__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SoftwareUpgradeProposal { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", len)?; - if true { - struct_ser.serialize_field("title", &self.title)?; - } - if true { - struct_ser.serialize_field("description", &self.description)?; - } - if let Some(v) = self.plan.as_ref() { - struct_ser.serialize_field("plan", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SoftwareUpgradeProposal { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "title", - "description", - "plan", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Title, - Description, - Plan, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "title" => Ok(GeneratedField::Title), - "description" => Ok(GeneratedField::Description), - "plan" => Ok(GeneratedField::Plan), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SoftwareUpgradeProposal; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.upgrade.v1beta1.SoftwareUpgradeProposal") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut title__ = None; - let mut description__ = None; - let mut plan__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Title => { - if title__.is_some() { - return Err(serde::de::Error::duplicate_field("title")); - } - title__ = Some(map_.next_value()?); - } - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); - } - description__ = Some(map_.next_value()?); - } - GeneratedField::Plan => { - if plan__.is_some() { - return Err(serde::de::Error::duplicate_field("plan")); - } - plan__ = map_.next_value()?; - } - } - } - Ok(SoftwareUpgradeProposal { - title: title__.unwrap_or_default(), - description: description__.unwrap_or_default(), - plan: plan__, - }) - } - } - deserializer.deserialize_struct("cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/google.api.rs b/src/prost/google.api.rs index 5aa04075..271bd761 100644 --- a/src/prost/google.api.rs +++ b/src/prost/google.api.rs @@ -194,18 +194,15 @@ impl ::prost::Name for Http { /// 1. Leaf request fields (recursive expansion nested messages in the request /// message) are classified into three categories: /// - Fields referred by the path template. They are passed via the URL path. -/// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -/// are passed via the HTTP +/// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP /// request body. /// - All other fields are passed via the URL query parameters, and the /// parameter name is the field path in the request message. A repeated /// field can be represented as multiple query parameters under the same /// name. -/// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -/// query parameter, all fields +/// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields /// are passed via URL path and HTTP request body. -/// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -/// request body, all +/// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all /// fields are passed via URL path and URL query parameters. /// /// ### Path template syntax @@ -302,8 +299,7 @@ impl ::prost::Name for Http { pub struct HttpRule { /// Selects a method to which this rule applies. /// - /// Refer to [selector][google.api.DocumentationRule.selector] for syntax - /// details. + /// Refer to [selector][google.api.DocumentationRule.selector] for syntax details. #[prost(string, tag = "1")] pub selector: ::prost::alloc::string::String, /// The name of the request field whose value is mapped to the HTTP request diff --git a/src/prost/ibc.applications.fee.v1.rs b/src/prost/ibc.applications.fee.v1.rs index 9d798dce..0c83c0b0 100644 --- a/src/prost/ibc.applications.fee.v1.rs +++ b/src/prost/ibc.applications.fee.v1.rs @@ -5,17 +5,17 @@ pub struct Fee { /// the packet receive fee #[prost(message, repeated, tag = "1")] pub recv_fee: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::base::v1beta1::Coin, + ::cosmos_sdk_proto::cosmos::base::v1beta1::Coin, >, /// the packet acknowledgement fee #[prost(message, repeated, tag = "2")] pub ack_fee: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::base::v1beta1::Coin, + ::cosmos_sdk_proto::cosmos::base::v1beta1::Coin, >, /// the packet timeout fee #[prost(message, repeated, tag = "3")] pub timeout_fee: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::base::v1beta1::Coin, + ::cosmos_sdk_proto::cosmos::base::v1beta1::Coin, >, } impl ::prost::Name for Fee { @@ -930,7 +930,7 @@ pub struct QueryIncentivizedPacketsRequest { /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest, >, /// block height at which to query #[prost(uint64, tag = "2")] @@ -953,7 +953,7 @@ pub struct QueryIncentivizedPacketsResponse { /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse, >, } impl ::prost::Name for QueryIncentivizedPacketsResponse { @@ -1006,7 +1006,7 @@ pub struct QueryIncentivizedPacketsForChannelRequest { /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest, >, #[prost(string, tag = "2")] pub port_id: ::prost::alloc::string::String, @@ -1033,7 +1033,7 @@ pub struct QueryIncentivizedPacketsForChannelResponse { /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse, >, } impl ::prost::Name for QueryIncentivizedPacketsForChannelResponse { @@ -1067,7 +1067,7 @@ pub struct QueryTotalRecvFeesResponse { /// the total packet receive fees #[prost(message, repeated, tag = "1")] pub recv_fees: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::base::v1beta1::Coin, + ::cosmos_sdk_proto::cosmos::base::v1beta1::Coin, >, } impl ::prost::Name for QueryTotalRecvFeesResponse { @@ -1101,7 +1101,7 @@ pub struct QueryTotalAckFeesResponse { /// the total packet acknowledgement fees #[prost(message, repeated, tag = "1")] pub ack_fees: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::base::v1beta1::Coin, + ::cosmos_sdk_proto::cosmos::base::v1beta1::Coin, >, } impl ::prost::Name for QueryTotalAckFeesResponse { @@ -1135,7 +1135,7 @@ pub struct QueryTotalTimeoutFeesResponse { /// the total packet timeout fees #[prost(message, repeated, tag = "1")] pub timeout_fees: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::base::v1beta1::Coin, + ::cosmos_sdk_proto::cosmos::base::v1beta1::Coin, >, } impl ::prost::Name for QueryTotalTimeoutFeesResponse { @@ -1218,7 +1218,7 @@ pub struct QueryFeeEnabledChannelsRequest { /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest, >, /// block height at which to query #[prost(uint64, tag = "2")] @@ -1241,7 +1241,7 @@ pub struct QueryFeeEnabledChannelsResponse { /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse, >, } impl ::prost::Name for QueryFeeEnabledChannelsResponse { diff --git a/src/prost/ibc.applications.interchain_accounts.v1.rs b/src/prost/ibc.applications.interchain_accounts.v1.rs index 045606e3..84800811 100644 --- a/src/prost/ibc.applications.interchain_accounts.v1.rs +++ b/src/prost/ibc.applications.interchain_accounts.v1.rs @@ -4,7 +4,7 @@ pub struct InterchainAccount { #[prost(message, optional, tag = "1")] pub base_account: ::core::option::Option< - super::super::super::super::cosmos::auth::v1beta1::BaseAccount, + ::cosmos_sdk_proto::cosmos::auth::v1beta1::BaseAccount, >, #[prost(string, tag = "2")] pub account_owner: ::prost::alloc::string::String, diff --git a/src/prost/ibc.applications.nft_transfer.v1.rs b/src/prost/ibc.applications.nft_transfer.v1.rs index bea5ee5a..479e0daf 100644 --- a/src/prost/ibc.applications.nft_transfer.v1.rs +++ b/src/prost/ibc.applications.nft_transfer.v1.rs @@ -602,7 +602,7 @@ pub struct QueryClassTracesRequest { /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest, >, } impl ::prost::Name for QueryClassTracesRequest { @@ -623,7 +623,7 @@ pub struct QueryClassTracesResponse { /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse, >, } impl ::prost::Name for QueryClassTracesResponse { diff --git a/src/prost/ibc.applications.transfer.v1.rs b/src/prost/ibc.applications.transfer.v1.rs index 70c3a6c7..10fea170 100644 --- a/src/prost/ibc.applications.transfer.v1.rs +++ b/src/prost/ibc.applications.transfer.v1.rs @@ -55,9 +55,7 @@ pub struct MsgTransfer { pub source_channel: ::prost::alloc::string::String, /// the tokens to be transferred #[prost(message, optional, tag = "3")] - pub token: ::core::option::Option< - super::super::super::super::cosmos::base::v1beta1::Coin, - >, + pub token: ::core::option::Option<::cosmos_sdk_proto::cosmos::base::v1beta1::Coin>, /// the sender address #[prost(string, tag = "4")] pub sender: ::prost::alloc::string::String, @@ -549,7 +547,7 @@ pub struct QueryDenomTracesRequest { /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest, >, } impl ::prost::Name for QueryDenomTracesRequest { @@ -570,7 +568,7 @@ pub struct QueryDenomTracesResponse { /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse, >, } impl ::prost::Name for QueryDenomTracesResponse { @@ -690,9 +688,7 @@ impl ::prost::Name for QueryTotalEscrowForDenomRequest { #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTotalEscrowForDenomResponse { #[prost(message, optional, tag = "1")] - pub amount: ::core::option::Option< - super::super::super::super::cosmos::base::v1beta1::Coin, - >, + pub amount: ::core::option::Option<::cosmos_sdk_proto::cosmos::base::v1beta1::Coin>, } impl ::prost::Name for QueryTotalEscrowForDenomResponse { const NAME: &'static str = "QueryTotalEscrowForDenomResponse"; @@ -1429,7 +1425,7 @@ pub struct Allocation { /// spend limitation on the channel #[prost(message, repeated, tag = "3")] pub spend_limit: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::base::v1beta1::Coin, + ::cosmos_sdk_proto::cosmos::base::v1beta1::Coin, >, /// allow list of receivers, an empty allow list permits any receiver address #[prost(string, repeated, tag = "4")] @@ -1476,7 +1472,7 @@ pub struct GenesisState { /// by the transfer module #[prost(message, repeated, tag = "4")] pub total_escrowed: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::base::v1beta1::Coin, + ::cosmos_sdk_proto::cosmos::base::v1beta1::Coin, >, } impl ::prost::Name for GenesisState { diff --git a/src/prost/ibc.core.channel.v1.rs b/src/prost/ibc.core.channel.v1.rs index 53c79e71..c0bb7156 100644 --- a/src/prost/ibc.core.channel.v1.rs +++ b/src/prost/ibc.core.channel.v1.rs @@ -2989,7 +2989,7 @@ pub struct QueryChannelsRequest { /// pagination request #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest, >, } impl ::prost::Name for QueryChannelsRequest { @@ -3009,7 +3009,7 @@ pub struct QueryChannelsResponse { /// pagination response #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse, >, /// query block height #[prost(message, optional, tag = "3")] @@ -3033,7 +3033,7 @@ pub struct QueryConnectionChannelsRequest { /// pagination request #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest, >, } impl ::prost::Name for QueryConnectionChannelsRequest { @@ -3054,7 +3054,7 @@ pub struct QueryConnectionChannelsResponse { /// pagination response #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse, >, /// query block height #[prost(message, optional, tag = "3")] @@ -3221,7 +3221,7 @@ pub struct QueryPacketCommitmentsRequest { /// pagination request #[prost(message, optional, tag = "3")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest, >, } impl ::prost::Name for QueryPacketCommitmentsRequest { @@ -3241,7 +3241,7 @@ pub struct QueryPacketCommitmentsResponse { /// pagination response #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse, >, /// query block height #[prost(message, optional, tag = "3")] @@ -3358,7 +3358,7 @@ pub struct QueryPacketAcknowledgementsRequest { /// pagination request #[prost(message, optional, tag = "3")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest, >, /// list of packet sequences #[prost(uint64, repeated, tag = "4")] @@ -3381,7 +3381,7 @@ pub struct QueryPacketAcknowledgementsResponse { /// pagination response #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse, >, /// query block height #[prost(message, optional, tag = "3")] diff --git a/src/prost/ibc.core.client.v1.rs b/src/prost/ibc.core.client.v1.rs index fc33ec80..43189fe9 100644 --- a/src/prost/ibc.core.client.v1.rs +++ b/src/prost/ibc.core.client.v1.rs @@ -150,9 +150,7 @@ pub struct UpgradeProposal { #[prost(string, tag = "2")] pub description: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] - pub plan: ::core::option::Option< - super::super::super::super::cosmos::upgrade::v1beta1::Plan, - >, + pub plan: ::core::option::Option<::cosmos_sdk_proto::cosmos::upgrade::v1beta1::Plan>, /// An UpgradedClientState must be provided to perform an IBC breaking upgrade. /// This will make the chain commit to the correct upgraded (self) client state /// before the upgrade occurs, so that connecting chains can verify that the @@ -432,9 +430,7 @@ impl ::prost::Name for MsgRecoverClientResponse { #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgIbcSoftwareUpgrade { #[prost(message, optional, tag = "1")] - pub plan: ::core::option::Option< - super::super::super::super::cosmos::upgrade::v1beta1::Plan, - >, + pub plan: ::core::option::Option<::cosmos_sdk_proto::cosmos::upgrade::v1beta1::Plan>, /// An UpgradedClientState must be provided to perform an IBC breaking upgrade. /// This will make the chain commit to the correct upgraded (self) client state /// before the upgrade occurs, so that connecting chains can verify that the @@ -1318,7 +1314,7 @@ pub struct QueryClientStatesRequest { /// pagination request #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest, >, } impl ::prost::Name for QueryClientStatesRequest { @@ -1339,7 +1335,7 @@ pub struct QueryClientStatesResponse { /// pagination response #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse, >, } impl ::prost::Name for QueryClientStatesResponse { @@ -1411,7 +1407,7 @@ pub struct QueryConsensusStatesRequest { /// pagination request #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest, >, } impl ::prost::Name for QueryConsensusStatesRequest { @@ -1432,7 +1428,7 @@ pub struct QueryConsensusStatesResponse { /// pagination response #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse, >, } impl ::prost::Name for QueryConsensusStatesResponse { @@ -1453,7 +1449,7 @@ pub struct QueryConsensusStateHeightsRequest { /// pagination request #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest, >, } impl ::prost::Name for QueryConsensusStateHeightsRequest { @@ -1474,7 +1470,7 @@ pub struct QueryConsensusStateHeightsResponse { /// pagination response #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse, >, } impl ::prost::Name for QueryConsensusStateHeightsResponse { diff --git a/src/prost/ibc.core.commitment.v1.rs b/src/prost/ibc.core.commitment.v1.rs index 3045d902..4d2a78a6 100644 --- a/src/prost/ibc.core.commitment.v1.rs +++ b/src/prost/ibc.core.commitment.v1.rs @@ -71,7 +71,7 @@ impl ::prost::Name for MerklePath { pub struct MerkleProof { #[prost(message, repeated, tag = "1")] pub proofs: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::ics23::v1::CommitmentProof, + ::cosmos_sdk_proto::cosmos::ics23::v1::CommitmentProof, >, } impl ::prost::Name for MerkleProof { diff --git a/src/prost/ibc.core.connection.v1.rs b/src/prost/ibc.core.connection.v1.rs index 01a54671..14c7efa8 100644 --- a/src/prost/ibc.core.connection.v1.rs +++ b/src/prost/ibc.core.connection.v1.rs @@ -1118,7 +1118,7 @@ impl ::prost::Name for QueryConnectionResponse { pub struct QueryConnectionsRequest { #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest, >, } impl ::prost::Name for QueryConnectionsRequest { @@ -1139,7 +1139,7 @@ pub struct QueryConnectionsResponse { /// pagination response #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + ::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse, >, /// query block height #[prost(message, optional, tag = "3")] diff --git a/src/prost/ibc.lightclients.tendermint.v1.rs b/src/prost/ibc.lightclients.tendermint.v1.rs index ff15fefe..66bd3a66 100644 --- a/src/prost/ibc.lightclients.tendermint.v1.rs +++ b/src/prost/ibc.lightclients.tendermint.v1.rs @@ -36,7 +36,7 @@ pub struct ClientState { /// Proof specifications used in verifying counterparty state #[prost(message, repeated, tag = "8")] pub proof_specs: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::ics23::v1::ProofSpec, + ::cosmos_sdk_proto::cosmos::ics23::v1::ProofSpec, >, /// Path at which next upgraded client will be committed. /// Each element corresponds to the key for a single CommitmentProof in the diff --git a/src/prost/interchain_security.ccv.provider.v1.rs b/src/prost/interchain_security.ccv.provider.v1.rs index f0561dee..a56a8e37 100644 --- a/src/prost/interchain_security.ccv.provider.v1.rs +++ b/src/prost/interchain_security.ccv.provider.v1.rs @@ -792,7 +792,7 @@ pub struct Params { /// The fee required to be paid to add a reward denom #[prost(message, optional, tag = "9")] pub consumer_reward_denom_registration_fee: ::core::option::Option< - super::super::super::super::cosmos::base::v1beta1::Coin, + ::cosmos_sdk_proto::cosmos::base::v1beta1::Coin, >, } impl ::prost::Name for Params { diff --git a/src/prost/interchain_security.ccv.v1.rs b/src/prost/interchain_security.ccv.v1.rs index c072c5f1..9e967c28 100644 --- a/src/prost/interchain_security.ccv.v1.rs +++ b/src/prost/interchain_security.ccv.v1.rs @@ -53,7 +53,7 @@ pub struct SlashPacketData { pub valset_update_id: u64, /// tell if the slashing is for a downtime or a double-signing infraction #[prost( - enumeration = "super::super::super::cosmos::staking::v1beta1::Infraction", + enumeration = "::cosmos_sdk_proto::cosmos::staking::v1beta1::Infraction", tag = "3" )] pub infraction: i32, diff --git a/src/prost/proto_descriptor.bin b/src/prost/proto_descriptor.bin index a785e760ead18d6b4b6a4979f2f22f4b319c2dc3..5ab6748a71d22db7b32a44283d26a3812bbf2887 100644 GIT binary patch delta 11856 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 C&ywi? delta 228211 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 diff --git a/tools/proto-compiler/src/cmd/compile.rs b/tools/proto-compiler/src/cmd/compile.rs index bb325564..e4d4a82a 100644 --- a/tools/proto-compiler/src/cmd/compile.rs +++ b/tools/proto-compiler/src/cmd/compile.rs @@ -13,10 +13,6 @@ pub struct CompileCmd { /// path to the IBC-Go proto files ibc: PathBuf, - #[argh(option, short = 's')] - /// path to the Cosmos SDK proto files - sdk: PathBuf, - #[argh(option, short = 'c')] /// path to the Cosmos ICS proto files ics: PathBuf, @@ -34,7 +30,6 @@ impl CompileCmd { pub fn run(&self) { Self::compile_ibc_protos( self.ibc.as_ref(), - self.sdk.as_ref(), self.ics.as_ref(), self.nft.as_ref(), self.out.as_ref(), @@ -59,7 +54,6 @@ impl CompileCmd { fn compile_ibc_protos( ibc_dir: &Path, - sdk_dir: &Path, ics_dir: &Path, nft_dir: &Path, out_dir: &Path, @@ -77,14 +71,6 @@ impl CompileCmd { root.join("../../definitions/ibc/lightclients/localhost/v1"), root.join("../../definitions/stride/interchainquery/v1"), ibc_dir.join("ibc"), - sdk_dir.join("cosmos/auth"), - sdk_dir.join("cosmos/gov"), - sdk_dir.join("cosmos/tx"), - sdk_dir.join("cosmos/base"), - sdk_dir.join("cosmos/crypto"), - sdk_dir.join("cosmos/bank"), - sdk_dir.join("cosmos/staking"), - sdk_dir.join("cosmos/upgrade"), ics_dir.join("interchain_security/ccv/v1"), ics_dir.join("interchain_security/ccv/provider"), ics_dir.join("interchain_security/ccv/consumer"), @@ -92,7 +78,6 @@ impl CompileCmd { ]; let proto_includes_paths = [ - sdk_dir.to_path_buf(), ibc_dir.to_path_buf(), ics_dir.to_path_buf(), nft_dir.to_path_buf(), @@ -105,6 +90,7 @@ impl CompileCmd { let mut protos: Vec = vec![]; for proto_path in &proto_paths { println!("Looking for proto files in '{}'", proto_path.display()); + protos.append( &mut WalkDir::new(proto_path) .into_iter() @@ -120,10 +106,12 @@ impl CompileCmd { } println!("Found the following protos:"); + // Show which protos will be compiled for proto in &protos { println!("\t-> {}", proto.display()); } + println!("[info ] Compiling.."); let attrs_jsonschema = r#"#[cfg_attr(all(feature = "json-schema", feature = "serde"), derive(::schemars::JsonSchema))]"#; @@ -155,7 +143,7 @@ impl CompileCmd { "::tendermint_proto::v0_34::abci::Event", ) .extern_path(".tendermint", "::tendermint_proto") - .extern_path(".ics23", "::ics23") + .extern_path(".cosmos", "::cosmos_sdk_proto::cosmos") .type_attribute(".google.protobuf.Any", attrs_eq) .type_attribute(".google.protobuf.Any", attrs_jsonschema) .type_attribute(".google.protobuf.Duration", attrs_eq) @@ -185,35 +173,22 @@ impl CompileCmd { } fn build_pbjson_impls(out_dir: &Path) -> Result<(), Box> { - println!("[info] Building pbjson Serialize, Deserialize impls..."); + println!("[info ] Building pbjson Serialize, Deserialize impls..."); + let descriptor_set_path = out_dir.join("proto_descriptor.bin"); let descriptor_set = std::fs::read(descriptor_set_path)?; pbjson_build::Builder::new() .register_descriptors(&descriptor_set)? - .out_dir(&out_dir) + .out_dir(out_dir) .exclude([ - // The validator patch is not compatible with protojson builds - ".cosmos.staking.v1beta1.StakeAuthorization", - ".cosmos.staking.v1beta1.ValidatorUpdates", - // TODO: These have dependencies on tendermint-proto, which does not implement protojson. - // After it's implemented there, we can delete these exclusions. - ".cosmos.base.abci.v1beta1", - ".cosmos.tx.v1beta1", - ".cosmos.base.tendermint.v1beta1", ".interchain_security.ccv.v1", ".interchain_security.ccv.provider.v1", ".interchain_security.ccv.consumer.v1", ".stride.interchainquery.v1", ]) .emit_fields() - .build(&[ - ".ibc", - ".cosmos", - ".interchain_security", - ".stride", - ".google", - ])?; + .build(&[".ibc", ".interchain_security", ".stride", ".google"])?; Ok(()) } @@ -225,18 +200,6 @@ impl CompileCmd { ); const PATCHES: &[(&str, &[(&str, &str)])] = &[ - ( - "cosmos.staking.v1beta1.rs", - &[ - ("pub struct Validators", "pub struct ValidatorsVec"), - ( - "impl ::prost::Name for Validators {", - "impl ::prost::Name for ValidatorsVec {", - ), - ("AllowList(Validators)", "AllowList(ValidatorsVec)"), - ("DenyList(Validators)", "DenyList(ValidatorsVec)"), - ], - ), ( "ibc.applications.transfer.v1.rs", &[( From 5cade7dffd092a6b741610442056b4310617eadc Mon Sep 17 00:00:00 2001 From: Romain Ruetschi <106849+romac@users.noreply.github.com> Date: Thu, 25 Jan 2024 14:13:40 +0100 Subject: [PATCH 02/11] Use our fork of `cosmos-sdk-proto` for now --- Cargo.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 2dc7e788..aa80438a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,7 +53,6 @@ default-features = false [dependencies.cosmos-sdk-proto] version = "0.20.0" -path = "../cosmos-rust/cosmos-sdk-proto" default-features = false [dev-dependencies] @@ -69,3 +68,6 @@ server = ["std", "dep:tonic", "tonic/codegen", "tonic/transport", "t parity-scale-codec = ["dep:parity-scale-codec", "dep:scale-info"] borsh = ["dep:borsh"] proto-descriptor = [] + +[patch.crates-io] +cosmos-sdk-proto = { git = "https://github.com/informalsystems/cosmos-rust", branch = "romac/extract-ibc-proto" } From ec34cab211cd493e47d6c01822325b6652fa1d48 Mon Sep 17 00:00:00 2001 From: Romain Ruetschi <106849+romac@users.noreply.github.com> Date: Thu, 25 Jan 2024 19:04:43 +0100 Subject: [PATCH 03/11] Enable `serde` feature on `cosmos-sdk-proto` when needed --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index aa80438a..70412701 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,7 +61,7 @@ serde_json = "1.0.107" [features] default = ["std", "client"] std = ["prost/std", "bytes/std", "subtle-encoding/std", "base64/std", "flex-error/std", "ics23/std", "informalsystems-pbjson/std"] -serde = ["dep:serde", "ics23/serde", "informalsystems-pbjson"] +serde = ["dep:serde", "dep:informalsystems-pbjson", "ics23/serde", "cosmos-sdk-proto/serde"] client = ["std", "dep:tonic", "tonic/codegen", "tonic/transport", "tonic/prost", "cosmos-sdk-proto/grpc-transport"] json-schema = ["std", "serde", "dep:schemars"] server = ["std", "dep:tonic", "tonic/codegen", "tonic/transport", "tonic/prost"] From c4ab3eb686c2920e48f2dee7225f1a708d63331b Mon Sep 17 00:00:00 2001 From: Romain Ruetschi <106849+romac@users.noreply.github.com> Date: Thu, 25 Jan 2024 19:04:51 +0100 Subject: [PATCH 04/11] Use patched `tendermint-proto` --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 70412701..d1a6a639 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,4 +70,5 @@ borsh = ["dep:borsh"] proto-descriptor = [] [patch.crates-io] +tendermint-proto = { git = "https://github.com/informalsystems/tendermint-rs", branch = "romac/missing-serde-proto" } cosmos-sdk-proto = { git = "https://github.com/informalsystems/cosmos-rust", branch = "romac/extract-ibc-proto" } From 1e4c7a3e717f542a78bbed1d56bc3c72981d4ecb Mon Sep 17 00:00:00 2001 From: Romain Ruetschi <106849+romac@users.noreply.github.com> Date: Fri, 26 Jan 2024 08:13:49 +0100 Subject: [PATCH 05/11] Setup protoc on CI --- .github/workflows/release.yml | 1 + .github/workflows/rust.yml | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cfbe4f93..254b3021 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: arduino/setup-protoc@v2 - uses: actions-rs/toolchain@v1 with: toolchain: stable diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f93962bb..e300391f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -48,6 +48,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: arduino/setup-protoc@v2 - uses: actions-rs/toolchain@v1 with: toolchain: stable @@ -63,6 +64,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: arduino/setup-protoc@v2 - uses: actions-rs/toolchain@v1 with: toolchain: stable @@ -78,6 +80,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: arduino/setup-protoc@v2 - uses: actions-rs/toolchain@v1 with: toolchain: stable @@ -92,6 +95,7 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v2 + - uses: arduino/setup-protoc@v2 - uses: actions-rs/toolchain@v1 with: toolchain: stable @@ -110,6 +114,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: arduino/setup-protoc@v2 - uses: actions-rs/toolchain@v1 with: toolchain: stable @@ -127,6 +132,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: arduino/setup-protoc@v2 - uses: actions-rs/toolchain@v1 with: toolchain: stable @@ -143,6 +149,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: arduino/setup-protoc@v2 - uses: actions-rs/toolchain@v1 with: toolchain: stable From c61fc22cb7251794e177822a950a87239782cef0 Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Wed, 4 Sep 2024 17:08:13 +0200 Subject: [PATCH 06/11] Enable `cosmos-sdk-proto/std` when `std` feature is enabled --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 0918e757..813d8870 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,7 +52,7 @@ serde_json = "1.0.107" [features] default = ["std", "client"] -std = ["prost/std", "bytes/std", "subtle-encoding/std", "base64/std", "flex-error/std", "ics23/std", "informalsystems-pbjson/std"] +std = ["cosmos-sdk-proto/std", "prost/std", "bytes/std", "subtle-encoding/std", "base64/std", "flex-error/std", "ics23/std", "informalsystems-pbjson/std"] serde = ["dep:serde", "dep:informalsystems-pbjson", "ics23/serde", "cosmos-sdk-proto/serde"] client = ["std", "dep:tonic", "tonic/codegen", "tonic/transport", "tonic/prost", "cosmos-sdk-proto/grpc-transport"] json-schema = ["std", "serde", "dep:schemars"] From 7f8d7650b834af65d3d08440687b97cf8d84cca3 Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Thu, 5 Sep 2024 21:07:22 +0200 Subject: [PATCH 07/11] Update to cosmos-sdk-proto v0.25.0-pre.1 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 813d8870..b49789fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,7 @@ version = "0.39" default-features = false [dependencies.cosmos-sdk-proto] -version = "0.25.0-pre.0" +version = "0.25.0-pre.1" default-features = false [dev-dependencies] From d3fc279e735ef0030dc355736198d8d2604e67c9 Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Tue, 10 Sep 2024 10:18:26 +0200 Subject: [PATCH 08/11] Update to cosmos-sdk-proto v0.25.0 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b49789fa..ae07abb8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,7 @@ version = "0.39" default-features = false [dependencies.cosmos-sdk-proto] -version = "0.25.0-pre.1" +version = "0.25.0" default-features = false [dev-dependencies] From f6d639668212fe6b8004e556e7e47a1c1b75ca58 Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Tue, 10 Sep 2024 10:20:34 +0200 Subject: [PATCH 09/11] Re-export ICS23 proto definitions from the `ics23` crate --- src/lib.rs | 3 +++ src/prost/ibc.core.commitment.v1.rs | 4 +--- src/prost/ibc.lightclients.tendermint.v1.rs | 4 +--- src/prost/proto_descriptor.bin | Bin 508441 -> 508489 bytes tools/proto-compiler/src/cmd/compile.rs | 4 +--- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ccf3a435..a3d7b552 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -44,6 +44,9 @@ pub const FILE_DESCRIPTOR_SET: &[u8] = include_bytes!("prost/proto_descriptor.bi // Re-export Cosmos SDK protos from the `cosmos_sdk_proto` crate pub use cosmos_sdk_proto::cosmos; +// Re-export the ICS23 proto from the `ics23` crate +pub use ics23; + pub mod ibc { #[deprecated(since = "0.15.0", note = "Use `ibc_proto::ibc::applications` instead")] pub mod apps { diff --git a/src/prost/ibc.core.commitment.v1.rs b/src/prost/ibc.core.commitment.v1.rs index 77d2ca9a..73e01a47 100644 --- a/src/prost/ibc.core.commitment.v1.rs +++ b/src/prost/ibc.core.commitment.v1.rs @@ -80,9 +80,7 @@ impl ::prost::Name for MerklePath { #[derive(Clone, PartialEq, ::prost::Message)] pub struct MerkleProof { #[prost(message, repeated, tag = "1")] - pub proofs: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::ics23::v1::CommitmentProof, - >, + pub proofs: ::prost::alloc::vec::Vec<::ics23::CommitmentProof>, } impl ::prost::Name for MerkleProof { const NAME: &'static str = "MerkleProof"; diff --git a/src/prost/ibc.lightclients.tendermint.v1.rs b/src/prost/ibc.lightclients.tendermint.v1.rs index b58c0e12..5ba8be8f 100644 --- a/src/prost/ibc.lightclients.tendermint.v1.rs +++ b/src/prost/ibc.lightclients.tendermint.v1.rs @@ -36,9 +36,7 @@ pub struct ClientState { >, /// Proof specifications used in verifying counterparty state #[prost(message, repeated, tag = "8")] - pub proof_specs: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::ics23::v1::ProofSpec, - >, + pub proof_specs: ::prost::alloc::vec::Vec<::ics23::ProofSpec>, /// Path at which next upgraded client will be committed. /// Each element corresponds to the key for a single CommitmentProof in the /// chained proof. NOTE: ClientState must stored under diff --git a/src/prost/proto_descriptor.bin b/src/prost/proto_descriptor.bin index 84bf38910c6f6098b6194d8560d2dcc3437d8fd4..a44e59cf1cb4c6496e876d7941877061e15b4c38 100644 GIT binary patch delta 10271 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 B!ju32 delta 10203 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 diff --git a/tools/proto-compiler/src/cmd/compile.rs b/tools/proto-compiler/src/cmd/compile.rs index 6c44fb0c..264dc7be 100644 --- a/tools/proto-compiler/src/cmd/compile.rs +++ b/tools/proto-compiler/src/cmd/compile.rs @@ -116,9 +116,7 @@ impl CompileCmd { let attrs_jsonschema = r#"#[cfg_attr(all(feature = "json-schema", feature = "serde"), derive(::schemars::JsonSchema))]"#; let attrs_jsonschema_str = r#"#[cfg_attr(all(feature = "json-schema", feature = "serde"), schemars(with = "String"))]"#; - let attrs_ord = "#[derive(Eq, PartialOrd, Ord)]"; - let attrs_eq = "#[derive(Eq)]"; // Automatically derive a `prost::Name` implementation. let mut config = prost_build::Config::new(); @@ -143,7 +141,7 @@ impl CompileCmd { "::tendermint_proto::v0_34::abci::Event", ) .extern_path(".tendermint", "::tendermint_proto") - .extern_path(".ics23", "::ics23") + .extern_path(".cosmos.ics23.v1", "::ics23") .extern_path(".google.protobuf", "::tendermint_proto::google::protobuf") .type_attribute(".ibc.core.client.v1.Height", attrs_ord) .type_attribute(".ibc.core.client.v1.Height", attrs_jsonschema) From b4c99c8bbf222e90b213e7be2d83ec16adf4f129 Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Fri, 13 Sep 2024 08:56:56 +0200 Subject: [PATCH 10/11] Remove leftover Cosmos SDK protos --- scripts/sync-protobuf.sh | 9 +- src/prost/cosmos.auth.v1beta1.rs | 96 ---- src/prost/cosmos.base.query.v1beta1.rs | 77 --- src/prost/cosmos.base.v1beta1.rs | 45 -- src/prost/cosmos.staking.v1beta1.rs | 622 ------------------------- src/prost/cosmos.upgrade.v1beta1.rs | 120 ----- src/prost/cosmos_proto.rs | 94 ---- 7 files changed, 7 insertions(+), 1056 deletions(-) delete mode 100644 src/prost/cosmos.auth.v1beta1.rs delete mode 100644 src/prost/cosmos.base.query.v1beta1.rs delete mode 100644 src/prost/cosmos.base.v1beta1.rs delete mode 100644 src/prost/cosmos.staking.v1beta1.rs delete mode 100644 src/prost/cosmos.upgrade.v1beta1.rs delete mode 100644 src/prost/cosmos_proto.rs diff --git a/scripts/sync-protobuf.sh b/scripts/sync-protobuf.sh index 3668c93b..b3e91d04 100755 --- a/scripts/sync-protobuf.sh +++ b/scripts/sync-protobuf.sh @@ -156,9 +156,14 @@ cd ../.. # we instead re-exports the `ics23` crate type definitions. rm -f src/prost/cosmos.ics23.v1.rs -# Remove `cosmos.base.store` module as it does not compile -# out of the box and we do not have a use for it at the moment. +# Remove leftover Cosmos SDK modules. rm -f src/prost/cosmos.base.store.v1beta1.rs +rm -f src/prost/cosmos.auth.v1beta1.rs +rm -f src/prost/cosmos.base.query.v1beta1.rs +rm -f src/prost/cosmos.base.v1beta1.rs +rm -f src/prost/cosmos.staking.v1beta1.rs +rm -f src/prost/cosmos.upgrade.v1beta1.rs +rm -f src/prost/cosmos_proto.rs # The Tendermint ABCI protos are unused from within ibc-proto rm -f src/prost/tendermint.abci.rs diff --git a/src/prost/cosmos.auth.v1beta1.rs b/src/prost/cosmos.auth.v1beta1.rs deleted file mode 100644 index d070c757..00000000 --- a/src/prost/cosmos.auth.v1beta1.rs +++ /dev/null @@ -1,96 +0,0 @@ -// This file is @generated by prost-build. -/// 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<::tendermint_proto::google::protobuf::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 { - "cosmos.auth.v1beta1.BaseAccount".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.auth.v1beta1.BaseAccount".into() - } -} -/// 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 { - "cosmos.auth.v1beta1.ModuleAccount".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.auth.v1beta1.ModuleAccount".into() - } -} -/// 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 { - "cosmos.auth.v1beta1.ModuleCredential".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.auth.v1beta1.ModuleCredential".into() - } -} -/// Params defines the parameters for the auth module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, Copy, 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 { - "cosmos.auth.v1beta1.Params".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.auth.v1beta1.Params".into() - } -} diff --git a/src/prost/cosmos.base.query.v1beta1.rs b/src/prost/cosmos.base.query.v1beta1.rs deleted file mode 100644 index dc11f529..00000000 --- a/src/prost/cosmos.base.query.v1beta1.rs +++ /dev/null @@ -1,77 +0,0 @@ -// This file is @generated by prost-build. -/// PageRequest is to be embedded in gRPC request messages for efficient -/// pagination. Ex: -/// -/// message SomeRequest { -/// Foo some_parameter = 1; -/// PageRequest pagination = 2; -/// } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PageRequest { - /// key is a value returned in PageResponse.next_key to begin - /// querying the next page most efficiently. Only one of offset or key - /// should be set. - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, - /// offset is a numeric offset that can be used when key is unavailable. - /// It is less efficient than using key. Only one of offset or key should - /// be set. - #[prost(uint64, tag = "2")] - pub offset: 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 = "3")] - pub limit: u64, - /// count_total is set to true to indicate that the result set should include - /// a count of the total number of items available for pagination in UIs. - /// count_total is only respected when offset is used. It is ignored when key - /// is set. - #[prost(bool, tag = "4")] - pub count_total: bool, - /// reverse is set to true if results are to be returned in the descending order. - /// - /// Since: cosmos-sdk 0.43 - #[prost(bool, tag = "5")] - pub reverse: bool, -} -impl ::prost::Name for PageRequest { - const NAME: &'static str = "PageRequest"; - const PACKAGE: &'static str = "cosmos.base.query.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.base.query.v1beta1.PageRequest".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.base.query.v1beta1.PageRequest".into() - } -} -/// PageResponse is to be embedded in gRPC response messages where the -/// corresponding request message has used PageRequest. -/// -/// message SomeResponse { -/// repeated Bar results = 1; -/// PageResponse page = 2; -/// } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PageResponse { - /// next_key is the key to be passed to PageRequest.key to - /// query the next page most efficiently. It will be empty if - /// there are no more results. - #[prost(bytes = "vec", tag = "1")] - pub next_key: ::prost::alloc::vec::Vec, - /// total is total number of results available if PageRequest.count_total - /// was set, its value is undefined otherwise - #[prost(uint64, tag = "2")] - pub total: u64, -} -impl ::prost::Name for PageResponse { - const NAME: &'static str = "PageResponse"; - const PACKAGE: &'static str = "cosmos.base.query.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.base.query.v1beta1.PageResponse".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.base.query.v1beta1.PageResponse".into() - } -} diff --git a/src/prost/cosmos.base.v1beta1.rs b/src/prost/cosmos.base.v1beta1.rs deleted file mode 100644 index c4cef79c..00000000 --- a/src/prost/cosmos.base.v1beta1.rs +++ /dev/null @@ -1,45 +0,0 @@ -// This file is @generated by prost-build. -/// Coin defines a token with a denomination and an amount. -/// -/// NOTE: The amount field is an Int which implements the custom method -/// signatures required by gogoproto. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Coin { - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub amount: ::prost::alloc::string::String, -} -impl ::prost::Name for Coin { - const NAME: &'static str = "Coin"; - const PACKAGE: &'static str = "cosmos.base.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.base.v1beta1.Coin".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.base.v1beta1.Coin".into() - } -} -/// DecCoin defines a token with a denomination and a decimal amount. -/// -/// NOTE: The amount field is an Dec which implements the custom method -/// signatures required by gogoproto. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DecCoin { - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub amount: ::prost::alloc::string::String, -} -impl ::prost::Name for DecCoin { - const NAME: &'static str = "DecCoin"; - const PACKAGE: &'static str = "cosmos.base.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.base.v1beta1.DecCoin".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.base.v1beta1.DecCoin".into() - } -} diff --git a/src/prost/cosmos.staking.v1beta1.rs b/src/prost/cosmos.staking.v1beta1.rs deleted file mode 100644 index 8bdf28bc..00000000 --- a/src/prost/cosmos.staking.v1beta1.rs +++ /dev/null @@ -1,622 +0,0 @@ -// This file is @generated by prost-build. -/// HistoricalInfo contains header and validator information for a given block. -/// It is stored as part of staking module's state, which persists the `n` most -/// recent HistoricalInfo -/// (`n` is set by the staking module's `historical_entries` parameter). -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct HistoricalInfo { - #[prost(message, optional, tag = "1")] - pub header: ::core::option::Option<::tendermint_proto::types::Header>, - #[prost(message, repeated, tag = "2")] - pub valset: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for HistoricalInfo { - const NAME: &'static str = "HistoricalInfo"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.HistoricalInfo".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.HistoricalInfo".into() - } -} -/// CommissionRates defines the initial commission rates to be used for creating -/// a validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CommissionRates { - /// rate is the commission rate charged to delegators, as a fraction. - #[prost(string, tag = "1")] - pub rate: ::prost::alloc::string::String, - /// max_rate defines the maximum commission rate which validator can ever charge, as a fraction. - #[prost(string, tag = "2")] - pub max_rate: ::prost::alloc::string::String, - /// max_change_rate defines the maximum daily increase of the validator commission, as a fraction. - #[prost(string, tag = "3")] - pub max_change_rate: ::prost::alloc::string::String, -} -impl ::prost::Name for CommissionRates { - const NAME: &'static str = "CommissionRates"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.CommissionRates".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.CommissionRates".into() - } -} -/// Commission defines commission parameters for a given validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Commission { - /// commission_rates defines the initial commission rates to be used for creating a validator. - #[prost(message, optional, tag = "1")] - pub commission_rates: ::core::option::Option, - /// update_time is the last time the commission rate was changed. - #[prost(message, optional, tag = "2")] - pub update_time: ::core::option::Option< - ::tendermint_proto::google::protobuf::Timestamp, - >, -} -impl ::prost::Name for Commission { - const NAME: &'static str = "Commission"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.Commission".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.Commission".into() - } -} -/// Description defines a validator description. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Description { - /// moniker defines a human-readable name for the validator. - #[prost(string, tag = "1")] - pub moniker: ::prost::alloc::string::String, - /// identity defines an optional identity signature (ex. UPort or Keybase). - #[prost(string, tag = "2")] - pub identity: ::prost::alloc::string::String, - /// website defines an optional website link. - #[prost(string, tag = "3")] - pub website: ::prost::alloc::string::String, - /// security_contact defines an optional email for security contact. - #[prost(string, tag = "4")] - pub security_contact: ::prost::alloc::string::String, - /// details define other optional details. - #[prost(string, tag = "5")] - pub details: ::prost::alloc::string::String, -} -impl ::prost::Name for Description { - const NAME: &'static str = "Description"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.Description".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.Description".into() - } -} -/// Validator defines a validator, together with the total amount of the -/// Validator's bond shares and their exchange rate to coins. Slashing results in -/// a decrease in the exchange rate, allowing correct calculation of future -/// undelegations without iterating over delegators. When coins are delegated to -/// this validator, the validator is credited with a delegation whose number of -/// bond shares is based on the amount of coins delegated divided by the current -/// exchange rate. Voting power can be calculated as total bonded shares -/// multiplied by exchange rate. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Validator { - /// operator_address defines the address of the validator's operator; bech encoded in JSON. - #[prost(string, tag = "1")] - pub operator_address: ::prost::alloc::string::String, - /// consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. - #[prost(message, optional, tag = "2")] - pub consensus_pubkey: ::core::option::Option< - ::tendermint_proto::google::protobuf::Any, - >, - /// jailed defined whether the validator has been jailed from bonded status or not. - #[prost(bool, tag = "3")] - pub jailed: bool, - /// status is the validator status (bonded/unbonding/unbonded). - #[prost(enumeration = "BondStatus", tag = "4")] - pub status: i32, - /// tokens define the delegated tokens (incl. self-delegation). - #[prost(string, tag = "5")] - pub tokens: ::prost::alloc::string::String, - /// delegator_shares defines total shares issued to a validator's delegators. - #[prost(string, tag = "6")] - pub delegator_shares: ::prost::alloc::string::String, - /// description defines the description terms for the validator. - #[prost(message, optional, tag = "7")] - pub description: ::core::option::Option, - /// unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. - #[prost(int64, tag = "8")] - pub unbonding_height: i64, - /// unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. - #[prost(message, optional, tag = "9")] - pub unbonding_time: ::core::option::Option< - ::tendermint_proto::google::protobuf::Timestamp, - >, - /// commission defines the commission parameters. - #[prost(message, optional, tag = "10")] - pub commission: ::core::option::Option, - /// min_self_delegation is the validator's self declared minimum self delegation. - /// - /// Since: cosmos-sdk 0.46 - #[prost(string, tag = "11")] - pub min_self_delegation: ::prost::alloc::string::String, - /// strictly positive if this validator's unbonding has been stopped by external modules - #[prost(int64, tag = "12")] - pub unbonding_on_hold_ref_count: i64, - /// list of unbonding ids, each uniquely identifing an unbonding of this validator - #[prost(uint64, repeated, tag = "13")] - pub unbonding_ids: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Validator { - const NAME: &'static str = "Validator"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.Validator".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.Validator".into() - } -} -/// ValAddresses defines a repeated set of validator addresses. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValAddresses { - #[prost(string, repeated, tag = "1")] - pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for ValAddresses { - const NAME: &'static str = "ValAddresses"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.ValAddresses".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.ValAddresses".into() - } -} -/// DVPair is struct that just has a delegator-validator pair with no other data. -/// It is intended to be used as a marshalable pointer. For example, a DVPair can -/// be used to construct the key to getting an UnbondingDelegation from state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DvPair { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, -} -impl ::prost::Name for DvPair { - const NAME: &'static str = "DVPair"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.DVPair".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.DVPair".into() - } -} -/// DVPairs defines an array of DVPair objects. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DvPairs { - #[prost(message, repeated, tag = "1")] - pub pairs: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for DvPairs { - const NAME: &'static str = "DVPairs"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.DVPairs".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.DVPairs".into() - } -} -/// DVVTriplet is struct that just has a delegator-validator-validator triplet -/// with no other data. It is intended to be used as a marshalable pointer. For -/// example, a DVVTriplet can be used to construct the key to getting a -/// Redelegation from state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DvvTriplet { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_src_address: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub validator_dst_address: ::prost::alloc::string::String, -} -impl ::prost::Name for DvvTriplet { - const NAME: &'static str = "DVVTriplet"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.DVVTriplet".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.DVVTriplet".into() - } -} -/// DVVTriplets defines an array of DVVTriplet objects. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DvvTriplets { - #[prost(message, repeated, tag = "1")] - pub triplets: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for DvvTriplets { - const NAME: &'static str = "DVVTriplets"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.DVVTriplets".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.DVVTriplets".into() - } -} -/// Delegation represents the bond with tokens held by an account. It is -/// owned by one delegator, and is associated with the voting power of one -/// validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Delegation { - /// delegator_address is the bech32-encoded address of the delegator. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - /// validator_address is the bech32-encoded address of the validator. - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// shares define the delegation shares received. - #[prost(string, tag = "3")] - pub shares: ::prost::alloc::string::String, -} -impl ::prost::Name for Delegation { - const NAME: &'static str = "Delegation"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.Delegation".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.Delegation".into() - } -} -/// UnbondingDelegation stores all of a single delegator's unbonding bonds -/// for a single validator in an time-ordered list. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UnbondingDelegation { - /// delegator_address is the bech32-encoded address of the delegator. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - /// validator_address is the bech32-encoded address of the validator. - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// entries are the unbonding delegation entries. - /// - /// unbonding delegation entries - #[prost(message, repeated, tag = "3")] - pub entries: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for UnbondingDelegation { - const NAME: &'static str = "UnbondingDelegation"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.UnbondingDelegation".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.UnbondingDelegation".into() - } -} -/// UnbondingDelegationEntry defines an unbonding object with relevant metadata. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UnbondingDelegationEntry { - /// creation_height is the height which the unbonding took place. - #[prost(int64, tag = "1")] - pub creation_height: i64, - /// completion_time is the unix time for unbonding completion. - #[prost(message, optional, tag = "2")] - pub completion_time: ::core::option::Option< - ::tendermint_proto::google::protobuf::Timestamp, - >, - /// initial_balance defines the tokens initially scheduled to receive at completion. - #[prost(string, tag = "3")] - pub initial_balance: ::prost::alloc::string::String, - /// balance defines the tokens to receive at completion. - #[prost(string, tag = "4")] - pub balance: ::prost::alloc::string::String, - /// Incrementing id that uniquely identifies this entry - #[prost(uint64, tag = "5")] - pub unbonding_id: u64, - /// Strictly positive if this entry's unbonding has been stopped by external modules - #[prost(int64, tag = "6")] - pub unbonding_on_hold_ref_count: i64, -} -impl ::prost::Name for UnbondingDelegationEntry { - const NAME: &'static str = "UnbondingDelegationEntry"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.UnbondingDelegationEntry".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.UnbondingDelegationEntry".into() - } -} -/// RedelegationEntry defines a redelegation object with relevant metadata. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct RedelegationEntry { - /// creation_height defines the height which the redelegation took place. - #[prost(int64, tag = "1")] - pub creation_height: i64, - /// completion_time defines the unix time for redelegation completion. - #[prost(message, optional, tag = "2")] - pub completion_time: ::core::option::Option< - ::tendermint_proto::google::protobuf::Timestamp, - >, - /// initial_balance defines the initial balance when redelegation started. - #[prost(string, tag = "3")] - pub initial_balance: ::prost::alloc::string::String, - /// shares_dst is the amount of destination-validator shares created by redelegation. - #[prost(string, tag = "4")] - pub shares_dst: ::prost::alloc::string::String, - /// Incrementing id that uniquely identifies this entry - #[prost(uint64, tag = "5")] - pub unbonding_id: u64, - /// Strictly positive if this entry's unbonding has been stopped by external modules - #[prost(int64, tag = "6")] - pub unbonding_on_hold_ref_count: i64, -} -impl ::prost::Name for RedelegationEntry { - const NAME: &'static str = "RedelegationEntry"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.RedelegationEntry".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.RedelegationEntry".into() - } -} -/// Redelegation contains the list of a particular delegator's redelegating bonds -/// from a particular source validator to a particular destination validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Redelegation { - /// delegator_address is the bech32-encoded address of the delegator. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - /// validator_src_address is the validator redelegation source operator address. - #[prost(string, tag = "2")] - pub validator_src_address: ::prost::alloc::string::String, - /// validator_dst_address is the validator redelegation destination operator address. - #[prost(string, tag = "3")] - pub validator_dst_address: ::prost::alloc::string::String, - /// entries are the redelegation entries. - /// - /// redelegation entries - #[prost(message, repeated, tag = "4")] - pub entries: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Redelegation { - const NAME: &'static str = "Redelegation"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.Redelegation".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.Redelegation".into() - } -} -/// Params defines the parameters for the x/staking module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// unbonding_time is the time duration of unbonding. - #[prost(message, optional, tag = "1")] - pub unbonding_time: ::core::option::Option< - ::tendermint_proto::google::protobuf::Duration, - >, - /// max_validators is the maximum number of validators. - #[prost(uint32, tag = "2")] - pub max_validators: u32, - /// max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). - #[prost(uint32, tag = "3")] - pub max_entries: u32, - /// historical_entries is the number of historical entries to persist. - #[prost(uint32, tag = "4")] - pub historical_entries: u32, - /// bond_denom defines the bondable coin denomination. - #[prost(string, tag = "5")] - pub bond_denom: ::prost::alloc::string::String, - /// min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators - #[prost(string, tag = "6")] - pub min_commission_rate: ::prost::alloc::string::String, -} -impl ::prost::Name for Params { - const NAME: &'static str = "Params"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.Params".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.Params".into() - } -} -/// DelegationResponse is equivalent to Delegation except that it contains a -/// balance in addition to shares which is more suitable for client responses. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DelegationResponse { - #[prost(message, optional, tag = "1")] - pub delegation: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub balance: ::core::option::Option, -} -impl ::prost::Name for DelegationResponse { - const NAME: &'static str = "DelegationResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.DelegationResponse".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.DelegationResponse".into() - } -} -/// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it -/// contains a balance in addition to shares which is more suitable for client -/// responses. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct RedelegationEntryResponse { - #[prost(message, optional, tag = "1")] - pub redelegation_entry: ::core::option::Option, - #[prost(string, tag = "4")] - pub balance: ::prost::alloc::string::String, -} -impl ::prost::Name for RedelegationEntryResponse { - const NAME: &'static str = "RedelegationEntryResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.RedelegationEntryResponse".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.RedelegationEntryResponse".into() - } -} -/// RedelegationResponse is equivalent to a Redelegation except that its entries -/// contain a balance in addition to shares which is more suitable for client -/// responses. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct RedelegationResponse { - #[prost(message, optional, tag = "1")] - pub redelegation: ::core::option::Option, - #[prost(message, repeated, tag = "2")] - pub entries: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for RedelegationResponse { - const NAME: &'static str = "RedelegationResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.RedelegationResponse".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.RedelegationResponse".into() - } -} -/// Pool is used for tracking bonded and not-bonded token supply of the bond -/// denomination. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Pool { - #[prost(string, tag = "1")] - pub not_bonded_tokens: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub bonded_tokens: ::prost::alloc::string::String, -} -impl ::prost::Name for Pool { - const NAME: &'static str = "Pool"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.Pool".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.Pool".into() - } -} -/// ValidatorUpdates defines an array of abci.ValidatorUpdate objects. -/// TODO: explore moving this to proto/cosmos/base to separate modules from tendermint dependence -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorUpdates { - #[prost(message, repeated, tag = "1")] - pub updates: ::prost::alloc::vec::Vec<::tendermint_proto::abci::ValidatorUpdate>, -} -impl ::prost::Name for ValidatorUpdates { - const NAME: &'static str = "ValidatorUpdates"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.staking.v1beta1.ValidatorUpdates".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.staking.v1beta1.ValidatorUpdates".into() - } -} -/// BondStatus is the status of a validator. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum BondStatus { - /// UNSPECIFIED defines an invalid validator status. - Unspecified = 0, - /// UNBONDED defines a validator that is not bonded. - Unbonded = 1, - /// UNBONDING defines a validator that is unbonding. - Unbonding = 2, - /// BONDED defines a validator that is bonded. - Bonded = 3, -} -impl BondStatus { - /// 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 { - BondStatus::Unspecified => "BOND_STATUS_UNSPECIFIED", - BondStatus::Unbonded => "BOND_STATUS_UNBONDED", - BondStatus::Unbonding => "BOND_STATUS_UNBONDING", - BondStatus::Bonded => "BOND_STATUS_BONDED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "BOND_STATUS_UNSPECIFIED" => Some(Self::Unspecified), - "BOND_STATUS_UNBONDED" => Some(Self::Unbonded), - "BOND_STATUS_UNBONDING" => Some(Self::Unbonding), - "BOND_STATUS_BONDED" => Some(Self::Bonded), - _ => None, - } - } -} -/// Infraction indicates the infraction a validator commited. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum Infraction { - /// UNSPECIFIED defines an empty infraction. - Unspecified = 0, - /// DOUBLE_SIGN defines a validator that double-signs a block. - DoubleSign = 1, - /// DOWNTIME defines a validator that missed signing too many blocks. - Downtime = 2, -} -impl Infraction { - /// 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 { - Infraction::Unspecified => "INFRACTION_UNSPECIFIED", - Infraction::DoubleSign => "INFRACTION_DOUBLE_SIGN", - Infraction::Downtime => "INFRACTION_DOWNTIME", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "INFRACTION_UNSPECIFIED" => Some(Self::Unspecified), - "INFRACTION_DOUBLE_SIGN" => Some(Self::DoubleSign), - "INFRACTION_DOWNTIME" => Some(Self::Downtime), - _ => None, - } - } -} diff --git a/src/prost/cosmos.upgrade.v1beta1.rs b/src/prost/cosmos.upgrade.v1beta1.rs deleted file mode 100644 index 039a4615..00000000 --- a/src/prost/cosmos.upgrade.v1beta1.rs +++ /dev/null @@ -1,120 +0,0 @@ -// This file is @generated by prost-build. -/// Plan specifies information about a planned upgrade and when it should occur. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Plan { - /// Sets the name for the upgrade. This name will be used by the upgraded - /// version of the software to apply any special "on-upgrade" commands during - /// the first BeginBlock method after the upgrade is applied. It is also used - /// to detect whether a software version can handle a given upgrade. If no - /// upgrade handler with this name has been set in the software, it will be - /// assumed that the software is out-of-date when the upgrade Time or Height is - /// reached and the software will exit. - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// Deprecated: Time based upgrades have been deprecated. Time based upgrade logic - /// has been removed from the SDK. - /// If this field is not empty, an error will be thrown. - #[deprecated] - #[prost(message, optional, tag = "2")] - pub time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, - /// The height at which the upgrade must be performed. - #[prost(int64, tag = "3")] - pub height: i64, - /// Any application specific upgrade info to be included on-chain - /// such as a git commit that validators could automatically upgrade to - #[prost(string, tag = "4")] - pub info: ::prost::alloc::string::String, - /// Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been - /// moved to the IBC module in the sub module 02-client. - /// If this field is not empty, an error will be thrown. - #[deprecated] - #[prost(message, optional, tag = "5")] - pub upgraded_client_state: ::core::option::Option< - ::tendermint_proto::google::protobuf::Any, - >, -} -impl ::prost::Name for Plan { - const NAME: &'static str = "Plan"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.upgrade.v1beta1.Plan".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.upgrade.v1beta1.Plan".into() - } -} -/// SoftwareUpgradeProposal is a gov Content type for initiating a software -/// upgrade. -/// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov -/// proposals, see MsgSoftwareUpgrade. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SoftwareUpgradeProposal { - /// title of the proposal - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// description of the proposal - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// plan of the proposal - #[prost(message, optional, tag = "3")] - pub plan: ::core::option::Option, -} -impl ::prost::Name for SoftwareUpgradeProposal { - const NAME: &'static str = "SoftwareUpgradeProposal"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal".into() - } -} -/// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software -/// upgrade. -/// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov -/// proposals, see MsgCancelUpgrade. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CancelSoftwareUpgradeProposal { - /// title of the proposal - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// description of the proposal - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, -} -impl ::prost::Name for CancelSoftwareUpgradeProposal { - const NAME: &'static str = "CancelSoftwareUpgradeProposal"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal".into() - } -} -/// ModuleVersion specifies a module and its consensus version. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ModuleVersion { - /// name of the app module - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// consensus version of the app module - #[prost(uint64, tag = "2")] - pub version: u64, -} -impl ::prost::Name for ModuleVersion { - const NAME: &'static str = "ModuleVersion"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos.upgrade.v1beta1.ModuleVersion".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos.upgrade.v1beta1.ModuleVersion".into() - } -} diff --git a/src/prost/cosmos_proto.rs b/src/prost/cosmos_proto.rs deleted file mode 100644 index e45172e7..00000000 --- a/src/prost/cosmos_proto.rs +++ /dev/null @@ -1,94 +0,0 @@ -// This file is @generated by prost-build. -/// InterfaceDescriptor describes an interface type to be used with -/// accepts_interface and implements_interface and declared by declare_interface. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InterfaceDescriptor { - /// name is the name of the interface. It should be a short-name (without - /// a period) such that the fully qualified name of the interface will be - /// package.name, ex. for the package a.b and interface named C, the - /// fully-qualified name will be a.b.C. - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// description is a human-readable description of the interface and its - /// purpose. - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, -} -impl ::prost::Name for InterfaceDescriptor { - const NAME: &'static str = "InterfaceDescriptor"; - const PACKAGE: &'static str = "cosmos_proto"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos_proto.InterfaceDescriptor".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos_proto.InterfaceDescriptor".into() - } -} -/// ScalarDescriptor describes an scalar type to be used with -/// the scalar field option and declared by declare_scalar. -/// Scalars extend simple protobuf built-in types with additional -/// syntax and semantics, for instance to represent big integers. -/// Scalars should ideally define an encoding such that there is only one -/// valid syntactical representation for a given semantic meaning, -/// i.e. the encoding should be deterministic. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ScalarDescriptor { - /// name is the name of the scalar. It should be a short-name (without - /// a period) such that the fully qualified name of the scalar will be - /// package.name, ex. for the package a.b and scalar named C, the - /// fully-qualified name will be a.b.C. - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// description is a human-readable description of the scalar and its - /// encoding format. For instance a big integer or decimal scalar should - /// specify precisely the expected encoding format. - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// field_type is the type of field with which this scalar can be used. - /// Scalars can be used with one and only one type of field so that - /// encoding standards and simple and clear. Currently only string and - /// bytes fields are supported for scalars. - #[prost(enumeration = "ScalarType", repeated, tag = "3")] - pub field_type: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for ScalarDescriptor { - const NAME: &'static str = "ScalarDescriptor"; - const PACKAGE: &'static str = "cosmos_proto"; - fn full_name() -> ::prost::alloc::string::String { - "cosmos_proto.ScalarDescriptor".into() - } - fn type_url() -> ::prost::alloc::string::String { - "/cosmos_proto.ScalarDescriptor".into() - } -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum ScalarType { - Unspecified = 0, - String = 1, - Bytes = 2, -} -impl ScalarType { - /// 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 { - ScalarType::Unspecified => "SCALAR_TYPE_UNSPECIFIED", - ScalarType::String => "SCALAR_TYPE_STRING", - ScalarType::Bytes => "SCALAR_TYPE_BYTES", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "SCALAR_TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "SCALAR_TYPE_STRING" => Some(Self::String), - "SCALAR_TYPE_BYTES" => Some(Self::Bytes), - _ => None, - } - } -} From b40ecf62de1fc43bd09ceaada11d975bb800d90d Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Fri, 13 Sep 2024 09:13:25 +0200 Subject: [PATCH 11/11] Add changelog entry --- .changelog/unreleased/breaking-changes/187-cosmos-sdk-proto.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/unreleased/breaking-changes/187-cosmos-sdk-proto.md diff --git a/.changelog/unreleased/breaking-changes/187-cosmos-sdk-proto.md b/.changelog/unreleased/breaking-changes/187-cosmos-sdk-proto.md new file mode 100644 index 00000000..8536f255 --- /dev/null +++ b/.changelog/unreleased/breaking-changes/187-cosmos-sdk-proto.md @@ -0,0 +1,3 @@ +- Cosmos SDK protos are now re-exported from the `cosmos_sdk_proto` + crate instead of being generated as part of `ibc-proto` + ([\#187](https://github.com/cosmos/ibc-proto-rs/pull/187)) \ No newline at end of file