From 074033cb55b25c82b986ff1c4f18b05b0090ffd9 Mon Sep 17 00:00:00 2001 From: Davirain Date: Mon, 8 May 2023 17:06:52 +0800 Subject: [PATCH 01/12] remove cosmos-sdk-proto --- .gitmodules | 9 - cosmos-sdk-go | 1 - cosmos-sdk-proto/CHANGELOG.md | 251 --- cosmos-sdk-proto/Cargo.toml | 34 - cosmos-sdk-proto/README.md | 38 - cosmos-sdk-proto/src/lib.rs | 340 ---- .../src/prost/cosmos-sdk/COSMOS_SDK_COMMIT | 1 - .../cosmos-sdk/cosmos.app.module.v1alpha1.rs | 5 - .../prost/cosmos-sdk/cosmos.app.v1alpha1.rs | 123 -- .../cosmos-sdk/cosmos.app.v1alpha1.tonic.rs | 230 --- .../prost/cosmos-sdk/cosmos.auth.v1beta1.rs | 185 -- .../cosmos-sdk/cosmos.auth.v1beta1.tonic.rs | 640 ------ .../prost/cosmos-sdk/cosmos.authz.v1beta1.rs | 184 -- .../cosmos-sdk/cosmos.authz.v1beta1.tonic.rs | 642 ------ .../prost/cosmos-sdk/cosmos.bank.v1beta1.rs | 342 ---- .../cosmos-sdk/cosmos.bank.v1beta1.tonic.rs | 894 --------- .../cosmos-sdk/cosmos.base.abci.v1beta1.rs | 171 -- .../cosmos-sdk/cosmos.base.kv.v1beta1.rs | 16 - .../cosmos-sdk/cosmos.base.node.v1beta1.rs | 12 - .../cosmos.base.node.v1beta1.tonic.rs | 223 --- .../cosmos-sdk/cosmos.base.query.v1beta1.rs | 56 - .../cosmos.base.reflection.v1beta1.rs | 28 - .../cosmos.base.reflection.v1beta1.tonic.rs | 281 --- .../cosmos.base.reflection.v2alpha1.rs | 225 --- .../cosmos.base.reflection.v2alpha1.tonic.rs | 502 ----- .../cosmos.base.snapshots.v1beta1.rs | 111 - .../cosmos-sdk/cosmos.base.store.v1beta1.rs | 75 - .../cosmos.base.tendermint.v1beta1.rs | 279 --- .../cosmos.base.tendermint.v1beta1.tonic.rs | 543 ----- .../prost/cosmos-sdk/cosmos.base.v1beta1.rs | 36 - .../cosmos-sdk/cosmos.capability.v1beta1.rs | 46 - .../prost/cosmos-sdk/cosmos.crisis.v1beta1.rs | 24 - .../cosmos-sdk/cosmos.crisis.v1beta1.tonic.rs | 220 -- .../prost/cosmos-sdk/cosmos.crypto.ed25519.rs | 19 - .../prost/cosmos-sdk/cosmos.crypto.hd.v1.rs | 22 - .../cosmos-sdk/cosmos.crypto.keyring.v1.rs | 53 - .../cosmos-sdk/cosmos.crypto.multisig.rs | 12 - .../cosmos.crypto.multisig.v1beta1.rs | 21 - .../cosmos-sdk/cosmos.crypto.secp256k1.rs | 18 - .../cosmos-sdk/cosmos.crypto.secp256r1.rs | 17 - .../cosmos-sdk/cosmos.distribution.v1beta1.rs | 460 ----- .../cosmos.distribution.v1beta1.tonic.rs | 1045 ---------- .../cosmos-sdk/cosmos.evidence.v1beta1.rs | 72 - .../cosmos.evidence.v1beta1.tonic.rs | 492 ----- .../cosmos-sdk/cosmos.feegrant.v1beta1.rs | 158 -- .../cosmos.feegrant.v1beta1.tonic.rs | 598 ------ .../cosmos-sdk/cosmos.genutil.v1beta1.rs | 9 - .../src/prost/cosmos-sdk/cosmos.gov.v1.rs | 426 ---- .../prost/cosmos-sdk/cosmos.gov.v1.tonic.rs | 979 --------- .../prost/cosmos-sdk/cosmos.gov.v1beta1.rs | 421 ---- .../cosmos-sdk/cosmos.gov.v1beta1.tonic.rs | 932 --------- .../src/prost/cosmos-sdk/cosmos.group.v1.rs | 999 --------- .../prost/cosmos-sdk/cosmos.group.v1.tonic.rs | 1782 ----------------- .../prost/cosmos-sdk/cosmos.mint.v1beta1.rs | 78 - .../cosmos-sdk/cosmos.mint.v1beta1.tonic.rs | 323 --- .../src/prost/cosmos-sdk/cosmos.msg.v1.rs | 2 - .../prost/cosmos-sdk/cosmos.nft.v1beta1.rs | 216 -- .../cosmos-sdk/cosmos.nft.v1beta1.tonic.rs | 734 ------- .../cosmos-sdk/cosmos.orm.module.v1alpha1.rs | 7 - .../src/prost/cosmos-sdk/cosmos.orm.v1.rs | 90 - .../prost/cosmos-sdk/cosmos.orm.v1alpha1.rs | 82 - .../prost/cosmos-sdk/cosmos.params.v1beta1.rs | 67 - .../cosmos-sdk/cosmos.params.v1beta1.tonic.rs | 272 --- .../cosmos-sdk/cosmos.slashing.v1beta1.rs | 140 -- .../cosmos.slashing.v1beta1.tonic.rs | 541 ----- .../cosmos-sdk/cosmos.staking.v1beta1.rs | 787 -------- .../cosmos.staking.v1beta1.tonic.rs | 1394 ------------- .../cosmos-sdk/cosmos.tx.signing.v1beta1.rs | 130 -- .../src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs | 458 ----- .../cosmos-sdk/cosmos.tx.v1beta1.tonic.rs | 423 ---- .../cosmos-sdk/cosmos.upgrade.v1beta1.rs | 183 -- .../cosmos.upgrade.v1beta1.tonic.rs | 701 ------- .../cosmos-sdk/cosmos.vesting.v1beta1.rs | 126 -- .../cosmos.vesting.v1beta1.tonic.rs | 336 ---- .../src/prost/cosmos-sdk/cosmos_proto.rs | 64 - cosmos-sdk-proto/src/prost/ibc-go/IBC_COMMIT | 1 - .../src/prost/ibc-go/cosmos.auth.v1beta1.rs | 41 - .../prost/ibc-go/cosmos.base.query.v1beta1.rs | 50 - .../src/prost/ibc-go/cosmos.base.v1beta1.rs | 38 - .../prost/ibc-go/cosmos.upgrade.v1beta1.rs | 48 - ...tions.interchain_accounts.controller.v1.rs | 135 -- ...pplications.interchain_accounts.host.v1.rs | 138 -- ...ibc.applications.interchain_accounts.v1.rs | 140 -- .../ibc-go/ibc.applications.transfer.v1.rs | 439 ---- .../ibc-go/ibc.applications.transfer.v2.rs | 19 - .../src/prost/ibc-go/ibc.core.channel.v1.rs | 1595 --------------- .../src/prost/ibc-go/ibc.core.client.v1.rs | 843 -------- .../prost/ibc-go/ibc.core.commitment.v1.rs | 37 - .../prost/ibc-go/ibc.core.connection.v1.rs | 804 -------- .../src/prost/ibc-go/ibc.core.types.v1.rs | 14 - .../ibc-go/ibc.lightclients.localhost.v1.rs | 12 - .../ibc-go/ibc.lightclients.solomachine.v1.rs | 257 --- .../ibc-go/ibc.lightclients.solomachine.v2.rs | 257 --- .../ibc-go/ibc.lightclients.tendermint.v1.rs | 106 - cosmos-sdk-proto/src/prost/ibc-go/ics23.rs | 361 ---- cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT | 1 - .../prost/wasmd/cosmos.base.query.v1beta1.rs | 56 - .../src/prost/wasmd/cosmos.base.v1beta1.rs | 36 - .../src/prost/wasmd/cosmos_proto.rs | 64 - .../src/prost/wasmd/cosmwasm.wasm.v1.rs | 834 -------- .../src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs | 395 ---- cosmos-sdk-proto/src/traits.rs | 76 - cosmos-sdk-proto/src/type_urls.rs | 227 --- cosmrs/Cargo.toml | 3 +- ibc-go | 1 - proto-build/Cargo.toml | 14 - proto-build/buf.sdk.gen.yaml | 10 - proto-build/buf.wasmd.gen.yaml | 8 - proto-build/src/main.rs | 421 ---- wasmd | 1 - 110 files changed, 2 insertions(+), 29936 deletions(-) delete mode 100644 .gitmodules delete mode 160000 cosmos-sdk-go delete mode 100644 cosmos-sdk-proto/CHANGELOG.md delete mode 100644 cosmos-sdk-proto/Cargo.toml delete mode 100644 cosmos-sdk-proto/README.md delete mode 100644 cosmos-sdk-proto/src/lib.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/COSMOS_SDK_COMMIT delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.msg.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/IBC_COMMIT delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/cosmos.auth.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.query.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/cosmos.upgrade.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.controller.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.host.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v2.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/ibc.core.channel.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/ibc.core.client.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/ibc.core.commitment.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/ibc.core.connection.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/ibc.core.types.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.localhost.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v2.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.tendermint.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/ibc-go/ics23.rs delete mode 100644 cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT delete mode 100644 cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.rs delete mode 100644 cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.rs delete mode 100644 cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs delete mode 100644 cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs delete mode 100644 cosmos-sdk-proto/src/traits.rs delete mode 100644 cosmos-sdk-proto/src/type_urls.rs delete mode 160000 ibc-go delete mode 100644 proto-build/Cargo.toml delete mode 100644 proto-build/buf.sdk.gen.yaml delete mode 100644 proto-build/buf.wasmd.gen.yaml delete mode 100644 proto-build/src/main.rs delete mode 160000 wasmd diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 0fe39efc..00000000 --- a/.gitmodules +++ /dev/null @@ -1,9 +0,0 @@ -[submodule "cosmos-sdk"] - path = cosmos-sdk-go - url = https://github.com/cosmos/cosmos-sdk.git -[submodule "wasmd"] - path = wasmd - url = https://github.com/CosmWasm/wasmd.git -[submodule "ibc-go"] - path = ibc-go - url = https://github.com/cosmos/ibc-go diff --git a/cosmos-sdk-go b/cosmos-sdk-go deleted file mode 160000 index 5cd0b231..00000000 --- a/cosmos-sdk-go +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5cd0b2316a7103468af38eab5d886f9f069c9cd7 diff --git a/cosmos-sdk-proto/CHANGELOG.md b/cosmos-sdk-proto/CHANGELOG.md deleted file mode 100644 index e616913d..00000000 --- a/cosmos-sdk-proto/CHANGELOG.md +++ /dev/null @@ -1,251 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## 0.19.0 (2023-05-03) -### Changed -- Use `buf` to generate Cosmos SDK protos ([#393]) -- Bump `COSMOS_SDK_REV` to v0.46.12 ([#395]) -- Bump `tendermint-proto` to v0.32 ([#400]) - -[#393]: https://github.com/cosmos/cosmos-rust/pull/393 -[#395]: https://github.com/cosmos/cosmos-rust/pull/395 -[#400]: https://github.com/cosmos/cosmos-rust/pull/400 - -## 0.18.0 (2023-04-17) -### Added -- TypeUrl for missing proposal types as well as others ([#360]) -- TypeUrl for some of structs from /cosmos.tx.v1beta1 namespace ([#384]) - -### Changed -- Bump `tendermint-proto` to v0.31 ([#385]) -- Bump `tonic` to v0.9 ([#386]) - -[#360]: https://github.com/cosmos/cosmos-rust/pull/360 -[#384]: https://github.com/cosmos/cosmos-rust/pull/384 -[#385]: https://github.com/cosmos/cosmos-rust/pull/385 -[#386]: https://github.com/cosmos/cosmos-rust/pull/386 - -## 0.17.0 (2023-03-21) -### Added -- Support for `wasmd` >=0.29 by generating files via buf ([#358]) - -### Changed -- Bump tendermint-rs crates to 0.30 ([#354]) -- MSRV 1.63 ([#356]) - -[#354]: https://github.com/cosmos/cosmos-rust/pull/354 -[#356]: https://github.com/cosmos/cosmos-rust/pull/356 -[#358]: https://github.com/cosmos/cosmos-rust/pull/358 - -## 0.16.0 (2022-11-30) -### Changed -- Bump tendermint-rs crates to 0.27 ([#306]) - -[#306]: https://github.com/cosmos/cosmos-rust/pull/306 - -## 0.15.0 (2022-11-07) -### Added -- `TypeUrl` impl for auth accounts ([#285]) -- `TypeUrl` impl for `MsgTransfer` ([#296]) - -### Changed -- Bump `tendermint-proto` to v0.26; MSRV 1.59 ([#302]) - -[#285]: https://github.com/cosmos/cosmos-rust/pull/285 -[#296]: https://github.com/cosmos/cosmos-rust/pull/296 -[#302]: https://github.com/cosmos/cosmos-rust/pull/302 - -## 0.14.0 (2022-08-08) -### Changed -- Rename `cosmos::staking::v1beta1::IsStakeAuthroizationValidator` to `::Policy` ([#275]) -- Bump `prost` to v0.11 ([#277]) -- Bump `tendermint-proto` to v0.23.9 ([#277]) -- Bump `tonic` to v0.8 ([#277]) - -### Removed -- `pub` from `mod type_urls` ([#263]) - -[#263]: https://github.com/cosmos/cosmos-rust/pull/263 -[#275]: https://github.com/cosmos/cosmos-rust/pull/275 -[#277]: https://github.com/cosmos/cosmos-rust/pull/277 - -## 0.13.0 (2022-07-25) -### Added -- gRPC server definitions ([#249]) -- Protobuf traits originally from `cosmrs` ([#255]) - -### Changed -- Bump `tendermint-proto` to v0.23.8 ([#253]) - -[#249]: https://github.com/cosmos/cosmos-rust/pull/249 -[#253]: https://github.com/cosmos/cosmos-rust/pull/253 -[#255]: https://github.com/cosmos/cosmos-rust/pull/255 - -## 0.12.3 (2022-06-09) -### Added -- Additional `cosmwasm` protos ([#240], [#244]) - -[#240]: https://github.com/cosmos/cosmos-rust/pull/240 -[#244]: https://github.com/cosmos/cosmos-rust/pull/244 - -## 0.12.2 (2022-05-16) -### Added -- `grpc-transport` crate feature ([#230]) - -[#230]: https://github.com/cosmos/cosmos-rust/pull/230 - -## 0.12.1 (2022-05-12) -### Fixed -- Clashing protobuf namespaces between `cosmos-sdk` and `ibc` ([#220]) - -[#220]: https://github.com/cosmos/cosmos-rust/pull/220 - -## 0.12.0 (2022-05-02) [YANKED] - -NOTE: this release was yanked due to the clashing namespace bug ([#220]) - -### Changed -- Bump tendermint-rs crates to v0.23.7 ([#215]) -- Bump `prost` to v0.10 ([#215]) -- Bump `tonic` to v0.7 ([#215]) -- Bump `COSMOS_SDK_REV` from v0.45.2 => v0.45.4 ([#215]) - -[#215]: https://github.com/cosmos/cosmos-rust/pull/215 - -## 0.11.0 (2022-04-21) -### Added -- Missing modules from `ibc-go` ([#187]) - -### Changed -- Upgrade SDK version => v0.45.2, IBC => v3.0.0 ([#199]) -- Bump tendermint-rs crates to v0.23.6 ([#205]) - -### Fixed -- Export `authz` module ([#186]) -- Export `feegrant` module ([#198]) - -[#186]: https://github.com/cosmos/cosmos-rust/pull/186 -[#187]: https://github.com/cosmos/cosmos-rust/pull/187 -[#198]: https://github.com/cosmos/cosmos-rust/pull/198 -[#199]: https://github.com/cosmos/cosmos-rust/pull/199 -[#205]: https://github.com/cosmos/cosmos-rust/pull/205 - -## 0.10.0 (2022-03-10) -### Added -- `authz` and `feegrant` protos ([#177]) - -### Changed -- Update SDK version => v0.45.1, IBC => v2.0.3, wasmd => v0.23.0 ([#177]) -- Bump `tendermint-proto` to v0.23.5 ([#178]) - -[#177]: https://github.com/cosmos/cosmos-rust/pull/177 -[#178]: https://github.com/cosmos/cosmos-rust/pull/178 - -## 0.9.0 (2022-01-10) -### Changed -- Update wasmd compatibility to 0.21 ([#158]) -- Bump `tendermint-proto` to v0.23.3 ([#163]) - -[#158]: https://github.com/cosmos/cosmos-rust/pull/158 -[#163]: https://github.com/cosmos/cosmos-rust/pull/163 - -## 0.8.0 (2021-10-28) -### Changed -- Update to cosmos-sdk v0.44.1 and ibc-go v1.2.0 ([#138]) -- Bump tendermint-rs crates to v0.23; MSRV 1.56 ([#144]) -- 2021 edition upgrade ([#148]) - -[#138]: https://github.com/cosmos/cosmos-rust/pull/138 -[#144]: https://github.com/cosmos/cosmos-rust/pull/144 -[#148]: https://github.com/cosmos/cosmos-rust/pull/148 - -## 0.7.0 (2021-09-27) -### Changed -- Update `tendermint-proto` crate to v0.22 ([#128]) -- Bump `COSMOS_REV` to v0.44.0 ([#130]) - -[#128]: https://github.com/cosmos/cosmos-rust/pull/128 -[#130]: https://github.com/cosmos/cosmos-rust/pull/130 - -## 0.6.3 (2021-08-24) -### Changed -- Bump MSRV to 1.54 ([#122]) - -[#122]: https://github.com/cosmos/cosmos-rust/pull/122 - -## 0.6.2 (2021-08-24) -### Added -- Protos for vesting accounts ([#119]) - -[#119]: https://github.com/cosmos/cosmos-rust/pull/119 - -## 0.6.1 (2021-08-19) -### Changed -- Rebuild protos with cosmos-sdk v0.43.0 ([#117]) - -[#117]: https://github.com/cosmos/cosmos-rust/pull/117 - -## 0.6.0 (2021-08-02) [YANKED] -### Added -- Basic `cosmwasm` support ([#96]) - -### Changed -- Bump `tendermint-proto` requirement from 0.20 to 0.21 ([#106]) - -[#96]: https://github.com/cosmos/cosmos-rust/pull/96 -[#106]: https://github.com/cosmos/cosmos-rust/pull/106 - -## 0.5.0 (2021-04-10) -### Changed -- Add support for crypto proto and services ([#73]) -- Update `tendermint` crate ([#72]) - -[#72]: https://github.com/cosmos/cosmos-rust/pull/72 -[#73]: https://github.com/cosmos/cosmos-rust/pull/73 - -## 0.4.0 (2021-04-02) -### Changed -- Add support for bank proto and services ([#61]) -- Add support for tendermint proto and services ([#57]) -- Add support for bank, crisis, distribution, evidence, genutil, gov, mint, params, slashing, staking upgrade and vesting proto and services ([#64]) -- Bump COSMOS_REV to v0.42.3 ([#57]) - -[#57]: https://github.com/cosmos/cosmos-rust/pull/57 -[#61]: https://github.com/cosmos/cosmos-rust/pull/61 -[#61]: https://github.com/cosmos/cosmos-rust/pull/64 - -## 0.3.0 (2020-02-01) -### Changed -- Bump `cosmos-sdk` rev to v0.40.0 ([#37]) -- Bump `tendermint` crate dependency to v0.18 ([#45]) -- Bump `prost`, `prost-types`, `prost-build` to v0.7 ([#45]) -- Bump `tonic`, `tonic-build` to v0.4 ([#45]) - -[#37]: https://github.com/cosmos/cosmos-rust/pull/37 -[#45]: https://github.com/cosmos/cosmos-rust/pull/45 -[#45]: https://github.com/cosmos/cosmos-rust/pull/45 -[#45]: https://github.com/cosmos/cosmos-rust/pull/45 - -## 0.2.0 (2020-01-04) -### Added -- `grpc` crate feature ([#8]) - -### Changed -- Bump `cosmos-sdk` rev to v0.40.0-rc6 ([#32]) -- Bump `tendermint` + `tendermint-proto` crate dependencies to v0.17 ([#18]) -- Format `prost`/`tonic` output with `rustfmt` ([#17]) - -[#8]: https://github.com/cosmos/cosmos-rust/pull/8 -[#17]: https://github.com/cosmos/cosmos-rust/pull/17 -[#18]: https://github.com/cosmos/cosmos-rust/pull/18 -[#32]: https://github.com/cosmos/cosmos-rust/pull/32 - -## 0.1.2 (2020-11-30) - -## 0.1.1 (2020-11-30) - -- Initial release diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml deleted file mode 100644 index 80cd9536..00000000 --- a/cosmos-sdk-proto/Cargo.toml +++ /dev/null @@ -1,34 +0,0 @@ -[package] -name = "cosmos-sdk-proto" -version = "0.19.0" -authors = [ - "Justin Kilpatrick ", - "Greg Szabo ", - "Tony Arcieri " -] -license = "Apache-2.0" -repository = "https://github.com/cosmos/cosmos-rust/tree/main/cosmos-sdk-proto" -description = "Protobuf stuct defintions for interacting Cosmos SDK powered blockchains" -readme = "README.md" -categories = ["cryptography", "cryptography::cryptocurrencies", "database"] -keywords = ["blockchain", "cosmos", "tendermint", "proto"] -edition = "2021" -rust-version = "1.63" - -[dependencies] -prost = "0.11" -prost-types = "0.11" -tendermint-proto = "0.32" - -# Optional dependencies -tonic = { version = "0.9", optional = true, default-features = false, features = ["codegen", "prost"] } - -[features] -default = ["grpc-transport"] -grpc = ["tonic"] -grpc-transport = ["grpc", "tonic/transport"] -cosmwasm = [] - -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] diff --git a/cosmos-sdk-proto/README.md b/cosmos-sdk-proto/README.md deleted file mode 100644 index 76bfa122..00000000 --- a/cosmos-sdk-proto/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# cosmos-sdk-proto - -[![Crate][crate-image]][crate-link] -[![Docs][docs-image]][docs-link] -[![Build Status][build-image]][build-link] -[![Apache 2.0 Licensed][license-image]][license-link] -![MSRV][rustc-image] - -Rust crate for interacting with [Protobufs] defined by the [Cosmos SDK]. - -The goal of this crate is to provide complete proto struct definitions for interacting -with a Cosmos SDK blockchain. - -Currently, this crate only provides a subset of the many total structs exported by -Cosmos SDK proto files. - -Pull requests to expand coverage are welcome. - -[Documentation][docs-link] - -## Minimum Supported Rust Version - -This crate is supported on Rust **1.63** or newer. - -[//]: # "badges" -[crate-image]: https://buildstats.info/crate/cosmos-sdk-proto -[crate-link]: https://crates.io/crates/cosmos-sdk-proto -[docs-image]: https://docs.rs/cosmos-sdk-proto/badge.svg -[docs-link]: https://docs.rs/cosmos-sdk-proto/ -[build-image]: https://github.com/cosmos/cosmos-rust/workflows/cosmos-sdk-proto/badge.svg -[build-link]: https://github.com/cosmos/cosmos-rust/actions/workflows/cosmos-sdk-proto.yml -[license-image]: https://img.shields.io/badge/license-Apache2.0-blue.svg -[license-link]: https://github.com/cosmos/cosmos-rust/blob/master/LICENSE -[rustc-image]: https://img.shields.io/badge/rustc-1.63+-blue.svg - -[//]: # "links" -[Protobufs]: (https://github.com/cosmos/cosmos-sdk/tree/master/proto/) -[Cosmos SDK]: https://github.com/cosmos/cosmos-sdk diff --git a/cosmos-sdk-proto/src/lib.rs b/cosmos-sdk-proto/src/lib.rs deleted file mode 100644 index 9a37dc66..00000000 --- a/cosmos-sdk-proto/src/lib.rs +++ /dev/null @@ -1,340 +0,0 @@ -#![doc = include_str!("../README.md")] -#![doc( - html_logo_url = "https://raw.githubusercontent.com/cosmos/cosmos-rust/main/.images/cosmos.png" -)] -#![cfg_attr(docsrs, feature(doc_cfg))] -#![allow( - rustdoc::bare_urls, - rustdoc::broken_intra_doc_links, - clippy::derive_partial_eq_without_eq -)] -#![forbid(unsafe_code)] -#![warn(trivial_casts, trivial_numeric_casts, unused_import_braces)] - -pub mod traits; -mod type_urls; - -pub use prost; -pub use prost_types::Any; -pub use tendermint_proto as tendermint; - -/// The version (commit hash) of the Cosmos SDK used when generating this library. -pub const COSMOS_SDK_VERSION: &str = include_str!("prost/cosmos-sdk/COSMOS_SDK_COMMIT"); - -/// Cosmos protobuf definitions. -pub mod cosmos { - /// Authentication of accounts and transactions. - pub mod auth { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.auth.v1beta1.rs"); - } - } - - /// Granting of arbitrary privileges from one account to another. - pub mod authz { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.authz.v1beta1.rs"); - } - } - - /// Balances. - pub mod bank { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.bank.v1beta1.rs"); - } - } - - /// Base functionality. - pub mod base { - /// Application BlockChain Interface (ABCI). - /// - /// Interface that defines the boundary between the replication engine - /// (the blockchain), and the state machine (the application). - pub mod abci { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs"); - } - } - - /// Key-value pairs. - pub mod kv { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs"); - } - } - - /// Query support. - pub mod query { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.base.query.v1beta1.rs"); - } - } - - /// Reflection support. - pub mod reflection { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs"); - } - - pub mod v2alpha1 { - include!("prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs"); - } - } - - /// Snapshots containing Tendermint state sync info. - pub mod snapshots { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs"); - } - } - - /// Data structure that holds the state of the application. - pub mod store { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.base.store.v1beta1.rs"); - } - } - - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.base.v1beta1.rs"); - } - - pub mod tendermint { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs"); - } - } - } - - /// Crisis handling - pub mod crisis { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.crisis.v1beta1.rs"); - } - } - - /// Cryptographic primitives. - pub mod crypto { - /// Multi-signature support. - pub mod multisig { - include!("prost/cosmos-sdk/cosmos.crypto.multisig.rs"); - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs"); - } - } - pub mod ed25519 { - include!("prost/cosmos-sdk/cosmos.crypto.ed25519.rs"); - } - pub mod secp256k1 { - include!("prost/cosmos-sdk/cosmos.crypto.secp256k1.rs"); - } - pub mod secp256r1 { - include!("prost/cosmos-sdk/cosmos.crypto.secp256r1.rs"); - } - } - - /// Messages and services handling token distribution - pub mod distribution { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.distribution.v1beta1.rs"); - } - } - - /// Messages and services handling evidence - pub mod evidence { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.evidence.v1beta1.rs"); - } - } - - /// Allows accounts to grant fee allowances and to use fees from their accounts. - pub mod feegrant { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs"); - } - } - - /// Messages and services handling gentx's - pub mod genutil { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.genutil.v1beta1.rs"); - } - } - - /// Messages and services handling governance - pub mod gov { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.gov.v1beta1.rs"); - } - } - - /// Messages and services handling minting - pub mod mint { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.mint.v1beta1.rs"); - } - } - - /// Messages and services handling chain parameters - pub mod params { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.params.v1beta1.rs"); - } - } - - /// Handling slashing parameters and unjailing - pub mod slashing { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.slashing.v1beta1.rs"); - } - } - - /// Proof-of-Stake layer for public blockchains. - pub mod staking { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.staking.v1beta1.rs"); - } - } - - /// Transactions. - pub mod tx { - /// Transaction signing support. - pub mod signing { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs"); - } - } - - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.tx.v1beta1.rs"); - } - } - - /// Services for the upgrade module. - pub mod upgrade { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs"); - } - } - - /// Services and tx's for the vesting module. - pub mod vesting { - pub mod v1beta1 { - include!("prost/cosmos-sdk/cosmos.vesting.v1beta1.rs"); - } - } -} - -/// CosmWasm protobuf definitions. -#[cfg(feature = "cosmwasm")] -#[cfg_attr(docsrs, doc(cfg(feature = "cosmwasm")))] -pub mod cosmwasm { - /// Messages and services handling CosmWasm. - pub mod wasm { - pub mod v1 { - include!("prost/wasmd/cosmwasm.wasm.v1.rs"); - } - } -} - -/// IBC protobuf definitions. -pub mod ibc { - /// IBC applications. - pub mod applications { - /// Interchain accounts support. - pub mod interchain_accounts { - pub mod controller { - pub mod v1 { - include!("prost/ibc-go/ibc.applications.interchain_accounts.controller.v1.rs"); - } - } - - pub mod host { - pub mod v1 { - include!("prost/ibc-go/ibc.applications.interchain_accounts.host.v1.rs"); - } - } - - pub mod v1 { - include!("prost/ibc-go/ibc.applications.interchain_accounts.v1.rs"); - } - } - - /// Transfer support. - pub mod transfer { - pub mod v1 { - include!("prost/ibc-go/ibc.applications.transfer.v1.rs"); - } - - pub mod v2 { - include!("prost/ibc-go/ibc.applications.transfer.v2.rs"); - } - } - } - - /// IBC core. - pub mod core { - /// IBC channels. - pub mod channel { - pub mod v1 { - include!("prost/ibc-go/ibc.core.channel.v1.rs"); - } - } - - /// IBC client. - pub mod client { - pub mod v1 { - include!("prost/ibc-go/ibc.core.client.v1.rs"); - } - } - - /// IBC commitments. - pub mod commitment { - pub mod v1 { - include!("prost/ibc-go/ibc.core.commitment.v1.rs"); - } - } - - /// IBC connections. - pub mod connection { - pub mod v1 { - include!("prost/ibc-go/ibc.core.connection.v1.rs"); - } - } - - /// IBC types. - pub mod types { - pub mod v1 { - include!("prost/ibc-go/ibc.core.types.v1.rs"); - } - } - } - - /// IBC light clients. - pub mod lightclients { - pub mod localhost { - pub mod v1 { - include!("prost/ibc-go/ibc.lightclients.localhost.v1.rs"); - } - } - pub mod solomachine { - pub mod v1 { - include!("prost/ibc-go/ibc.lightclients.solomachine.v1.rs"); - } - - pub mod v2 { - include!("prost/ibc-go/ibc.lightclients.solomachine.v2.rs"); - } - } - pub mod tendermint { - pub mod v1 { - include!("prost/ibc-go/ibc.lightclients.tendermint.v1.rs"); - } - } - } -} - -/// ICS23 protobuf definitions. -pub mod ics23 { - include!("prost/ibc-go/ics23.rs"); -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/COSMOS_SDK_COMMIT b/cosmos-sdk-proto/src/prost/cosmos-sdk/COSMOS_SDK_COMMIT deleted file mode 100644 index 22ced787..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/COSMOS_SDK_COMMIT +++ /dev/null @@ -1 +0,0 @@ -v0.46.12 \ No newline at end of file diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs deleted file mode 100644 index c37f344f..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs +++ /dev/null @@ -1,5 +0,0 @@ -// @generated -/// Module is the module config object for the cosmos.app v1 app module. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Module {} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs deleted file mode 100644 index e857bec1..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs +++ /dev/null @@ -1,123 +0,0 @@ -// @generated -/// ModuleDescriptor describes an app module. -#[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, -} -/// PackageReference is a reference to a protobuf package used by a module. -#[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, -} -/// MigrateFromInfo is information on a module version that a newer module -/// can migrate from. -#[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, -} -/// Config represents the configuration for a Cosmos SDK ABCI app. -/// It is intended that all state machine logic including the version of -/// baseapp and tx handlers (and possibly even Tendermint) that an app needs -/// can be described in a config object. For compatibility, the framework should -/// allow a mixture of declarative and imperative app wiring, however, apps -/// that strive for the maximum ease of maintainability should be able to describe -/// their state machine with a config object alone. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Config { - /// modules are the module configurations for the app. - #[prost(message, repeated, tag = "1")] - pub modules: ::prost::alloc::vec::Vec, -} -/// ModuleConfig is a module configuration for an app. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ModuleConfig { - /// name is the unique name of the module within the app. It should be a name - /// that persists between different versions of a module so that modules - /// can be smoothly upgraded to new versions. - /// - /// For example, for the module cosmos.bank.module.v1.Module, we may chose - /// to simply name the module "bank" in the app. When we upgrade to - /// cosmos.bank.module.v2.Module, the app-specific name "bank" stays the same - /// and the framework knows that the v2 module should receive all the same state - /// that the v1 module had. Note: modules should provide info on which versions - /// they can migrate from in the ModuleDescriptor.can_migration_from field. - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// config is the config object for the module. Module config messages should - /// define a ModuleDescriptor using the cosmos.app.v1alpha1.is_module extension. - #[prost(message, optional, tag = "2")] - pub config: ::core::option::Option<::prost_types::Any>, -} -/// QueryConfigRequest is the Query/Config request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConfigRequest {} -/// QueryConfigRequest is the Query/Config response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConfigResponse { - /// config is the current app config. - #[prost(message, optional, tag = "1")] - pub config: ::core::option::Option, -} -include!("cosmos.app.v1alpha1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.tonic.rs deleted file mode 100644 index 2b400c61..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.tonic.rs +++ /dev/null @@ -1,230 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - /** Query is the app module query service. - */ - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - /** Config returns the current app config. - */ - pub async fn config( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.app.v1alpha1.Query/Config"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -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 { - /** Config returns the current app config. - */ - async fn config( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - /** Query is the app module query service. - */ - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.app.v1alpha1.Query/Config" => { - #[allow(non_camel_case_types)] - struct ConfigSvc(pub Arc); - impl tonic::server::UnaryService for ConfigSvc { - type Response = super::QueryConfigResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).config(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.app.v1alpha1.Query"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs deleted file mode 100644 index e14153ef..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs +++ /dev/null @@ -1,185 +0,0 @@ -// @generated -/// 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). -#[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_types::Any>, - #[prost(uint64, tag = "3")] - pub account_number: u64, - #[prost(uint64, tag = "4")] - pub sequence: u64, -} -/// ModuleAccount defines an account for modules that holds coins on a pool. -#[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>, -} -/// Params defines the parameters for the auth module. -#[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, -} -/// GenesisState defines the auth module's genesis state. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// params defines all the paramaters 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<::prost_types::Any>, -} -/// QueryAccountsRequest is the request type for the Query/Accounts RPC method. -/// -/// Since: cosmos-sdk 0.43 -#[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, -} -/// QueryAccountsResponse is the response type for the Query/Accounts RPC method. -/// -/// Since: cosmos-sdk 0.43 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAccountsResponse { - /// accounts are the existing accounts - #[prost(message, repeated, tag = "1")] - pub accounts: ::prost::alloc::vec::Vec<::prost_types::Any>, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryAccountRequest is the request type for the Query/Account RPC method. -#[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, -} -/// QueryAccountResponse is the response type for the Query/Account RPC method. -#[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<::prost_types::Any>, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[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, -} -/// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryModuleAccountsRequest {} -/// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryModuleAccountsResponse { - #[prost(message, repeated, tag = "1")] - pub accounts: ::prost::alloc::vec::Vec<::prost_types::Any>, -} -/// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryModuleAccountByNameRequest { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, -} -/// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryModuleAccountByNameResponse { - #[prost(message, optional, tag = "1")] - pub account: ::core::option::Option<::prost_types::Any>, -} -/// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Bech32PrefixRequest {} -/// Bech32PrefixResponse is the response type for Bech32Prefix rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Bech32PrefixResponse { - #[prost(string, tag = "1")] - pub bech32_prefix: ::prost::alloc::string::String, -} -/// AddressBytesToStringRequest is the request type for AddressString rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AddressBytesToStringRequest { - #[prost(bytes = "vec", tag = "1")] - pub address_bytes: ::prost::alloc::vec::Vec, -} -/// AddressBytesToStringResponse is the response type for AddressString rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AddressBytesToStringResponse { - #[prost(string, tag = "1")] - pub address_string: ::prost::alloc::string::String, -} -/// AddressStringToBytesRequest is the request type for AccountBytes rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AddressStringToBytesRequest { - #[prost(string, tag = "1")] - pub address_string: ::prost::alloc::string::String, -} -/// AddressStringToBytesResponse is the response type for AddressBytes rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AddressStringToBytesResponse { - #[prost(bytes = "vec", tag = "1")] - pub address_bytes: ::prost::alloc::vec::Vec, -} -/// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method -/// -/// Since: cosmos-sdk 0.46.2 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAccountAddressByIdRequest { - /// 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. - #[prost(int64, tag = "1")] - pub id: i64, -} -/// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method -/// -/// Since: cosmos-sdk 0.46.2 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAccountAddressByIdResponse { - #[prost(string, tag = "1")] - pub account_address: ::prost::alloc::string::String, -} -include!("cosmos.auth.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.tonic.rs deleted file mode 100644 index 3a3ffccd..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.tonic.rs +++ /dev/null @@ -1,640 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn accounts( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.auth.v1beta1.Query/Accounts"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn account( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.auth.v1beta1.Query/Account"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn account_address_by_id( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.auth.v1beta1.Query/AccountAddressByID", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn params( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.auth.v1beta1.Query/Params"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn module_accounts( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.auth.v1beta1.Query/ModuleAccounts"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn module_account_by_name( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.auth.v1beta1.Query/ModuleAccountByName", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn bech32_prefix( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.auth.v1beta1.Query/Bech32Prefix"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn address_bytes_to_string( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.auth.v1beta1.Query/AddressBytesToString", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn address_string_to_bytes( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.auth.v1beta1.Query/AddressStringToBytes", - ); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - async fn accounts( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn account( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn account_address_by_id( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn params( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn module_accounts( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn module_account_by_name( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn bech32_prefix( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn address_bytes_to_string( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn address_string_to_bytes( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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 tonic::server::UnaryService for AccountsSvc { - type Response = super::QueryAccountsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).accounts(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for AccountSvc { - type Response = super::QueryAccountResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).account(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for AccountAddressByIDSvc - { - type Response = super::QueryAccountAddressByIdResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).account_address_by_id(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).params(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService - for ModuleAccountsSvc - { - type Response = super::QueryModuleAccountsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).module_accounts(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for ModuleAccountByNameSvc - { - type Response = super::QueryModuleAccountByNameResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).module_account_by_name(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for Bech32PrefixSvc { - type Response = super::Bech32PrefixResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).bech32_prefix(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService - for AddressBytesToStringSvc - { - type Response = super::AddressBytesToStringResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).address_bytes_to_string(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService - for AddressStringToBytesSvc - { - type Response = super::AddressStringToBytesResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).address_string_to_bytes(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs deleted file mode 100644 index 8d38d9f9..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs +++ /dev/null @@ -1,184 +0,0 @@ -// @generated -/// GenericAuthorization gives the grantee unrestricted permissions to execute -/// the provided method on behalf of the granter's account. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenericAuthorization { - /// Msg, identified by it's type URL, to grant unrestricted permissions to execute - #[prost(string, tag = "1")] - pub msg: ::prost::alloc::string::String, -} -/// Grant gives permissions to execute -/// the provide method with expiration time. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Grant { - #[prost(message, optional, tag = "1")] - pub authorization: ::core::option::Option<::prost_types::Any>, - /// time when the grant will expire and will be pruned. If null, then the grant - /// doesn't have a time expiration (other conditions in `authorization` - /// may apply to invalidate the grant) - #[prost(message, optional, tag = "2")] - pub expiration: ::core::option::Option<::prost_types::Timestamp>, -} -/// GrantAuthorization extends a grant with both the addresses of the grantee and granter. -/// It is used in genesis.proto and query.proto -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GrantAuthorization { - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub authorization: ::core::option::Option<::prost_types::Any>, - #[prost(message, optional, tag = "4")] - pub expiration: ::core::option::Option<::prost_types::Timestamp>, -} -/// GrantQueueItem contains the list of TypeURL of a sdk.Msg. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GrantQueueItem { - /// msg_type_urls contains the list of TypeURL of a sdk.Msg. - #[prost(string, repeated, tag = "1")] - pub msg_type_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// EventGrant is emitted on Msg/Grant -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventGrant { - /// Msg type URL for which an autorization is granted - #[prost(string, tag = "2")] - pub msg_type_url: ::prost::alloc::string::String, - /// Granter account address - #[prost(string, tag = "3")] - pub granter: ::prost::alloc::string::String, - /// Grantee account address - #[prost(string, tag = "4")] - pub grantee: ::prost::alloc::string::String, -} -/// EventRevoke is emitted on Msg/Revoke -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventRevoke { - /// Msg type URL for which an autorization is revoked - #[prost(string, tag = "2")] - pub msg_type_url: ::prost::alloc::string::String, - /// Granter account address - #[prost(string, tag = "3")] - pub granter: ::prost::alloc::string::String, - /// Grantee account address - #[prost(string, tag = "4")] - pub grantee: ::prost::alloc::string::String, -} -/// GenesisState defines the authz module's genesis state. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - #[prost(message, repeated, tag = "1")] - pub authorization: ::prost::alloc::vec::Vec, -} -/// QueryGrantsRequest is the request type for the Query/Grants RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGrantsRequest { - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, - /// Optional, msg_type_url, when set, will query only grants matching given msg type. - #[prost(string, tag = "3")] - pub msg_type_url: ::prost::alloc::string::String, - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "4")] - pub pagination: ::core::option::Option, -} -/// QueryGrantsResponse is the response type for the Query/Authorizations RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGrantsResponse { - /// authorizations is a list of grants granted for grantee by granter. - #[prost(message, repeated, tag = "1")] - pub grants: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGranterGrantsRequest { - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGranterGrantsResponse { - /// grants is a list of grants granted by the granter. - #[prost(message, repeated, tag = "1")] - pub grants: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGranteeGrantsRequest { - #[prost(string, tag = "1")] - pub grantee: ::prost::alloc::string::String, - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGranteeGrantsResponse { - /// grants is a list of grants granted to the grantee. - #[prost(message, repeated, tag = "1")] - pub grants: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// MsgGrant is a request type for Grant method. It declares authorization to the grantee -/// on behalf of the granter with the provided expiration time. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgGrant { - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub grant: ::core::option::Option, -} -/// MsgExecResponse defines the Msg/MsgExecResponse response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecResponse { - #[prost(bytes = "vec", repeated, tag = "1")] - pub results: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -/// MsgExec attempts to execute the provided messages using -/// authorizations granted to the grantee. Each message should have only -/// one signer corresponding to the granter of the authorization. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExec { - #[prost(string, tag = "1")] - pub grantee: ::prost::alloc::string::String, - /// Authorization Msg requests to execute. Each msg must implement Authorization interface - /// The x/authz will try to find a grant matching (msg.signers\[0\], grantee, MsgTypeURL(msg)) - /// triple and validate it. - #[prost(message, repeated, tag = "2")] - pub msgs: ::prost::alloc::vec::Vec<::prost_types::Any>, -} -/// MsgGrantResponse defines the Msg/MsgGrant response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgGrantResponse {} -/// MsgRevoke revokes any authorization with the provided sdk.Msg type on the -/// granter's account with that has been granted to the grantee. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRevoke { - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub msg_type_url: ::prost::alloc::string::String, -} -/// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRevokeResponse {} -include!("cosmos.authz.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.tonic.rs deleted file mode 100644 index 067a9ab2..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.tonic.rs +++ /dev/null @@ -1,642 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn grants( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.authz.v1beta1.Query/Grants"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn granter_grants( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.authz.v1beta1.Query/GranterGrants"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn grantee_grants( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.authz.v1beta1.Query/GranteeGrants"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - async fn grants( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn granter_grants( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn grantee_grants( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.authz.v1beta1.Query/Grants" => { - #[allow(non_camel_case_types)] - struct GrantsSvc(pub Arc); - impl tonic::server::UnaryService for GrantsSvc { - type Response = super::QueryGrantsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).grants(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GrantsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.authz.v1beta1.Query/GranterGrants" => { - #[allow(non_camel_case_types)] - struct GranterGrantsSvc(pub Arc); - impl tonic::server::UnaryService - for GranterGrantsSvc - { - type Response = super::QueryGranterGrantsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).granter_grants(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GranterGrantsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.authz.v1beta1.Query/GranteeGrants" => { - #[allow(non_camel_case_types)] - struct GranteeGrantsSvc(pub Arc); - impl tonic::server::UnaryService - for GranteeGrantsSvc - { - type Response = super::QueryGranteeGrantsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).grantee_grants(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GranteeGrantsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.authz.v1beta1.Query"; - } -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn grant( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.authz.v1beta1.Msg/Grant"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn exec( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.authz.v1beta1.Msg/Exec"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn revoke( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.authz.v1beta1.Msg/Revoke"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - async fn grant( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn exec( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn revoke( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.authz.v1beta1.Msg/Grant" => { - #[allow(non_camel_case_types)] - struct GrantSvc(pub Arc); - impl tonic::server::UnaryService for GrantSvc { - type Response = super::MsgGrantResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).grant(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GrantSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.authz.v1beta1.Msg/Exec" => { - #[allow(non_camel_case_types)] - struct ExecSvc(pub Arc); - impl tonic::server::UnaryService for ExecSvc { - type Response = super::MsgExecResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).exec(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ExecSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.authz.v1beta1.Msg/Revoke" => { - #[allow(non_camel_case_types)] - struct RevokeSvc(pub Arc); - impl tonic::server::UnaryService for RevokeSvc { - type Response = super::MsgRevokeResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).revoke(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = RevokeSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.authz.v1beta1.Msg"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs deleted file mode 100644 index 4574722a..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs +++ /dev/null @@ -1,342 +0,0 @@ -// @generated -/// SendAuthorization allows the grantee to spend up to spend_limit coins from -/// the granter's account. -/// -/// Since: cosmos-sdk 0.43 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SendAuthorization { - #[prost(message, repeated, tag = "1")] - pub spend_limit: ::prost::alloc::vec::Vec, -} -/// Params defines the parameters for the bank module. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - #[prost(message, repeated, tag = "1")] - pub send_enabled: ::prost::alloc::vec::Vec, - #[prost(bool, tag = "2")] - pub default_send_enabled: bool, -} -/// SendEnabled maps coin denom to a send_enabled status (whether a denom is -/// sendable). -#[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, -} -/// Input models transaction input. -#[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, -} -/// Output models transaction outputs. -#[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, -} -/// 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. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Supply { - #[prost(message, repeated, tag = "1")] - pub total: ::prost::alloc::vec::Vec, -} -/// DenomUnit represents a struct that describes a given -/// denomination unit of the basic token. -#[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>, -} -/// Metadata represents a struct that describes -/// a basic token. -#[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, -} -/// GenesisState defines the bank module's genesis state. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// params defines all the paramaters 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 differents coins. - #[prost(message, repeated, tag = "4")] - pub denom_metadata: ::prost::alloc::vec::Vec, -} -/// Balance defines an account address and balance pair used in the bank module's -/// genesis state. -#[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, -} -/// QueryBalanceRequest is the request type for the Query/Balance RPC method. -#[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, -} -/// QueryBalanceResponse is the response type for the Query/Balance RPC method. -#[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, -} -/// QueryBalanceRequest is the request type for the Query/AllBalances RPC method. -#[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, -} -/// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -/// method. -#[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, -} -/// QuerySpendableBalancesRequest defines the gRPC request structure for querying -/// an account's spendable balances. -/// -/// Since: cosmos-sdk 0.46 -#[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, -} -/// QuerySpendableBalancesResponse defines the gRPC response structure for querying -/// an account's spendable balances. -/// -/// Since: cosmos-sdk 0.46 -#[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, -} -/// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC -/// method. -#[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, -} -/// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC -/// method -#[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, -} -/// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. -#[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, -} -/// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. -#[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, -} -/// QueryParamsRequest defines the request type for querying x/bank parameters. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse defines the response type for querying x/bank parameters. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. -#[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, -} -/// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC -/// method. -#[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, -} -/// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. -#[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, -} -/// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC -/// method. -#[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, -} -/// QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, -/// which queries for a paginated set of all account holders of a particular -/// denomination. -#[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, -} -/// 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 -#[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, -} -/// QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. -/// -/// Since: cosmos-sdk 0.46 -#[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, -} -/// MsgSend represents a message to send coins from one account to another. -#[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, -} -/// MsgSendResponse defines the Msg/Send response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSendResponse {} -/// MsgMultiSend represents an arbitrary multi-in, multi-out send message. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMultiSend { - #[prost(message, repeated, tag = "1")] - pub inputs: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub outputs: ::prost::alloc::vec::Vec, -} -/// MsgMultiSendResponse defines the Msg/MultiSend response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMultiSendResponse {} -include!("cosmos.bank.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.tonic.rs deleted file mode 100644 index a9c40591..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.tonic.rs +++ /dev/null @@ -1,894 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn balance( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.bank.v1beta1.Query/Balance"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn all_balances( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.bank.v1beta1.Query/AllBalances"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn spendable_balances( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.bank.v1beta1.Query/SpendableBalances", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn total_supply( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.bank.v1beta1.Query/TotalSupply"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn supply_of( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.bank.v1beta1.Query/SupplyOf"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn params( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.bank.v1beta1.Query/Params"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn denom_metadata( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.bank.v1beta1.Query/DenomMetadata"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn denoms_metadata( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.bank.v1beta1.Query/DenomsMetadata"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn denom_owners( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.bank.v1beta1.Query/DenomOwners"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - async fn balance( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn all_balances( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn spendable_balances( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn total_supply( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn supply_of( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn params( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn denom_metadata( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn denoms_metadata( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn denom_owners( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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 tonic::server::UnaryService for BalanceSvc { - type Response = super::QueryBalanceResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).balance(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for AllBalancesSvc { - type Response = super::QueryAllBalancesResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).all_balances(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService - for SpendableBalancesSvc - { - type Response = super::QuerySpendableBalancesResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).spendable_balances(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for TotalSupplySvc { - type Response = super::QueryTotalSupplyResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).total_supply(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for SupplyOfSvc { - type Response = super::QuerySupplyOfResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).supply_of(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).params(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService - for DenomMetadataSvc - { - type Response = super::QueryDenomMetadataResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).denom_metadata(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService - for DenomsMetadataSvc - { - type Response = super::QueryDenomsMetadataResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).denoms_metadata(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for DenomOwnersSvc { - type Response = super::QueryDenomOwnersResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).denom_owners(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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"; - } -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn send( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.bank.v1beta1.Msg/Send"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn multi_send( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.bank.v1beta1.Msg/MultiSend"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - async fn send( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn multi_send( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).send(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).multi_send(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs deleted file mode 100644 index 94c0e4b0..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs +++ /dev/null @@ -1,171 +0,0 @@ -// @generated -/// TxResponse defines a structure containing relevant tx data and metadata. The -/// tags are stringified and the log is JSON decoded. -#[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<::prost_types::Any>, - /// Time of the previous block. For heights > 1, it's the weighted median of - /// the timestamps of the valid votes in the block.LastCommit. For height == 1, - /// it's genesis time. - #[prost(string, tag = "12")] - pub timestamp: ::prost::alloc::string::String, - /// Events defines all the events emitted by processing a transaction. Note, - /// these events include those emitted by processing all the messages and those - /// emitted from the ante. Whereas Logs contains the events, with - /// additional metadata, emitted only by processing the messages. - /// - /// Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - #[prost(message, repeated, tag = "13")] - pub events: ::prost::alloc::vec::Vec<::tendermint_proto::abci::Event>, -} -/// ABCIMessageLog defines a structure containing an indexed tx ABCI message log. -#[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, -} -/// StringEvent defines en Event object wrapper where all the attributes -/// contain key/value pairs that are strings instead of raw bytes. -#[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, -} -/// Attribute defines an attribute wrapper where the key and value are -/// strings instead of raw bytes. -#[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, -} -/// GasInfo defines tx execution gas context. -#[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, -} -/// Result is the union of ResponseFormat and ResponseCheckTx. -#[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::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<::prost_types::Any>, -} -/// SimulationResponse defines the response generated when a transaction is -/// successfully simulated. -#[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, -} -/// MsgData defines the data returned in a Result object during message -/// execution. -#[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, -} -/// TxMsgData defines a list of MsgData. A transaction will have a MsgData object -/// for each message. -#[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<::prost_types::Any>, -} -/// SearchTxsResult defines a structure for querying txs pageable -#[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, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs deleted file mode 100644 index ac1906db..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs +++ /dev/null @@ -1,16 +0,0 @@ -// @generated -/// Pairs defines a repeated slice of Pair objects. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Pairs { - #[prost(message, repeated, tag = "1")] - pub pairs: ::prost::alloc::vec::Vec, -} -/// Pair defines a key/value bytes tuple. -#[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, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs deleted file mode 100644 index 20a2cbf8..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs +++ /dev/null @@ -1,12 +0,0 @@ -// @generated -/// ConfigRequest defines the request structure for the Config gRPC query. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConfigRequest {} -/// ConfigResponse defines the response structure for the Config gRPC query. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConfigResponse { - #[prost(string, tag = "1")] - pub minimum_gas_price: ::prost::alloc::string::String, -} -include!("cosmos.base.node.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.tonic.rs deleted file mode 100644 index 94ba0e42..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.tonic.rs +++ /dev/null @@ -1,223 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod service_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct ServiceClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl ServiceClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn config( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -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 { - async fn config( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct ServiceServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).config(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs deleted file mode 100644 index f37d3872..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs +++ /dev/null @@ -1,56 +0,0 @@ -// @generated -/// PageRequest is to be embedded in gRPC request messages for efficient -/// pagination. Ex: -/// -/// message SomeRequest { -/// Foo some_parameter = 1; -/// PageRequest pagination = 2; -/// } -#[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, -} -/// 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; -/// } -#[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, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs deleted file mode 100644 index d640d9f6..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs +++ /dev/null @@ -1,28 +0,0 @@ -// @generated -/// ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListAllInterfacesRequest {} -/// ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. -#[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>, -} -/// ListImplementationsRequest is the request type of the ListImplementations -/// RPC. -#[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, -} -/// ListImplementationsResponse is the response type of the ListImplementations -/// RPC. -#[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>, -} -include!("cosmos.base.reflection.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.tonic.rs deleted file mode 100644 index 2ad0f533..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.tonic.rs +++ /dev/null @@ -1,281 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod reflection_service_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct ReflectionServiceClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl ReflectionServiceClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn list_all_interfaces( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.reflection.v1beta1.ReflectionService/ListAllInterfaces", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn list_implementations( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.reflection.v1beta1.ReflectionService/ListImplementations", - ); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -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 { - async fn list_all_interfaces( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn list_implementations( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct ReflectionServiceServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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 - tonic::server::UnaryService - for ListAllInterfacesSvc - { - type Response = super::ListAllInterfacesResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).list_all_interfaces(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for ListImplementationsSvc - { - type Response = super::ListImplementationsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).list_implementations(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs deleted file mode 100644 index e50492c5..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs +++ /dev/null @@ -1,225 +0,0 @@ -// @generated -/// AppDescriptor describes a cosmos-sdk based application -#[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, -} -/// TxDescriptor describes the accepted transaction type -#[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, -} -/// AuthnDescriptor provides information on how to sign transactions without relying -/// on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures -#[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, -} -/// 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 -#[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, -} -/// ChainDescriptor describes chain information of the application -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ChainDescriptor { - /// id is the chain id - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, -} -/// CodecDescriptor describes the registered interfaces and provides metadata information on the types -#[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, -} -/// InterfaceDescriptor describes the implementation of an interface -#[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, - /// interface_implementers is a list of the descriptors of the interface implementers - #[prost(message, repeated, tag = "3")] - pub interface_implementers: ::prost::alloc::vec::Vec, -} -/// InterfaceImplementerDescriptor describes an interface implementer -#[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, -} -/// InterfaceAcceptingMessageDescriptor describes a protobuf message which contains -/// an interface represented as a google.protobuf.Any -#[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>, -} -/// ConfigurationDescriptor contains metadata information on the sdk.Config -#[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, -} -/// MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction -#[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, -} -/// GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetAuthnDescriptorRequest {} -/// GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC -#[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, -} -/// GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetChainDescriptorRequest {} -/// GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetChainDescriptorResponse { - /// chain describes application chain information - #[prost(message, optional, tag = "1")] - pub chain: ::core::option::Option, -} -/// GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetCodecDescriptorRequest {} -/// GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC -#[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, -} -/// GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetConfigurationDescriptorRequest {} -/// GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC -#[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, -} -/// GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetQueryServicesDescriptorRequest {} -/// GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC -#[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, -} -/// GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTxDescriptorRequest {} -/// GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC -#[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, -} -/// QueryServicesDescriptor contains the list of cosmos-sdk queriable services -#[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, -} -/// QueryServiceDescriptor describes a cosmos-sdk queryable service -#[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, -} -/// 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 -#[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, -} -include!("cosmos.base.reflection.v2alpha1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.tonic.rs deleted file mode 100644 index 8d0f7ab9..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.tonic.rs +++ /dev/null @@ -1,502 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod reflection_service_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct ReflectionServiceClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl ReflectionServiceClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn get_authn_descriptor( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn get_chain_descriptor( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.reflection.v2alpha1.ReflectionService/GetChainDescriptor", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn get_codec_descriptor( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.reflection.v2alpha1.ReflectionService/GetCodecDescriptor", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn get_configuration_descriptor( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn get_query_services_descriptor( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn get_tx_descriptor( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.reflection.v2alpha1.ReflectionService/GetTxDescriptor", - ); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -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 { - async fn get_authn_descriptor( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn get_chain_descriptor( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn get_codec_descriptor( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn get_configuration_descriptor( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn get_query_services_descriptor( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn get_tx_descriptor( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct ReflectionServiceServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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 - tonic::server::UnaryService - for GetAuthnDescriptorSvc - { - type Response = super::GetAuthnDescriptorResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).get_authn_descriptor(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for GetChainDescriptorSvc - { - type Response = super::GetChainDescriptorResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).get_chain_descriptor(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for GetCodecDescriptorSvc - { - type Response = super::GetCodecDescriptorResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).get_codec_descriptor(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for GetConfigurationDescriptorSvc - { - type Response = super::GetConfigurationDescriptorResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).get_configuration_descriptor(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for GetQueryServicesDescriptorSvc - { - type Response = super::GetQueryServicesDescriptorResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { - (*inner).get_query_services_descriptor(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for GetTxDescriptorSvc - { - type Response = super::GetTxDescriptorResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).get_tx_descriptor(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs deleted file mode 100644 index 8d80a25d..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs +++ /dev/null @@ -1,111 +0,0 @@ -// @generated -/// Snapshot contains Tendermint state sync snapshot info. -#[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, -} -/// Metadata contains SDK-specific snapshot metadata. -#[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>, -} -/// SnapshotItem is an item contained in a rootmulti.Store snapshot. -/// -/// Since: cosmos-sdk 0.46 -#[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. - #[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), - } -} -/// SnapshotStoreItem contains metadata about a snapshotted store. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotStoreItem { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, -} -/// SnapshotIAVLItem is an exported IAVL node. -/// -/// Since: cosmos-sdk 0.46 -#[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, -} -/// SnapshotExtensionMeta contains metadata about an external snapshotter. -/// -/// Since: cosmos-sdk 0.46 -#[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, -} -/// SnapshotExtensionPayload contains payloads of an external snapshotter. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotExtensionPayload { - #[prost(bytes = "vec", tag = "1")] - pub payload: ::prost::alloc::vec::Vec, -} -/// SnapshotKVItem is an exported Key/Value Pair -/// -/// Since: cosmos-sdk 0.46 -#[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, -} -/// SnapshotSchema is an exported schema of smt store -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotSchema { - #[prost(bytes = "vec", repeated, tag = "1")] - pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs deleted file mode 100644 index 7bc08e4e..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs +++ /dev/null @@ -1,75 +0,0 @@ -// @generated -/// CommitInfo defines commit information used by the multi-store when committing -/// a version/height. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CommitInfo { - #[prost(int64, tag = "1")] - pub version: i64, - #[prost(message, repeated, tag = "2")] - pub store_infos: ::prost::alloc::vec::Vec, -} -/// StoreInfo defines store-specific commit information. It contains a reference -/// between a store name and the commit ID. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StoreInfo { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub commit_id: ::core::option::Option, -} -/// CommitID defines the committment information when a specific store is -/// committed. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CommitId { - #[prost(int64, tag = "1")] - pub version: i64, - #[prost(bytes = "vec", tag = "2")] - pub hash: ::prost::alloc::vec::Vec, -} -/// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) -/// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and -/// Deletes -/// -/// Since: cosmos-sdk 0.43 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StoreKvPair { - /// the store key for the KVStore this pair originates from - #[prost(string, tag = "1")] - pub store_key: ::prost::alloc::string::String, - /// true indicates a delete operation, false indicates a set operation - #[prost(bool, tag = "2")] - pub delete: bool, - #[prost(bytes = "vec", tag = "3")] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "4")] - pub value: ::prost::alloc::vec::Vec, -} -/// BlockMetadata contains all the abci event data of a block -/// the file streamer dump them into files together with the state changes. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BlockMetadata { - #[prost(message, optional, tag = "1")] - pub request_begin_block: ::core::option::Option<::tendermint_proto::abci::RequestBeginBlock>, - #[prost(message, optional, tag = "2")] - pub response_begin_block: ::core::option::Option<::tendermint_proto::abci::ResponseBeginBlock>, - #[prost(message, repeated, tag = "3")] - pub deliver_txs: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub request_end_block: ::core::option::Option<::tendermint_proto::abci::RequestEndBlock>, - #[prost(message, optional, tag = "5")] - pub response_end_block: ::core::option::Option<::tendermint_proto::abci::ResponseEndBlock>, - #[prost(message, optional, tag = "6")] - pub response_commit: ::core::option::Option<::tendermint_proto::abci::ResponseCommit>, -} -/// Nested message and enum types in `BlockMetadata`. -pub mod block_metadata { - /// DeliverTx encapulate deliver tx request and response. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct DeliverTx { - #[prost(message, optional, tag = "1")] - pub request: ::core::option::Option<::tendermint_proto::abci::RequestDeliverTx>, - #[prost(message, optional, tag = "2")] - pub response: ::core::option::Option<::tendermint_proto::abci::ResponseDeliverTx>, - } -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs deleted file mode 100644 index 73c81a51..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs +++ /dev/null @@ -1,279 +0,0 @@ -// @generated -/// Block is tendermint type Block, with the Header proposer address -/// field converted to bech32 string. -#[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>, -} -/// Header defines the structure of a Tendermint block header. -#[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<::prost_types::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, -} -/// GetValidatorSetByHeightRequest is the request type for the -/// Query/GetValidatorSetByHeight RPC method. -#[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, -} -/// GetValidatorSetByHeightResponse is the response type for the -/// Query/GetValidatorSetByHeight RPC method. -#[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, -} -/// GetLatestValidatorSetRequest is the request type for the -/// Query/GetValidatorSetByHeight RPC method. -#[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, -} -/// GetLatestValidatorSetResponse is the response type for the -/// Query/GetValidatorSetByHeight RPC method. -#[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, -} -/// Validator is the type for the validator-set. -#[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<::prost_types::Any>, - #[prost(int64, tag = "3")] - pub voting_power: i64, - #[prost(int64, tag = "4")] - pub proposer_priority: i64, -} -/// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight -/// RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetBlockByHeightRequest { - #[prost(int64, tag = "1")] - pub height: i64, -} -/// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight -/// RPC method. -#[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, -} -/// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC -/// method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetLatestBlockRequest {} -/// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC -/// method. -#[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, -} -/// GetSyncingRequest is the request type for the Query/GetSyncing RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetSyncingRequest {} -/// GetSyncingResponse is the response type for the Query/GetSyncing RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetSyncingResponse { - #[prost(bool, tag = "1")] - pub syncing: bool, -} -/// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetNodeInfoRequest {} -/// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC -/// method. -#[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, -} -/// VersionInfo is the type for the GetNodeInfoResponse message. -#[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, -} -/// Module is the type for VersionInfo -#[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, -} -/// ABCIQueryRequest defines the request structure for the ABCIQuery gRPC query. -#[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, -} -/// ABCIQueryResponse defines the response structure for the ABCIQuery gRPC -/// query. -/// -/// Note: This type is a duplicate of the ResponseQuery proto type defined in -/// Tendermint. -#[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, -} -/// ProofOp defines an operation used for calculating Merkle root. The data could -/// be arbitrary format, providing nessecary data for example neighbouring node -/// hash. -/// -/// Note: This type is a duplicate of the ProofOp proto type defined in -/// Tendermint. -#[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, -} -/// ProofOps is Merkle proof defined by the list of ProofOps. -/// -/// Note: This type is a duplicate of the ProofOps proto type defined in -/// Tendermint. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ProofOps { - #[prost(message, repeated, tag = "1")] - pub ops: ::prost::alloc::vec::Vec, -} -include!("cosmos.base.tendermint.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.tonic.rs deleted file mode 100644 index e1868655..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.tonic.rs +++ /dev/null @@ -1,543 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod service_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct ServiceClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl ServiceClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn get_node_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.tendermint.v1beta1.Service/GetNodeInfo", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn get_syncing( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.tendermint.v1beta1.Service/GetSyncing", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn get_latest_block( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.tendermint.v1beta1.Service/GetLatestBlock", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn get_block_by_height( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.tendermint.v1beta1.Service/GetBlockByHeight", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn get_latest_validator_set( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.tendermint.v1beta1.Service/GetLatestValidatorSet", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn get_validator_set_by_height( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.tendermint.v1beta1.Service/GetValidatorSetByHeight", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn abci_query( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.tendermint.v1beta1.Service/ABCIQuery", - ); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -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 { - async fn get_node_info( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn get_syncing( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn get_latest_block( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn get_block_by_height( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn get_latest_validator_set( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn get_validator_set_by_height( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn abci_query( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct ServiceServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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 tonic::server::UnaryService for GetNodeInfoSvc { - type Response = super::GetNodeInfoResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).get_node_info(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for GetSyncingSvc { - type Response = super::GetSyncingResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).get_syncing(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService - for GetLatestBlockSvc - { - type Response = super::GetLatestBlockResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).get_latest_block(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService - for GetBlockByHeightSvc - { - type Response = super::GetBlockByHeightResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).get_block_by_height(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for GetLatestValidatorSetSvc - { - type Response = super::GetLatestValidatorSetResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).get_latest_validator_set(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for GetValidatorSetByHeightSvc - { - type Response = super::GetValidatorSetByHeightResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).get_validator_set_by_height(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).abci_query(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs deleted file mode 100644 index cc4421b2..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs +++ /dev/null @@ -1,36 +0,0 @@ -// @generated -/// 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. -#[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, -} -/// 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. -#[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, -} -/// IntProto defines a Protobuf wrapper around an Int object. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct IntProto { - #[prost(string, tag = "1")] - pub int: ::prost::alloc::string::String, -} -/// DecProto defines a Protobuf wrapper around a Dec object. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DecProto { - #[prost(string, tag = "1")] - pub dec: ::prost::alloc::string::String, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs deleted file mode 100644 index b1c83050..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs +++ /dev/null @@ -1,46 +0,0 @@ -// @generated -/// Capability defines an implementation of an object capability. The index -/// provided to a Capability must be globally unique. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Capability { - #[prost(uint64, tag = "1")] - pub index: u64, -} -/// Owner defines a single capability owner. An owner is defined by the name of -/// capability and the module name. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Owner { - #[prost(string, tag = "1")] - pub module: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub name: ::prost::alloc::string::String, -} -/// CapabilityOwners defines a set of owners of a single Capability. The set of -/// owners must be unique. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CapabilityOwners { - #[prost(message, repeated, tag = "1")] - pub owners: ::prost::alloc::vec::Vec, -} -/// GenesisOwners defines the capability owners with their corresponding index. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisOwners { - /// index is the index of the capability owner. - #[prost(uint64, tag = "1")] - pub index: u64, - /// index_owners are the owners at the given index. - #[prost(message, optional, tag = "2")] - pub index_owners: ::core::option::Option, -} -/// GenesisState defines the capability module's genesis state. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// index is the capability global index. - #[prost(uint64, tag = "1")] - pub index: u64, - /// owners represents a map from index to owners of the capability index - /// index key is string to allow amino marshalling. - #[prost(message, repeated, tag = "2")] - pub owners: ::prost::alloc::vec::Vec, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs deleted file mode 100644 index b26eda40..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs +++ /dev/null @@ -1,24 +0,0 @@ -// @generated -/// GenesisState defines the crisis module's genesis state. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// constant_fee is the fee used to verify the invariant in the crisis - /// module. - #[prost(message, optional, tag = "3")] - pub constant_fee: ::core::option::Option, -} -/// MsgVerifyInvariant represents a message to verify a particular invariance. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVerifyInvariant { - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub invariant_module_name: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub invariant_route: ::prost::alloc::string::String, -} -/// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVerifyInvariantResponse {} -include!("cosmos.crisis.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.tonic.rs deleted file mode 100644 index c8ef7c45..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.tonic.rs +++ /dev/null @@ -1,220 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn verify_invariant( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.crisis.v1beta1.Msg/VerifyInvariant"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - async fn verify_invariant( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.crisis.v1beta1.Msg/VerifyInvariant" => { - #[allow(non_camel_case_types)] - struct VerifyInvariantSvc(pub Arc); - impl tonic::server::UnaryService for VerifyInvariantSvc { - type Response = super::MsgVerifyInvariantResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).verify_invariant(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = VerifyInvariantSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.crisis.v1beta1.Msg"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs deleted file mode 100644 index 238b361a..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs +++ /dev/null @@ -1,19 +0,0 @@ -// @generated -/// 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. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PubKey { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, -} -/// Deprecated: PrivKey defines a ed25519 private key. -/// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PrivKey { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs deleted file mode 100644 index 1ff415b4..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs +++ /dev/null @@ -1,22 +0,0 @@ -// @generated -/// BIP44Params is used as path field in ledger item in Record. -#[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, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs deleted file mode 100644 index 6f72e275..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs +++ /dev/null @@ -1,53 +0,0 @@ -// @generated -/// Record is used for representing a key in the keyring. -#[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<::prost_types::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 - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Local { - #[prost(message, optional, tag = "1")] - pub priv_key: ::core::option::Option<::prost_types::Any>, - } - /// Ledger item - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Ledger { - #[prost(message, optional, tag = "1")] - pub path: ::core::option::Option, - } - /// Multi item - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Multi {} - /// Offline item - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Offline {} - /// Record contains one of the following items - #[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), - } -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs deleted file mode 100644 index 974b4bc0..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs +++ /dev/null @@ -1,12 +0,0 @@ -// @generated -/// LegacyAminoPubKey specifies a public key type -/// which nests multiple public keys and a threshold, -/// it uses legacy amino address rules. -#[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<::prost_types::Any>, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs deleted file mode 100644 index 9898f38e..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs +++ /dev/null @@ -1,21 +0,0 @@ -// @generated -/// 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. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MultiSignature { - #[prost(bytes = "vec", repeated, tag = "1")] - pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -/// 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. -#[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, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs deleted file mode 100644 index 1f145b3c..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs +++ /dev/null @@ -1,18 +0,0 @@ -// @generated -/// 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. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PubKey { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, -} -/// PrivKey defines a secp256k1 private key. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PrivKey { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs deleted file mode 100644 index ec7fc762..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs +++ /dev/null @@ -1,17 +0,0 @@ -// @generated -/// PubKey defines a secp256r1 ECDSA public key. -#[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, -} -/// PrivKey defines a secp256r1 ECDSA private key. -#[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, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs deleted file mode 100644 index 85d64736..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs +++ /dev/null @@ -1,460 +0,0 @@ -// @generated -/// Params defines the set of params for the distribution module. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - #[prost(string, tag = "1")] - pub community_tax: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub base_proposer_reward: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub bonus_proposer_reward: ::prost::alloc::string::String, - #[prost(bool, tag = "4")] - pub withdraw_addr_enabled: bool, -} -/// ValidatorHistoricalRewards represents historical rewards for a validator. -/// Height is implicit within the store key. -/// Cumulative reward ratio is the sum from the zeroeth period -/// until this period of rewards / tokens, per the spec. -/// The reference count indicates the number of objects -/// which might need to reference this historical entry at any point. -/// ReferenceCount = -/// number of outstanding delegations which ended the associated period (and -/// might need to read that record) -/// + number of slashes which ended the associated period (and might need to -/// read that record) -/// + one per validator for the zeroeth period, set on initialization -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorHistoricalRewards { - #[prost(message, repeated, tag = "1")] - pub cumulative_reward_ratio: ::prost::alloc::vec::Vec, - #[prost(uint32, tag = "2")] - pub reference_count: u32, -} -/// ValidatorCurrentRewards represents current rewards and current -/// period for a validator kept as a running counter and incremented -/// each block as long as the validator's tokens remain constant. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorCurrentRewards { - #[prost(message, repeated, tag = "1")] - pub rewards: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "2")] - pub period: u64, -} -/// ValidatorAccumulatedCommission represents accumulated commission -/// for a validator kept as a running counter, can be withdrawn at any time. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorAccumulatedCommission { - #[prost(message, repeated, tag = "1")] - pub commission: ::prost::alloc::vec::Vec, -} -/// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards -/// for a validator inexpensive to track, allows simple sanity checks. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorOutstandingRewards { - #[prost(message, repeated, tag = "1")] - pub rewards: ::prost::alloc::vec::Vec, -} -/// ValidatorSlashEvent represents a validator slash event. -/// Height is implicit within the store key. -/// This is needed to calculate appropriate amount of staking tokens -/// for delegations which are withdrawn after a slash has occurred. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorSlashEvent { - #[prost(uint64, tag = "1")] - pub validator_period: u64, - #[prost(string, tag = "2")] - pub fraction: ::prost::alloc::string::String, -} -/// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorSlashEvents { - #[prost(message, repeated, tag = "1")] - pub validator_slash_events: ::prost::alloc::vec::Vec, -} -/// FeePool is the global fee pool for distribution. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FeePool { - #[prost(message, repeated, tag = "1")] - pub community_pool: ::prost::alloc::vec::Vec, -} -/// CommunityPoolSpendProposal details a proposal for use of community funds, -/// together with how many coins are proposed to be spent, and to which -/// recipient account. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CommunityPoolSpendProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub recipient: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "4")] - pub amount: ::prost::alloc::vec::Vec, -} -/// DelegatorStartingInfo represents the starting info for a delegator reward -/// period. It tracks the previous validator period, the delegation's amount of -/// staking token, and the creation height (to check later on if any slashes have -/// occurred). NOTE: Even though validators are slashed to whole staking tokens, -/// the delegators within the validator may be left with less than a full token, -/// thus sdk.Dec is used. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DelegatorStartingInfo { - #[prost(uint64, tag = "1")] - pub previous_period: u64, - #[prost(string, tag = "2")] - pub stake: ::prost::alloc::string::String, - #[prost(uint64, tag = "3")] - pub height: u64, -} -/// DelegationDelegatorReward represents the properties -/// of a delegator's delegation reward. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DelegationDelegatorReward { - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub reward: ::prost::alloc::vec::Vec, -} -/// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal -/// with a deposit -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CommunityPoolSpendProposalWithDeposit { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub recipient: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub amount: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub deposit: ::prost::alloc::string::String, -} -/// DelegatorWithdrawInfo is the address for where distributions rewards are -/// withdrawn to by default this struct is only used at genesis to feed in -/// default withdraw addresses. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DelegatorWithdrawInfo { - /// delegator_address is the address of the delegator. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - /// withdraw_address is the address to withdraw the delegation rewards to. - #[prost(string, tag = "2")] - pub withdraw_address: ::prost::alloc::string::String, -} -/// ValidatorOutstandingRewardsRecord is used for import/export via genesis json. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorOutstandingRewardsRecord { - /// validator_address is the address of the validator. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, - /// outstanding_rewards represents the oustanding rewards of a validator. - #[prost(message, repeated, tag = "2")] - pub outstanding_rewards: ::prost::alloc::vec::Vec, -} -/// ValidatorAccumulatedCommissionRecord is used for import / export via genesis -/// json. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorAccumulatedCommissionRecord { - /// validator_address is the address of the validator. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, - /// accumulated is the accumulated commission of a validator. - #[prost(message, optional, tag = "2")] - pub accumulated: ::core::option::Option, -} -/// ValidatorHistoricalRewardsRecord is used for import / export via genesis -/// json. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorHistoricalRewardsRecord { - /// validator_address is the address of the validator. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, - /// period defines the period the historical rewards apply to. - #[prost(uint64, tag = "2")] - pub period: u64, - /// rewards defines the historical rewards of a validator. - #[prost(message, optional, tag = "3")] - pub rewards: ::core::option::Option, -} -/// ValidatorCurrentRewardsRecord is used for import / export via genesis json. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorCurrentRewardsRecord { - /// validator_address is the address of the validator. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, - /// rewards defines the current rewards of a validator. - #[prost(message, optional, tag = "2")] - pub rewards: ::core::option::Option, -} -/// DelegatorStartingInfoRecord used for import / export via genesis json. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DelegatorStartingInfoRecord { - /// delegator_address is the address of the delegator. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - /// validator_address is the address of the validator. - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// starting_info defines the starting info of a delegator. - #[prost(message, optional, tag = "3")] - pub starting_info: ::core::option::Option, -} -/// ValidatorSlashEventRecord is used for import / export via genesis json. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorSlashEventRecord { - /// validator_address is the address of the validator. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, - /// height defines the block height at which the slash event occured. - #[prost(uint64, tag = "2")] - pub height: u64, - /// period is the period of the slash event. - #[prost(uint64, tag = "3")] - pub period: u64, - /// validator_slash_event describes the slash event. - #[prost(message, optional, tag = "4")] - pub validator_slash_event: ::core::option::Option, -} -/// GenesisState defines the distribution module's genesis state. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// params defines all the paramaters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// fee_pool defines the fee pool at genesis. - #[prost(message, optional, tag = "2")] - pub fee_pool: ::core::option::Option, - /// fee_pool defines the delegator withdraw infos at genesis. - #[prost(message, repeated, tag = "3")] - pub delegator_withdraw_infos: ::prost::alloc::vec::Vec, - /// fee_pool defines the previous proposer at genesis. - #[prost(string, tag = "4")] - pub previous_proposer: ::prost::alloc::string::String, - /// fee_pool defines the outstanding rewards of all validators at genesis. - #[prost(message, repeated, tag = "5")] - pub outstanding_rewards: ::prost::alloc::vec::Vec, - /// fee_pool defines the accumulated commisions of all validators at genesis. - #[prost(message, repeated, tag = "6")] - pub validator_accumulated_commissions: - ::prost::alloc::vec::Vec, - /// fee_pool defines the historical rewards of all validators at genesis. - #[prost(message, repeated, tag = "7")] - pub validator_historical_rewards: ::prost::alloc::vec::Vec, - /// fee_pool defines the current rewards of all validators at genesis. - #[prost(message, repeated, tag = "8")] - pub validator_current_rewards: ::prost::alloc::vec::Vec, - /// fee_pool defines the delegator starting infos at genesis. - #[prost(message, repeated, tag = "9")] - pub delegator_starting_infos: ::prost::alloc::vec::Vec, - /// fee_pool defines the validator slash events at genesis. - #[prost(message, repeated, tag = "10")] - pub validator_slash_events: ::prost::alloc::vec::Vec, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[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, -} -/// QueryValidatorOutstandingRewardsRequest is the request type for the -/// Query/ValidatorOutstandingRewards RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorOutstandingRewardsRequest { - /// validator_address defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, -} -/// QueryValidatorOutstandingRewardsResponse is the response type for the -/// Query/ValidatorOutstandingRewards RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorOutstandingRewardsResponse { - #[prost(message, optional, tag = "1")] - pub rewards: ::core::option::Option, -} -/// QueryValidatorCommissionRequest is the request type for the -/// Query/ValidatorCommission RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorCommissionRequest { - /// validator_address defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, -} -/// QueryValidatorCommissionResponse is the response type for the -/// Query/ValidatorCommission RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorCommissionResponse { - /// commission defines the commision the validator received. - #[prost(message, optional, tag = "1")] - pub commission: ::core::option::Option, -} -/// QueryValidatorSlashesRequest is the request type for the -/// Query/ValidatorSlashes RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorSlashesRequest { - /// validator_address defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, - /// starting_height defines the optional starting height to query the slashes. - #[prost(uint64, tag = "2")] - pub starting_height: u64, - /// starting_height defines the optional ending height to query the slashes. - #[prost(uint64, tag = "3")] - pub ending_height: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "4")] - pub pagination: ::core::option::Option, -} -/// QueryValidatorSlashesResponse is the response type for the -/// Query/ValidatorSlashes RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorSlashesResponse { - /// slashes defines the slashes the validator received. - #[prost(message, repeated, tag = "1")] - pub slashes: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryDelegationRewardsRequest is the request type for the -/// Query/DelegationRewards RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegationRewardsRequest { - /// delegator_address defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - /// validator_address defines the validator address to query for. - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, -} -/// QueryDelegationRewardsResponse is the response type for the -/// Query/DelegationRewards RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegationRewardsResponse { - /// rewards defines the rewards accrued by a delegation. - #[prost(message, repeated, tag = "1")] - pub rewards: ::prost::alloc::vec::Vec, -} -/// QueryDelegationTotalRewardsRequest is the request type for the -/// Query/DelegationTotalRewards RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegationTotalRewardsRequest { - /// delegator_address defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, -} -/// QueryDelegationTotalRewardsResponse is the response type for the -/// Query/DelegationTotalRewards RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegationTotalRewardsResponse { - /// rewards defines all the rewards accrued by a delegator. - #[prost(message, repeated, tag = "1")] - pub rewards: ::prost::alloc::vec::Vec, - /// total defines the sum of all the rewards. - #[prost(message, repeated, tag = "2")] - pub total: ::prost::alloc::vec::Vec, -} -/// QueryDelegatorValidatorsRequest is the request type for the -/// Query/DelegatorValidators RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorValidatorsRequest { - /// delegator_address defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, -} -/// QueryDelegatorValidatorsResponse is the response type for the -/// Query/DelegatorValidators RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorValidatorsResponse { - /// validators defines the validators a delegator is delegating for. - #[prost(string, repeated, tag = "1")] - pub validators: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// QueryDelegatorWithdrawAddressRequest is the request type for the -/// Query/DelegatorWithdrawAddress RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorWithdrawAddressRequest { - /// delegator_address defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, -} -/// QueryDelegatorWithdrawAddressResponse is the response type for the -/// Query/DelegatorWithdrawAddress RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorWithdrawAddressResponse { - /// withdraw_address defines the delegator address to query for. - #[prost(string, tag = "1")] - pub withdraw_address: ::prost::alloc::string::String, -} -/// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC -/// method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCommunityPoolRequest {} -/// QueryCommunityPoolResponse is the response type for the Query/CommunityPool -/// RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCommunityPoolResponse { - /// pool defines community pool's coins. - #[prost(message, repeated, tag = "1")] - pub pool: ::prost::alloc::vec::Vec, -} -/// MsgSetWithdrawAddress sets the withdraw address for -/// a delegator (or validator self-delegation). -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSetWithdrawAddress { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub withdraw_address: ::prost::alloc::string::String, -} -/// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSetWithdrawAddressResponse {} -/// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator -/// from a single validator. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgWithdrawDelegatorReward { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, -} -/// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgWithdrawDelegatorRewardResponse { - /// Since: cosmos-sdk 0.46 - #[prost(message, repeated, tag = "1")] - pub amount: ::prost::alloc::vec::Vec, -} -/// MsgWithdrawValidatorCommission withdraws the full commission to the validator -/// address. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgWithdrawValidatorCommission { - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, -} -/// MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgWithdrawValidatorCommissionResponse { - /// Since: cosmos-sdk 0.46 - #[prost(message, repeated, tag = "1")] - pub amount: ::prost::alloc::vec::Vec, -} -/// MsgFundCommunityPool allows an account to directly -/// fund the community pool. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgFundCommunityPool { - #[prost(message, repeated, tag = "1")] - pub amount: ::prost::alloc::vec::Vec, - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, -} -/// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgFundCommunityPoolResponse {} -include!("cosmos.distribution.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.tonic.rs deleted file mode 100644 index c9047094..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.tonic.rs +++ /dev/null @@ -1,1045 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn params( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.distribution.v1beta1.Query/Params"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn validator_outstanding_rewards( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.distribution.v1beta1.Query/ValidatorOutstandingRewards", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn validator_commission( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.distribution.v1beta1.Query/ValidatorCommission", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn validator_slashes( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.distribution.v1beta1.Query/ValidatorSlashes", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn delegation_rewards( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.distribution.v1beta1.Query/DelegationRewards", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn delegation_total_rewards( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.distribution.v1beta1.Query/DelegationTotalRewards", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn delegator_validators( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.distribution.v1beta1.Query/DelegatorValidators", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn delegator_withdraw_address( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.distribution.v1beta1.Query/DelegatorWithdrawAddress", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn community_pool( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.distribution.v1beta1.Query/CommunityPool", - ); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - async fn params( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn validator_outstanding_rewards( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn validator_commission( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn validator_slashes( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn delegation_rewards( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn delegation_total_rewards( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn delegator_validators( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn delegator_withdraw_address( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn community_pool( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.distribution.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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).params(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards" => { - #[allow(non_camel_case_types)] - struct ValidatorOutstandingRewardsSvc(pub Arc); - impl - tonic::server::UnaryService - for ValidatorOutstandingRewardsSvc - { - type Response = super::QueryValidatorOutstandingRewardsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { - (*inner).validator_outstanding_rewards(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ValidatorOutstandingRewardsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.distribution.v1beta1.Query/ValidatorCommission" => { - #[allow(non_camel_case_types)] - struct ValidatorCommissionSvc(pub Arc); - impl - tonic::server::UnaryService - for ValidatorCommissionSvc - { - type Response = super::QueryValidatorCommissionResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).validator_commission(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ValidatorCommissionSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.distribution.v1beta1.Query/ValidatorSlashes" => { - #[allow(non_camel_case_types)] - struct ValidatorSlashesSvc(pub Arc); - impl tonic::server::UnaryService - for ValidatorSlashesSvc - { - type Response = super::QueryValidatorSlashesResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).validator_slashes(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ValidatorSlashesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.distribution.v1beta1.Query/DelegationRewards" => { - #[allow(non_camel_case_types)] - struct DelegationRewardsSvc(pub Arc); - impl tonic::server::UnaryService - for DelegationRewardsSvc - { - type Response = super::QueryDelegationRewardsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).delegation_rewards(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = DelegationRewardsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.distribution.v1beta1.Query/DelegationTotalRewards" => { - #[allow(non_camel_case_types)] - struct DelegationTotalRewardsSvc(pub Arc); - impl - tonic::server::UnaryService - for DelegationTotalRewardsSvc - { - type Response = super::QueryDelegationTotalRewardsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).delegation_total_rewards(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = DelegationTotalRewardsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.distribution.v1beta1.Query/DelegatorValidators" => { - #[allow(non_camel_case_types)] - struct DelegatorValidatorsSvc(pub Arc); - impl - tonic::server::UnaryService - for DelegatorValidatorsSvc - { - type Response = super::QueryDelegatorValidatorsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).delegator_validators(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress" => { - #[allow(non_camel_case_types)] - struct DelegatorWithdrawAddressSvc(pub Arc); - impl - tonic::server::UnaryService - for DelegatorWithdrawAddressSvc - { - type Response = super::QueryDelegatorWithdrawAddressResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).delegator_withdraw_address(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = DelegatorWithdrawAddressSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.distribution.v1beta1.Query/CommunityPool" => { - #[allow(non_camel_case_types)] - struct CommunityPoolSvc(pub Arc); - impl tonic::server::UnaryService - for CommunityPoolSvc - { - type Response = super::QueryCommunityPoolResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).community_pool(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = CommunityPoolSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.distribution.v1beta1.Query"; - } -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn set_withdraw_address( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.distribution.v1beta1.Msg/SetWithdrawAddress", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn withdraw_delegator_reward( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.distribution.v1beta1.Msg/WithdrawDelegatorReward", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn withdraw_validator_commission( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.distribution.v1beta1.Msg/WithdrawValidatorCommission", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn fund_community_pool( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.distribution.v1beta1.Msg/FundCommunityPool", - ); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - async fn set_withdraw_address( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn withdraw_delegator_reward( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn withdraw_validator_commission( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn fund_community_pool( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.distribution.v1beta1.Msg/SetWithdrawAddress" => { - #[allow(non_camel_case_types)] - struct SetWithdrawAddressSvc(pub Arc); - impl tonic::server::UnaryService - for SetWithdrawAddressSvc - { - type Response = super::MsgSetWithdrawAddressResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).set_withdraw_address(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = SetWithdrawAddressSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward" => { - #[allow(non_camel_case_types)] - struct WithdrawDelegatorRewardSvc(pub Arc); - impl tonic::server::UnaryService - for WithdrawDelegatorRewardSvc - { - type Response = super::MsgWithdrawDelegatorRewardResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).withdraw_delegator_reward(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = WithdrawDelegatorRewardSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission" => { - #[allow(non_camel_case_types)] - struct WithdrawValidatorCommissionSvc(pub Arc); - impl tonic::server::UnaryService - for WithdrawValidatorCommissionSvc - { - type Response = super::MsgWithdrawValidatorCommissionResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { - (*inner).withdraw_validator_commission(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = WithdrawValidatorCommissionSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.distribution.v1beta1.Msg/FundCommunityPool" => { - #[allow(non_camel_case_types)] - struct FundCommunityPoolSvc(pub Arc); - impl tonic::server::UnaryService for FundCommunityPoolSvc { - type Response = super::MsgFundCommunityPoolResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).fund_community_pool(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = FundCommunityPoolSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.distribution.v1beta1.Msg"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs deleted file mode 100644 index 6ef949d0..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs +++ /dev/null @@ -1,72 +0,0 @@ -// @generated -/// Equivocation implements the Evidence interface and defines evidence of double -/// signing misbehavior. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Equivocation { - #[prost(int64, tag = "1")] - pub height: i64, - #[prost(message, optional, tag = "2")] - pub time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(int64, tag = "3")] - pub power: i64, - #[prost(string, tag = "4")] - pub consensus_address: ::prost::alloc::string::String, -} -/// GenesisState defines the evidence module's genesis state. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// evidence defines all the evidence at genesis. - #[prost(message, repeated, tag = "1")] - pub evidence: ::prost::alloc::vec::Vec<::prost_types::Any>, -} -/// QueryEvidenceRequest is the request type for the Query/Evidence RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryEvidenceRequest { - /// evidence_hash defines the hash of the requested evidence. - #[prost(bytes = "vec", tag = "1")] - pub evidence_hash: ::prost::alloc::vec::Vec, -} -/// QueryEvidenceResponse is the response type for the Query/Evidence RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryEvidenceResponse { - /// evidence returns the requested evidence. - #[prost(message, optional, tag = "1")] - pub evidence: ::core::option::Option<::prost_types::Any>, -} -/// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC -/// method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllEvidenceRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -/// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC -/// method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllEvidenceResponse { - /// evidence returns all evidences. - #[prost(message, repeated, tag = "1")] - pub evidence: ::prost::alloc::vec::Vec<::prost_types::Any>, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// MsgSubmitEvidence represents a message that supports submitting arbitrary -/// Evidence of misbehavior such as equivocation or counterfactual signing. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitEvidence { - #[prost(string, tag = "1")] - pub submitter: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub evidence: ::core::option::Option<::prost_types::Any>, -} -/// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitEvidenceResponse { - /// hash defines the hash of the evidence. - #[prost(bytes = "vec", tag = "4")] - pub hash: ::prost::alloc::vec::Vec, -} -include!("cosmos.evidence.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.tonic.rs deleted file mode 100644 index 60478992..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.tonic.rs +++ /dev/null @@ -1,492 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn evidence( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.evidence.v1beta1.Query/Evidence"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn all_evidence( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.evidence.v1beta1.Query/AllEvidence"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - async fn evidence( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn all_evidence( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.evidence.v1beta1.Query/Evidence" => { - #[allow(non_camel_case_types)] - struct EvidenceSvc(pub Arc); - impl tonic::server::UnaryService for EvidenceSvc { - type Response = super::QueryEvidenceResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).evidence(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = EvidenceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.evidence.v1beta1.Query/AllEvidence" => { - #[allow(non_camel_case_types)] - struct AllEvidenceSvc(pub Arc); - impl tonic::server::UnaryService for AllEvidenceSvc { - type Response = super::QueryAllEvidenceResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).all_evidence(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = AllEvidenceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.evidence.v1beta1.Query"; - } -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn submit_evidence( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.evidence.v1beta1.Msg/SubmitEvidence"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - async fn submit_evidence( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.evidence.v1beta1.Msg/SubmitEvidence" => { - #[allow(non_camel_case_types)] - struct SubmitEvidenceSvc(pub Arc); - impl tonic::server::UnaryService for SubmitEvidenceSvc { - type Response = super::MsgSubmitEvidenceResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).submit_evidence(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = SubmitEvidenceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.evidence.v1beta1.Msg"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs deleted file mode 100644 index 6715da41..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs +++ /dev/null @@ -1,158 +0,0 @@ -// @generated -/// BasicAllowance implements Allowance with a one-time grant of coins -/// that optionally expires. The grantee can use up to SpendLimit to cover fees. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BasicAllowance { - /// spend_limit specifies the maximum amount of coins that can be spent - /// by this allowance and will be updated as coins are spent. If it is - /// empty, there is no spend limit and any amount of coins can be spent. - #[prost(message, repeated, tag = "1")] - pub spend_limit: ::prost::alloc::vec::Vec, - /// expiration specifies an optional time when this allowance expires - #[prost(message, optional, tag = "2")] - pub expiration: ::core::option::Option<::prost_types::Timestamp>, -} -/// PeriodicAllowance extends Allowance to allow for both a maximum cap, -/// as well as a limit per time period. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PeriodicAllowance { - /// basic specifies a struct of `BasicAllowance` - #[prost(message, optional, tag = "1")] - pub basic: ::core::option::Option, - /// period specifies the time duration in which period_spend_limit coins can - /// be spent before that allowance is reset - #[prost(message, optional, tag = "2")] - pub period: ::core::option::Option<::prost_types::Duration>, - /// period_spend_limit specifies the maximum number of coins that can be spent - /// in the period - #[prost(message, repeated, tag = "3")] - pub period_spend_limit: ::prost::alloc::vec::Vec, - /// period_can_spend is the number of coins left to be spent before the period_reset time - #[prost(message, repeated, tag = "4")] - pub period_can_spend: ::prost::alloc::vec::Vec, - /// period_reset is the time at which this period resets and a new one begins, - /// it is calculated from the start time of the first transaction after the - /// last period ended - #[prost(message, optional, tag = "5")] - pub period_reset: ::core::option::Option<::prost_types::Timestamp>, -} -/// AllowedMsgAllowance creates allowance only for specified message types. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AllowedMsgAllowance { - /// allowance can be any of basic and periodic fee allowance. - #[prost(message, optional, tag = "1")] - pub allowance: ::core::option::Option<::prost_types::Any>, - /// allowed_messages are the messages for which the grantee has the access. - #[prost(string, repeated, tag = "2")] - pub allowed_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// Grant is stored in the KVStore to record a grant with full context -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Grant { - /// granter is the address of the user granting an allowance of their funds. - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - /// grantee is the address of the user being granted an allowance of another user's funds. - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, - /// allowance can be any of basic, periodic, allowed fee allowance. - #[prost(message, optional, tag = "3")] - pub allowance: ::core::option::Option<::prost_types::Any>, -} -/// GenesisState contains a set of fee allowances, persisted from the store -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - #[prost(message, repeated, tag = "1")] - pub allowances: ::prost::alloc::vec::Vec, -} -/// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllowanceRequest { - /// granter is the address of the user granting an allowance of their funds. - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - /// grantee is the address of the user being granted an allowance of another user's funds. - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, -} -/// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllowanceResponse { - /// allowance is a allowance granted for grantee by granter. - #[prost(message, optional, tag = "1")] - pub allowance: ::core::option::Option, -} -/// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllowancesRequest { - #[prost(string, tag = "1")] - pub grantee: ::prost::alloc::string::String, - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllowancesResponse { - /// allowances are allowance's granted for grantee by granter. - #[prost(message, repeated, tag = "1")] - pub allowances: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllowancesByGranterRequest { - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllowancesByGranterResponse { - /// allowances that have been issued by the granter. - #[prost(message, repeated, tag = "1")] - pub allowances: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// MsgGrantAllowance adds permission for Grantee to spend up to Allowance -/// of fees from the account of Granter. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgGrantAllowance { - /// granter is the address of the user granting an allowance of their funds. - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - /// grantee is the address of the user being granted an allowance of another user's funds. - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, - /// allowance can be any of basic, periodic, allowed fee allowance. - #[prost(message, optional, tag = "3")] - pub allowance: ::core::option::Option<::prost_types::Any>, -} -/// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgGrantAllowanceResponse {} -/// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRevokeAllowance { - /// granter is the address of the user granting an allowance of their funds. - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - /// grantee is the address of the user being granted an allowance of another user's funds. - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, -} -/// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRevokeAllowanceResponse {} -include!("cosmos.feegrant.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.tonic.rs deleted file mode 100644 index 1dda0514..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.tonic.rs +++ /dev/null @@ -1,598 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn allowance( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.feegrant.v1beta1.Query/Allowance"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn allowances( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.feegrant.v1beta1.Query/Allowances"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn allowances_by_granter( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.feegrant.v1beta1.Query/AllowancesByGranter", - ); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - async fn allowance( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn allowances( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn allowances_by_granter( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.feegrant.v1beta1.Query/Allowance" => { - #[allow(non_camel_case_types)] - struct AllowanceSvc(pub Arc); - impl tonic::server::UnaryService for AllowanceSvc { - type Response = super::QueryAllowanceResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).allowance(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = AllowanceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.feegrant.v1beta1.Query/Allowances" => { - #[allow(non_camel_case_types)] - struct AllowancesSvc(pub Arc); - impl tonic::server::UnaryService for AllowancesSvc { - type Response = super::QueryAllowancesResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).allowances(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = AllowancesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.feegrant.v1beta1.Query/AllowancesByGranter" => { - #[allow(non_camel_case_types)] - struct AllowancesByGranterSvc(pub Arc); - impl - tonic::server::UnaryService - for AllowancesByGranterSvc - { - type Response = super::QueryAllowancesByGranterResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).allowances_by_granter(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = AllowancesByGranterSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.feegrant.v1beta1.Query"; - } -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn grant_allowance( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.feegrant.v1beta1.Msg/GrantAllowance"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn revoke_allowance( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.feegrant.v1beta1.Msg/RevokeAllowance", - ); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - async fn grant_allowance( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn revoke_allowance( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.feegrant.v1beta1.Msg/GrantAllowance" => { - #[allow(non_camel_case_types)] - struct GrantAllowanceSvc(pub Arc); - impl tonic::server::UnaryService for GrantAllowanceSvc { - type Response = super::MsgGrantAllowanceResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).grant_allowance(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GrantAllowanceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance" => { - #[allow(non_camel_case_types)] - struct RevokeAllowanceSvc(pub Arc); - impl tonic::server::UnaryService for RevokeAllowanceSvc { - type Response = super::MsgRevokeAllowanceResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).revoke_allowance(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = RevokeAllowanceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.feegrant.v1beta1.Msg"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs deleted file mode 100644 index 2527f9e4..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs +++ /dev/null @@ -1,9 +0,0 @@ -// @generated -/// GenesisState defines the raw genesis transaction in JSON. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// gen_txs defines the genesis transactions. - #[prost(bytes = "vec", repeated, tag = "1")] - pub gen_txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs deleted file mode 100644 index 97baf541..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs +++ /dev/null @@ -1,426 +0,0 @@ -// @generated -/// WeightedVoteOption defines a unit of vote for vote split. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct WeightedVoteOption { - #[prost(enumeration = "VoteOption", tag = "1")] - pub option: i32, - #[prost(string, tag = "2")] - pub weight: ::prost::alloc::string::String, -} -/// Deposit defines an amount deposited by an account address to an active -/// proposal. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Deposit { - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -/// Proposal defines the core field members of a governance proposal. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Proposal { - #[prost(uint64, tag = "1")] - pub id: u64, - #[prost(message, repeated, tag = "2")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, - #[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, - #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(message, optional, tag = "6")] - pub deposit_end_time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(message, repeated, tag = "7")] - pub total_deposit: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "8")] - pub voting_start_time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(message, optional, tag = "9")] - pub voting_end_time: ::core::option::Option<::prost_types::Timestamp>, - /// metadata is any arbitrary metadata attached to the proposal. - #[prost(string, tag = "10")] - pub metadata: ::prost::alloc::string::String, -} -/// TallyResult defines a standard tally for a governance proposal. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TallyResult { - #[prost(string, tag = "1")] - pub yes_count: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub abstain_count: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub no_count: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub no_with_veto_count: ::prost::alloc::string::String, -} -/// Vote defines a vote on a governance proposal. -/// A Vote consists of a proposal ID, the voter, and the vote option. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Vote { - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - #[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, -} -/// DepositParams defines the params for deposits on governance proposals. -#[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<::prost_types::Duration>, -} -/// VotingParams defines the params for voting on governance proposals. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct VotingParams { - /// Length of the voting period. - #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option<::prost_types::Duration>, -} -/// TallyParams defines the params for tallying votes on governance proposals. -#[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, -} -/// 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", - } - } -} -/// 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", - } - } -} -/// GenesisState defines the gov module's genesis state. -#[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 paramaters of related to deposit. - #[prost(message, optional, tag = "5")] - pub deposit_params: ::core::option::Option, - /// params defines all the paramaters of related to voting. - #[prost(message, optional, tag = "6")] - pub voting_params: ::core::option::Option, - /// params defines all the paramaters of related to tally. - #[prost(message, optional, tag = "7")] - pub tally_params: ::core::option::Option, -} -/// QueryProposalRequest is the request type for the Query/Proposal RPC method. -#[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, -} -/// QueryProposalResponse is the response type for the Query/Proposal RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalResponse { - #[prost(message, optional, tag = "1")] - pub proposal: ::core::option::Option, -} -/// QueryProposalsRequest is the request type for the Query/Proposals RPC method. -#[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, -} -/// QueryProposalsResponse is the response type for the Query/Proposals RPC -/// method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsResponse { - #[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, -} -/// QueryVoteRequest is the request type for the Query/Vote RPC method. -#[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, -} -/// QueryVoteResponse is the response type for the Query/Vote RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteResponse { - /// vote defined the queried vote. - #[prost(message, optional, tag = "1")] - pub vote: ::core::option::Option, -} -/// QueryVotesRequest is the request type for the Query/Votes RPC method. -#[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, -} -/// QueryVotesResponse is the response type for the Query/Votes RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesResponse { - /// votes defined 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, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[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, -} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[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, -} -/// QueryDepositRequest is the request type for the Query/Deposit RPC method. -#[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, -} -/// QueryDepositResponse is the response type for the Query/Deposit RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositResponse { - /// deposit defines the requested deposit. - #[prost(message, optional, tag = "1")] - pub deposit: ::core::option::Option, -} -/// QueryDepositsRequest is the request type for the Query/Deposits RPC method. -#[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, -} -/// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositsResponse { - #[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, -} -/// QueryTallyResultRequest is the request type for the Query/Tally RPC method. -#[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, -} -/// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultResponse { - /// tally defines the requested tally. - #[prost(message, optional, tag = "1")] - pub tally: ::core::option::Option, -} -/// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -/// proposal Content. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposal { - #[prost(message, repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, - #[prost(message, repeated, tag = "2")] - pub initial_deposit: ::prost::alloc::vec::Vec, - #[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, -} -/// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposalResponse { - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -/// MsgExecLegacyContent is used to wrap the legacy content field into a message. -/// This ensures backwards compatibility with v1beta1.MsgSubmitProposal. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecLegacyContent { - /// content is the proposal's content. - #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option<::prost_types::Any>, - /// authority must be the gov module address. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} -/// MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecLegacyContentResponse {} -/// MsgVote defines a message to cast a vote. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVote { - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - #[prost(enumeration = "VoteOption", tag = "3")] - pub option: i32, - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, -} -/// MsgVoteResponse defines the Msg/Vote response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteResponse {} -/// MsgVoteWeighted defines a message to cast a vote. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeighted { - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub options: ::prost::alloc::vec::Vec, - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, -} -/// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeightedResponse {} -/// MsgDeposit defines a message to submit a deposit to an existing proposal. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDeposit { - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -/// MsgDepositResponse defines the Msg/Deposit response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDepositResponse {} -include!("cosmos.gov.v1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.tonic.rs deleted file mode 100644 index 5948293e..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.tonic.rs +++ /dev/null @@ -1,979 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn proposal( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1.Query/Proposal"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn proposals( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1.Query/Proposals"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn vote( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1.Query/Vote"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn votes( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1.Query/Votes"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn params( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1.Query/Params"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn deposit( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1.Query/Deposit"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn deposits( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1.Query/Deposits"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn tally_result( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1.Query/TallyResult"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - async fn proposal( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn proposals( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn vote( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn votes( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn params( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn deposit( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn deposits( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn tally_result( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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 tonic::server::UnaryService for ProposalSvc { - type Response = super::QueryProposalResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).proposal(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for ProposalsSvc { - type Response = super::QueryProposalsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).proposals(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).vote(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).votes(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).params(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for DepositSvc { - type Response = super::QueryDepositResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).deposit(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for DepositsSvc { - type Response = super::QueryDepositsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).deposits(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for TallyResultSvc { - type Response = super::QueryTallyResultResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).tally_result(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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"; - } -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn submit_proposal( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1.Msg/SubmitProposal"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn exec_legacy_content( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1.Msg/ExecLegacyContent"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn vote( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1.Msg/Vote"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn vote_weighted( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1.Msg/VoteWeighted"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn deposit( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1.Msg/Deposit"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - async fn submit_proposal( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn exec_legacy_content( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn vote( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn vote_weighted( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn deposit( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).submit_proposal(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).exec_legacy_content(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).vote(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).vote_weighted(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).deposit(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs deleted file mode 100644 index ede6c2bc..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs +++ /dev/null @@ -1,421 +0,0 @@ -// @generated -/// WeightedVoteOption defines a unit of vote for vote split. -/// -/// Since: cosmos-sdk 0.43 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct WeightedVoteOption { - #[prost(enumeration = "VoteOption", tag = "1")] - pub option: i32, - #[prost(string, tag = "2")] - pub weight: ::prost::alloc::string::String, -} -/// TextProposal defines a standard text proposal whose changes need to be -/// manually updated in case of approval. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TextProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, -} -/// Deposit defines an amount deposited by an account address to an active -/// proposal. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Deposit { - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -/// Proposal defines the core field members of a governance proposal. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Proposal { - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - #[prost(message, optional, tag = "2")] - pub content: ::core::option::Option<::prost_types::Any>, - #[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, - #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(message, optional, tag = "6")] - pub deposit_end_time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(message, repeated, tag = "7")] - pub total_deposit: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "8")] - pub voting_start_time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(message, optional, tag = "9")] - pub voting_end_time: ::core::option::Option<::prost_types::Timestamp>, -} -/// TallyResult defines a standard tally for a governance proposal. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TallyResult { - #[prost(string, tag = "1")] - pub yes: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub abstain: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub no: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub no_with_veto: ::prost::alloc::string::String, -} -/// Vote defines a vote on a governance proposal. -/// A Vote consists of a proposal ID, the voter, and the vote option. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Vote { - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - #[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, - /// Since: cosmos-sdk 0.43 - #[prost(message, repeated, tag = "4")] - pub options: ::prost::alloc::vec::Vec, -} -/// DepositParams defines the params for deposits on governance proposals. -#[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<::prost_types::Duration>, -} -/// VotingParams defines the params for voting on governance proposals. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct VotingParams { - /// Length of the voting period. - #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option<::prost_types::Duration>, -} -/// TallyParams defines the params for tallying votes on governance proposals. -#[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, -} -/// 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", - } - } -} -/// 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", - } - } -} -/// GenesisState defines the gov module's genesis state. -#[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 paramaters of related to deposit. - #[prost(message, optional, tag = "5")] - pub deposit_params: ::core::option::Option, - /// params defines all the paramaters of related to voting. - #[prost(message, optional, tag = "6")] - pub voting_params: ::core::option::Option, - /// params defines all the paramaters of related to tally. - #[prost(message, optional, tag = "7")] - pub tally_params: ::core::option::Option, -} -/// QueryProposalRequest is the request type for the Query/Proposal RPC method. -#[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, -} -/// QueryProposalResponse is the response type for the Query/Proposal RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalResponse { - #[prost(message, optional, tag = "1")] - pub proposal: ::core::option::Option, -} -/// QueryProposalsRequest is the request type for the Query/Proposals RPC method. -#[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, -} -/// QueryProposalsResponse is the response type for the Query/Proposals RPC -/// method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsResponse { - #[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, -} -/// QueryVoteRequest is the request type for the Query/Vote RPC method. -#[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, -} -/// QueryVoteResponse is the response type for the Query/Vote RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteResponse { - /// vote defined the queried vote. - #[prost(message, optional, tag = "1")] - pub vote: ::core::option::Option, -} -/// QueryVotesRequest is the request type for the Query/Votes RPC method. -#[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, -} -/// QueryVotesResponse is the response type for the Query/Votes RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesResponse { - /// votes defined 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, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[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, -} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[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, -} -/// QueryDepositRequest is the request type for the Query/Deposit RPC method. -#[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, -} -/// QueryDepositResponse is the response type for the Query/Deposit RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositResponse { - /// deposit defines the requested deposit. - #[prost(message, optional, tag = "1")] - pub deposit: ::core::option::Option, -} -/// QueryDepositsRequest is the request type for the Query/Deposits RPC method. -#[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, -} -/// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositsResponse { - #[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, -} -/// QueryTallyResultRequest is the request type for the Query/Tally RPC method. -#[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, -} -/// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultResponse { - /// tally defines the requested tally. - #[prost(message, optional, tag = "1")] - pub tally: ::core::option::Option, -} -/// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -/// proposal Content. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposal { - #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option<::prost_types::Any>, - #[prost(message, repeated, tag = "2")] - pub initial_deposit: ::prost::alloc::vec::Vec, - #[prost(string, tag = "3")] - pub proposer: ::prost::alloc::string::String, -} -/// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposalResponse { - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -/// MsgVote defines a message to cast a vote. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVote { - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - #[prost(enumeration = "VoteOption", tag = "3")] - pub option: i32, -} -/// MsgVoteResponse defines the Msg/Vote response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteResponse {} -/// MsgVoteWeighted defines a message to cast a vote. -/// -/// Since: cosmos-sdk 0.43 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeighted { - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub options: ::prost::alloc::vec::Vec, -} -/// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -/// -/// Since: cosmos-sdk 0.43 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeightedResponse {} -/// MsgDeposit defines a message to submit a deposit to an existing proposal. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDeposit { - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -/// MsgDepositResponse defines the Msg/Deposit response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDepositResponse {} -include!("cosmos.gov.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.tonic.rs deleted file mode 100644 index 8ec7f6e6..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.tonic.rs +++ /dev/null @@ -1,932 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn proposal( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1beta1.Query/Proposal"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn proposals( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1beta1.Query/Proposals"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn vote( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1beta1.Query/Vote"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn votes( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1beta1.Query/Votes"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn params( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1beta1.Query/Params"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn deposit( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1beta1.Query/Deposit"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn deposits( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1beta1.Query/Deposits"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn tally_result( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1beta1.Query/TallyResult"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - async fn proposal( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn proposals( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn vote( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn votes( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn params( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn deposit( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn deposits( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn tally_result( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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 tonic::server::UnaryService for ProposalSvc { - type Response = super::QueryProposalResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).proposal(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for ProposalsSvc { - type Response = super::QueryProposalsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).proposals(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).vote(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).votes(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).params(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for DepositSvc { - type Response = super::QueryDepositResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).deposit(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for DepositsSvc { - type Response = super::QueryDepositsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).deposits(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for TallyResultSvc { - type Response = super::QueryTallyResultResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).tally_result(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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"; - } -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn submit_proposal( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1beta1.Msg/SubmitProposal"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn vote( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1beta1.Msg/Vote"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn vote_weighted( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1beta1.Msg/VoteWeighted"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn deposit( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.gov.v1beta1.Msg/Deposit"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - async fn submit_proposal( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn vote( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn vote_weighted( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn deposit( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).submit_proposal(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).vote(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).vote_weighted(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).deposit(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs deleted file mode 100644 index 6453e258..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs +++ /dev/null @@ -1,999 +0,0 @@ -// @generated -/// Member represents a group member with an account address, -/// non-zero weight, metadata and added_at timestamp. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Member { - /// address is the member's account address. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// weight is the member's voting weight that should be greater than 0. - #[prost(string, tag = "2")] - pub weight: ::prost::alloc::string::String, - /// metadata is any arbitrary metadata attached to the member. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, - /// added_at is a timestamp specifying when a member was added. - #[prost(message, optional, tag = "4")] - pub added_at: ::core::option::Option<::prost_types::Timestamp>, -} -/// MemberRequest represents a group member to be used in Msg server requests. -/// Contrary to `Member`, it doesn't have any `added_at` field -/// since this field cannot be set as part of requests. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MemberRequest { - /// address is the member's account address. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// weight is the member's voting weight that should be greater than 0. - #[prost(string, tag = "2")] - pub weight: ::prost::alloc::string::String, - /// metadata is any arbitrary metadata attached to the member. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, -} -/// ThresholdDecisionPolicy is a decision policy where a proposal passes when it -/// satisfies the two following conditions: -/// 1. The sum of all `YES` voters' weights is greater or equal than the defined -/// `threshold`. -/// 2. The voting and execution periods of the proposal respect the parameters -/// given by `windows`. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ThresholdDecisionPolicy { - /// threshold is the minimum weighted sum of `YES` votes that must be met or - /// exceeded for a proposal to succeed. - #[prost(string, tag = "1")] - pub threshold: ::prost::alloc::string::String, - /// windows defines the different windows for voting and execution. - #[prost(message, optional, tag = "2")] - pub windows: ::core::option::Option, -} -/// PercentageDecisionPolicy is a decision policy where a proposal passes when -/// it satisfies the two following conditions: -/// 1. The percentage of all `YES` voters' weights out of the total group weight -/// is greater or equal than the given `percentage`. -/// 2. The voting and execution periods of the proposal respect the parameters -/// given by `windows`. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PercentageDecisionPolicy { - /// percentage is the minimum percentage the weighted sum of `YES` votes must - /// meet for a proposal to succeed. - #[prost(string, tag = "1")] - pub percentage: ::prost::alloc::string::String, - /// windows defines the different windows for voting and execution. - #[prost(message, optional, tag = "2")] - pub windows: ::core::option::Option, -} -/// DecisionPolicyWindows defines the different windows for voting and execution. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DecisionPolicyWindows { - /// voting_period is the duration from submission of a proposal to the end of voting period - /// Within this times votes can be submitted with MsgVote. - #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option<::prost_types::Duration>, - /// min_execution_period is the minimum duration after the proposal submission - /// where members can start sending MsgExec. This means that the window for - /// sending a MsgExec transaction is: - /// `[ submission + min_execution_period ; submission + voting_period + max_execution_period]` - /// where max_execution_period is a app-specific config, defined in the keeper. - /// If not set, min_execution_period will default to 0. - /// - /// Please make sure to set a `min_execution_period` that is smaller than - /// `voting_period + max_execution_period`, or else the above execution window - /// is empty, meaning that all proposals created with this decision policy - /// won't be able to be executed. - #[prost(message, optional, tag = "2")] - pub min_execution_period: ::core::option::Option<::prost_types::Duration>, -} -// -// State -// - -/// GroupInfo represents the high-level on-chain information for a group. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GroupInfo { - /// id is the unique ID of the group. - #[prost(uint64, tag = "1")] - pub id: u64, - /// admin is the account address of the group's admin. - #[prost(string, tag = "2")] - pub admin: ::prost::alloc::string::String, - /// metadata is any arbitrary metadata to attached to the group. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, - /// version is used to track changes to a group's membership structure that - /// would break existing proposals. Whenever any members weight is changed, - /// or any member is added or removed this version is incremented and will - /// cause proposals based on older versions of this group to fail - #[prost(uint64, tag = "4")] - pub version: u64, - /// total_weight is the sum of the group members' weights. - #[prost(string, tag = "5")] - pub total_weight: ::prost::alloc::string::String, - /// created_at is a timestamp specifying when a group was created. - #[prost(message, optional, tag = "6")] - pub created_at: ::core::option::Option<::prost_types::Timestamp>, -} -/// GroupMember represents the relationship between a group and a member. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GroupMember { - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "1")] - pub group_id: u64, - /// member is the member data. - #[prost(message, optional, tag = "2")] - pub member: ::core::option::Option, -} -/// GroupPolicyInfo represents the high-level on-chain information for a group policy. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GroupPolicyInfo { - /// address is the account address of group policy. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] - pub group_id: u64, - /// admin is the account address of the group admin. - #[prost(string, tag = "3")] - pub admin: ::prost::alloc::string::String, - /// metadata is any arbitrary metadata to attached to the group policy. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, - /// version is used to track changes to a group's GroupPolicyInfo structure that - /// would create a different result on a running proposal. - #[prost(uint64, tag = "5")] - pub version: u64, - /// decision_policy specifies the group policy's decision policy. - #[prost(message, optional, tag = "6")] - pub decision_policy: ::core::option::Option<::prost_types::Any>, - /// created_at is a timestamp specifying when a group policy was created. - #[prost(message, optional, tag = "7")] - pub created_at: ::core::option::Option<::prost_types::Timestamp>, -} -/// Proposal defines a group proposal. Any member of a group can submit a proposal -/// for a group policy to decide upon. -/// A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal -/// passes as well as some optional metadata associated with the proposal. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Proposal { - /// id is the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub id: u64, - /// group_policy_address is the account address of group policy. - #[prost(string, tag = "2")] - pub group_policy_address: ::prost::alloc::string::String, - /// metadata is any arbitrary metadata to attached to the proposal. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, - /// proposers are the account addresses of the proposers. - #[prost(string, repeated, tag = "4")] - pub proposers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// submit_time is a timestamp specifying when a proposal was submitted. - #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::prost_types::Timestamp>, - /// group_version tracks the version of the group at proposal submission. - /// This field is here for informational purposes only. - #[prost(uint64, tag = "6")] - pub group_version: u64, - /// group_policy_version tracks the version of the group policy at proposal submission. - /// When a decision policy is changed, existing proposals from previous policy - /// versions will become invalid with the `ABORTED` status. - /// This field is here for informational purposes only. - #[prost(uint64, tag = "7")] - pub group_policy_version: u64, - /// status represents the high level position in the life cycle of the proposal. Initial value is Submitted. - #[prost(enumeration = "ProposalStatus", tag = "8")] - pub status: i32, - /// final_tally_result contains the sums of all weighted votes for this - /// proposal for each vote option. It is empty at submission, and only - /// populated after tallying, at voting period end or at proposal execution, - /// whichever happens first. - #[prost(message, optional, tag = "9")] - pub final_tally_result: ::core::option::Option, - /// voting_period_end is the timestamp before which voting must be done. - /// Unless a successfull MsgExec is called before (to execute a proposal whose - /// tally is successful before the voting period ends), tallying will be done - /// at this point, and the `final_tally_result`and `status` fields will be - /// accordingly updated. - #[prost(message, optional, tag = "10")] - pub voting_period_end: ::core::option::Option<::prost_types::Timestamp>, - /// executor_result is the final result of the proposal execution. Initial value is NotRun. - #[prost(enumeration = "ProposalExecutorResult", tag = "11")] - pub executor_result: i32, - /// messages is a list of `sdk.Msg`s that will be executed if the proposal passes. - #[prost(message, repeated, tag = "12")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, -} -/// TallyResult represents the sum of weighted votes for each vote option. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TallyResult { - /// yes_count is the weighted sum of yes votes. - #[prost(string, tag = "1")] - pub yes_count: ::prost::alloc::string::String, - /// abstain_count is the weighted sum of abstainers. - #[prost(string, tag = "2")] - pub abstain_count: ::prost::alloc::string::String, - /// no_count is the weighted sum of no votes. - #[prost(string, tag = "3")] - pub no_count: ::prost::alloc::string::String, - /// no_with_veto_count is the weighted sum of veto. - #[prost(string, tag = "4")] - pub no_with_veto_count: ::prost::alloc::string::String, -} -/// Vote represents a vote for a proposal. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Vote { - /// proposal is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter is the account address of the voter. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// option is the voter's choice on the proposal. - #[prost(enumeration = "VoteOption", tag = "3")] - pub option: i32, - /// metadata is any arbitrary metadata to attached to the vote. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, - /// submit_time is the timestamp when the vote was submitted. - #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::prost_types::Timestamp>, -} -/// VoteOption enumerates the valid vote options for a given proposal. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum VoteOption { - /// VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will - /// return an error. - 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", - } - } -} -/// ProposalStatus defines proposal statuses. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum ProposalStatus { - /// An empty value is invalid and not allowed. - Unspecified = 0, - /// Initial status of a proposal when submitted. - Submitted = 1, - /// Final status of a proposal when the final tally is done and the outcome - /// passes the group policy's decision policy. - Accepted = 2, - /// Final status of a proposal when the final tally is done and the outcome - /// is rejected by the group policy's decision policy. - Rejected = 3, - /// Final status of a proposal when the group policy is modified before the - /// final tally. - Aborted = 4, - /// A proposal can be withdrawn before the voting start time by the owner. - /// When this happens the final status is Withdrawn. - Withdrawn = 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::Submitted => "PROPOSAL_STATUS_SUBMITTED", - ProposalStatus::Accepted => "PROPOSAL_STATUS_ACCEPTED", - ProposalStatus::Rejected => "PROPOSAL_STATUS_REJECTED", - ProposalStatus::Aborted => "PROPOSAL_STATUS_ABORTED", - ProposalStatus::Withdrawn => "PROPOSAL_STATUS_WITHDRAWN", - } - } -} -/// ProposalExecutorResult defines types of proposal executor results. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum ProposalExecutorResult { - /// An empty value is not allowed. - Unspecified = 0, - /// We have not yet run the executor. - NotRun = 1, - /// The executor was successful and proposed action updated state. - Success = 2, - /// The executor returned an error and proposed action didn't update state. - Failure = 3, -} -impl ProposalExecutorResult { - /// 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 { - ProposalExecutorResult::Unspecified => "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED", - ProposalExecutorResult::NotRun => "PROPOSAL_EXECUTOR_RESULT_NOT_RUN", - ProposalExecutorResult::Success => "PROPOSAL_EXECUTOR_RESULT_SUCCESS", - ProposalExecutorResult::Failure => "PROPOSAL_EXECUTOR_RESULT_FAILURE", - } - } -} -/// EventCreateGroup is an event emitted when a group is created. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventCreateGroup { - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "1")] - pub group_id: u64, -} -/// EventUpdateGroup is an event emitted when a group is updated. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventUpdateGroup { - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "1")] - pub group_id: u64, -} -/// EventCreateGroupPolicy is an event emitted when a group policy is created. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventCreateGroupPolicy { - /// address is the account address of the group policy. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// EventUpdateGroupPolicy is an event emitted when a group policy is updated. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventUpdateGroupPolicy { - /// address is the account address of the group policy. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// EventSubmitProposal is an event emitted when a proposal is created. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventSubmitProposal { - /// proposal_id is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -/// EventWithdrawProposal is an event emitted when a proposal is withdrawn. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventWithdrawProposal { - /// proposal_id is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -/// EventVote is an event emitted when a voter votes on a proposal. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventVote { - /// proposal_id is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -/// EventExec is an event emitted when a proposal is executed. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventExec { - /// proposal_id is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// result is the proposal execution result. - #[prost(enumeration = "ProposalExecutorResult", tag = "2")] - pub result: i32, - /// logs contains error logs in case the execution result is FAILURE. - #[prost(string, tag = "3")] - pub logs: ::prost::alloc::string::String, -} -/// EventLeaveGroup is an event emitted when group member leaves the group. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventLeaveGroup { - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "1")] - pub group_id: u64, - /// address is the account address of the group member. - #[prost(string, tag = "2")] - pub address: ::prost::alloc::string::String, -} -/// GenesisState defines the group module's genesis state. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// group_seq is the group table orm.Sequence, - /// it is used to get the next group ID. - #[prost(uint64, tag = "1")] - pub group_seq: u64, - /// groups is the list of groups info. - #[prost(message, repeated, tag = "2")] - pub groups: ::prost::alloc::vec::Vec, - /// group_members is the list of groups members. - #[prost(message, repeated, tag = "3")] - pub group_members: ::prost::alloc::vec::Vec, - /// group_policy_seq is the group policy table orm.Sequence, - /// it is used to generate the next group policy account address. - #[prost(uint64, tag = "4")] - pub group_policy_seq: u64, - /// group_policies is the list of group policies info. - #[prost(message, repeated, tag = "5")] - pub group_policies: ::prost::alloc::vec::Vec, - /// proposal_seq is the proposal table orm.Sequence, - /// it is used to get the next proposal ID. - #[prost(uint64, tag = "6")] - pub proposal_seq: u64, - /// proposals is the list of proposals. - #[prost(message, repeated, tag = "7")] - pub proposals: ::prost::alloc::vec::Vec, - /// votes is the list of votes. - #[prost(message, repeated, tag = "8")] - pub votes: ::prost::alloc::vec::Vec, -} -/// QueryGroupInfoRequest is the Query/GroupInfo request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupInfoRequest { - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "1")] - pub group_id: u64, -} -/// QueryGroupInfoResponse is the Query/GroupInfo response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupInfoResponse { - /// info is the GroupInfo for the group. - #[prost(message, optional, tag = "1")] - pub info: ::core::option::Option, -} -/// QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupPolicyInfoRequest { - /// address is the account address of the group policy. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupPolicyInfoResponse { - /// info is the GroupPolicyInfo for the group policy. - #[prost(message, optional, tag = "1")] - pub info: ::core::option::Option, -} -/// QueryGroupMembersRequest is the Query/GroupMembers request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupMembersRequest { - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "1")] - pub group_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupMembersResponse is the Query/GroupMembersResponse response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupMembersResponse { - /// members are the members of the group with given group_id. - #[prost(message, repeated, tag = "1")] - pub members: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupsByAdminRequest { - /// admin is the account address of a group's admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupsByAdminResponse { - /// groups are the groups info with the provided admin. - #[prost(message, repeated, tag = "1")] - pub groups: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupPoliciesByGroupRequest { - /// group_id is the unique ID of the group policy's group. - #[prost(uint64, tag = "1")] - pub group_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupPoliciesByGroupResponse { - /// group_policies are the group policies info associated with the provided group. - #[prost(message, repeated, tag = "1")] - pub group_policies: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupPoliciesByAdminRequest { - /// admin is the admin address of the group policy. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupPoliciesByAdminResponse { - /// group_policies are the group policies info with provided admin. - #[prost(message, repeated, tag = "1")] - pub group_policies: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryProposalRequest is the Query/Proposal request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalRequest { - /// proposal_id is the unique ID of a proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -/// QueryProposalResponse is the Query/Proposal response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalResponse { - /// proposal is the proposal info. - #[prost(message, optional, tag = "1")] - pub proposal: ::core::option::Option, -} -/// QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsByGroupPolicyRequest { - /// address is the account address of the group policy related to proposals. - #[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, -} -/// QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsByGroupPolicyResponse { - /// proposals are the proposals with given group policy. - #[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, -} -/// QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteByProposalVoterRequest { - /// proposal_id is the unique ID of a proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter is a proposal voter account address. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, -} -/// QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteByProposalVoterResponse { - /// vote is the vote with given proposal_id and voter. - #[prost(message, optional, tag = "1")] - pub vote: ::core::option::Option, -} -/// QueryVotesByProposalRequest is the Query/VotesByProposal request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesByProposalRequest { - /// proposal_id is the unique ID of a 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, -} -/// QueryVotesByProposalResponse is the Query/VotesByProposal response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesByProposalResponse { - /// votes are the list of votes for given proposal_id. - #[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, -} -/// QueryVotesByVoterRequest is the Query/VotesByVoter request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesByVoterRequest { - /// voter is a proposal voter account address. - #[prost(string, tag = "1")] - pub voter: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryVotesByVoterResponse is the Query/VotesByVoter response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesByVoterResponse { - /// votes are the list of votes by given voter. - #[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, -} -/// QueryGroupsByMemberRequest is the Query/GroupsByMember request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupsByMemberRequest { - /// address is the group member address. - #[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, -} -/// QueryGroupsByMemberResponse is the Query/GroupsByMember response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupsByMemberResponse { - /// groups are the groups info with the provided group member. - #[prost(message, repeated, tag = "1")] - pub groups: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryTallyResultRequest is the Query/TallyResult request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultRequest { - /// proposal_id is the unique id of a proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -/// QueryTallyResultResponse is the Query/TallyResult response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultResponse { - /// tally defines the requested tally. - #[prost(message, optional, tag = "1")] - pub tally: ::core::option::Option, -} -/// QueryGroupsRequest is the Query/Groups request type. -/// -/// Since: cosmos-sdk 0.47.1 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupsRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupsResponse is the Query/Groups response type. -/// -/// Since: cosmos-sdk 0.47.1 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryGroupsResponse { - /// `groups` is all the groups present in state. - #[prost(message, repeated, tag = "1")] - pub groups: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -// -// Groups -// - -/// MsgCreateGroup is the Msg/CreateGroup request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateGroup { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// members defines the group members. - #[prost(message, repeated, tag = "2")] - pub members: ::prost::alloc::vec::Vec, - /// metadata is any arbitrary metadata to attached to the group. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, -} -/// MsgCreateGroupResponse is the Msg/CreateGroup response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateGroupResponse { - /// group_id is the unique ID of the newly created group. - #[prost(uint64, tag = "1")] - pub group_id: u64, -} -/// MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupMembers { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] - pub group_id: u64, - /// member_updates is the list of members to update, - /// set weight to 0 to remove a member. - #[prost(message, repeated, tag = "3")] - pub member_updates: ::prost::alloc::vec::Vec, -} -/// MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupMembersResponse {} -/// MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupAdmin { - /// admin is the current account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] - pub group_id: u64, - /// new_admin is the group new admin account address. - #[prost(string, tag = "3")] - pub new_admin: ::prost::alloc::string::String, -} -/// MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupAdminResponse {} -/// MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupMetadata { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] - pub group_id: u64, - /// metadata is the updated group's metadata. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, -} -/// MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupMetadataResponse {} -// -// Group Policies -// - -/// MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateGroupPolicy { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] - pub group_id: u64, - /// metadata is any arbitrary metadata attached to the group policy. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, - /// decision_policy specifies the group policy's decision policy. - #[prost(message, optional, tag = "4")] - pub decision_policy: ::core::option::Option<::prost_types::Any>, -} -/// MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateGroupPolicyResponse { - /// address is the account address of the newly created group policy. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupPolicyAdmin { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_policy_address is the account address of the group policy. - #[prost(string, tag = "2")] - pub group_policy_address: ::prost::alloc::string::String, - /// new_admin is the new group policy admin. - #[prost(string, tag = "3")] - pub new_admin: ::prost::alloc::string::String, -} -/// MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateGroupWithPolicy { - /// admin is the account address of the group and group policy admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// members defines the group members. - #[prost(message, repeated, tag = "2")] - pub members: ::prost::alloc::vec::Vec, - /// group_metadata is any arbitrary metadata attached to the group. - #[prost(string, tag = "3")] - pub group_metadata: ::prost::alloc::string::String, - /// group_policy_metadata is any arbitrary metadata attached to the group policy. - #[prost(string, tag = "4")] - pub group_policy_metadata: ::prost::alloc::string::String, - /// group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group - /// and group policy admin. - #[prost(bool, tag = "5")] - pub group_policy_as_admin: bool, - /// decision_policy specifies the group policy's decision policy. - #[prost(message, optional, tag = "6")] - pub decision_policy: ::core::option::Option<::prost_types::Any>, -} -/// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateGroupWithPolicyResponse { - /// group_id is the unique ID of the newly created group with policy. - #[prost(uint64, tag = "1")] - pub group_id: u64, - /// group_policy_address is the account address of the newly created group policy. - #[prost(string, tag = "2")] - pub group_policy_address: ::prost::alloc::string::String, -} -/// MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupPolicyAdminResponse {} -/// MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupPolicyDecisionPolicy { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_policy_address is the account address of group policy. - #[prost(string, tag = "2")] - pub group_policy_address: ::prost::alloc::string::String, - /// decision_policy is the updated group policy's decision policy. - #[prost(message, optional, tag = "3")] - pub decision_policy: ::core::option::Option<::prost_types::Any>, -} -/// MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupPolicyDecisionPolicyResponse {} -/// MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupPolicyMetadata { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_policy_address is the account address of group policy. - #[prost(string, tag = "2")] - pub group_policy_address: ::prost::alloc::string::String, - /// metadata is the updated group policy metadata. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, -} -/// MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateGroupPolicyMetadataResponse {} -/// MsgSubmitProposal is the Msg/SubmitProposal request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposal { - /// group_policy_address is the account address of group policy. - #[prost(string, tag = "1")] - pub group_policy_address: ::prost::alloc::string::String, - /// proposers are the account addresses of the proposers. - /// Proposers signatures will be counted as yes votes. - #[prost(string, repeated, tag = "2")] - pub proposers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// metadata is any arbitrary metadata to attached to the proposal. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, - /// messages is a list of `sdk.Msg`s that will be executed if the proposal passes. - #[prost(message, repeated, tag = "4")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, - /// exec defines the mode of execution of the proposal, - /// whether it should be executed immediately on creation or not. - /// If so, proposers signatures are considered as Yes votes. - #[prost(enumeration = "Exec", tag = "5")] - pub exec: i32, -} -/// MsgSubmitProposalResponse is the Msg/SubmitProposal response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposalResponse { - /// proposal is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -/// MsgWithdrawProposal is the Msg/WithdrawProposal request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgWithdrawProposal { - /// proposal is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// address is the admin of the group policy or one of the proposer of the proposal. - #[prost(string, tag = "2")] - pub address: ::prost::alloc::string::String, -} -/// MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgWithdrawProposalResponse {} -/// MsgVote is the Msg/Vote request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVote { - /// proposal is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter is the voter account address. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// option is the voter's choice on the proposal. - #[prost(enumeration = "VoteOption", tag = "3")] - pub option: i32, - /// metadata is any arbitrary metadata to attached to the vote. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, - /// exec defines whether the proposal should be executed - /// immediately after voting or not. - #[prost(enumeration = "Exec", tag = "5")] - pub exec: i32, -} -/// MsgVoteResponse is the Msg/Vote response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteResponse {} -/// MsgExec is the Msg/Exec request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExec { - /// proposal is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// executor is the account address used to execute the proposal. - #[prost(string, tag = "2")] - pub executor: ::prost::alloc::string::String, -} -/// MsgExecResponse is the Msg/Exec request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecResponse { - /// result is the final result of the proposal execution. - #[prost(enumeration = "ProposalExecutorResult", tag = "2")] - pub result: i32, -} -/// MsgLeaveGroup is the Msg/LeaveGroup request type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgLeaveGroup { - /// address is the account address of the group member. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] - pub group_id: u64, -} -/// MsgLeaveGroupResponse is the Msg/LeaveGroup response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgLeaveGroupResponse {} -// -// Proposals and Voting -// - -/// Exec defines modes of execution of a proposal on creation or on new vote. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum Exec { - /// An empty value means that there should be a separate - /// MsgExec request for the proposal to execute. - Unspecified = 0, - /// Try to execute the proposal immediately. - /// If the proposal is not allowed per the DecisionPolicy, - /// the proposal will still be open and could - /// be executed at a later point. - Try = 1, -} -impl Exec { - /// 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 { - Exec::Unspecified => "EXEC_UNSPECIFIED", - Exec::Try => "EXEC_TRY", - } - } -} -include!("cosmos.group.v1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.tonic.rs deleted file mode 100644 index a5d54bca..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.tonic.rs +++ /dev/null @@ -1,1782 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn group_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Query/GroupInfo"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn group_policy_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Query/GroupPolicyInfo"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn group_members( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Query/GroupMembers"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn groups_by_admin( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Query/GroupsByAdmin"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn group_policies_by_group( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Query/GroupPoliciesByGroup"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn group_policies_by_admin( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Query/GroupPoliciesByAdmin"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn proposal( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Query/Proposal"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn proposals_by_group_policy( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Query/ProposalsByGroupPolicy", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn vote_by_proposal_voter( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Query/VoteByProposalVoter"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn votes_by_proposal( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Query/VotesByProposal"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn votes_by_voter( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Query/VotesByVoter"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn groups_by_member( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Query/GroupsByMember"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn tally_result( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Query/TallyResult"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn groups( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Query/Groups"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - async fn group_info( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn group_policy_info( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn group_members( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn groups_by_admin( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn group_policies_by_group( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn group_policies_by_admin( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn proposal( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn proposals_by_group_policy( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn vote_by_proposal_voter( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn votes_by_proposal( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn votes_by_voter( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn groups_by_member( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn tally_result( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn groups( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.group.v1.Query/GroupInfo" => { - #[allow(non_camel_case_types)] - struct GroupInfoSvc(pub Arc); - impl tonic::server::UnaryService for GroupInfoSvc { - type Response = super::QueryGroupInfoResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).group_info(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GroupInfoSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Query/GroupPolicyInfo" => { - #[allow(non_camel_case_types)] - struct GroupPolicyInfoSvc(pub Arc); - impl tonic::server::UnaryService - for GroupPolicyInfoSvc - { - type Response = super::QueryGroupPolicyInfoResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).group_policy_info(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GroupPolicyInfoSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Query/GroupMembers" => { - #[allow(non_camel_case_types)] - struct GroupMembersSvc(pub Arc); - impl tonic::server::UnaryService for GroupMembersSvc { - type Response = super::QueryGroupMembersResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).group_members(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GroupMembersSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Query/GroupsByAdmin" => { - #[allow(non_camel_case_types)] - struct GroupsByAdminSvc(pub Arc); - impl tonic::server::UnaryService - for GroupsByAdminSvc - { - type Response = super::QueryGroupsByAdminResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).groups_by_admin(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GroupsByAdminSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Query/GroupPoliciesByGroup" => { - #[allow(non_camel_case_types)] - struct GroupPoliciesByGroupSvc(pub Arc); - impl - tonic::server::UnaryService - for GroupPoliciesByGroupSvc - { - type Response = super::QueryGroupPoliciesByGroupResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).group_policies_by_group(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GroupPoliciesByGroupSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Query/GroupPoliciesByAdmin" => { - #[allow(non_camel_case_types)] - struct GroupPoliciesByAdminSvc(pub Arc); - impl - tonic::server::UnaryService - for GroupPoliciesByAdminSvc - { - type Response = super::QueryGroupPoliciesByAdminResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).group_policies_by_admin(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GroupPoliciesByAdminSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Query/Proposal" => { - #[allow(non_camel_case_types)] - struct ProposalSvc(pub Arc); - impl tonic::server::UnaryService for ProposalSvc { - type Response = super::QueryProposalResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).proposal(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Query/ProposalsByGroupPolicy" => { - #[allow(non_camel_case_types)] - struct ProposalsByGroupPolicySvc(pub Arc); - impl - tonic::server::UnaryService - for ProposalsByGroupPolicySvc - { - type Response = super::QueryProposalsByGroupPolicyResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).proposals_by_group_policy(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ProposalsByGroupPolicySvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Query/VoteByProposalVoter" => { - #[allow(non_camel_case_types)] - struct VoteByProposalVoterSvc(pub Arc); - impl - tonic::server::UnaryService - for VoteByProposalVoterSvc - { - type Response = super::QueryVoteByProposalVoterResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).vote_by_proposal_voter(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = VoteByProposalVoterSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Query/VotesByProposal" => { - #[allow(non_camel_case_types)] - struct VotesByProposalSvc(pub Arc); - impl tonic::server::UnaryService - for VotesByProposalSvc - { - type Response = super::QueryVotesByProposalResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).votes_by_proposal(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = VotesByProposalSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Query/VotesByVoter" => { - #[allow(non_camel_case_types)] - struct VotesByVoterSvc(pub Arc); - impl tonic::server::UnaryService for VotesByVoterSvc { - type Response = super::QueryVotesByVoterResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).votes_by_voter(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = VotesByVoterSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Query/GroupsByMember" => { - #[allow(non_camel_case_types)] - struct GroupsByMemberSvc(pub Arc); - impl tonic::server::UnaryService - for GroupsByMemberSvc - { - type Response = super::QueryGroupsByMemberResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).groups_by_member(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GroupsByMemberSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Query/TallyResult" => { - #[allow(non_camel_case_types)] - struct TallyResultSvc(pub Arc); - impl tonic::server::UnaryService for TallyResultSvc { - type Response = super::QueryTallyResultResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).tally_result(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Query/Groups" => { - #[allow(non_camel_case_types)] - struct GroupsSvc(pub Arc); - impl tonic::server::UnaryService for GroupsSvc { - type Response = super::QueryGroupsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).groups(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GroupsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.group.v1.Query"; - } -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn create_group( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Msg/CreateGroup"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn update_group_members( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Msg/UpdateGroupMembers"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn update_group_admin( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Msg/UpdateGroupAdmin"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn update_group_metadata( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Msg/UpdateGroupMetadata"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn create_group_policy( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Msg/CreateGroupPolicy"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn create_group_with_policy( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Msg/CreateGroupWithPolicy"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn update_group_policy_admin( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Msg/UpdateGroupPolicyAdmin"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn update_group_policy_decision_policy( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Msg/UpdateGroupPolicyDecisionPolicy", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn update_group_policy_metadata( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Msg/UpdateGroupPolicyMetadata", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn submit_proposal( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Msg/SubmitProposal"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn withdraw_proposal( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Msg/WithdrawProposal"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn vote( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Msg/Vote"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn exec( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Msg/Exec"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn leave_group( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.group.v1.Msg/LeaveGroup"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - async fn create_group( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn update_group_members( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn update_group_admin( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn update_group_metadata( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn create_group_policy( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn create_group_with_policy( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn update_group_policy_admin( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn update_group_policy_decision_policy( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn update_group_policy_metadata( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn submit_proposal( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn withdraw_proposal( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn vote( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn exec( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn leave_group( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.group.v1.Msg/CreateGroup" => { - #[allow(non_camel_case_types)] - struct CreateGroupSvc(pub Arc); - impl tonic::server::UnaryService for CreateGroupSvc { - type Response = super::MsgCreateGroupResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).create_group(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = CreateGroupSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Msg/UpdateGroupMembers" => { - #[allow(non_camel_case_types)] - struct UpdateGroupMembersSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateGroupMembersSvc - { - type Response = super::MsgUpdateGroupMembersResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).update_group_members(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = UpdateGroupMembersSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Msg/UpdateGroupAdmin" => { - #[allow(non_camel_case_types)] - struct UpdateGroupAdminSvc(pub Arc); - impl tonic::server::UnaryService for UpdateGroupAdminSvc { - type Response = super::MsgUpdateGroupAdminResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).update_group_admin(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = UpdateGroupAdminSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Msg/UpdateGroupMetadata" => { - #[allow(non_camel_case_types)] - struct UpdateGroupMetadataSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateGroupMetadataSvc - { - type Response = super::MsgUpdateGroupMetadataResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).update_group_metadata(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = UpdateGroupMetadataSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Msg/CreateGroupPolicy" => { - #[allow(non_camel_case_types)] - struct CreateGroupPolicySvc(pub Arc); - impl tonic::server::UnaryService for CreateGroupPolicySvc { - type Response = super::MsgCreateGroupPolicyResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).create_group_policy(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = CreateGroupPolicySvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Msg/CreateGroupWithPolicy" => { - #[allow(non_camel_case_types)] - struct CreateGroupWithPolicySvc(pub Arc); - impl tonic::server::UnaryService - for CreateGroupWithPolicySvc - { - type Response = super::MsgCreateGroupWithPolicyResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).create_group_with_policy(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = CreateGroupWithPolicySvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Msg/UpdateGroupPolicyAdmin" => { - #[allow(non_camel_case_types)] - struct UpdateGroupPolicyAdminSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateGroupPolicyAdminSvc - { - type Response = super::MsgUpdateGroupPolicyAdminResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).update_group_policy_admin(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = UpdateGroupPolicyAdminSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Msg/UpdateGroupPolicyDecisionPolicy" => { - #[allow(non_camel_case_types)] - struct UpdateGroupPolicyDecisionPolicySvc(pub Arc); - impl - tonic::server::UnaryService - for UpdateGroupPolicyDecisionPolicySvc - { - type Response = super::MsgUpdateGroupPolicyDecisionPolicyResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { - (*inner).update_group_policy_decision_policy(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = UpdateGroupPolicyDecisionPolicySvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Msg/UpdateGroupPolicyMetadata" => { - #[allow(non_camel_case_types)] - struct UpdateGroupPolicyMetadataSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateGroupPolicyMetadataSvc - { - type Response = super::MsgUpdateGroupPolicyMetadataResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).update_group_policy_metadata(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = UpdateGroupPolicyMetadataSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).submit_proposal(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Msg/WithdrawProposal" => { - #[allow(non_camel_case_types)] - struct WithdrawProposalSvc(pub Arc); - impl tonic::server::UnaryService for WithdrawProposalSvc { - type Response = super::MsgWithdrawProposalResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).withdraw_proposal(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = WithdrawProposalSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).vote(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Msg/Exec" => { - #[allow(non_camel_case_types)] - struct ExecSvc(pub Arc); - impl tonic::server::UnaryService for ExecSvc { - type Response = super::MsgExecResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).exec(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ExecSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.group.v1.Msg/LeaveGroup" => { - #[allow(non_camel_case_types)] - struct LeaveGroupSvc(pub Arc); - impl tonic::server::UnaryService for LeaveGroupSvc { - type Response = super::MsgLeaveGroupResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).leave_group(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = LeaveGroupSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.group.v1.Msg"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs deleted file mode 100644 index 70d49802..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs +++ /dev/null @@ -1,78 +0,0 @@ -// @generated -/// Minter represents the minting state. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Minter { - /// current annual inflation rate - #[prost(string, tag = "1")] - pub inflation: ::prost::alloc::string::String, - /// current annual expected provisions - #[prost(string, tag = "2")] - pub annual_provisions: ::prost::alloc::string::String, -} -/// Params holds parameters for the mint module. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// type of coin to mint - #[prost(string, tag = "1")] - pub mint_denom: ::prost::alloc::string::String, - /// maximum annual change in inflation rate - #[prost(string, tag = "2")] - pub inflation_rate_change: ::prost::alloc::string::String, - /// maximum inflation rate - #[prost(string, tag = "3")] - pub inflation_max: ::prost::alloc::string::String, - /// minimum inflation rate - #[prost(string, tag = "4")] - pub inflation_min: ::prost::alloc::string::String, - /// goal of percent bonded atoms - #[prost(string, tag = "5")] - pub goal_bonded: ::prost::alloc::string::String, - /// expected blocks per year - #[prost(uint64, tag = "6")] - pub blocks_per_year: u64, -} -/// GenesisState defines the mint module's genesis state. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// minter is a space for holding current inflation information. - #[prost(message, optional, tag = "1")] - pub minter: ::core::option::Option, - /// params defines all the paramaters of the module. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[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, -} -/// QueryInflationRequest is the request type for the Query/Inflation RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryInflationRequest {} -/// QueryInflationResponse is the response type for the Query/Inflation RPC -/// method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryInflationResponse { - /// inflation is the current minting inflation value. - #[prost(bytes = "vec", tag = "1")] - pub inflation: ::prost::alloc::vec::Vec, -} -/// QueryAnnualProvisionsRequest is the request type for the -/// Query/AnnualProvisions RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAnnualProvisionsRequest {} -/// QueryAnnualProvisionsResponse is the response type for the -/// Query/AnnualProvisions RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAnnualProvisionsResponse { - /// annual_provisions is the current minting annual provisions value. - #[prost(bytes = "vec", tag = "1")] - pub annual_provisions: ::prost::alloc::vec::Vec, -} -include!("cosmos.mint.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.tonic.rs deleted file mode 100644 index b100e323..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.tonic.rs +++ /dev/null @@ -1,323 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn params( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.mint.v1beta1.Query/Params"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn inflation( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.mint.v1beta1.Query/Inflation"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn annual_provisions( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.mint.v1beta1.Query/AnnualProvisions"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - async fn params( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn inflation( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn annual_provisions( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.mint.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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).params(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.mint.v1beta1.Query/Inflation" => { - #[allow(non_camel_case_types)] - struct InflationSvc(pub Arc); - impl tonic::server::UnaryService for InflationSvc { - type Response = super::QueryInflationResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).inflation(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = InflationSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.mint.v1beta1.Query/AnnualProvisions" => { - #[allow(non_camel_case_types)] - struct AnnualProvisionsSvc(pub Arc); - impl tonic::server::UnaryService - for AnnualProvisionsSvc - { - type Response = super::QueryAnnualProvisionsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).annual_provisions(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = AnnualProvisionsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.mint.v1beta1.Query"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.msg.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.msg.v1.rs deleted file mode 100644 index 8e2ac1be..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.msg.v1.rs +++ /dev/null @@ -1,2 +0,0 @@ -// @generated -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs deleted file mode 100644 index 9c48b679..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs +++ /dev/null @@ -1,216 +0,0 @@ -// @generated -/// EventSend is emitted on Msg/Send -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventSend { - #[prost(string, tag = "1")] - pub class_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub sender: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub receiver: ::prost::alloc::string::String, -} -/// EventMint is emitted on Mint -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventMint { - #[prost(string, tag = "1")] - pub class_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub owner: ::prost::alloc::string::String, -} -/// EventBurn is emitted on Burn -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventBurn { - #[prost(string, tag = "1")] - pub class_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub owner: ::prost::alloc::string::String, -} -/// Class defines the class of the nft type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Class { - /// id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, - /// name defines the human-readable name of the NFT classification. Optional - #[prost(string, tag = "2")] - pub name: ::prost::alloc::string::String, - /// symbol is an abbreviated name for nft classification. Optional - #[prost(string, tag = "3")] - pub symbol: ::prost::alloc::string::String, - /// description is a brief description of nft classification. Optional - #[prost(string, tag = "4")] - pub description: ::prost::alloc::string::String, - /// uri for the class metadata stored off chain. It can define schema for Class and NFT `Data` attributes. Optional - #[prost(string, tag = "5")] - pub uri: ::prost::alloc::string::String, - /// uri_hash is a hash of the document pointed by uri. Optional - #[prost(string, tag = "6")] - pub uri_hash: ::prost::alloc::string::String, - /// data is the app specific metadata of the NFT class. Optional - #[prost(message, optional, tag = "7")] - pub data: ::core::option::Option<::prost_types::Any>, -} -/// NFT defines the NFT. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Nft { - /// class_id associated with the NFT, similar to the contract address of ERC721 - #[prost(string, tag = "1")] - pub class_id: ::prost::alloc::string::String, - /// id is a unique identifier of the NFT - #[prost(string, tag = "2")] - pub id: ::prost::alloc::string::String, - /// uri for the NFT metadata stored off chain - #[prost(string, tag = "3")] - pub uri: ::prost::alloc::string::String, - /// uri_hash is a hash of the document pointed by uri - #[prost(string, tag = "4")] - pub uri_hash: ::prost::alloc::string::String, - /// data is an app specific data of the NFT. Optional - #[prost(message, optional, tag = "10")] - pub data: ::core::option::Option<::prost_types::Any>, -} -/// GenesisState defines the nft module's genesis state. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// class defines the class of the nft type. - #[prost(message, repeated, tag = "1")] - pub classes: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub entries: ::prost::alloc::vec::Vec, -} -/// Entry Defines all nft owned by a person -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Entry { - /// owner is the owner address of the following nft - #[prost(string, tag = "1")] - pub owner: ::prost::alloc::string::String, - /// nfts is a group of nfts of the same owner - #[prost(message, repeated, tag = "2")] - pub nfts: ::prost::alloc::vec::Vec, -} -/// QueryBalanceRequest is the request type for the Query/Balance RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryBalanceRequest { - #[prost(string, tag = "1")] - pub class_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub owner: ::prost::alloc::string::String, -} -/// QueryBalanceResponse is the response type for the Query/Balance RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryBalanceResponse { - #[prost(uint64, tag = "1")] - pub amount: u64, -} -/// QueryOwnerRequest is the request type for the Query/Owner RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryOwnerRequest { - #[prost(string, tag = "1")] - pub class_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub id: ::prost::alloc::string::String, -} -/// QueryOwnerResponse is the response type for the Query/Owner RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryOwnerResponse { - #[prost(string, tag = "1")] - pub owner: ::prost::alloc::string::String, -} -/// QuerySupplyRequest is the request type for the Query/Supply RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySupplyRequest { - #[prost(string, tag = "1")] - pub class_id: ::prost::alloc::string::String, -} -/// QuerySupplyResponse is the response type for the Query/Supply RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySupplyResponse { - #[prost(uint64, tag = "1")] - pub amount: u64, -} -/// QueryNFTstRequest is the request type for the Query/NFTs RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNfTsRequest { - #[prost(string, tag = "1")] - pub class_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub owner: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option, -} -/// QueryNFTsResponse is the response type for the Query/NFTs RPC methods -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNfTsResponse { - #[prost(message, repeated, tag = "1")] - pub nfts: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryNFTRequest is the request type for the Query/NFT RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNftRequest { - #[prost(string, tag = "1")] - pub class_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub id: ::prost::alloc::string::String, -} -/// QueryNFTResponse is the response type for the Query/NFT RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNftResponse { - #[prost(message, optional, tag = "1")] - pub nft: ::core::option::Option, -} -/// QueryClassRequest is the request type for the Query/Class RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClassRequest { - #[prost(string, tag = "1")] - pub class_id: ::prost::alloc::string::String, -} -/// QueryClassResponse is the response type for the Query/Class RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClassResponse { - #[prost(message, optional, tag = "1")] - pub class: ::core::option::Option, -} -/// QueryClassesRequest is the request type for the Query/Classes RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClassesRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -/// QueryClassesResponse is the response type for the Query/Classes RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClassesResponse { - #[prost(message, repeated, tag = "1")] - pub classes: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// MsgSend represents a message to send a nft from one account to another account. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSend { - /// class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 - #[prost(string, tag = "1")] - pub class_id: ::prost::alloc::string::String, - /// id defines the unique identification of nft - #[prost(string, tag = "2")] - pub id: ::prost::alloc::string::String, - /// sender is the address of the owner of nft - #[prost(string, tag = "3")] - pub sender: ::prost::alloc::string::String, - /// receiver is the receiver address of nft - #[prost(string, tag = "4")] - pub receiver: ::prost::alloc::string::String, -} -/// MsgSendResponse defines the Msg/Send response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSendResponse {} -include!("cosmos.nft.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.tonic.rs deleted file mode 100644 index cfbe0906..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.tonic.rs +++ /dev/null @@ -1,734 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn balance( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.nft.v1beta1.Query/Balance"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn owner( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.nft.v1beta1.Query/Owner"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn supply( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.nft.v1beta1.Query/Supply"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn nf_ts( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.nft.v1beta1.Query/NFTs"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn nft( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.nft.v1beta1.Query/NFT"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn class( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.nft.v1beta1.Query/Class"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn classes( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.nft.v1beta1.Query/Classes"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - async fn balance( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn owner( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn supply( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn nf_ts( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn nft( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn class( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn classes( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.nft.v1beta1.Query/Balance" => { - #[allow(non_camel_case_types)] - struct BalanceSvc(pub Arc); - impl tonic::server::UnaryService for BalanceSvc { - type Response = super::QueryBalanceResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).balance(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.nft.v1beta1.Query/Owner" => { - #[allow(non_camel_case_types)] - struct OwnerSvc(pub Arc); - impl tonic::server::UnaryService for OwnerSvc { - type Response = super::QueryOwnerResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).owner(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = OwnerSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.nft.v1beta1.Query/Supply" => { - #[allow(non_camel_case_types)] - struct SupplySvc(pub Arc); - impl tonic::server::UnaryService for SupplySvc { - type Response = super::QuerySupplyResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).supply(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = SupplySvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.nft.v1beta1.Query/NFTs" => { - #[allow(non_camel_case_types)] - struct NFTsSvc(pub Arc); - impl tonic::server::UnaryService for NFTsSvc { - type Response = super::QueryNfTsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).nf_ts(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = NFTsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.nft.v1beta1.Query/NFT" => { - #[allow(non_camel_case_types)] - struct NFTSvc(pub Arc); - impl tonic::server::UnaryService for NFTSvc { - type Response = super::QueryNftResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).nft(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = NFTSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.nft.v1beta1.Query/Class" => { - #[allow(non_camel_case_types)] - struct ClassSvc(pub Arc); - impl tonic::server::UnaryService for ClassSvc { - type Response = super::QueryClassResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).class(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ClassSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.nft.v1beta1.Query/Classes" => { - #[allow(non_camel_case_types)] - struct ClassesSvc(pub Arc); - impl tonic::server::UnaryService for ClassesSvc { - type Response = super::QueryClassesResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).classes(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ClassesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.nft.v1beta1.Query"; - } -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn send( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.nft.v1beta1.Msg/Send"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - async fn send( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.nft.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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).send(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.nft.v1beta1.Msg"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs deleted file mode 100644 index f73da631..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs +++ /dev/null @@ -1,7 +0,0 @@ -// @generated -/// Module defines the ORM module which adds providers to the app container for -/// module-scoped DB's. In the future it may provide gRPC services for interacting -/// with ORM data. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Module {} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs deleted file mode 100644 index 8f1615c5..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs +++ /dev/null @@ -1,90 +0,0 @@ -// @generated -/// TableDescriptor describes an ORM table. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TableDescriptor { - /// primary_key defines the primary key for the table. - #[prost(message, optional, tag = "1")] - pub primary_key: ::core::option::Option, - /// index defines one or more secondary indexes. - #[prost(message, repeated, tag = "2")] - pub index: ::prost::alloc::vec::Vec, - /// id is a non-zero integer ID that must be unique within the - /// tables and singletons in this file. It may be deprecated in the future when this - /// can be auto-generated. - #[prost(uint32, tag = "3")] - pub id: u32, -} -/// PrimaryKeyDescriptor describes a table primary key. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PrimaryKeyDescriptor { - /// fields is a comma-separated list of fields in the primary key. Spaces are - /// not allowed. Supported field types, their encodings, and any applicable constraints - /// are described below. - /// - uint32 are encoded as 2,3,4 or 5 bytes using a compact encoding that - /// is suitable for sorted iteration (not varint encoding). This type is - /// well-suited for small integers. - /// - uint64 are encoded as 2,4,6 or 9 bytes using a compact encoding that - /// is suitable for sorted iteration (not varint encoding). This type is - /// well-suited for small integers such as auto-incrementing sequences. - /// - fixed32, fixed64 are encoded as big-endian fixed width bytes and support - /// sorted iteration. These types are well-suited for encoding fixed with - /// decimals as integers. - /// - string's are encoded as raw bytes in terminal key segments and null-terminated - /// in non-terminal segments. Null characters are thus forbidden in strings. - /// string fields support sorted iteration. - /// - bytes are encoded as raw bytes in terminal segments and length-prefixed - /// with a 32-bit unsigned varint in non-terminal segments. - /// - int32, sint32, int64, sint64, sfixed32, sfixed64 are encoded as fixed width bytes with - /// an encoding that enables sorted iteration. - /// - google.protobuf.Timestamp and google.protobuf.Duration are encoded - /// as 12 bytes using an encoding that enables sorted iteration. - /// - enum fields are encoded using varint encoding and do not support sorted - /// iteration. - /// - bool fields are encoded as a single byte 0 or 1. - /// - /// All other fields types are unsupported in keys including repeated and - /// oneof fields. - /// - /// Primary keys are prefixed by the varint encoded table id and the byte 0x0 - /// plus any additional prefix specified by the schema. - #[prost(string, tag = "1")] - pub fields: ::prost::alloc::string::String, - /// auto_increment specifies that the primary key is generated by an - /// auto-incrementing integer. If this is set to true fields must only - /// contain one field of that is of type uint64. - #[prost(bool, tag = "2")] - pub auto_increment: bool, -} -/// PrimaryKeyDescriptor describes a table secondary index. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SecondaryIndexDescriptor { - /// fields is a comma-separated list of fields in the index. The supported - /// field types are the same as those for PrimaryKeyDescriptor.fields. - /// Index keys are prefixed by the varint encoded table id and the varint - /// encoded index id plus any additional prefix specified by the schema. - /// - /// In addition the field segments, non-unique index keys are suffixed with - /// any additional primary key fields not present in the index fields so that the - /// primary key can be reconstructed. Unique indexes instead of being suffixed - /// store the remaining primary key fields in the value.. - #[prost(string, tag = "1")] - pub fields: ::prost::alloc::string::String, - /// id is a non-zero integer ID that must be unique within the indexes for this - /// table and less than 32768. It may be deprecated in the future when this can - /// be auto-generated. - #[prost(uint32, tag = "2")] - pub id: u32, - /// unique specifies that this an unique index. - #[prost(bool, tag = "3")] - pub unique: bool, -} -/// TableDescriptor describes an ORM singleton table which has at most one instance. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SingletonDescriptor { - /// id is a non-zero integer ID that must be unique within the - /// tables and singletons in this file. It may be deprecated in the future when this - /// can be auto-generated. - #[prost(uint32, tag = "1")] - pub id: u32, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs deleted file mode 100644 index 9122e8ad..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs +++ /dev/null @@ -1,82 +0,0 @@ -// @generated -/// ModuleSchemaDescriptor describe's a module's ORM schema. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ModuleSchemaDescriptor { - #[prost(message, repeated, tag = "1")] - pub schema_file: ::prost::alloc::vec::Vec, - /// prefix is an optional prefix that precedes all keys in this module's - /// store. - #[prost(bytes = "vec", tag = "2")] - pub prefix: ::prost::alloc::vec::Vec, -} -/// Nested message and enum types in `ModuleSchemaDescriptor`. -pub mod module_schema_descriptor { - /// FileEntry describes an ORM file used in a module. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct FileEntry { - /// id is a prefix that will be varint encoded and prepended to all the - /// table keys specified in the file's tables. - #[prost(uint32, tag = "1")] - pub id: u32, - /// proto_file_name is the name of a file .proto in that contains - /// table definitions. The .proto file must be in a package that the - /// module has referenced using cosmos.app.v1.ModuleDescriptor.use_package. - #[prost(string, tag = "2")] - pub proto_file_name: ::prost::alloc::string::String, - /// storage_type optionally indicates the type of storage this file's - /// tables should used. If it is left unspecified, the default KV-storage - /// of the app will be used. - #[prost(enumeration = "super::StorageType", tag = "3")] - pub storage_type: i32, - } -} -/// StorageType -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum StorageType { - /// STORAGE_TYPE_DEFAULT_UNSPECIFIED indicates the persistent - /// KV-storage where primary key entries are stored in merkle-tree - /// backed commitment storage and indexes and seqs are stored in - /// fast index storage. Note that the Cosmos SDK before store/v2alpha1 - /// does not support this. - DefaultUnspecified = 0, - /// STORAGE_TYPE_MEMORY indicates in-memory storage that will be - /// reloaded every time an app restarts. Tables with this type of storage - /// will by default be ignored when importing and exporting a module's - /// state from JSON. - Memory = 1, - /// STORAGE_TYPE_TRANSIENT indicates transient storage that is reset - /// at the end of every block. Tables with this type of storage - /// will by default be ignored when importing and exporting a module's - /// state from JSON. - Transient = 2, - /// STORAGE_TYPE_INDEX indicates persistent storage which is not backed - /// by a merkle-tree and won't affect the app hash. Note that the Cosmos SDK - /// before store/v2alpha1 does not support this. - Index = 3, - /// STORAGE_TYPE_INDEX indicates persistent storage which is backed by - /// a merkle-tree. With this type of storage, both primary and index keys - /// will affect the app hash and this is generally less efficient - /// than using STORAGE_TYPE_DEFAULT_UNSPECIFIED which separates index - /// keys into index storage. Note that modules built with the - /// Cosmos SDK before store/v2alpha1 must specify STORAGE_TYPE_COMMITMENT - /// instead of STORAGE_TYPE_DEFAULT_UNSPECIFIED or STORAGE_TYPE_INDEX - /// because this is the only type of persistent storage available. - Commitment = 4, -} -impl StorageType { - /// 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 { - StorageType::DefaultUnspecified => "STORAGE_TYPE_DEFAULT_UNSPECIFIED", - StorageType::Memory => "STORAGE_TYPE_MEMORY", - StorageType::Transient => "STORAGE_TYPE_TRANSIENT", - StorageType::Index => "STORAGE_TYPE_INDEX", - StorageType::Commitment => "STORAGE_TYPE_COMMITMENT", - } - } -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs deleted file mode 100644 index 59c20e5d..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs +++ /dev/null @@ -1,67 +0,0 @@ -// @generated -/// ParameterChangeProposal defines a proposal to change one or more parameters. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ParameterChangeProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub changes: ::prost::alloc::vec::Vec, -} -/// ParamChange defines an individual parameter change, for use in -/// ParameterChangeProposal. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ParamChange { - #[prost(string, tag = "1")] - pub subspace: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub key: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub value: ::prost::alloc::string::String, -} -/// QueryParamsRequest is request type for the Query/Params RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest { - /// subspace defines the module to query the parameter for. - #[prost(string, tag = "1")] - pub subspace: ::prost::alloc::string::String, - /// key defines the key of the parameter in the subspace. - #[prost(string, tag = "2")] - pub key: ::prost::alloc::string::String, -} -/// QueryParamsResponse is response type for the Query/Params RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// param defines the queried parameter. - #[prost(message, optional, tag = "1")] - pub param: ::core::option::Option, -} -/// QuerySubspacesRequest defines a request type for querying for all registered -/// subspaces and all keys for a subspace. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySubspacesRequest {} -/// QuerySubspacesResponse defines the response types for querying for all -/// registered subspaces and all keys for a subspace. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySubspacesResponse { - #[prost(message, repeated, tag = "1")] - pub subspaces: ::prost::alloc::vec::Vec, -} -/// Subspace defines a parameter subspace name and all the keys that exist for -/// the subspace. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Subspace { - #[prost(string, tag = "1")] - pub subspace: ::prost::alloc::string::String, - #[prost(string, repeated, tag = "2")] - pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -include!("cosmos.params.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.tonic.rs deleted file mode 100644 index 3ffebbc4..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.tonic.rs +++ /dev/null @@ -1,272 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn params( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.params.v1beta1.Query/Params"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn subspaces( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.params.v1beta1.Query/Subspaces"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - async fn params( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn subspaces( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.params.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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).params(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.params.v1beta1.Query/Subspaces" => { - #[allow(non_camel_case_types)] - struct SubspacesSvc(pub Arc); - impl tonic::server::UnaryService for SubspacesSvc { - type Response = super::QuerySubspacesResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).subspaces(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = SubspacesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.params.v1beta1.Query"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs deleted file mode 100644 index 31d12936..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs +++ /dev/null @@ -1,140 +0,0 @@ -// @generated -/// ValidatorSigningInfo defines a validator's signing info for monitoring their -/// liveness activity. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorSigningInfo { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Height at which validator was first a candidate OR was unjailed - #[prost(int64, tag = "2")] - pub start_height: i64, - /// Index which is incremented each time the validator was a bonded - /// in a block and may have signed a precommit or not. This in conjunction with the - /// `SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`. - #[prost(int64, tag = "3")] - pub index_offset: i64, - /// Timestamp until which the validator is jailed due to liveness downtime. - #[prost(message, optional, tag = "4")] - pub jailed_until: ::core::option::Option<::prost_types::Timestamp>, - /// Whether or not a validator has been tombstoned (killed out of validator set). It is set - /// once the validator commits an equivocation or for any other configured misbehiavor. - #[prost(bool, tag = "5")] - pub tombstoned: bool, - /// A counter kept to avoid unnecessary array reads. - /// Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. - #[prost(int64, tag = "6")] - pub missed_blocks_counter: i64, -} -/// Params represents the parameters used for by the slashing module. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - #[prost(int64, tag = "1")] - pub signed_blocks_window: i64, - #[prost(bytes = "vec", tag = "2")] - pub min_signed_per_window: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub downtime_jail_duration: ::core::option::Option<::prost_types::Duration>, - #[prost(bytes = "vec", tag = "4")] - pub slash_fraction_double_sign: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "5")] - pub slash_fraction_downtime: ::prost::alloc::vec::Vec, -} -/// GenesisState defines the slashing module's genesis state. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// params defines all the paramaters of related to deposit. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// signing_infos represents a map between validator addresses and their - /// signing infos. - #[prost(message, repeated, tag = "2")] - pub signing_infos: ::prost::alloc::vec::Vec, - /// missed_blocks represents a map between validator addresses and their - /// missed blocks. - #[prost(message, repeated, tag = "3")] - pub missed_blocks: ::prost::alloc::vec::Vec, -} -/// SigningInfo stores validator signing info of corresponding address. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SigningInfo { - /// address is the validator address. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// validator_signing_info represents the signing info of this validator. - #[prost(message, optional, tag = "2")] - pub validator_signing_info: ::core::option::Option, -} -/// ValidatorMissedBlocks contains array of missed blocks of corresponding -/// address. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorMissedBlocks { - /// address is the validator address. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// missed_blocks is an array of missed blocks by the validator. - #[prost(message, repeated, tag = "2")] - pub missed_blocks: ::prost::alloc::vec::Vec, -} -/// MissedBlock contains height and missed status as boolean. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MissedBlock { - /// index is the height at which the block was missed. - #[prost(int64, tag = "1")] - pub index: i64, - /// missed is the missed status. - #[prost(bool, tag = "2")] - pub missed: bool, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC -/// method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySigningInfoRequest { - /// cons_address is the address to query signing info of - #[prost(string, tag = "1")] - pub cons_address: ::prost::alloc::string::String, -} -/// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC -/// method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySigningInfoResponse { - /// val_signing_info is the signing info of requested val cons address - #[prost(message, optional, tag = "1")] - pub val_signing_info: ::core::option::Option, -} -/// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC -/// method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySigningInfosRequest { - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -/// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC -/// method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySigningInfosResponse { - /// info is the signing info of all validators - #[prost(message, repeated, tag = "1")] - pub info: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// MsgUnjail defines the Msg/Unjail request type -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUnjail { - #[prost(string, tag = "1")] - pub validator_addr: ::prost::alloc::string::String, -} -/// MsgUnjailResponse defines the Msg/Unjail response type -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUnjailResponse {} -include!("cosmos.slashing.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.tonic.rs deleted file mode 100644 index 559a6659..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.tonic.rs +++ /dev/null @@ -1,541 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn params( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.slashing.v1beta1.Query/Params"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn signing_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.slashing.v1beta1.Query/SigningInfo"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn signing_infos( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.slashing.v1beta1.Query/SigningInfos"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - async fn params( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn signing_info( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn signing_infos( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.slashing.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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).params(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.slashing.v1beta1.Query/SigningInfo" => { - #[allow(non_camel_case_types)] - struct SigningInfoSvc(pub Arc); - impl tonic::server::UnaryService for SigningInfoSvc { - type Response = super::QuerySigningInfoResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).signing_info(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = SigningInfoSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.slashing.v1beta1.Query/SigningInfos" => { - #[allow(non_camel_case_types)] - struct SigningInfosSvc(pub Arc); - impl tonic::server::UnaryService for SigningInfosSvc { - type Response = super::QuerySigningInfosResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).signing_infos(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = SigningInfosSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.slashing.v1beta1.Query"; - } -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn unjail( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.slashing.v1beta1.Msg/Unjail"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - async fn unjail( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.slashing.v1beta1.Msg/Unjail" => { - #[allow(non_camel_case_types)] - struct UnjailSvc(pub Arc); - impl tonic::server::UnaryService for UnjailSvc { - type Response = super::MsgUnjailResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).unjail(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = UnjailSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.slashing.v1beta1.Msg"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs deleted file mode 100644 index a74fc9ac..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs +++ /dev/null @@ -1,787 +0,0 @@ -// @generated -/// StakeAuthorization defines authorization for delegate/undelegate/redelegate. -/// -/// Since: cosmos-sdk 0.43 -#[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::Policy", 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. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Validators { - #[prost(string, repeated, tag = "1")] - pub address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - } - /// validators is the oneof that represents either allow_list or deny_list - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Policy { - /// allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - /// account. - #[prost(message, tag = "2")] - AllowList(Validators), - /// deny_list specifies list of validator addresses to whom grantee can not delegate tokens. - #[prost(message, tag = "3")] - DenyList(Validators), - } -} -/// 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", - } - } -} -/// 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). -#[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, -} -/// CommissionRates defines the initial commission rates to be used for creating -/// a validator. -#[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, -} -/// Commission defines commission parameters for a given validator. -#[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<::prost_types::Timestamp>, -} -/// Description defines a validator description. -#[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, -} -/// 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. -#[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<::prost_types::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<::prost_types::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, -} -/// ValAddresses defines a repeated set of validator addresses. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValAddresses { - #[prost(string, repeated, tag = "1")] - pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// 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. -#[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, -} -/// DVPairs defines an array of DVPair objects. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DvPairs { - #[prost(message, repeated, tag = "1")] - pub pairs: ::prost::alloc::vec::Vec, -} -/// 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. -#[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, -} -/// DVVTriplets defines an array of DVVTriplet objects. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DvvTriplets { - #[prost(message, repeated, tag = "1")] - pub triplets: ::prost::alloc::vec::Vec, -} -/// 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. -#[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, -} -/// UnbondingDelegation stores all of a single delegator's unbonding bonds -/// for a single validator in an time-ordered list. -#[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, -} -/// UnbondingDelegationEntry defines an unbonding object with relevant metadata. -#[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<::prost_types::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, -} -/// RedelegationEntry defines a redelegation object with relevant metadata. -#[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<::prost_types::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, -} -/// Redelegation contains the list of a particular delegator's redelegating bonds -/// from a particular source validator to a particular destination validator. -#[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, -} -/// Params defines the parameters for the staking module. -#[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<::prost_types::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, -} -/// DelegationResponse is equivalent to Delegation except that it contains a -/// balance in addition to shares which is more suitable for client responses. -#[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, -} -/// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it -/// contains a balance in addition to shares which is more suitable for client -/// responses. -#[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, -} -/// RedelegationResponse is equivalent to a Redelegation except that its entries -/// contain a balance in addition to shares which is more suitable for client -/// responses. -#[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, -} -/// Pool is used for tracking bonded and not-bonded token supply of the bond -/// denomination. -#[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, -} -/// 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", - } - } -} -/// GenesisState defines the staking module's genesis state. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// params defines all the paramaters 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, -} -/// LastValidatorPower required for validator set update logic. -#[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, -} -/// QueryValidatorsRequest is request type for Query/Validators RPC method. -#[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, -} -/// QueryValidatorsResponse is response type for the Query/Validators RPC method -#[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, -} -/// QueryValidatorRequest is response type for the Query/Validator RPC method -#[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, -} -/// QueryValidatorResponse is response type for the Query/Validator RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorResponse { - /// validator defines the validator info. - #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option, -} -/// QueryValidatorDelegationsRequest is request type for the -/// Query/ValidatorDelegations RPC method -#[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, -} -/// QueryValidatorDelegationsResponse is response type for the -/// Query/ValidatorDelegations RPC method -#[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, -} -/// QueryValidatorUnbondingDelegationsRequest is required type for the -/// Query/ValidatorUnbondingDelegations RPC method -#[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, -} -/// QueryValidatorUnbondingDelegationsResponse is response type for the -/// Query/ValidatorUnbondingDelegations RPC method. -#[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, -} -/// QueryDelegationRequest is request type for the Query/Delegation RPC method. -#[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, -} -/// QueryDelegationResponse is response type for the Query/Delegation RPC method. -#[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, -} -/// QueryUnbondingDelegationRequest is request type for the -/// Query/UnbondingDelegation RPC method. -#[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, -} -/// QueryDelegationResponse is response type for the Query/UnbondingDelegation -/// RPC method. -#[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, -} -/// QueryDelegatorDelegationsRequest is request type for the -/// Query/DelegatorDelegations RPC method. -#[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, -} -/// QueryDelegatorDelegationsResponse is response type for the -/// Query/DelegatorDelegations RPC method. -#[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, -} -/// QueryDelegatorUnbondingDelegationsRequest is request type for the -/// Query/DelegatorUnbondingDelegations RPC method. -#[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, -} -/// QueryUnbondingDelegatorDelegationsResponse is response type for the -/// Query/UnbondingDelegatorDelegations RPC method. -#[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, -} -/// QueryRedelegationsRequest is request type for the Query/Redelegations RPC -/// method. -#[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, -} -/// QueryRedelegationsResponse is response type for the Query/Redelegations RPC -/// method. -#[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, -} -/// QueryDelegatorValidatorsRequest is request type for the -/// Query/DelegatorValidators RPC method. -#[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, -} -/// QueryDelegatorValidatorsResponse is response type for the -/// Query/DelegatorValidators RPC method. -#[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, -} -/// QueryDelegatorValidatorRequest is request type for the -/// Query/DelegatorValidator RPC method. -#[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, -} -/// QueryDelegatorValidatorResponse response type for the -/// Query/DelegatorValidator RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorValidatorResponse { - /// validator defines the validator info. - #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option, -} -/// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC -/// method. -#[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, -} -/// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -/// method. -#[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, -} -/// QueryPoolRequest is request type for the Query/Pool RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPoolRequest {} -/// QueryPoolResponse is response type for the Query/Pool RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPoolResponse { - /// pool defines the pool info. - #[prost(message, optional, tag = "1")] - pub pool: ::core::option::Option, -} -/// QueryParamsRequest is request type for the Query/Params RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is response type for the Query/Params RPC method. -#[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, -} -/// MsgCreateValidator defines a SDK message for creating a new validator. -#[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_types::Any>, - #[prost(message, optional, tag = "7")] - pub value: ::core::option::Option, -} -/// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateValidatorResponse {} -/// MsgEditValidator defines a SDK message for editing an existing validator. -#[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, -} -/// MsgEditValidatorResponse defines the Msg/EditValidator response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgEditValidatorResponse {} -/// MsgDelegate defines a SDK message for performing a delegation of coins -/// from a delegator to a validator. -#[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, -} -/// MsgDelegateResponse defines the Msg/Delegate response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDelegateResponse {} -/// MsgBeginRedelegate defines a SDK message for performing a redelegation -/// of coins from a delegator and source validator to a destination validator. -#[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, -} -/// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgBeginRedelegateResponse { - #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option<::prost_types::Timestamp>, -} -/// MsgUndelegate defines a SDK message for performing an undelegation from a -/// delegate and a validator. -#[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, -} -/// MsgUndelegateResponse defines the Msg/Undelegate response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUndelegateResponse { - #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option<::prost_types::Timestamp>, -} -/// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator -/// -/// Since: cosmos-sdk 0.46 -#[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, -} -/// MsgCancelUnbondingDelegationResponse -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelUnbondingDelegationResponse {} -include!("cosmos.staking.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.tonic.rs deleted file mode 100644 index cc803d79..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.tonic.rs +++ /dev/null @@ -1,1394 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn validators( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Query/Validators"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn validator( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Query/Validator"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn validator_delegations( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Query/ValidatorDelegations", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn validator_unbonding_delegations( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Query/ValidatorUnbondingDelegations", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn delegation( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Query/Delegation"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn unbonding_delegation( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Query/UnbondingDelegation", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn delegator_delegations( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Query/DelegatorDelegations", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn delegator_unbonding_delegations( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Query/DelegatorUnbondingDelegations", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn redelegations( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Query/Redelegations"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn delegator_validators( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Query/DelegatorValidators", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn delegator_validator( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Query/DelegatorValidator", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn historical_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Query/HistoricalInfo", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn pool( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Query/Pool"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn params( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Query/Params"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - async fn validators( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn validator( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn validator_delegations( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn validator_unbonding_delegations( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn delegation( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn unbonding_delegation( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn delegator_delegations( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn delegator_unbonding_delegations( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn redelegations( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn delegator_validators( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn delegator_validator( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn historical_info( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn pool( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn params( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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 tonic::server::UnaryService for ValidatorsSvc { - type Response = super::QueryValidatorsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).validators(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for ValidatorSvc { - type Response = super::QueryValidatorResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).validator(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for ValidatorDelegationsSvc - { - type Response = super::QueryValidatorDelegationsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).validator_delegations(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService< - super::QueryValidatorUnbondingDelegationsRequest, - > for ValidatorUnbondingDelegationsSvc - { - type Response = super::QueryValidatorUnbondingDelegationsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request< - super::QueryValidatorUnbondingDelegationsRequest, - >, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { - (*inner).validator_unbonding_delegations(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for DelegationSvc { - type Response = super::QueryDelegationResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).delegation(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for UnbondingDelegationSvc - { - type Response = super::QueryUnbondingDelegationResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).unbonding_delegation(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for DelegatorDelegationsSvc - { - type Response = super::QueryDelegatorDelegationsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).delegator_delegations(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService< - super::QueryDelegatorUnbondingDelegationsRequest, - > for DelegatorUnbondingDelegationsSvc - { - type Response = super::QueryDelegatorUnbondingDelegationsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request< - super::QueryDelegatorUnbondingDelegationsRequest, - >, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { - (*inner).delegator_unbonding_delegations(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService - for RedelegationsSvc - { - type Response = super::QueryRedelegationsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).redelegations(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for DelegatorValidatorsSvc - { - type Response = super::QueryDelegatorValidatorsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).delegator_validators(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for DelegatorValidatorSvc - { - type Response = super::QueryDelegatorValidatorResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).delegator_validator(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService - for HistoricalInfoSvc - { - type Response = super::QueryHistoricalInfoResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).historical_info(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).pool(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).params(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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"; - } -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn create_validator( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Msg/CreateValidator"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn edit_validator( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Msg/EditValidator"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn delegate( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Msg/Delegate"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn begin_redelegate( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Msg/BeginRedelegate"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn undelegate( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Msg/Undelegate"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn cancel_unbonding_delegation( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.staking.v1beta1.Msg/CancelUnbondingDelegation", - ); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - async fn create_validator( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn edit_validator( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn delegate( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn begin_redelegate( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn undelegate( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn cancel_unbonding_delegation( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).create_validator(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).edit_validator(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).delegate(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).begin_redelegate(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).undelegate(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService - for CancelUnbondingDelegationSvc - { - type Response = super::MsgCancelUnbondingDelegationResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).cancel_unbonding_delegation(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs deleted file mode 100644 index ef809f20..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs +++ /dev/null @@ -1,130 +0,0 @@ -// @generated -/// SignatureDescriptors wraps multiple SignatureDescriptor's. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignatureDescriptors { - /// signatures are the signature descriptors - #[prost(message, repeated, tag = "1")] - pub signatures: ::prost::alloc::vec::Vec, -} -/// 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. -#[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<::prost_types::Any>, - #[prost(message, optional, tag = "2")] - pub data: ::core::option::Option, - /// sequence is the sequence of the account, which describes the - /// number of committed transactions signed by a given address. It is used to prevent - /// replay attacks. - #[prost(uint64, tag = "3")] - pub sequence: u64, -} -/// Nested message and enum types in `SignatureDescriptor`. -pub mod signature_descriptor { - /// Data represents signature data - #[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 - #[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, - } - /// Multi is the signature data for a multisig public key - #[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, - } - /// sum is the oneof that specifies whether this represents single or multi-signature data - #[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), - } - } -} -/// 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", - } - } -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs deleted file mode 100644 index da14606a..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs +++ /dev/null @@ -1,458 +0,0 @@ -// @generated -/// Tx is the standard type used for broadcasting transactions. -#[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>, -} -/// 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. -#[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>, -} -/// SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. -#[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, -} -/// SignDocDirectAux is the type used for generating sign bytes for -/// SIGN_MODE_DIRECT_AUX. -/// -/// Since: cosmos-sdk 0.46 -#[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<::prost_types::Any>, - /// chain_id is the identifier of the chain this transaction targets. - /// It prevents signed transactions from being used on another chain by an - /// attacker. - #[prost(string, tag = "3")] - pub chain_id: ::prost::alloc::string::String, - /// account_number is the account number of the account in state. - #[prost(uint64, tag = "4")] - pub account_number: u64, - /// sequence is the sequence number of the signing account. - #[prost(uint64, tag = "5")] - pub sequence: u64, - /// Tip is the optional tip used for transactions fees paid in another denom. - /// It should be left empty if the signer is not the tipper for this - /// transaction. - /// - /// This field is ignored if the chain didn't enable tips, i.e. didn't add the - /// `TipDecorator` in its posthandler. - #[prost(message, optional, tag = "6")] - pub tip: ::core::option::Option, -} -/// TxBody is the body of a transaction that all signers sign over. -#[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<::prost_types::Any>, - /// memo is any arbitrary note/comment to be added to the transaction. - /// WARNING: in clients, any publicly exposed text should not be called memo, - /// but should be called `note` instead (see ). - #[prost(string, tag = "2")] - pub memo: ::prost::alloc::string::String, - /// timeout is the block height after which this transaction will not - /// be processed by the chain - #[prost(uint64, tag = "3")] - pub timeout_height: u64, - /// extension_options are arbitrary options that can be added by chains - /// when the default options are not sufficient. If any of these are present - /// and can't be handled, the transaction will be rejected - #[prost(message, repeated, tag = "1023")] - pub extension_options: ::prost::alloc::vec::Vec<::prost_types::Any>, - /// extension_options are arbitrary options that can be added by chains - /// when the default options are not sufficient. If any of these are present - /// and can't be handled, they will be ignored - #[prost(message, repeated, tag = "2047")] - pub non_critical_extension_options: ::prost::alloc::vec::Vec<::prost_types::Any>, -} -/// AuthInfo describes the fee and signer modes that are used to sign a -/// transaction. -#[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, -} -/// SignerInfo describes the public key and signing mode of a single top-level -/// signer. -#[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<::prost_types::Any>, - /// mode_info describes the signing mode of the signer and is a nested - /// structure to support nested multisig pubkey's - #[prost(message, optional, tag = "2")] - pub mode_info: ::core::option::Option, - /// sequence is the sequence of the account, which describes the - /// number of committed transactions signed by a given address. It is used to - /// prevent replay attacks. - #[prost(uint64, tag = "3")] - pub sequence: u64, -} -/// ModeInfo describes the signing mode of a single or nested multisig signer. -#[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 - #[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, - } - /// Multi is the mode info for a multisig public key - #[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, - /// 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, - } - /// sum is the oneof that specifies whether this represents a single or nested - /// multisig signer - #[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), - } -} -/// 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. -#[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, -} -/// Tip is the tip used for meta-transactions. -/// -/// Since: cosmos-sdk 0.46 -#[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, -} -/// 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 -#[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, -} -/// GetTxsEventRequest is the request type for the Service.TxsByEvents -/// RPC method. -#[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, - #[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, -} -/// GetTxsEventResponse is the response type for the Service.TxsByEvents -/// RPC method. -#[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, - /// 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, - /// total is total number of results available - #[prost(uint64, tag = "4")] - pub total: u64, -} -/// BroadcastTxRequest is the request type for the Service.BroadcastTxRequest -/// RPC method. -#[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, -} -/// BroadcastTxResponse is the response type for the -/// Service.BroadcastTx method. -#[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, -} -/// SimulateRequest is the request type for the Service.Simulate -/// RPC method. -#[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, -} -/// SimulateResponse is the response type for the -/// Service.SimulateRPC method. -#[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, -} -/// GetTxRequest is the request type for the Service.GetTx -/// RPC method. -#[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, -} -/// GetTxResponse is the response type for the Service.GetTx method. -#[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, -} -/// GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs -/// RPC method. -/// -/// Since: cosmos-sdk 0.45.2 -#[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, -} -/// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. -/// -/// Since: cosmos-sdk 0.45.2 -#[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, -} -/// 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", - } - } -} -/// 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, - /// BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for - /// the tx to be committed in a block. - 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", - } - } -} -include!("cosmos.tx.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.tonic.rs deleted file mode 100644 index 4c5a9788..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.tonic.rs +++ /dev/null @@ -1,423 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod service_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct ServiceClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl ServiceClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn simulate( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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/Simulate"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn get_tx( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn broadcast_tx( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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/BroadcastTx"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn get_txs_event( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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/GetTxsEvent"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn get_block_with_txs( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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/GetBlockWithTxs"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -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 { - async fn simulate( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn get_tx( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn broadcast_tx( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn get_txs_event( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn get_block_with_txs( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct ServiceServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).simulate(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).get_tx(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for BroadcastTxSvc { - type Response = super::BroadcastTxResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).broadcast_tx(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for GetTxsEventSvc { - type Response = super::GetTxsEventResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).get_txs_event(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService - for GetBlockWithTxsSvc - { - type Response = super::GetBlockWithTxsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).get_block_with_txs(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs deleted file mode 100644 index cd3ad7d9..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs +++ /dev/null @@ -1,183 +0,0 @@ -// @generated -/// Plan specifies information about a planned upgrade and when it should occur. -#[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<::prost_types::Timestamp>, - /// The height at which the upgrade must be performed. - /// Only used if Time is not set. - #[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<::prost_types::Any>, -} -/// 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. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SoftwareUpgradeProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub plan: ::core::option::Option, -} -/// 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. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CancelSoftwareUpgradeProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, -} -/// ModuleVersion specifies a module and its consensus version. -/// -/// Since: cosmos-sdk 0.43 -#[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, -} -/// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC -/// method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCurrentPlanRequest {} -/// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC -/// method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCurrentPlanResponse { - /// plan is the current upgrade plan. - #[prost(message, optional, tag = "1")] - pub plan: ::core::option::Option, -} -/// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC -/// method. -#[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, -} -/// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC -/// method. -#[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, -} -/// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState -/// RPC method. -#[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, -} -/// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState -/// RPC method. -#[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, -} -/// QueryModuleVersionsRequest is the request type for the Query/ModuleVersions -/// RPC method. -/// -/// Since: cosmos-sdk 0.43 -#[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, -} -/// QueryModuleVersionsResponse is the response type for the Query/ModuleVersions -/// RPC method. -/// -/// Since: cosmos-sdk 0.43 -#[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, -} -/// QueryAuthorityRequest is the request type for Query/Authority -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAuthorityRequest {} -/// QueryAuthorityResponse is the response type for Query/Authority -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAuthorityResponse { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSoftwareUpgrade { - /// authority is the address of the governance account. - #[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, -} -/// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSoftwareUpgradeResponse {} -/// MsgCancelUpgrade is the Msg/CancelUpgrade request type. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelUpgrade { - /// authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} -/// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelUpgradeResponse {} -include!("cosmos.upgrade.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.tonic.rs deleted file mode 100644 index 1f7b3c9c..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.tonic.rs +++ /dev/null @@ -1,701 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn current_plan( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.upgrade.v1beta1.Query/CurrentPlan"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn applied_plan( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.upgrade.v1beta1.Query/AppliedPlan"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn upgraded_consensus_state( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.upgrade.v1beta1.Query/UpgradedConsensusState", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn module_versions( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.upgrade.v1beta1.Query/ModuleVersions", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn authority( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.upgrade.v1beta1.Query/Authority"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - async fn current_plan( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn applied_plan( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn upgraded_consensus_state( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn module_versions( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn authority( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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 tonic::server::UnaryService for CurrentPlanSvc { - type Response = super::QueryCurrentPlanResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).current_plan(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for AppliedPlanSvc { - type Response = super::QueryAppliedPlanResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).applied_plan(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 - tonic::server::UnaryService - for UpgradedConsensusStateSvc - { - type Response = super::QueryUpgradedConsensusStateResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = - async move { (*inner).upgraded_consensus_state(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService - for ModuleVersionsSvc - { - type Response = super::QueryModuleVersionsResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).module_versions(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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 tonic::server::UnaryService for AuthoritySvc { - type Response = super::QueryAuthorityResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).authority(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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"; - } -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn software_upgrade( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.upgrade.v1beta1.Msg/SoftwareUpgrade"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn cancel_upgrade( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.upgrade.v1beta1.Msg/CancelUpgrade"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - async fn software_upgrade( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn cancel_upgrade( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).software_upgrade(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).cancel_upgrade(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - 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, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs deleted file mode 100644 index 63a56aeb..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs +++ /dev/null @@ -1,126 +0,0 @@ -// @generated -/// BaseVestingAccount implements the VestingAccount interface. It contains all -/// the necessary fields needed for any vesting account implementation. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BaseVestingAccount { - #[prost(message, optional, tag = "1")] - pub base_account: ::core::option::Option, - #[prost(message, repeated, tag = "2")] - pub original_vesting: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "3")] - pub delegated_free: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "4")] - pub delegated_vesting: ::prost::alloc::vec::Vec, - /// Vesting end time, as unix timestamp (in seconds). - #[prost(int64, tag = "5")] - pub end_time: i64, -} -/// ContinuousVestingAccount implements the VestingAccount interface. It -/// continuously vests by unlocking coins linearly with respect to time. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ContinuousVestingAccount { - #[prost(message, optional, tag = "1")] - pub base_vesting_account: ::core::option::Option, - /// Vesting start time, as unix timestamp (in seconds). - #[prost(int64, tag = "2")] - pub start_time: i64, -} -/// DelayedVestingAccount implements the VestingAccount interface. It vests all -/// coins after a specific time, but non prior. In other words, it keeps them -/// locked until a specified time. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DelayedVestingAccount { - #[prost(message, optional, tag = "1")] - pub base_vesting_account: ::core::option::Option, -} -/// Period defines a length of time and amount of coins that will vest. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Period { - /// Period duration in seconds. - #[prost(int64, tag = "1")] - pub length: i64, - #[prost(message, repeated, tag = "2")] - pub amount: ::prost::alloc::vec::Vec, -} -/// PeriodicVestingAccount implements the VestingAccount interface. It -/// periodically vests by unlocking coins during each specified period. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PeriodicVestingAccount { - #[prost(message, optional, tag = "1")] - pub base_vesting_account: ::core::option::Option, - #[prost(int64, tag = "2")] - pub start_time: i64, - #[prost(message, repeated, tag = "3")] - pub vesting_periods: ::prost::alloc::vec::Vec, -} -/// PermanentLockedAccount implements the VestingAccount interface. It does -/// not ever release coins, locking them indefinitely. Coins in this account can -/// still be used for delegating and for governance votes even while locked. -/// -/// Since: cosmos-sdk 0.43 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PermanentLockedAccount { - #[prost(message, optional, tag = "1")] - pub base_vesting_account: ::core::option::Option, -} -/// MsgCreateVestingAccount defines a message that enables creating a vesting -/// account. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateVestingAccount { - #[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, - /// end of vesting as unix time (in seconds). - #[prost(int64, tag = "4")] - pub end_time: i64, - #[prost(bool, tag = "5")] - pub delayed: bool, -} -/// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateVestingAccountResponse {} -/// MsgCreatePermanentLockedAccount defines a message that enables creating a permanent -/// locked account. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreatePermanentLockedAccount { - #[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, -} -/// MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreatePermanentLockedAccountResponse {} -/// MsgCreateVestingAccount defines a message that enables creating a vesting -/// account. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreatePeriodicVestingAccount { - #[prost(string, tag = "1")] - pub from_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub to_address: ::prost::alloc::string::String, - /// start of vesting as unix time (in seconds). - #[prost(int64, tag = "3")] - pub start_time: i64, - #[prost(message, repeated, tag = "4")] - pub vesting_periods: ::prost::alloc::vec::Vec, -} -/// MsgCreateVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount -/// response type. -/// -/// Since: cosmos-sdk 0.46 -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreatePeriodicVestingAccountResponse {} -include!("cosmos.vesting.v1beta1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.tonic.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.tonic.rs deleted file mode 100644 index 05394ce6..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.tonic.rs +++ /dev/null @@ -1,336 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn create_vesting_account( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.vesting.v1beta1.Msg/CreateVestingAccount", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn create_permanent_locked_account( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.vesting.v1beta1.Msg/CreatePermanentLockedAccount", - ); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn create_periodic_vesting_account( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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.vesting.v1beta1.Msg/CreatePeriodicVestingAccount", - ); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - ///Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - async fn create_vesting_account( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn create_permanent_locked_account( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - async fn create_periodic_vesting_account( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - } - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - } - 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(), - } - } - 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 - } - } - 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.vesting.v1beta1.Msg/CreateVestingAccount" => { - #[allow(non_camel_case_types)] - struct CreateVestingAccountSvc(pub Arc); - impl tonic::server::UnaryService - for CreateVestingAccountSvc - { - type Response = super::MsgCreateVestingAccountResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).create_vesting_account(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = CreateVestingAccountSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.vesting.v1beta1.Msg/CreatePermanentLockedAccount" => { - #[allow(non_camel_case_types)] - struct CreatePermanentLockedAccountSvc(pub Arc); - impl tonic::server::UnaryService - for CreatePermanentLockedAccountSvc - { - type Response = super::MsgCreatePermanentLockedAccountResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { - (*inner).create_permanent_locked_account(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = CreatePermanentLockedAccountSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.vesting.v1beta1.Msg/CreatePeriodicVestingAccount" => { - #[allow(non_camel_case_types)] - struct CreatePeriodicVestingAccountSvc(pub Arc); - impl tonic::server::UnaryService - for CreatePeriodicVestingAccountSvc - { - type Response = super::MsgCreatePeriodicVestingAccountResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { - (*inner).create_periodic_vesting_account(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = CreatePeriodicVestingAccountSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ); - 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, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(self.0.clone()) - } - } - 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.vesting.v1beta1.Msg"; - } -} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs deleted file mode 100644 index a74f2b1e..00000000 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs +++ /dev/null @@ -1,64 +0,0 @@ -// @generated -/// InterfaceDescriptor describes an interface type to be used with -/// accepts_interface and implements_interface and declared by declare_interface. -#[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, -} -/// 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. -#[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, -} -#[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", - } - } -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/ibc-go/IBC_COMMIT b/cosmos-sdk-proto/src/prost/ibc-go/IBC_COMMIT deleted file mode 100644 index 1c5ae582..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/IBC_COMMIT +++ /dev/null @@ -1 +0,0 @@ -v3.0.0 \ No newline at end of file diff --git a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.auth.v1beta1.rs b/cosmos-sdk-proto/src/prost/ibc-go/cosmos.auth.v1beta1.rs deleted file mode 100644 index 51ea652d..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.auth.v1beta1.rs +++ /dev/null @@ -1,41 +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_types::Any>, - #[prost(uint64, tag = "3")] - pub account_number: u64, - #[prost(uint64, tag = "4")] - pub sequence: u64, -} -/// 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>, -} -/// 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, -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.query.v1beta1.rs b/cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.query.v1beta1.rs deleted file mode 100644 index fa391c8e..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.query.v1beta1.rs +++ /dev/null @@ -1,50 +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, -} -/// 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 - #[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, -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.v1beta1.rs b/cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.v1beta1.rs deleted file mode 100644 index 325bf8df..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.v1beta1.rs +++ /dev/null @@ -1,38 +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, -} -/// 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, -} -/// 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, -} -/// 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, -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.upgrade.v1beta1.rs b/cosmos-sdk-proto/src/prost/ibc-go/cosmos.upgrade.v1beta1.rs deleted file mode 100644 index afd49768..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.upgrade.v1beta1.rs +++ /dev/null @@ -1,48 +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, - /// The time after which the upgrade must be performed. - /// Leave set to its zero value to use a pre-defined Height instead. - #[prost(message, optional, tag = "2")] - pub time: ::core::option::Option<::prost_types::Timestamp>, - /// The height at which the upgrade must be performed. - /// Only used if Time is not set. - #[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, -} -/// SoftwareUpgradeProposal is a gov Content type for initiating a software -/// upgrade. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SoftwareUpgradeProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub plan: ::core::option::Option, -} -/// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software -/// upgrade. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CancelSoftwareUpgradeProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.controller.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.controller.v1.rs deleted file mode 100644 index ba3b0ce8..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.controller.v1.rs +++ /dev/null @@ -1,135 +0,0 @@ -/// Params defines the set of on-chain interchain accounts parameters. -/// The following parameters may be used to disable the controller submodule. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// controller_enabled enables or disables the controller submodule. - #[prost(bool, tag = "1")] - pub controller_enabled: bool, -} -/// 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 {} -/// 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, -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - /// Query provides defines the gRPC querier service. - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - 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 - } - /// Params queries all parameters of the ICA controller submodule. - pub async fn params( - &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( - "/ibc.applications.interchain_accounts.controller.v1.Query/Params", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.interchain_accounts.controller.v1.Query", - "Params", - )); - self.inner.unary(req, path, codec).await - } - } -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.host.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.host.v1.rs deleted file mode 100644 index 0cd82f71..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.host.v1.rs +++ /dev/null @@ -1,138 +0,0 @@ -/// Params defines the set of on-chain interchain accounts parameters. -/// The following parameters may be used to disable the host submodule. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// host_enabled enables or disables the host submodule. - #[prost(bool, tag = "1")] - pub host_enabled: bool, - /// allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain. - #[prost(string, repeated, tag = "2")] - pub allow_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// 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 {} -/// 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, -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - /// Query provides defines the gRPC querier service. - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - 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 - } - /// Params queries all parameters of the ICA host submodule. - pub async fn params( - &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( - "/ibc.applications.interchain_accounts.host.v1.Query/Params", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.interchain_accounts.host.v1.Query", - "Params", - )); - self.inner.unary(req, path, codec).await - } - } -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.v1.rs deleted file mode 100644 index 1eef5c48..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.v1.rs +++ /dev/null @@ -1,140 +0,0 @@ -/// An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InterchainAccount { - #[prost(message, optional, tag = "1")] - pub base_account: - ::core::option::Option, - #[prost(string, tag = "2")] - pub account_owner: ::prost::alloc::string::String, -} -/// InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InterchainAccountPacketData { - #[prost(enumeration = "Type", tag = "1")] - pub r#type: i32, - #[prost(bytes = "vec", tag = "2")] - pub data: ::prost::alloc::vec::Vec, - #[prost(string, tag = "3")] - pub memo: ::prost::alloc::string::String, -} -/// CosmosTx contains a list of sdk.Msg's. It should be used when sending transactions to an SDK host chain. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CosmosTx { - #[prost(message, repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, -} -/// Type defines a classification of message issued from a controller chain to its associated interchain accounts -/// host -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum Type { - /// Default zero value enumeration - Unspecified = 0, - /// Execute a transaction on an interchain accounts host chain - ExecuteTx = 1, -} -impl Type { - /// 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 { - Type::Unspecified => "TYPE_UNSPECIFIED", - Type::ExecuteTx => "TYPE_EXECUTE_TX", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "TYPE_EXECUTE_TX" => Some(Self::ExecuteTx), - _ => None, - } - } -} -/// Metadata defines a set of protocol specific data encoded into the ICS27 channel version bytestring -/// See ICS004: -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Metadata { - /// version defines the ICS27 protocol version - #[prost(string, tag = "1")] - pub version: ::prost::alloc::string::String, - /// controller_connection_id is the connection identifier associated with the controller chain - #[prost(string, tag = "2")] - pub controller_connection_id: ::prost::alloc::string::String, - /// host_connection_id is the connection identifier associated with the host chain - #[prost(string, tag = "3")] - pub host_connection_id: ::prost::alloc::string::String, - /// address defines the interchain account address to be fulfilled upon the OnChanOpenTry handshake step - /// NOTE: the address field is empty on the OnChanOpenInit handshake step - #[prost(string, tag = "4")] - pub address: ::prost::alloc::string::String, - /// encoding defines the supported codec format - #[prost(string, tag = "5")] - pub encoding: ::prost::alloc::string::String, - /// tx_type defines the type of transactions the interchain account can execute - #[prost(string, tag = "6")] - pub tx_type: ::prost::alloc::string::String, -} -/// GenesisState defines the interchain accounts genesis state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - #[prost(message, optional, tag = "1")] - pub controller_genesis_state: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub host_genesis_state: ::core::option::Option, -} -/// ControllerGenesisState defines the interchain accounts controller genesis state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ControllerGenesisState { - #[prost(message, repeated, tag = "1")] - pub active_channels: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub interchain_accounts: ::prost::alloc::vec::Vec, - #[prost(string, repeated, tag = "3")] - pub ports: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(message, optional, tag = "4")] - pub params: ::core::option::Option, -} -/// HostGenesisState defines the interchain accounts host genesis state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct HostGenesisState { - #[prost(message, repeated, tag = "1")] - pub active_channels: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub interchain_accounts: ::prost::alloc::vec::Vec, - #[prost(string, tag = "3")] - pub port: ::prost::alloc::string::String, - #[prost(message, optional, tag = "4")] - pub params: ::core::option::Option, -} -/// ActiveChannel contains a connection ID, port ID and associated active channel ID -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ActiveChannel { - #[prost(string, tag = "1")] - pub connection_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub channel_id: ::prost::alloc::string::String, -} -/// RegisteredInterchainAccount contains a connection ID, port ID and associated interchain account address -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct RegisteredInterchainAccount { - #[prost(string, tag = "1")] - pub connection_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub account_address: ::prost::alloc::string::String, -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v1.rs deleted file mode 100644 index 7f00dde9..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v1.rs +++ /dev/null @@ -1,439 +0,0 @@ -/// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between -/// ICS20 enabled chains. See ICS Spec here: -/// -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTransfer { - /// the port on which the packet will be sent - #[prost(string, tag = "1")] - pub source_port: ::prost::alloc::string::String, - /// the channel by which the packet will be sent - #[prost(string, tag = "2")] - pub source_channel: ::prost::alloc::string::String, - /// the tokens to be transferred - #[prost(message, optional, tag = "3")] - pub token: ::core::option::Option, - /// the sender address - #[prost(string, tag = "4")] - pub sender: ::prost::alloc::string::String, - /// the recipient address on the destination chain - #[prost(string, tag = "5")] - pub receiver: ::prost::alloc::string::String, - /// Timeout height relative to the current block height. - /// The timeout is disabled when set to 0. - #[prost(message, optional, tag = "6")] - pub timeout_height: ::core::option::Option, - /// Timeout timestamp in absolute nanoseconds since unix epoch. - /// The timeout is disabled when set to 0. - #[prost(uint64, tag = "7")] - pub timeout_timestamp: u64, -} -/// MsgTransferResponse defines the Msg/Transfer response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTransferResponse {} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - /// Msg defines the ibc/transfer Msg service. - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - 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 - } - /// Transfer defines a rpc handler method for MsgTransfer. - pub async fn transfer( - &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("/ibc.applications.transfer.v1.Msg/Transfer"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.transfer.v1.Msg", - "Transfer", - )); - self.inner.unary(req, path, codec).await - } - } -} -/// DenomTrace contains the base denomination for ICS20 fungible tokens and the -/// source tracing information path. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DenomTrace { - /// path defines the chain of port/channel identifiers used for tracing the - /// source of the fungible token. - #[prost(string, tag = "1")] - pub path: ::prost::alloc::string::String, - /// base denomination of the relayed fungible token. - #[prost(string, tag = "2")] - pub base_denom: ::prost::alloc::string::String, -} -/// Params defines the set of IBC transfer parameters. -/// NOTE: To prevent a single token from being transferred, set the -/// TransfersEnabled parameter to true and then set the bank module's SendEnabled -/// parameter for the denomination to false. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// send_enabled enables or disables all cross-chain token transfers from this - /// chain. - #[prost(bool, tag = "1")] - pub send_enabled: bool, - /// receive_enabled enables or disables all cross-chain token transfers to this - /// chain. - #[prost(bool, tag = "2")] - pub receive_enabled: bool, -} -/// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomTraceRequest { - /// hash (in hex format) of the denomination trace information. - #[prost(string, tag = "1")] - pub hash: ::prost::alloc::string::String, -} -/// QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomTraceResponse { - /// denom_trace returns the requested denomination trace information. - #[prost(message, optional, tag = "1")] - pub denom_trace: ::core::option::Option, -} -/// QueryConnectionsRequest is the request type for the Query/DenomTraces RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -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, - >, -} -/// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomTracesResponse { - /// denom_traces returns all denominations trace information. - #[prost(message, repeated, tag = "1")] - pub denom_traces: ::prost::alloc::vec::Vec, - /// 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, - >, -} -/// 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 {} -/// 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, -} -/// QueryDenomHashRequest is the request type for the Query/DenomHash RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomHashRequest { - /// The denomination trace (\[port_id]/[channel_id])+/[denom\] - #[prost(string, tag = "1")] - pub trace: ::prost::alloc::string::String, -} -/// QueryDenomHashResponse is the response type for the Query/DenomHash RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomHashResponse { - /// hash (in hex format) of the denomination trace information. - #[prost(string, tag = "1")] - pub hash: ::prost::alloc::string::String, -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - /// Query provides defines the gRPC querier service. - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - 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 - } - /// DenomTrace queries a denomination trace information. - pub async fn denom_trace( - &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( - "/ibc.applications.transfer.v1.Query/DenomTrace", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.transfer.v1.Query", - "DenomTrace", - )); - self.inner.unary(req, path, codec).await - } - /// DenomTraces queries all denomination traces. - pub async fn denom_traces( - &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( - "/ibc.applications.transfer.v1.Query/DenomTraces", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.transfer.v1.Query", - "DenomTraces", - )); - self.inner.unary(req, path, codec).await - } - /// Params queries all parameters of the ibc-transfer module. - pub async fn params( - &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("/ibc.applications.transfer.v1.Query/Params"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.transfer.v1.Query", - "Params", - )); - self.inner.unary(req, path, codec).await - } - /// DenomHash queries a denomination hash information. - pub async fn denom_hash( - &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( - "/ibc.applications.transfer.v1.Query/DenomHash", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.applications.transfer.v1.Query", - "DenomHash", - )); - self.inner.unary(req, path, codec).await - } - } -} -/// GenesisState defines the ibc-transfer genesis state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub denom_traces: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub params: ::core::option::Option, -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v2.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v2.rs deleted file mode 100644 index cf073398..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v2.rs +++ /dev/null @@ -1,19 +0,0 @@ -/// FungibleTokenPacketData defines a struct for the packet payload -/// See FungibleTokenPacketData spec: -/// -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FungibleTokenPacketData { - /// the token denomination to be transferred - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - /// the token amount to be transferred - #[prost(string, tag = "2")] - pub amount: ::prost::alloc::string::String, - /// the sender address - #[prost(string, tag = "3")] - pub sender: ::prost::alloc::string::String, - /// the recipient address on the destination chain - #[prost(string, tag = "4")] - pub receiver: ::prost::alloc::string::String, -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.channel.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.channel.v1.rs deleted file mode 100644 index 70f2d395..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.channel.v1.rs +++ /dev/null @@ -1,1595 +0,0 @@ -/// Channel defines pipeline for exactly-once packet delivery between specific -/// modules on separate blockchains, which has at least one end capable of -/// sending packets and one end capable of receiving packets. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Channel { - /// current state of the channel end - #[prost(enumeration = "State", tag = "1")] - pub state: i32, - /// whether the channel is ordered or unordered - #[prost(enumeration = "Order", tag = "2")] - pub ordering: i32, - /// counterparty channel end - #[prost(message, optional, tag = "3")] - pub counterparty: ::core::option::Option, - /// list of connection identifiers, in order, along which packets sent on - /// this channel will travel - #[prost(string, repeated, tag = "4")] - pub connection_hops: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// opaque channel version, which is agreed upon during the handshake - #[prost(string, tag = "5")] - pub version: ::prost::alloc::string::String, -} -/// IdentifiedChannel defines a channel with additional port and channel -/// identifier fields. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct IdentifiedChannel { - /// current state of the channel end - #[prost(enumeration = "State", tag = "1")] - pub state: i32, - /// whether the channel is ordered or unordered - #[prost(enumeration = "Order", tag = "2")] - pub ordering: i32, - /// counterparty channel end - #[prost(message, optional, tag = "3")] - pub counterparty: ::core::option::Option, - /// list of connection identifiers, in order, along which packets sent on - /// this channel will travel - #[prost(string, repeated, tag = "4")] - pub connection_hops: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// opaque channel version, which is agreed upon during the handshake - #[prost(string, tag = "5")] - pub version: ::prost::alloc::string::String, - /// port identifier - #[prost(string, tag = "6")] - pub port_id: ::prost::alloc::string::String, - /// channel identifier - #[prost(string, tag = "7")] - pub channel_id: ::prost::alloc::string::String, -} -/// Counterparty defines a channel end counterparty -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Counterparty { - /// port on the counterparty chain which owns the other end of the channel. - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel end on the counterparty chain - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, -} -/// Packet defines a type that carries data across different chains through IBC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Packet { - /// number corresponds to the order of sends and receives, where a Packet - /// with an earlier sequence number must be sent and received before a Packet - /// with a later sequence number. - #[prost(uint64, tag = "1")] - pub sequence: u64, - /// identifies the port on the sending chain. - #[prost(string, tag = "2")] - pub source_port: ::prost::alloc::string::String, - /// identifies the channel end on the sending chain. - #[prost(string, tag = "3")] - pub source_channel: ::prost::alloc::string::String, - /// identifies the port on the receiving chain. - #[prost(string, tag = "4")] - pub destination_port: ::prost::alloc::string::String, - /// identifies the channel end on the receiving chain. - #[prost(string, tag = "5")] - pub destination_channel: ::prost::alloc::string::String, - /// actual opaque bytes transferred directly to the application module - #[prost(bytes = "vec", tag = "6")] - pub data: ::prost::alloc::vec::Vec, - /// block height after which the packet times out - #[prost(message, optional, tag = "7")] - pub timeout_height: ::core::option::Option, - /// block timestamp (in nanoseconds) after which the packet times out - #[prost(uint64, tag = "8")] - pub timeout_timestamp: u64, -} -/// PacketState defines the generic type necessary to retrieve and store -/// packet commitments, acknowledgements, and receipts. -/// Caller is responsible for knowing the context necessary to interpret this -/// state as a commitment, acknowledgement, or a receipt. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PacketState { - /// channel port identifier. - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier. - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// packet sequence. - #[prost(uint64, tag = "3")] - pub sequence: u64, - /// embedded data that represents packet state. - #[prost(bytes = "vec", tag = "4")] - pub data: ::prost::alloc::vec::Vec, -} -/// Acknowledgement is the recommended acknowledgement format to be used by -/// app-specific protocols. -/// NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental -/// conflicts with other protobuf message formats used for acknowledgements. -/// The first byte of any message with this format will be the non-ASCII values -/// `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: -/// -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Acknowledgement { - /// response contains either a result or an error and must be non-empty - #[prost(oneof = "acknowledgement::Response", tags = "21, 22")] - pub response: ::core::option::Option, -} -/// Nested message and enum types in `Acknowledgement`. -pub mod acknowledgement { - /// response contains either a result or an error and must be non-empty - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Response { - #[prost(bytes, tag = "21")] - Result(::prost::alloc::vec::Vec), - #[prost(string, tag = "22")] - Error(::prost::alloc::string::String), - } -} -/// State defines if a channel is in one of the following states: -/// CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum State { - /// Default State - UninitializedUnspecified = 0, - /// A channel has just started the opening handshake. - Init = 1, - /// A channel has acknowledged the handshake step on the counterparty chain. - Tryopen = 2, - /// A channel has completed the handshake. Open channels are - /// ready to send and receive packets. - Open = 3, - /// A channel has been closed and can no longer be used to send or receive - /// packets. - Closed = 4, -} -impl State { - /// 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 { - State::UninitializedUnspecified => "STATE_UNINITIALIZED_UNSPECIFIED", - State::Init => "STATE_INIT", - State::Tryopen => "STATE_TRYOPEN", - State::Open => "STATE_OPEN", - State::Closed => "STATE_CLOSED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "STATE_UNINITIALIZED_UNSPECIFIED" => Some(Self::UninitializedUnspecified), - "STATE_INIT" => Some(Self::Init), - "STATE_TRYOPEN" => Some(Self::Tryopen), - "STATE_OPEN" => Some(Self::Open), - "STATE_CLOSED" => Some(Self::Closed), - _ => None, - } - } -} -/// Order defines if a channel is ORDERED or UNORDERED -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum Order { - /// zero-value for channel ordering - NoneUnspecified = 0, - /// packets can be delivered in any order, which may differ from the order in - /// which they were sent. - Unordered = 1, - /// packets are delivered exactly in the order which they were sent - Ordered = 2, -} -impl Order { - /// 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 { - Order::NoneUnspecified => "ORDER_NONE_UNSPECIFIED", - Order::Unordered => "ORDER_UNORDERED", - Order::Ordered => "ORDER_ORDERED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "ORDER_NONE_UNSPECIFIED" => Some(Self::NoneUnspecified), - "ORDER_UNORDERED" => Some(Self::Unordered), - "ORDER_ORDERED" => Some(Self::Ordered), - _ => None, - } - } -} -/// MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It -/// is called by a relayer on Chain A. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenInit { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub channel: ::core::option::Option, - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenInitResponse { - #[prost(string, tag = "1")] - pub channel_id: ::prost::alloc::string::String, -} -/// MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel -/// on Chain B. The version field within the Channel field has been deprecated. Its -/// value will be ignored by core IBC. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenTry { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// in the case of crossing hello's, when both chains call OpenInit, we need - /// the channel identifier of the previous channel in state INIT - #[prost(string, tag = "2")] - pub previous_channel_id: ::prost::alloc::string::String, - /// NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. - #[prost(message, optional, tag = "3")] - pub channel: ::core::option::Option, - #[prost(string, tag = "4")] - pub counterparty_version: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "5")] - pub proof_init: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "6")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "7")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenTryResponse {} -/// MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge -/// the change of channel state to TRYOPEN on Chain B. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenAck { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub counterparty_channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub counterparty_version: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "5")] - pub proof_try: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "6")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "7")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenAckResponse {} -/// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to -/// acknowledge the change of channel state to OPEN on Chain A. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenConfirm { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "3")] - pub proof_ack: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response -/// type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenConfirmResponse {} -/// MsgChannelCloseInit defines a msg sent by a Relayer to Chain A -/// to close a channel with Chain B. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelCloseInit { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelCloseInitResponse {} -/// MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B -/// to acknowledge the change of channel state to CLOSED on Chain A. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelCloseConfirm { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "3")] - pub proof_init: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response -/// type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelCloseConfirmResponse {} -/// MsgRecvPacket receives incoming IBC packet -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRecvPacket { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - pub proof_commitment: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "4")] - pub signer: ::prost::alloc::string::String, -} -/// MsgRecvPacketResponse defines the Msg/RecvPacket response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRecvPacketResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - pub result: i32, -} -/// MsgTimeout receives timed-out packet -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTimeout { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - pub proof_unreceived: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, - #[prost(uint64, tag = "4")] - pub next_sequence_recv: u64, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, -} -/// MsgTimeoutResponse defines the Msg/Timeout response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTimeoutResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - pub result: i32, -} -/// MsgTimeoutOnClose timed-out packet upon counterparty channel closure. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTimeoutOnClose { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - pub proof_unreceived: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - pub proof_close: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, - #[prost(uint64, tag = "5")] - pub next_sequence_recv: u64, - #[prost(string, tag = "6")] - pub signer: ::prost::alloc::string::String, -} -/// MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTimeoutOnCloseResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - pub result: i32, -} -/// MsgAcknowledgement receives incoming IBC acknowledgement -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgAcknowledgement { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - pub acknowledgement: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - pub proof_acked: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, -} -/// MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgAcknowledgementResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - pub result: i32, -} -/// ResponseResultType defines the possible outcomes of the execution of a message -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum ResponseResultType { - /// Default zero value enumeration - ResponseResultUnspecified = 0, - /// The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - ResponseResultNoop = 1, - /// The message was executed successfully - ResponseResultSuccess = 2, -} -impl ResponseResultType { - /// 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 { - ResponseResultType::ResponseResultUnspecified => "RESPONSE_RESULT_UNSPECIFIED", - ResponseResultType::ResponseResultNoop => "RESPONSE_RESULT_NOOP", - ResponseResultType::ResponseResultSuccess => "RESPONSE_RESULT_SUCCESS", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "RESPONSE_RESULT_UNSPECIFIED" => Some(Self::ResponseResultUnspecified), - "RESPONSE_RESULT_NOOP" => Some(Self::ResponseResultNoop), - "RESPONSE_RESULT_SUCCESS" => Some(Self::ResponseResultSuccess), - _ => None, - } - } -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - /// Msg defines the ibc/channel Msg service. - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - 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 - } - /// ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. - pub async fn channel_open_init( - &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("/ibc.core.channel.v1.Msg/ChannelOpenInit"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Msg", - "ChannelOpenInit", - )); - self.inner.unary(req, path, codec).await - } - /// ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. - pub async fn channel_open_try( - &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("/ibc.core.channel.v1.Msg/ChannelOpenTry"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenTry")); - self.inner.unary(req, path, codec).await - } - /// ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. - pub async fn channel_open_ack( - &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("/ibc.core.channel.v1.Msg/ChannelOpenAck"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenAck")); - self.inner.unary(req, path, codec).await - } - /// ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. - pub async fn channel_open_confirm( - &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("/ibc.core.channel.v1.Msg/ChannelOpenConfirm"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Msg", - "ChannelOpenConfirm", - )); - self.inner.unary(req, path, codec).await - } - /// ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. - pub async fn channel_close_init( - &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("/ibc.core.channel.v1.Msg/ChannelCloseInit"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Msg", - "ChannelCloseInit", - )); - self.inner.unary(req, path, codec).await - } - /// ChannelCloseConfirm defines a rpc handler method for - /// MsgChannelCloseConfirm. - pub async fn channel_close_confirm( - &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( - "/ibc.core.channel.v1.Msg/ChannelCloseConfirm", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Msg", - "ChannelCloseConfirm", - )); - self.inner.unary(req, path, codec).await - } - /// RecvPacket defines a rpc handler method for MsgRecvPacket. - pub async fn recv_packet( - &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("/ibc.core.channel.v1.Msg/RecvPacket"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "RecvPacket")); - self.inner.unary(req, path, codec).await - } - /// Timeout defines a rpc handler method for MsgTimeout. - pub async fn timeout( - &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("/ibc.core.channel.v1.Msg/Timeout"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "Timeout")); - self.inner.unary(req, path, codec).await - } - /// TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. - pub async fn timeout_on_close( - &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("/ibc.core.channel.v1.Msg/TimeoutOnClose"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "TimeoutOnClose")); - self.inner.unary(req, path, codec).await - } - /// Acknowledgement defines a rpc handler method for MsgAcknowledgement. - pub async fn acknowledgement( - &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("/ibc.core.channel.v1.Msg/Acknowledgement"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Msg", - "Acknowledgement", - )); - self.inner.unary(req, path, codec).await - } - } -} -/// QueryChannelRequest is the request type for the Query/Channel RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, -} -/// QueryChannelResponse is the response type for the Query/Channel RPC method. -/// Besides the Channel end, it includes a proof and the height from which the -/// proof was retrieved. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelResponse { - /// channel associated with the request identifiers - #[prost(message, optional, tag = "1")] - pub channel: ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryChannelsRequest is the request type for the Query/Channels RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelsRequest { - /// pagination request - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -/// QueryChannelsResponse is the response type for the Query/Channels RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelsResponse { - /// list of stored channels of the chain. - #[prost(message, repeated, tag = "1")] - pub channels: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, -} -/// QueryConnectionChannelsRequest is the request type for the -/// Query/QueryConnectionChannels RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionChannelsRequest { - /// connection unique identifier - #[prost(string, tag = "1")] - pub connection: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -/// QueryConnectionChannelsResponse is the Response type for the -/// Query/QueryConnectionChannels RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionChannelsResponse { - /// list of channels associated with a connection. - #[prost(message, repeated, tag = "1")] - pub channels: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, -} -/// QueryChannelClientStateRequest is the request type for the Query/ClientState -/// RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelClientStateRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, -} -/// QueryChannelClientStateResponse is the Response type for the -/// Query/QueryChannelClientState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelClientStateResponse { - /// client state associated with the channel - #[prost(message, optional, tag = "1")] - pub identified_client_state: - ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryChannelConsensusStateRequest is the request type for the -/// Query/ConsensusState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelConsensusStateRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// revision number of the consensus state - #[prost(uint64, tag = "3")] - pub revision_number: u64, - /// revision height of the consensus state - #[prost(uint64, tag = "4")] - pub revision_height: u64, -} -/// QueryChannelClientStateResponse is the Response type for the -/// Query/QueryChannelClientState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelConsensusStateResponse { - /// consensus state associated with the channel - #[prost(message, optional, tag = "1")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, - /// client ID associated with the consensus state - #[prost(string, tag = "2")] - pub client_id: ::prost::alloc::string::String, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "3")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, -} -/// QueryPacketCommitmentRequest is the request type for the -/// Query/PacketCommitment RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketCommitmentRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// packet sequence - #[prost(uint64, tag = "3")] - pub sequence: u64, -} -/// QueryPacketCommitmentResponse defines the client query response for a packet -/// which also includes a proof and the height from which the proof was -/// retrieved -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketCommitmentResponse { - /// packet associated with the request fields - #[prost(bytes = "vec", tag = "1")] - pub commitment: ::prost::alloc::vec::Vec, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryPacketCommitmentsRequest is the request type for the -/// Query/QueryPacketCommitments RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketCommitmentsRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -/// QueryPacketCommitmentsResponse is the request type for the -/// Query/QueryPacketCommitments RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketCommitmentsResponse { - #[prost(message, repeated, tag = "1")] - pub commitments: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, -} -/// QueryPacketReceiptRequest is the request type for the -/// Query/PacketReceipt RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketReceiptRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// packet sequence - #[prost(uint64, tag = "3")] - pub sequence: u64, -} -/// QueryPacketReceiptResponse defines the client query response for a packet -/// receipt which also includes a proof, and the height from which the proof was -/// retrieved -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketReceiptResponse { - /// success flag for if receipt exists - #[prost(bool, tag = "2")] - pub received: bool, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "3")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, -} -/// QueryPacketAcknowledgementRequest is the request type for the -/// Query/PacketAcknowledgement RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketAcknowledgementRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// packet sequence - #[prost(uint64, tag = "3")] - pub sequence: u64, -} -/// QueryPacketAcknowledgementResponse defines the client query response for a -/// packet which also includes a proof and the height from which the -/// proof was retrieved -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketAcknowledgementResponse { - /// packet associated with the request fields - #[prost(bytes = "vec", tag = "1")] - pub acknowledgement: ::prost::alloc::vec::Vec, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryPacketAcknowledgementsRequest is the request type for the -/// Query/QueryPacketCommitments RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketAcknowledgementsRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - /// list of packet sequences - #[prost(uint64, repeated, tag = "4")] - pub packet_commitment_sequences: ::prost::alloc::vec::Vec, -} -/// QueryPacketAcknowledgemetsResponse is the request type for the -/// Query/QueryPacketAcknowledgements RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketAcknowledgementsResponse { - #[prost(message, repeated, tag = "1")] - pub acknowledgements: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, -} -/// QueryUnreceivedPacketsRequest is the request type for the -/// Query/UnreceivedPackets RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnreceivedPacketsRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// list of packet sequences - #[prost(uint64, repeated, tag = "3")] - pub packet_commitment_sequences: ::prost::alloc::vec::Vec, -} -/// QueryUnreceivedPacketsResponse is the response type for the -/// Query/UnreceivedPacketCommitments RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnreceivedPacketsResponse { - /// list of unreceived packet sequences - #[prost(uint64, repeated, tag = "1")] - pub sequences: ::prost::alloc::vec::Vec, - /// query block height - #[prost(message, optional, tag = "2")] - pub height: ::core::option::Option, -} -/// QueryUnreceivedAcks is the request type for the -/// Query/UnreceivedAcks RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnreceivedAcksRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// list of acknowledgement sequences - #[prost(uint64, repeated, tag = "3")] - pub packet_ack_sequences: ::prost::alloc::vec::Vec, -} -/// QueryUnreceivedAcksResponse is the response type for the -/// Query/UnreceivedAcks RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnreceivedAcksResponse { - /// list of unreceived acknowledgement sequences - #[prost(uint64, repeated, tag = "1")] - pub sequences: ::prost::alloc::vec::Vec, - /// query block height - #[prost(message, optional, tag = "2")] - pub height: ::core::option::Option, -} -/// QueryNextSequenceReceiveRequest is the request type for the -/// Query/QueryNextSequenceReceiveRequest RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNextSequenceReceiveRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, -} -/// QuerySequenceResponse is the request type for the -/// Query/QueryNextSequenceReceiveResponse RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNextSequenceReceiveResponse { - /// next sequence receive number - #[prost(uint64, tag = "1")] - pub next_sequence_receive: u64, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - /// Query provides defines the gRPC querier service - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - 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 - } - /// Channel queries an IBC Channel. - pub async fn channel( - &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("/ibc.core.channel.v1.Query/Channel"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "Channel")); - self.inner.unary(req, path, codec).await - } - /// Channels queries all the IBC channels of a chain. - pub async fn channels( - &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("/ibc.core.channel.v1.Query/Channels"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "Channels")); - self.inner.unary(req, path, codec).await - } - /// ConnectionChannels queries all the channels associated with a connection - /// end. - pub async fn connection_channels( - &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( - "/ibc.core.channel.v1.Query/ConnectionChannels", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "ConnectionChannels", - )); - self.inner.unary(req, path, codec).await - } - /// ChannelClientState queries for the client state for the channel associated - /// with the provided channel identifiers. - pub async fn channel_client_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( - "/ibc.core.channel.v1.Query/ChannelClientState", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "ChannelClientState", - )); - self.inner.unary(req, path, codec).await - } - /// ChannelConsensusState queries for the consensus state for the channel - /// associated with the provided channel identifiers. - pub async fn channel_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( - "/ibc.core.channel.v1.Query/ChannelConsensusState", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "ChannelConsensusState", - )); - self.inner.unary(req, path, codec).await - } - /// PacketCommitment queries a stored packet commitment hash. - pub async fn packet_commitment( - &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("/ibc.core.channel.v1.Query/PacketCommitment"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "PacketCommitment", - )); - self.inner.unary(req, path, codec).await - } - /// PacketCommitments returns all the packet commitments hashes associated - /// with a channel. - pub async fn packet_commitments( - &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( - "/ibc.core.channel.v1.Query/PacketCommitments", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "PacketCommitments", - )); - self.inner.unary(req, path, codec).await - } - /// PacketReceipt queries if a given packet sequence has been received on the - /// queried chain - pub async fn packet_receipt( - &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("/ibc.core.channel.v1.Query/PacketReceipt"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "PacketReceipt", - )); - self.inner.unary(req, path, codec).await - } - /// PacketAcknowledgement queries a stored packet acknowledgement hash. - pub async fn packet_acknowledgement( - &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( - "/ibc.core.channel.v1.Query/PacketAcknowledgement", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "PacketAcknowledgement", - )); - self.inner.unary(req, path, codec).await - } - /// PacketAcknowledgements returns all the packet acknowledgements associated - /// with a channel. - pub async fn packet_acknowledgements( - &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( - "/ibc.core.channel.v1.Query/PacketAcknowledgements", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "PacketAcknowledgements", - )); - self.inner.unary(req, path, codec).await - } - /// UnreceivedPackets returns all the unreceived IBC packets associated with a - /// channel and sequences. - pub async fn unreceived_packets( - &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( - "/ibc.core.channel.v1.Query/UnreceivedPackets", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "UnreceivedPackets", - )); - self.inner.unary(req, path, codec).await - } - /// UnreceivedAcks returns all the unreceived IBC acknowledgements associated - /// with a channel and sequences. - pub async fn unreceived_acks( - &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("/ibc.core.channel.v1.Query/UnreceivedAcks"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "UnreceivedAcks", - )); - self.inner.unary(req, path, codec).await - } - /// NextSequenceReceive returns the next receive sequence for a given channel. - pub async fn next_sequence_receive( - &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( - "/ibc.core.channel.v1.Query/NextSequenceReceive", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.channel.v1.Query", - "NextSequenceReceive", - )); - self.inner.unary(req, path, codec).await - } - } -} -/// GenesisState defines the ibc channel submodule's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - #[prost(message, repeated, tag = "1")] - pub channels: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub acknowledgements: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "3")] - pub commitments: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "4")] - pub receipts: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "5")] - pub send_sequences: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "6")] - pub recv_sequences: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "7")] - pub ack_sequences: ::prost::alloc::vec::Vec, - /// the sequence for the next generated channel identifier - #[prost(uint64, tag = "8")] - pub next_channel_sequence: u64, -} -/// PacketSequence defines the genesis type necessary to retrieve and store -/// next send and receive sequences. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PacketSequence { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - #[prost(uint64, tag = "3")] - pub sequence: u64, -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.client.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.client.v1.rs deleted file mode 100644 index cb0a79f9..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.client.v1.rs +++ /dev/null @@ -1,843 +0,0 @@ -/// IdentifiedClientState defines a client state with an additional client -/// identifier field. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct IdentifiedClientState { - /// client identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// client state - #[prost(message, optional, tag = "2")] - pub client_state: ::core::option::Option<::prost_types::Any>, -} -/// ConsensusStateWithHeight defines a consensus state with an additional height -/// field. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsensusStateWithHeight { - /// consensus state height - #[prost(message, optional, tag = "1")] - pub height: ::core::option::Option, - /// consensus state - #[prost(message, optional, tag = "2")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, -} -/// ClientConsensusStates defines all the stored consensus states for a given -/// client. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ClientConsensusStates { - /// client identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// consensus states and their heights associated with the client - #[prost(message, repeated, tag = "2")] - pub consensus_states: ::prost::alloc::vec::Vec, -} -/// ClientUpdateProposal is a governance proposal. If it passes, the substitute -/// client's latest consensus state is copied over to the subject client. The proposal -/// handler may fail if the subject and the substitute do not match in client and -/// chain parameters (with exception to latest height, frozen height, and chain-id). -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ClientUpdateProposal { - /// the title of the update proposal - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// the description of the proposal - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// the client identifier for the client to be updated if the proposal passes - #[prost(string, tag = "3")] - pub subject_client_id: ::prost::alloc::string::String, - /// the substitute client identifier for the client standing in for the subject - /// client - #[prost(string, tag = "4")] - pub substitute_client_id: ::prost::alloc::string::String, -} -/// UpgradeProposal is a gov Content type for initiating an IBC breaking -/// upgrade. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpgradeProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub plan: ::core::option::Option, - /// 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 - /// new upgraded client is valid by verifying a proof on the previous version - /// of the chain. This will allow IBC connections to persist smoothly across - /// planned chain upgrades - #[prost(message, optional, tag = "4")] - pub upgraded_client_state: ::core::option::Option<::prost_types::Any>, -} -/// Height is a monotonically increasing data type -/// that can be compared against another Height for the purposes of updating and -/// freezing clients -/// -/// Normally the RevisionHeight is incremented at each height while keeping -/// RevisionNumber the same. However some consensus algorithms may choose to -/// reset the height in certain conditions e.g. hard forks, state-machine -/// breaking changes In these cases, the RevisionNumber is incremented so that -/// height continues to be monitonically increasing even as the RevisionHeight -/// gets reset -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Height { - /// the revision that the client is currently on - #[prost(uint64, tag = "1")] - pub revision_number: u64, - /// the height within the given revision - #[prost(uint64, tag = "2")] - pub revision_height: u64, -} -/// Params defines the set of IBC light client parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// allowed_clients defines the list of allowed client state types. - #[prost(string, repeated, tag = "1")] - pub allowed_clients: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// MsgCreateClient defines a message to create an IBC client -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateClient { - /// light client state - #[prost(message, optional, tag = "1")] - pub client_state: ::core::option::Option<::prost_types::Any>, - /// consensus state associated with the client that corresponds to a given - /// height. - #[prost(message, optional, tag = "2")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, -} -/// MsgCreateClientResponse defines the Msg/CreateClient response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateClientResponse {} -/// MsgUpdateClient defines an sdk.Msg to update a IBC client state using -/// the given header. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateClient { - /// client unique identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// header to update the light client - #[prost(message, optional, tag = "2")] - pub header: ::core::option::Option<::prost_types::Any>, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, -} -/// MsgUpdateClientResponse defines the Msg/UpdateClient response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateClientResponse {} -/// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client -/// state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpgradeClient { - /// client unique identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// upgraded client state - #[prost(message, optional, tag = "2")] - pub client_state: ::core::option::Option<::prost_types::Any>, - /// upgraded consensus state, only contains enough information to serve as a - /// basis of trust in update logic - #[prost(message, optional, tag = "3")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, - /// proof that old chain committed to new client - #[prost(bytes = "vec", tag = "4")] - pub proof_upgrade_client: ::prost::alloc::vec::Vec, - /// proof that old chain committed to new consensus state - #[prost(bytes = "vec", tag = "5")] - pub proof_upgrade_consensus_state: ::prost::alloc::vec::Vec, - /// signer address - #[prost(string, tag = "6")] - pub signer: ::prost::alloc::string::String, -} -/// MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpgradeClientResponse {} -/// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for -/// light client misbehaviour. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitMisbehaviour { - /// client unique identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// misbehaviour used for freezing the light client - #[prost(message, optional, tag = "2")] - pub misbehaviour: ::core::option::Option<::prost_types::Any>, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, -} -/// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response -/// type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitMisbehaviourResponse {} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - /// Msg defines the ibc/client Msg service. - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - 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 - } - /// CreateClient defines a rpc handler method for MsgCreateClient. - pub async fn create_client( - &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("/ibc.core.client.v1.Msg/CreateClient"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "CreateClient")); - self.inner.unary(req, path, codec).await - } - /// UpdateClient defines a rpc handler method for MsgUpdateClient. - pub async fn update_client( - &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("/ibc.core.client.v1.Msg/UpdateClient"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpdateClient")); - self.inner.unary(req, path, codec).await - } - /// UpgradeClient defines a rpc handler method for MsgUpgradeClient. - pub async fn upgrade_client( - &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("/ibc.core.client.v1.Msg/UpgradeClient"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpgradeClient")); - self.inner.unary(req, path, codec).await - } - /// SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. - pub async fn submit_misbehaviour( - &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("/ibc.core.client.v1.Msg/SubmitMisbehaviour"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.client.v1.Msg", - "SubmitMisbehaviour", - )); - self.inner.unary(req, path, codec).await - } - } -} -/// QueryClientStateRequest is the request type for the Query/ClientState RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStateRequest { - /// client state unique identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, -} -/// QueryClientStateResponse is the response type for the Query/ClientState RPC -/// method. Besides the client state, it includes a proof and the height from -/// which the proof was retrieved. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStateResponse { - /// client state associated with the request identifier - #[prost(message, optional, tag = "1")] - pub client_state: ::core::option::Option<::prost_types::Any>, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryClientStatesRequest is the request type for the Query/ClientStates RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStatesRequest { - /// pagination request - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -/// QueryClientStatesResponse is the response type for the Query/ClientStates RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStatesResponse { - /// list of stored ClientStates of the chain. - #[prost(message, repeated, tag = "1")] - pub client_states: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -/// QueryConsensusStateRequest is the request type for the Query/ConsensusState -/// RPC method. Besides the consensus state, it includes a proof and the height -/// from which the proof was retrieved. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStateRequest { - /// client identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// consensus state revision number - #[prost(uint64, tag = "2")] - pub revision_number: u64, - /// consensus state revision height - #[prost(uint64, tag = "3")] - pub revision_height: u64, - /// latest_height overrrides the height field and queries the latest stored - /// ConsensusState - #[prost(bool, tag = "4")] - pub latest_height: bool, -} -/// QueryConsensusStateResponse is the response type for the Query/ConsensusState -/// RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStateResponse { - /// consensus state associated with the client identifier at the given height - #[prost(message, optional, tag = "1")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStatesRequest { - /// client identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -/// QueryConsensusStatesResponse is the response type for the -/// Query/ConsensusStates RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStatesResponse { - /// consensus states associated with the identifier - #[prost(message, repeated, tag = "1")] - pub consensus_states: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -/// QueryClientStatusRequest is the request type for the Query/ClientStatus RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStatusRequest { - /// client unique identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, -} -/// QueryClientStatusResponse is the response type for the Query/ClientStatus RPC -/// method. It returns the current status of the IBC client. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStatusResponse { - #[prost(string, tag = "1")] - pub status: ::prost::alloc::string::String, -} -/// QueryClientParamsRequest is the request type for the Query/ClientParams RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientParamsRequest {} -/// QueryClientParamsResponse is the response type for the Query/ClientParams RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QueryUpgradedClientStateRequest is the request type for the -/// Query/UpgradedClientState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradedClientStateRequest {} -/// QueryUpgradedClientStateResponse is the response type for the -/// Query/UpgradedClientState RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradedClientStateResponse { - /// client state associated with the request identifier - #[prost(message, optional, tag = "1")] - pub upgraded_client_state: ::core::option::Option<::prost_types::Any>, -} -/// 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 {} -/// 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 { - /// Consensus state associated with the request identifier - #[prost(message, optional, tag = "1")] - pub upgraded_consensus_state: ::core::option::Option<::prost_types::Any>, -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - /// Query provides defines the gRPC querier service - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - 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 - } - /// ClientState queries an IBC light client. - pub async fn client_state( - &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("/ibc.core.client.v1.Query/ClientState"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientState")); - self.inner.unary(req, path, codec).await - } - /// ClientStates queries all the IBC light clients of a chain. - pub async fn client_states( - &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("/ibc.core.client.v1.Query/ClientStates"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientStates")); - self.inner.unary(req, path, codec).await - } - /// ConsensusState queries a consensus state associated with a client state at - /// a given height. - pub async fn consensus_state( - &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("/ibc.core.client.v1.Query/ConsensusState"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.client.v1.Query", - "ConsensusState", - )); - self.inner.unary(req, path, codec).await - } - /// ConsensusStates queries all the consensus state associated with a given - /// client. - pub async fn consensus_states( - &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("/ibc.core.client.v1.Query/ConsensusStates"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.client.v1.Query", - "ConsensusStates", - )); - self.inner.unary(req, path, codec).await - } - /// Status queries the status of an IBC client. - pub async fn client_status( - &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("/ibc.core.client.v1.Query/ClientStatus"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientStatus")); - self.inner.unary(req, path, codec).await - } - /// ClientParams queries all parameters of the ibc client. - pub async fn client_params( - &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("/ibc.core.client.v1.Query/ClientParams"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientParams")); - self.inner.unary(req, path, codec).await - } - /// UpgradedClientState queries an Upgraded IBC light client. - pub async fn upgraded_client_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( - "/ibc.core.client.v1.Query/UpgradedClientState", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.client.v1.Query", - "UpgradedClientState", - )); - self.inner.unary(req, path, codec).await - } - /// UpgradedConsensusState queries an Upgraded IBC consensus state. - 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( - "/ibc.core.client.v1.Query/UpgradedConsensusState", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.client.v1.Query", - "UpgradedConsensusState", - )); - self.inner.unary(req, path, codec).await - } - } -} -/// GenesisState defines the ibc client submodule's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// client states with their corresponding identifiers - #[prost(message, repeated, tag = "1")] - pub clients: ::prost::alloc::vec::Vec, - /// consensus states from each client - #[prost(message, repeated, tag = "2")] - pub clients_consensus: ::prost::alloc::vec::Vec, - /// metadata from each client - #[prost(message, repeated, tag = "3")] - pub clients_metadata: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub params: ::core::option::Option, - /// create localhost on initialization - #[prost(bool, tag = "5")] - pub create_localhost: bool, - /// the sequence for the next generated client identifier - #[prost(uint64, tag = "6")] - pub next_client_sequence: u64, -} -/// GenesisMetadata defines the genesis type for metadata that clients may return -/// with ExportMetadata -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisMetadata { - /// store key of metadata without clientID-prefix - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, - /// metadata value - #[prost(bytes = "vec", tag = "2")] - pub value: ::prost::alloc::vec::Vec, -} -/// IdentifiedGenesisMetadata has the client metadata with the corresponding -/// client id. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct IdentifiedGenesisMetadata { - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub client_metadata: ::prost::alloc::vec::Vec, -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.commitment.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.commitment.v1.rs deleted file mode 100644 index db7ce7c5..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.commitment.v1.rs +++ /dev/null @@ -1,37 +0,0 @@ -/// MerkleRoot defines a merkle root hash. -/// In the Cosmos SDK, the AppHash of a block header becomes the root. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MerkleRoot { - #[prost(bytes = "vec", tag = "1")] - pub hash: ::prost::alloc::vec::Vec, -} -/// MerklePrefix is merkle path prefixed to the key. -/// The constructed key from the Path and the key will be append(Path.KeyPath, -/// append(Path.KeyPrefix, key...)) -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MerklePrefix { - #[prost(bytes = "vec", tag = "1")] - pub key_prefix: ::prost::alloc::vec::Vec, -} -/// MerklePath is the path used to verify commitment proofs, which can be an -/// arbitrary structured object (defined by a commitment type). -/// MerklePath is represented from root-to-leaf -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MerklePath { - #[prost(string, repeated, tag = "1")] - pub key_path: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// MerkleProof is a wrapper type over a chain of CommitmentProofs. -/// It demonstrates membership or non-membership for an element or set of -/// elements, verifiable in conjunction with a known commitment root. Proofs -/// should be succinct. -/// MerkleProofs are ordered from leaf-to-root -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MerkleProof { - #[prost(message, repeated, tag = "1")] - pub proofs: ::prost::alloc::vec::Vec, -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.connection.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.connection.v1.rs deleted file mode 100644 index aab85ce8..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.connection.v1.rs +++ /dev/null @@ -1,804 +0,0 @@ -/// ConnectionEnd defines a stateful object on a chain connected to another -/// separate one. -/// NOTE: there must only be 2 defined ConnectionEnds to establish -/// a connection between two chains. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConnectionEnd { - /// client associated with this connection. - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// IBC version which can be utilised to determine encodings or protocols for - /// channels or packets utilising this connection. - #[prost(message, repeated, tag = "2")] - pub versions: ::prost::alloc::vec::Vec, - /// current state of the connection end. - #[prost(enumeration = "State", tag = "3")] - pub state: i32, - /// counterparty chain associated with this connection. - #[prost(message, optional, tag = "4")] - pub counterparty: ::core::option::Option, - /// delay period that must pass before a consensus state can be used for - /// packet-verification NOTE: delay period logic is only implemented by some - /// clients. - #[prost(uint64, tag = "5")] - pub delay_period: u64, -} -/// IdentifiedConnection defines a connection with additional connection -/// identifier field. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct IdentifiedConnection { - /// connection identifier. - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, - /// client associated with this connection. - #[prost(string, tag = "2")] - pub client_id: ::prost::alloc::string::String, - /// IBC version which can be utilised to determine encodings or protocols for - /// channels or packets utilising this connection - #[prost(message, repeated, tag = "3")] - pub versions: ::prost::alloc::vec::Vec, - /// current state of the connection end. - #[prost(enumeration = "State", tag = "4")] - pub state: i32, - /// counterparty chain associated with this connection. - #[prost(message, optional, tag = "5")] - pub counterparty: ::core::option::Option, - /// delay period associated with this connection. - #[prost(uint64, tag = "6")] - pub delay_period: u64, -} -/// Counterparty defines the counterparty chain associated with a connection end. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Counterparty { - /// identifies the client on the counterparty chain associated with a given - /// connection. - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// identifies the connection end on the counterparty chain associated with a - /// given connection. - #[prost(string, tag = "2")] - pub connection_id: ::prost::alloc::string::String, - /// commitment merkle prefix of the counterparty chain. - #[prost(message, optional, tag = "3")] - pub prefix: ::core::option::Option, -} -/// ClientPaths define all the connection paths for a client state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ClientPaths { - /// list of connection paths - #[prost(string, repeated, tag = "1")] - pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// ConnectionPaths define all the connection paths for a given client state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConnectionPaths { - /// client state unique identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// list of connection paths - #[prost(string, repeated, tag = "2")] - pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// Version defines the versioning scheme used to negotiate the IBC verison in -/// the connection handshake. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Version { - /// unique version identifier - #[prost(string, tag = "1")] - pub identifier: ::prost::alloc::string::String, - /// list of features compatible with the specified identifier - #[prost(string, repeated, tag = "2")] - pub features: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// Params defines the set of Connection parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the - /// largest amount of time that the chain might reasonably take to produce the next block under normal operating - /// conditions. A safe choice is 3-5x the expected time per block. - #[prost(uint64, tag = "1")] - pub max_expected_time_per_block: u64, -} -/// State defines if a connection is in one of the following states: -/// INIT, TRYOPEN, OPEN or UNINITIALIZED. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum State { - /// Default State - UninitializedUnspecified = 0, - /// A connection end has just started the opening handshake. - Init = 1, - /// A connection end has acknowledged the handshake step on the counterparty - /// chain. - Tryopen = 2, - /// A connection end has completed the handshake. - Open = 3, -} -impl State { - /// 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 { - State::UninitializedUnspecified => "STATE_UNINITIALIZED_UNSPECIFIED", - State::Init => "STATE_INIT", - State::Tryopen => "STATE_TRYOPEN", - State::Open => "STATE_OPEN", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "STATE_UNINITIALIZED_UNSPECIFIED" => Some(Self::UninitializedUnspecified), - "STATE_INIT" => Some(Self::Init), - "STATE_TRYOPEN" => Some(Self::Tryopen), - "STATE_OPEN" => Some(Self::Open), - _ => None, - } - } -} -/// MsgConnectionOpenInit defines the msg sent by an account on Chain A to -/// initialize a connection with Chain B. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenInit { - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub counterparty: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub version: ::core::option::Option, - #[prost(uint64, tag = "4")] - pub delay_period: u64, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, -} -/// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response -/// type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenInitResponse {} -/// MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a -/// connection on Chain B. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenTry { - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// in the case of crossing hello's, when both chains call OpenInit, we need - /// the connection identifier of the previous connection in state INIT - #[prost(string, tag = "2")] - pub previous_connection_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub client_state: ::core::option::Option<::prost_types::Any>, - #[prost(message, optional, tag = "4")] - pub counterparty: ::core::option::Option, - #[prost(uint64, tag = "5")] - pub delay_period: u64, - #[prost(message, repeated, tag = "6")] - pub counterparty_versions: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "7")] - pub proof_height: ::core::option::Option, - /// proof of the initialization the connection on Chain A: `UNITIALIZED -> - /// INIT` - #[prost(bytes = "vec", tag = "8")] - pub proof_init: ::prost::alloc::vec::Vec, - /// proof of client state included in message - #[prost(bytes = "vec", tag = "9")] - pub proof_client: ::prost::alloc::vec::Vec, - /// proof of client consensus state - #[prost(bytes = "vec", tag = "10")] - pub proof_consensus: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "11")] - pub consensus_height: ::core::option::Option, - #[prost(string, tag = "12")] - pub signer: ::prost::alloc::string::String, -} -/// MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenTryResponse {} -/// MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to -/// acknowledge the change of connection state to TRYOPEN on Chain B. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenAck { - #[prost(string, tag = "1")] - pub connection_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub counterparty_connection_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub version: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub client_state: ::core::option::Option<::prost_types::Any>, - #[prost(message, optional, tag = "5")] - pub proof_height: ::core::option::Option, - /// proof of the initialization the connection on Chain B: `UNITIALIZED -> - /// TRYOPEN` - #[prost(bytes = "vec", tag = "6")] - pub proof_try: ::prost::alloc::vec::Vec, - /// proof of client state included in message - #[prost(bytes = "vec", tag = "7")] - pub proof_client: ::prost::alloc::vec::Vec, - /// proof of client consensus state - #[prost(bytes = "vec", tag = "8")] - pub proof_consensus: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "9")] - pub consensus_height: ::core::option::Option, - #[prost(string, tag = "10")] - pub signer: ::prost::alloc::string::String, -} -/// MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenAckResponse {} -/// MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to -/// acknowledge the change of connection state to OPEN on Chain A. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenConfirm { - #[prost(string, tag = "1")] - pub connection_id: ::prost::alloc::string::String, - /// proof for the change of the connection state on Chain A: `INIT -> OPEN` - #[prost(bytes = "vec", tag = "2")] - pub proof_ack: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "4")] - pub signer: ::prost::alloc::string::String, -} -/// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm -/// response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenConfirmResponse {} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - /// Msg defines the ibc/connection Msg service. - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - 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 - } - /// ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. - pub async fn connection_open_init( - &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( - "/ibc.core.connection.v1.Msg/ConnectionOpenInit", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Msg", - "ConnectionOpenInit", - )); - self.inner.unary(req, path, codec).await - } - /// ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. - pub async fn connection_open_try( - &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( - "/ibc.core.connection.v1.Msg/ConnectionOpenTry", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Msg", - "ConnectionOpenTry", - )); - self.inner.unary(req, path, codec).await - } - /// ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. - pub async fn connection_open_ack( - &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( - "/ibc.core.connection.v1.Msg/ConnectionOpenAck", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Msg", - "ConnectionOpenAck", - )); - self.inner.unary(req, path, codec).await - } - /// ConnectionOpenConfirm defines a rpc handler method for - /// MsgConnectionOpenConfirm. - pub async fn connection_open_confirm( - &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( - "/ibc.core.connection.v1.Msg/ConnectionOpenConfirm", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Msg", - "ConnectionOpenConfirm", - )); - self.inner.unary(req, path, codec).await - } - } -} -/// QueryConnectionRequest is the request type for the Query/Connection RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionRequest { - /// connection unique identifier - #[prost(string, tag = "1")] - pub connection_id: ::prost::alloc::string::String, -} -/// QueryConnectionResponse is the response type for the Query/Connection RPC -/// method. Besides the connection end, it includes a proof and the height from -/// which the proof was retrieved. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionResponse { - /// connection associated with the request identifier - #[prost(message, optional, tag = "1")] - pub connection: ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryConnectionsRequest is the request type for the Query/Connections RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionsRequest { - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -/// QueryConnectionsResponse is the response type for the Query/Connections RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionsResponse { - /// list of stored connections of the chain. - #[prost(message, repeated, tag = "1")] - pub connections: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, -} -/// QueryClientConnectionsRequest is the request type for the -/// Query/ClientConnections RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientConnectionsRequest { - /// client identifier associated with a connection - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, -} -/// QueryClientConnectionsResponse is the response type for the -/// Query/ClientConnections RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientConnectionsResponse { - /// slice of all the connection paths associated with a client. - #[prost(string, repeated, tag = "1")] - pub connection_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was generated - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryConnectionClientStateRequest is the request type for the -/// Query/ConnectionClientState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionClientStateRequest { - /// connection identifier - #[prost(string, tag = "1")] - pub connection_id: ::prost::alloc::string::String, -} -/// QueryConnectionClientStateResponse is the response type for the -/// Query/ConnectionClientState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionClientStateResponse { - /// client state associated with the channel - #[prost(message, optional, tag = "1")] - pub identified_client_state: - ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryConnectionConsensusStateRequest is the request type for the -/// Query/ConnectionConsensusState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionConsensusStateRequest { - /// connection identifier - #[prost(string, tag = "1")] - pub connection_id: ::prost::alloc::string::String, - #[prost(uint64, tag = "2")] - pub revision_number: u64, - #[prost(uint64, tag = "3")] - pub revision_height: u64, -} -/// QueryConnectionConsensusStateResponse is the response type for the -/// Query/ConnectionConsensusState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionConsensusStateResponse { - /// consensus state associated with the channel - #[prost(message, optional, tag = "1")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, - /// client ID associated with the consensus state - #[prost(string, tag = "2")] - pub client_id: ::prost::alloc::string::String, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "3")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - /// Query provides defines the gRPC querier service - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - 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 - } - /// Connection queries an IBC connection end. - pub async fn connection( - &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("/ibc.core.connection.v1.Query/Connection"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Query", - "Connection", - )); - self.inner.unary(req, path, codec).await - } - /// Connections queries all the IBC connections of a chain. - pub async fn connections( - &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("/ibc.core.connection.v1.Query/Connections"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Query", - "Connections", - )); - self.inner.unary(req, path, codec).await - } - /// ClientConnections queries the connection paths associated with a client - /// state. - pub async fn client_connections( - &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( - "/ibc.core.connection.v1.Query/ClientConnections", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Query", - "ClientConnections", - )); - self.inner.unary(req, path, codec).await - } - /// ConnectionClientState queries the client state associated with the - /// connection. - pub async fn connection_client_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( - "/ibc.core.connection.v1.Query/ConnectionClientState", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Query", - "ConnectionClientState", - )); - self.inner.unary(req, path, codec).await - } - /// ConnectionConsensusState queries the consensus state associated with the - /// connection. - pub async fn connection_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( - "/ibc.core.connection.v1.Query/ConnectionConsensusState", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "ibc.core.connection.v1.Query", - "ConnectionConsensusState", - )); - self.inner.unary(req, path, codec).await - } - } -} -/// GenesisState defines the ibc connection submodule's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - #[prost(message, repeated, tag = "1")] - pub connections: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub client_connection_paths: ::prost::alloc::vec::Vec, - /// the sequence for the next generated connection identifier - #[prost(uint64, tag = "3")] - pub next_connection_sequence: u64, - #[prost(message, optional, tag = "4")] - pub params: ::core::option::Option, -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.types.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.types.v1.rs deleted file mode 100644 index 9d882d7c..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.types.v1.rs +++ /dev/null @@ -1,14 +0,0 @@ -/// GenesisState defines the ibc module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// ICS002 - Clients genesis state - #[prost(message, optional, tag = "1")] - pub client_genesis: ::core::option::Option, - /// ICS003 - Connections genesis state - #[prost(message, optional, tag = "2")] - pub connection_genesis: ::core::option::Option, - /// ICS004 - Channel genesis state - #[prost(message, optional, tag = "3")] - pub channel_genesis: ::core::option::Option, -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.localhost.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.localhost.v1.rs deleted file mode 100644 index 980676d1..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.localhost.v1.rs +++ /dev/null @@ -1,12 +0,0 @@ -/// ClientState defines a loopback (localhost) client. It requires (read-only) -/// access to keys outside the client prefix. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ClientState { - /// self chain ID - #[prost(string, tag = "1")] - pub chain_id: ::prost::alloc::string::String, - /// self latest block height - #[prost(message, optional, tag = "2")] - pub height: ::core::option::Option, -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v1.rs deleted file mode 100644 index 82b43ca2..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v1.rs +++ /dev/null @@ -1,257 +0,0 @@ -/// ClientState defines a solo machine client that tracks the current consensus -/// state and if the client is frozen. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ClientState { - /// latest sequence of the client state - #[prost(uint64, tag = "1")] - pub sequence: u64, - /// frozen sequence of the solo machine - #[prost(uint64, tag = "2")] - pub frozen_sequence: u64, - #[prost(message, optional, tag = "3")] - pub consensus_state: ::core::option::Option, - /// when set to true, will allow governance to update a solo machine client. - /// The client will be unfrozen if it is frozen. - #[prost(bool, tag = "4")] - pub allow_update_after_proposal: bool, -} -/// ConsensusState defines a solo machine consensus state. The sequence of a -/// consensus state is contained in the "height" key used in storing the -/// consensus state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsensusState { - /// public key of the solo machine - #[prost(message, optional, tag = "1")] - pub public_key: ::core::option::Option<::prost_types::Any>, - /// diversifier allows the same public key to be re-used across different solo - /// machine clients (potentially on different chains) without being considered - /// misbehaviour. - #[prost(string, tag = "2")] - pub diversifier: ::prost::alloc::string::String, - #[prost(uint64, tag = "3")] - pub timestamp: u64, -} -/// Header defines a solo machine consensus header -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Header { - /// sequence to update solo machine public key at - #[prost(uint64, tag = "1")] - pub sequence: u64, - #[prost(uint64, tag = "2")] - pub timestamp: u64, - #[prost(bytes = "vec", tag = "3")] - pub signature: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub new_public_key: ::core::option::Option<::prost_types::Any>, - #[prost(string, tag = "5")] - pub new_diversifier: ::prost::alloc::string::String, -} -/// Misbehaviour defines misbehaviour for a solo machine which consists -/// of a sequence and two signatures over different messages at that sequence. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Misbehaviour { - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - #[prost(uint64, tag = "2")] - pub sequence: u64, - #[prost(message, optional, tag = "3")] - pub signature_one: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub signature_two: ::core::option::Option, -} -/// SignatureAndData contains a signature and the data signed over to create that -/// signature. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignatureAndData { - #[prost(bytes = "vec", tag = "1")] - pub signature: ::prost::alloc::vec::Vec, - #[prost(enumeration = "DataType", tag = "2")] - pub data_type: i32, - #[prost(bytes = "vec", tag = "3")] - pub data: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "4")] - pub timestamp: u64, -} -/// TimestampedSignatureData contains the signature data and the timestamp of the -/// signature. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TimestampedSignatureData { - #[prost(bytes = "vec", tag = "1")] - pub signature_data: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "2")] - pub timestamp: u64, -} -/// SignBytes defines the signed bytes used for signature verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignBytes { - #[prost(uint64, tag = "1")] - pub sequence: u64, - #[prost(uint64, tag = "2")] - pub timestamp: u64, - #[prost(string, tag = "3")] - pub diversifier: ::prost::alloc::string::String, - /// type of the data used - #[prost(enumeration = "DataType", tag = "4")] - pub data_type: i32, - /// marshaled data - #[prost(bytes = "vec", tag = "5")] - pub data: ::prost::alloc::vec::Vec, -} -/// HeaderData returns the SignBytes data for update verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct HeaderData { - /// header public key - #[prost(message, optional, tag = "1")] - pub new_pub_key: ::core::option::Option<::prost_types::Any>, - /// header diversifier - #[prost(string, tag = "2")] - pub new_diversifier: ::prost::alloc::string::String, -} -/// ClientStateData returns the SignBytes data for client state verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ClientStateData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub client_state: ::core::option::Option<::prost_types::Any>, -} -/// ConsensusStateData returns the SignBytes data for consensus state -/// verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsensusStateData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, -} -/// ConnectionStateData returns the SignBytes data for connection state -/// verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConnectionStateData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub connection: - ::core::option::Option, -} -/// ChannelStateData returns the SignBytes data for channel state -/// verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ChannelStateData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub channel: ::core::option::Option, -} -/// PacketCommitmentData returns the SignBytes data for packet commitment -/// verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PacketCommitmentData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - pub commitment: ::prost::alloc::vec::Vec, -} -/// PacketAcknowledgementData returns the SignBytes data for acknowledgement -/// verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PacketAcknowledgementData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - pub acknowledgement: ::prost::alloc::vec::Vec, -} -/// PacketReceiptAbsenceData returns the SignBytes data for -/// packet receipt absence verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PacketReceiptAbsenceData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, -} -/// NextSequenceRecvData returns the SignBytes data for verification of the next -/// sequence to be received. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct NextSequenceRecvData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "2")] - pub next_seq_recv: u64, -} -/// DataType defines the type of solo machine proof being created. This is done -/// to preserve uniqueness of different data sign byte encodings. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum DataType { - /// Default State - UninitializedUnspecified = 0, - /// Data type for client state verification - ClientState = 1, - /// Data type for consensus state verification - ConsensusState = 2, - /// Data type for connection state verification - ConnectionState = 3, - /// Data type for channel state verification - ChannelState = 4, - /// Data type for packet commitment verification - PacketCommitment = 5, - /// Data type for packet acknowledgement verification - PacketAcknowledgement = 6, - /// Data type for packet receipt absence verification - PacketReceiptAbsence = 7, - /// Data type for next sequence recv verification - NextSequenceRecv = 8, - /// Data type for header verification - Header = 9, -} -impl DataType { - /// 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 { - DataType::UninitializedUnspecified => "DATA_TYPE_UNINITIALIZED_UNSPECIFIED", - DataType::ClientState => "DATA_TYPE_CLIENT_STATE", - DataType::ConsensusState => "DATA_TYPE_CONSENSUS_STATE", - DataType::ConnectionState => "DATA_TYPE_CONNECTION_STATE", - DataType::ChannelState => "DATA_TYPE_CHANNEL_STATE", - DataType::PacketCommitment => "DATA_TYPE_PACKET_COMMITMENT", - DataType::PacketAcknowledgement => "DATA_TYPE_PACKET_ACKNOWLEDGEMENT", - DataType::PacketReceiptAbsence => "DATA_TYPE_PACKET_RECEIPT_ABSENCE", - DataType::NextSequenceRecv => "DATA_TYPE_NEXT_SEQUENCE_RECV", - DataType::Header => "DATA_TYPE_HEADER", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "DATA_TYPE_UNINITIALIZED_UNSPECIFIED" => Some(Self::UninitializedUnspecified), - "DATA_TYPE_CLIENT_STATE" => Some(Self::ClientState), - "DATA_TYPE_CONSENSUS_STATE" => Some(Self::ConsensusState), - "DATA_TYPE_CONNECTION_STATE" => Some(Self::ConnectionState), - "DATA_TYPE_CHANNEL_STATE" => Some(Self::ChannelState), - "DATA_TYPE_PACKET_COMMITMENT" => Some(Self::PacketCommitment), - "DATA_TYPE_PACKET_ACKNOWLEDGEMENT" => Some(Self::PacketAcknowledgement), - "DATA_TYPE_PACKET_RECEIPT_ABSENCE" => Some(Self::PacketReceiptAbsence), - "DATA_TYPE_NEXT_SEQUENCE_RECV" => Some(Self::NextSequenceRecv), - "DATA_TYPE_HEADER" => Some(Self::Header), - _ => None, - } - } -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v2.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v2.rs deleted file mode 100644 index 879c9322..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v2.rs +++ /dev/null @@ -1,257 +0,0 @@ -/// ClientState defines a solo machine client that tracks the current consensus -/// state and if the client is frozen. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ClientState { - /// latest sequence of the client state - #[prost(uint64, tag = "1")] - pub sequence: u64, - /// frozen sequence of the solo machine - #[prost(bool, tag = "2")] - pub is_frozen: bool, - #[prost(message, optional, tag = "3")] - pub consensus_state: ::core::option::Option, - /// when set to true, will allow governance to update a solo machine client. - /// The client will be unfrozen if it is frozen. - #[prost(bool, tag = "4")] - pub allow_update_after_proposal: bool, -} -/// ConsensusState defines a solo machine consensus state. The sequence of a -/// consensus state is contained in the "height" key used in storing the -/// consensus state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsensusState { - /// public key of the solo machine - #[prost(message, optional, tag = "1")] - pub public_key: ::core::option::Option<::prost_types::Any>, - /// diversifier allows the same public key to be re-used across different solo - /// machine clients (potentially on different chains) without being considered - /// misbehaviour. - #[prost(string, tag = "2")] - pub diversifier: ::prost::alloc::string::String, - #[prost(uint64, tag = "3")] - pub timestamp: u64, -} -/// Header defines a solo machine consensus header -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Header { - /// sequence to update solo machine public key at - #[prost(uint64, tag = "1")] - pub sequence: u64, - #[prost(uint64, tag = "2")] - pub timestamp: u64, - #[prost(bytes = "vec", tag = "3")] - pub signature: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub new_public_key: ::core::option::Option<::prost_types::Any>, - #[prost(string, tag = "5")] - pub new_diversifier: ::prost::alloc::string::String, -} -/// Misbehaviour defines misbehaviour for a solo machine which consists -/// of a sequence and two signatures over different messages at that sequence. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Misbehaviour { - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - #[prost(uint64, tag = "2")] - pub sequence: u64, - #[prost(message, optional, tag = "3")] - pub signature_one: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub signature_two: ::core::option::Option, -} -/// SignatureAndData contains a signature and the data signed over to create that -/// signature. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignatureAndData { - #[prost(bytes = "vec", tag = "1")] - pub signature: ::prost::alloc::vec::Vec, - #[prost(enumeration = "DataType", tag = "2")] - pub data_type: i32, - #[prost(bytes = "vec", tag = "3")] - pub data: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "4")] - pub timestamp: u64, -} -/// TimestampedSignatureData contains the signature data and the timestamp of the -/// signature. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TimestampedSignatureData { - #[prost(bytes = "vec", tag = "1")] - pub signature_data: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "2")] - pub timestamp: u64, -} -/// SignBytes defines the signed bytes used for signature verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignBytes { - #[prost(uint64, tag = "1")] - pub sequence: u64, - #[prost(uint64, tag = "2")] - pub timestamp: u64, - #[prost(string, tag = "3")] - pub diversifier: ::prost::alloc::string::String, - /// type of the data used - #[prost(enumeration = "DataType", tag = "4")] - pub data_type: i32, - /// marshaled data - #[prost(bytes = "vec", tag = "5")] - pub data: ::prost::alloc::vec::Vec, -} -/// HeaderData returns the SignBytes data for update verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct HeaderData { - /// header public key - #[prost(message, optional, tag = "1")] - pub new_pub_key: ::core::option::Option<::prost_types::Any>, - /// header diversifier - #[prost(string, tag = "2")] - pub new_diversifier: ::prost::alloc::string::String, -} -/// ClientStateData returns the SignBytes data for client state verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ClientStateData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub client_state: ::core::option::Option<::prost_types::Any>, -} -/// ConsensusStateData returns the SignBytes data for consensus state -/// verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsensusStateData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, -} -/// ConnectionStateData returns the SignBytes data for connection state -/// verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConnectionStateData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub connection: - ::core::option::Option, -} -/// ChannelStateData returns the SignBytes data for channel state -/// verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ChannelStateData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub channel: ::core::option::Option, -} -/// PacketCommitmentData returns the SignBytes data for packet commitment -/// verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PacketCommitmentData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - pub commitment: ::prost::alloc::vec::Vec, -} -/// PacketAcknowledgementData returns the SignBytes data for acknowledgement -/// verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PacketAcknowledgementData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - pub acknowledgement: ::prost::alloc::vec::Vec, -} -/// PacketReceiptAbsenceData returns the SignBytes data for -/// packet receipt absence verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PacketReceiptAbsenceData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, -} -/// NextSequenceRecvData returns the SignBytes data for verification of the next -/// sequence to be received. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct NextSequenceRecvData { - #[prost(bytes = "vec", tag = "1")] - pub path: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "2")] - pub next_seq_recv: u64, -} -/// DataType defines the type of solo machine proof being created. This is done -/// to preserve uniqueness of different data sign byte encodings. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum DataType { - /// Default State - UninitializedUnspecified = 0, - /// Data type for client state verification - ClientState = 1, - /// Data type for consensus state verification - ConsensusState = 2, - /// Data type for connection state verification - ConnectionState = 3, - /// Data type for channel state verification - ChannelState = 4, - /// Data type for packet commitment verification - PacketCommitment = 5, - /// Data type for packet acknowledgement verification - PacketAcknowledgement = 6, - /// Data type for packet receipt absence verification - PacketReceiptAbsence = 7, - /// Data type for next sequence recv verification - NextSequenceRecv = 8, - /// Data type for header verification - Header = 9, -} -impl DataType { - /// 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 { - DataType::UninitializedUnspecified => "DATA_TYPE_UNINITIALIZED_UNSPECIFIED", - DataType::ClientState => "DATA_TYPE_CLIENT_STATE", - DataType::ConsensusState => "DATA_TYPE_CONSENSUS_STATE", - DataType::ConnectionState => "DATA_TYPE_CONNECTION_STATE", - DataType::ChannelState => "DATA_TYPE_CHANNEL_STATE", - DataType::PacketCommitment => "DATA_TYPE_PACKET_COMMITMENT", - DataType::PacketAcknowledgement => "DATA_TYPE_PACKET_ACKNOWLEDGEMENT", - DataType::PacketReceiptAbsence => "DATA_TYPE_PACKET_RECEIPT_ABSENCE", - DataType::NextSequenceRecv => "DATA_TYPE_NEXT_SEQUENCE_RECV", - DataType::Header => "DATA_TYPE_HEADER", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "DATA_TYPE_UNINITIALIZED_UNSPECIFIED" => Some(Self::UninitializedUnspecified), - "DATA_TYPE_CLIENT_STATE" => Some(Self::ClientState), - "DATA_TYPE_CONSENSUS_STATE" => Some(Self::ConsensusState), - "DATA_TYPE_CONNECTION_STATE" => Some(Self::ConnectionState), - "DATA_TYPE_CHANNEL_STATE" => Some(Self::ChannelState), - "DATA_TYPE_PACKET_COMMITMENT" => Some(Self::PacketCommitment), - "DATA_TYPE_PACKET_ACKNOWLEDGEMENT" => Some(Self::PacketAcknowledgement), - "DATA_TYPE_PACKET_RECEIPT_ABSENCE" => Some(Self::PacketReceiptAbsence), - "DATA_TYPE_NEXT_SEQUENCE_RECV" => Some(Self::NextSequenceRecv), - "DATA_TYPE_HEADER" => Some(Self::Header), - _ => None, - } - } -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.tendermint.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.tendermint.v1.rs deleted file mode 100644 index c6368b07..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.tendermint.v1.rs +++ /dev/null @@ -1,106 +0,0 @@ -/// ClientState from Tendermint tracks the current validator set, latest height, -/// and a possible frozen height. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ClientState { - #[prost(string, tag = "1")] - pub chain_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub trust_level: ::core::option::Option, - /// duration of the period since the LastestTimestamp during which the - /// submitted headers are valid for upgrade - #[prost(message, optional, tag = "3")] - pub trusting_period: ::core::option::Option<::prost_types::Duration>, - /// duration of the staking unbonding period - #[prost(message, optional, tag = "4")] - pub unbonding_period: ::core::option::Option<::prost_types::Duration>, - /// defines how much new (untrusted) header's Time can drift into the future. - #[prost(message, optional, tag = "5")] - pub max_clock_drift: ::core::option::Option<::prost_types::Duration>, - /// Block height when the client was frozen due to a misbehaviour - #[prost(message, optional, tag = "6")] - pub frozen_height: ::core::option::Option, - /// Latest height the client was updated to - #[prost(message, optional, tag = "7")] - pub latest_height: ::core::option::Option, - /// Proof specifications used in verifying counterparty state - #[prost(message, repeated, tag = "8")] - pub proof_specs: ::prost::alloc::vec::Vec, - /// 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 - /// `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored - /// under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using - /// the default upgrade module, upgrade_path should be []string{"upgrade", - /// "upgradedIBCState"}` - #[prost(string, repeated, tag = "9")] - pub upgrade_path: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// This flag, when set to true, will allow governance to recover a client - /// which has expired - #[prost(bool, tag = "10")] - pub allow_update_after_expiry: bool, - /// This flag, when set to true, will allow governance to unfreeze a client - /// whose chain has experienced a misbehaviour event - #[prost(bool, tag = "11")] - pub allow_update_after_misbehaviour: bool, -} -/// ConsensusState defines the consensus state from Tendermint. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsensusState { - /// timestamp that corresponds to the block height in which the ConsensusState - /// was stored. - #[prost(message, optional, tag = "1")] - pub timestamp: ::core::option::Option<::prost_types::Timestamp>, - /// commitment root (i.e app hash) - #[prost(message, optional, tag = "2")] - pub root: ::core::option::Option, - #[prost(bytes = "vec", tag = "3")] - pub next_validators_hash: ::prost::alloc::vec::Vec, -} -/// Misbehaviour is a wrapper over two conflicting Headers -/// that implements Misbehaviour interface expected by ICS-02 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Misbehaviour { - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub header_1: ::core::option::Option
, - #[prost(message, optional, tag = "3")] - pub header_2: ::core::option::Option
, -} -/// Header defines the Tendermint client consensus Header. -/// It encapsulates all the information necessary to update from a trusted -/// Tendermint ConsensusState. The inclusion of TrustedHeight and -/// TrustedValidators allows this update to process correctly, so long as the -/// ConsensusState for the TrustedHeight exists, this removes race conditions -/// among relayers The SignedHeader and ValidatorSet are the new untrusted update -/// fields for the client. The TrustedHeight is the height of a stored -/// ConsensusState on the client that will be used to verify the new untrusted -/// header. The Trusted ConsensusState must be within the unbonding period of -/// current time in order to correctly verify, and the TrustedValidators must -/// hash to TrustedConsensusState.NextValidatorsHash since that is the last -/// trusted validator set at the TrustedHeight. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Header { - #[prost(message, optional, tag = "1")] - pub signed_header: ::core::option::Option<::tendermint_proto::types::SignedHeader>, - #[prost(message, optional, tag = "2")] - pub validator_set: ::core::option::Option<::tendermint_proto::types::ValidatorSet>, - #[prost(message, optional, tag = "3")] - pub trusted_height: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub trusted_validators: ::core::option::Option<::tendermint_proto::types::ValidatorSet>, -} -/// Fraction defines the protobuf message type for tmmath.Fraction that only -/// supports positive values. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Fraction { - #[prost(uint64, tag = "1")] - pub numerator: u64, - #[prost(uint64, tag = "2")] - pub denominator: u64, -} diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ics23.rs b/cosmos-sdk-proto/src/prost/ibc-go/ics23.rs deleted file mode 100644 index 10e98d37..00000000 --- a/cosmos-sdk-proto/src/prost/ibc-go/ics23.rs +++ /dev/null @@ -1,361 +0,0 @@ -/// * -/// ExistenceProof takes a key and a value and a set of steps to perform on it. -/// The result of peforming all these steps will provide a "root hash", which can -/// be compared to the value in a header. -/// -/// Since it is computationally infeasible to produce a hash collission for any of the used -/// cryptographic hash functions, if someone can provide a series of operations to transform -/// a given key and value into a root hash that matches some trusted root, these key and values -/// must be in the referenced merkle tree. -/// -/// The only possible issue is maliablity in LeafOp, such as providing extra prefix data, -/// which should be controlled by a spec. Eg. with lengthOp as NONE, -/// prefix = FOO, key = BAR, value = CHOICE -/// and -/// prefix = F, key = OOBAR, value = CHOICE -/// would produce the same value. -/// -/// With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field -/// in the ProofSpec is valuable to prevent this mutability. And why all trees should -/// length-prefix the data before hashing it. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExistenceProof { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - pub value: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub leaf: ::core::option::Option, - #[prost(message, repeated, tag = "4")] - pub path: ::prost::alloc::vec::Vec, -} -/// -/// NonExistenceProof takes a proof of two neighbors, one left of the desired key, -/// one right of the desired key. If both proofs are valid AND they are neighbors, -/// then there is no valid proof for the given key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct NonExistenceProof { - /// TODO: remove this as unnecessary??? we prove a range - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub left: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub right: ::core::option::Option, -} -/// -/// CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CommitmentProof { - #[prost(oneof = "commitment_proof::Proof", tags = "1, 2, 3, 4")] - pub proof: ::core::option::Option, -} -/// Nested message and enum types in `CommitmentProof`. -pub mod commitment_proof { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Proof { - #[prost(message, tag = "1")] - Exist(super::ExistenceProof), - #[prost(message, tag = "2")] - Nonexist(super::NonExistenceProof), - #[prost(message, tag = "3")] - Batch(super::BatchProof), - #[prost(message, tag = "4")] - Compressed(super::CompressedBatchProof), - } -} -/// * -/// LeafOp represents the raw key-value data we wish to prove, and -/// must be flexible to represent the internal transformation from -/// the original key-value pairs into the basis hash, for many existing -/// merkle trees. -/// -/// key and value are passed in. So that the signature of this operation is: -/// leafOp(key, value) -> output -/// -/// To process this, first prehash the keys and values if needed (ANY means no hash in this case): -/// hkey = prehashKey(key) -/// hvalue = prehashValue(value) -/// -/// Then combine the bytes, and hash it -/// output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct LeafOp { - #[prost(enumeration = "HashOp", tag = "1")] - pub hash: i32, - #[prost(enumeration = "HashOp", tag = "2")] - pub prehash_key: i32, - #[prost(enumeration = "HashOp", tag = "3")] - pub prehash_value: i32, - #[prost(enumeration = "LengthOp", tag = "4")] - pub length: i32, - /// prefix is a fixed bytes that may optionally be included at the beginning to differentiate - /// a leaf node from an inner node. - #[prost(bytes = "vec", tag = "5")] - pub prefix: ::prost::alloc::vec::Vec, -} -/// * -/// InnerOp represents a merkle-proof step that is not a leaf. -/// It represents concatenating two children and hashing them to provide the next result. -/// -/// The result of the previous step is passed in, so the signature of this op is: -/// innerOp(child) -> output -/// -/// The result of applying InnerOp should be: -/// output = op.hash(op.prefix || child || op.suffix) -/// -/// where the || operator is concatenation of binary data, -/// and child is the result of hashing all the tree below this step. -/// -/// Any special data, like prepending child with the length, or prepending the entire operation with -/// some value to differentiate from leaf nodes, should be included in prefix and suffix. -/// If either of prefix or suffix is empty, we just treat it as an empty string -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InnerOp { - #[prost(enumeration = "HashOp", tag = "1")] - pub hash: i32, - #[prost(bytes = "vec", tag = "2")] - pub prefix: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - pub suffix: ::prost::alloc::vec::Vec, -} -/// * -/// ProofSpec defines what the expected parameters are for a given proof type. -/// This can be stored in the client and used to validate any incoming proofs. -/// -/// verify(ProofSpec, Proof) -> Proof | Error -/// -/// As demonstrated in tests, if we don't fix the algorithm used to calculate the -/// LeafHash for a given tree, there are many possible key-value pairs that can -/// generate a given hash (by interpretting the preimage differently). -/// We need this for proper security, requires client knows a priori what -/// tree format server uses. But not in code, rather a configuration object. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ProofSpec { - /// any field in the ExistenceProof must be the same as in this spec. - /// except Prefix, which is just the first bytes of prefix (spec can be longer) - #[prost(message, optional, tag = "1")] - pub leaf_spec: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub inner_spec: ::core::option::Option, - /// max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) - #[prost(int32, tag = "3")] - pub max_depth: i32, - /// min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) - #[prost(int32, tag = "4")] - pub min_depth: i32, -} -/// -/// InnerSpec contains all store-specific structure info to determine if two proofs from a -/// given store are neighbors. -/// -/// This enables: -/// -/// isLeftMost(spec: InnerSpec, op: InnerOp) -/// isRightMost(spec: InnerSpec, op: InnerOp) -/// isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InnerSpec { - /// Child order is the ordering of the children node, must count from 0 - /// iavl tree is [0, 1] (left then right) - /// merk is [0, 2, 1] (left, right, here) - #[prost(int32, repeated, tag = "1")] - pub child_order: ::prost::alloc::vec::Vec, - #[prost(int32, tag = "2")] - pub child_size: i32, - #[prost(int32, tag = "3")] - pub min_prefix_length: i32, - #[prost(int32, tag = "4")] - pub max_prefix_length: i32, - /// empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) - #[prost(bytes = "vec", tag = "5")] - pub empty_child: ::prost::alloc::vec::Vec, - /// hash is the algorithm that must be used for each InnerOp - #[prost(enumeration = "HashOp", tag = "6")] - pub hash: i32, -} -/// -/// BatchProof is a group of multiple proof types than can be compressed -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BatchProof { - #[prost(message, repeated, tag = "1")] - pub entries: ::prost::alloc::vec::Vec, -} -/// Use BatchEntry not CommitmentProof, to avoid recursion -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BatchEntry { - #[prost(oneof = "batch_entry::Proof", tags = "1, 2")] - pub proof: ::core::option::Option, -} -/// Nested message and enum types in `BatchEntry`. -pub mod batch_entry { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Proof { - #[prost(message, tag = "1")] - Exist(super::ExistenceProof), - #[prost(message, tag = "2")] - Nonexist(super::NonExistenceProof), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CompressedBatchProof { - #[prost(message, repeated, tag = "1")] - pub entries: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub lookup_inners: ::prost::alloc::vec::Vec, -} -/// Use BatchEntry not CommitmentProof, to avoid recursion -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CompressedBatchEntry { - #[prost(oneof = "compressed_batch_entry::Proof", tags = "1, 2")] - pub proof: ::core::option::Option, -} -/// Nested message and enum types in `CompressedBatchEntry`. -pub mod compressed_batch_entry { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Proof { - #[prost(message, tag = "1")] - Exist(super::CompressedExistenceProof), - #[prost(message, tag = "2")] - Nonexist(super::CompressedNonExistenceProof), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CompressedExistenceProof { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - pub value: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub leaf: ::core::option::Option, - /// these are indexes into the lookup_inners table in CompressedBatchProof - #[prost(int32, repeated, tag = "4")] - pub path: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CompressedNonExistenceProof { - /// TODO: remove this as unnecessary??? we prove a range - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub left: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub right: ::core::option::Option, -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum HashOp { - /// NO_HASH is the default if no data passed. Note this is an illegal argument some places. - NoHash = 0, - Sha256 = 1, - Sha512 = 2, - Keccak = 3, - Ripemd160 = 4, - /// ripemd160(sha256(x)) - Bitcoin = 5, -} -impl HashOp { - /// 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 { - HashOp::NoHash => "NO_HASH", - HashOp::Sha256 => "SHA256", - HashOp::Sha512 => "SHA512", - HashOp::Keccak => "KECCAK", - HashOp::Ripemd160 => "RIPEMD160", - HashOp::Bitcoin => "BITCOIN", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "NO_HASH" => Some(Self::NoHash), - "SHA256" => Some(Self::Sha256), - "SHA512" => Some(Self::Sha512), - "KECCAK" => Some(Self::Keccak), - "RIPEMD160" => Some(Self::Ripemd160), - "BITCOIN" => Some(Self::Bitcoin), - _ => None, - } - } -} -/// * -/// LengthOp defines how to process the key and value of the LeafOp -/// to include length information. After encoding the length with the given -/// algorithm, the length will be prepended to the key and value bytes. -/// (Each one with it's own encoded length) -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum LengthOp { - /// NO_PREFIX don't include any length info - NoPrefix = 0, - /// VAR_PROTO uses protobuf (and go-amino) varint encoding of the length - VarProto = 1, - /// VAR_RLP uses rlp int encoding of the length - VarRlp = 2, - /// FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer - Fixed32Big = 3, - /// FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer - Fixed32Little = 4, - /// FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer - Fixed64Big = 5, - /// FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer - Fixed64Little = 6, - /// REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) - Require32Bytes = 7, - /// REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) - Require64Bytes = 8, -} -impl LengthOp { - /// 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 { - LengthOp::NoPrefix => "NO_PREFIX", - LengthOp::VarProto => "VAR_PROTO", - LengthOp::VarRlp => "VAR_RLP", - LengthOp::Fixed32Big => "FIXED32_BIG", - LengthOp::Fixed32Little => "FIXED32_LITTLE", - LengthOp::Fixed64Big => "FIXED64_BIG", - LengthOp::Fixed64Little => "FIXED64_LITTLE", - LengthOp::Require32Bytes => "REQUIRE_32_BYTES", - LengthOp::Require64Bytes => "REQUIRE_64_BYTES", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "NO_PREFIX" => Some(Self::NoPrefix), - "VAR_PROTO" => Some(Self::VarProto), - "VAR_RLP" => Some(Self::VarRlp), - "FIXED32_BIG" => Some(Self::Fixed32Big), - "FIXED32_LITTLE" => Some(Self::Fixed32Little), - "FIXED64_BIG" => Some(Self::Fixed64Big), - "FIXED64_LITTLE" => Some(Self::Fixed64Little), - "REQUIRE_32_BYTES" => Some(Self::Require32Bytes), - "REQUIRE_64_BYTES" => Some(Self::Require64Bytes), - _ => None, - } - } -} diff --git a/cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT b/cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT deleted file mode 100644 index 9f27816d..00000000 --- a/cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT +++ /dev/null @@ -1 +0,0 @@ -v0.29.2 \ No newline at end of file diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.rs deleted file mode 100644 index f37d3872..00000000 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.rs +++ /dev/null @@ -1,56 +0,0 @@ -// @generated -/// PageRequest is to be embedded in gRPC request messages for efficient -/// pagination. Ex: -/// -/// message SomeRequest { -/// Foo some_parameter = 1; -/// PageRequest pagination = 2; -/// } -#[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, -} -/// 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; -/// } -#[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, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.rs deleted file mode 100644 index cc4421b2..00000000 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.rs +++ /dev/null @@ -1,36 +0,0 @@ -// @generated -/// 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. -#[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, -} -/// 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. -#[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, -} -/// IntProto defines a Protobuf wrapper around an Int object. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct IntProto { - #[prost(string, tag = "1")] - pub int: ::prost::alloc::string::String, -} -/// DecProto defines a Protobuf wrapper around a Dec object. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DecProto { - #[prost(string, tag = "1")] - pub dec: ::prost::alloc::string::String, -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.rs deleted file mode 100644 index a74f2b1e..00000000 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.rs +++ /dev/null @@ -1,64 +0,0 @@ -// @generated -/// InterfaceDescriptor describes an interface type to be used with -/// accepts_interface and implements_interface and declared by declare_interface. -#[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, -} -/// 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. -#[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, -} -#[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", - } - } -} -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs deleted file mode 100644 index d2ed2ea6..00000000 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs +++ /dev/null @@ -1,834 +0,0 @@ -// @generated -/// AccessTypeParam -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AccessTypeParam { - #[prost(enumeration = "AccessType", tag = "1")] - pub value: i32, -} -/// AccessConfig access control type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AccessConfig { - #[prost(enumeration = "AccessType", tag = "1")] - pub permission: i32, - /// Address - /// Deprecated: replaced by addresses - #[prost(string, tag = "2")] - pub address: ::prost::alloc::string::String, - #[prost(string, repeated, tag = "3")] - pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// Params defines the set of wasm parameters. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - #[prost(message, optional, tag = "1")] - pub code_upload_access: ::core::option::Option, - #[prost(enumeration = "AccessType", tag = "2")] - pub instantiate_default_permission: i32, -} -/// CodeInfo is data for the uploaded contract WASM code -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CodeInfo { - /// CodeHash is the unique identifier created by wasmvm - #[prost(bytes = "vec", tag = "1")] - pub code_hash: ::prost::alloc::vec::Vec, - /// Creator address who initially stored the code - #[prost(string, tag = "2")] - pub creator: ::prost::alloc::string::String, - /// InstantiateConfig access control to apply on contract creation, optional - #[prost(message, optional, tag = "5")] - pub instantiate_config: ::core::option::Option, -} -/// ContractInfo stores a WASM contract instance -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ContractInfo { - /// CodeID is the reference to the stored Wasm code - #[prost(uint64, tag = "1")] - pub code_id: u64, - /// Creator address who initially instantiated the contract - #[prost(string, tag = "2")] - pub creator: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "3")] - pub admin: ::prost::alloc::string::String, - /// Label is optional metadata to be stored with a contract instance. - #[prost(string, tag = "4")] - pub label: ::prost::alloc::string::String, - /// Created Tx position when the contract was instantiated. - /// This data should kept internal and not be exposed via query results. Just - /// use for sorting - #[prost(message, optional, tag = "5")] - pub created: ::core::option::Option, - #[prost(string, tag = "6")] - pub ibc_port_id: ::prost::alloc::string::String, - /// Extension is an extension point to store custom metadata within the - /// persistence model. - #[prost(message, optional, tag = "7")] - pub extension: ::core::option::Option<::prost_types::Any>, -} -/// ContractCodeHistoryEntry metadata to a contract. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ContractCodeHistoryEntry { - #[prost(enumeration = "ContractCodeHistoryOperationType", tag = "1")] - pub operation: i32, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "2")] - pub code_id: u64, - /// Updated Tx position when the operation was executed. - #[prost(message, optional, tag = "3")] - pub updated: ::core::option::Option, - #[prost(bytes = "vec", tag = "4")] - pub msg: ::prost::alloc::vec::Vec, -} -/// AbsoluteTxPosition is a unique transaction position that allows for global -/// ordering of transactions. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AbsoluteTxPosition { - /// BlockHeight is the block the contract was created at - #[prost(uint64, tag = "1")] - pub block_height: u64, - /// TxIndex is a monotonic counter within the block (actual transaction index, - /// or gas consumed) - #[prost(uint64, tag = "2")] - pub tx_index: u64, -} -/// Model is a struct that holds a KV pair -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Model { - /// hex-encode key to read it better (this is often ascii) - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, - /// base64-encode raw value - #[prost(bytes = "vec", tag = "2")] - pub value: ::prost::alloc::vec::Vec, -} -/// AccessType permission types -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum AccessType { - /// AccessTypeUnspecified placeholder for empty value - Unspecified = 0, - /// AccessTypeNobody forbidden - Nobody = 1, - /// AccessTypeOnlyAddress restricted to a single address - /// Deprecated: use AccessTypeAnyOfAddresses instead - OnlyAddress = 2, - /// AccessTypeEverybody unrestricted - Everybody = 3, - /// AccessTypeAnyOfAddresses allow any of the addresses - AnyOfAddresses = 4, -} -impl AccessType { - /// 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 { - AccessType::Unspecified => "ACCESS_TYPE_UNSPECIFIED", - AccessType::Nobody => "ACCESS_TYPE_NOBODY", - AccessType::OnlyAddress => "ACCESS_TYPE_ONLY_ADDRESS", - AccessType::Everybody => "ACCESS_TYPE_EVERYBODY", - AccessType::AnyOfAddresses => "ACCESS_TYPE_ANY_OF_ADDRESSES", - } - } -} -/// ContractCodeHistoryOperationType actions that caused a code change -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum ContractCodeHistoryOperationType { - /// ContractCodeHistoryOperationTypeUnspecified placeholder for empty value - Unspecified = 0, - /// ContractCodeHistoryOperationTypeInit on chain contract instantiation - Init = 1, - /// ContractCodeHistoryOperationTypeMigrate code migration - Migrate = 2, - /// ContractCodeHistoryOperationTypeGenesis based on genesis data - Genesis = 3, -} -impl ContractCodeHistoryOperationType { - /// 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 { - ContractCodeHistoryOperationType::Unspecified => { - "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED" - } - ContractCodeHistoryOperationType::Init => "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT", - ContractCodeHistoryOperationType::Migrate => { - "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE" - } - ContractCodeHistoryOperationType::Genesis => { - "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS" - } - } - } -} -/// MsgStoreCode submit Wasm code to the system -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreCode { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// WASMByteCode can be raw or gzip compressed - #[prost(bytes = "vec", tag = "2")] - pub wasm_byte_code: ::prost::alloc::vec::Vec, - /// InstantiatePermission access control to apply on contract creation, - /// optional - #[prost(message, optional, tag = "5")] - pub instantiate_permission: ::core::option::Option, -} -/// MsgStoreCodeResponse returns store result data. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreCodeResponse { - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "1")] - pub code_id: u64, - /// Checksum is the sha256 hash of the stored code - #[prost(bytes = "vec", tag = "2")] - pub checksum: ::prost::alloc::vec::Vec, -} -/// MsgInstantiateContract create a new smart contract instance for the given -/// code id. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContract { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "2")] - pub admin: ::prost::alloc::string::String, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "3")] - pub code_id: u64, - /// Label is optional metadata to be stored with a contract instance. - #[prost(string, tag = "4")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "5")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "6")] - pub funds: ::prost::alloc::vec::Vec, -} -/// MsgInstantiateContract2 create a new smart contract instance for the given -/// code id with a predicable address. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContract2 { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "2")] - pub admin: ::prost::alloc::string::String, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "3")] - pub code_id: u64, - /// Label is optional metadata to be stored with a contract instance. - #[prost(string, tag = "4")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "5")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "6")] - pub funds: ::prost::alloc::vec::Vec, - /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64. - #[prost(bytes = "vec", tag = "7")] - pub salt: ::prost::alloc::vec::Vec, - /// FixMsg include the msg value into the hash for the predictable address. - /// Default is false - #[prost(bool, tag = "8")] - pub fix_msg: bool, -} -/// MsgInstantiateContractResponse return instantiation result data -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContractResponse { - /// Address is the bech32 address of the new contract instance. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "2")] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgInstantiateContract2Response return instantiation result data -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContract2Response { - /// Address is the bech32 address of the new contract instance. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "2")] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgExecuteContract submits the given message data to a smart contract -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecuteContract { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "2")] - pub contract: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract - #[prost(bytes = "vec", tag = "3")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on execution - #[prost(message, repeated, tag = "5")] - pub funds: ::prost::alloc::vec::Vec, -} -/// MsgExecuteContractResponse returns execution result data. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecuteContractResponse { - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "1")] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMigrateContract { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "2")] - pub contract: ::prost::alloc::string::String, - /// CodeID references the new WASM code - #[prost(uint64, tag = "3")] - pub code_id: u64, - /// Msg json encoded message to be passed to the contract on migration - #[prost(bytes = "vec", tag = "4")] - pub msg: ::prost::alloc::vec::Vec, -} -/// MsgMigrateContractResponse returns contract migration result data. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMigrateContractResponse { - /// Data contains same raw bytes returned as data from the wasm contract. - /// (May be empty) - #[prost(bytes = "vec", tag = "1")] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgUpdateAdmin sets a new admin for a smart contract -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateAdmin { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// NewAdmin address to be set - #[prost(string, tag = "2")] - pub new_admin: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, -} -/// MsgUpdateAdminResponse returns empty data -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateAdminResponse {} -/// MsgClearAdmin removes any admin stored for a smart contract -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgClearAdmin { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, -} -/// MsgClearAdminResponse returns empty data -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgClearAdminResponse {} -/// GenesisState - genesis state of x/wasm -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - #[prost(message, repeated, tag = "2")] - pub codes: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "3")] - pub contracts: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "4")] - pub sequences: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "5")] - pub gen_msgs: ::prost::alloc::vec::Vec, -} -/// Nested message and enum types in `GenesisState`. -pub mod genesis_state { - /// GenMsgs define the messages that can be executed during genesis phase in - /// order. The intention is to have more human readable data that is auditable. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct GenMsgs { - /// sum is a single message - #[prost(oneof = "gen_msgs::Sum", tags = "1, 2, 3")] - pub sum: ::core::option::Option, - } - /// Nested message and enum types in `GenMsgs`. - pub mod gen_msgs { - /// sum is a single message - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Sum { - #[prost(message, tag = "1")] - StoreCode(super::super::MsgStoreCode), - #[prost(message, tag = "2")] - InstantiateContract(super::super::MsgInstantiateContract), - /// MsgInstantiateContract2 intentionally not supported - /// see - #[prost(message, tag = "3")] - ExecuteContract(super::super::MsgExecuteContract), - } - } -} -/// Code struct encompasses CodeInfo and CodeBytes -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Code { - #[prost(uint64, tag = "1")] - pub code_id: u64, - #[prost(message, optional, tag = "2")] - pub code_info: ::core::option::Option, - #[prost(bytes = "vec", tag = "3")] - pub code_bytes: ::prost::alloc::vec::Vec, - /// Pinned to wasmvm cache - #[prost(bool, tag = "4")] - pub pinned: bool, -} -/// Contract struct encompasses ContractAddress, ContractInfo, and ContractState -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Contract { - #[prost(string, tag = "1")] - pub contract_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub contract_info: ::core::option::Option, - #[prost(message, repeated, tag = "3")] - pub contract_state: ::prost::alloc::vec::Vec, -} -/// Sequence key and value of an id generation counter -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Sequence { - #[prost(bytes = "vec", tag = "1")] - pub id_key: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "2")] - pub value: u64, -} -/// MsgIBCSend -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgIbcSend { - /// the channel by which the packet will be sent - #[prost(string, tag = "2")] - pub channel: ::prost::alloc::string::String, - /// Timeout height relative to the current block height. - /// The timeout is disabled when set to 0. - #[prost(uint64, tag = "4")] - pub timeout_height: u64, - /// Timeout timestamp (in nanoseconds) relative to the current block timestamp. - /// The timeout is disabled when set to 0. - #[prost(uint64, tag = "5")] - pub timeout_timestamp: u64, - /// Data is the payload to transfer. We must not make assumption what format or - /// content is in here. - #[prost(bytes = "vec", tag = "6")] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgIBCCloseChannel port and channel need to be owned by the contract -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgIbcCloseChannel { - #[prost(string, tag = "2")] - pub channel: ::prost::alloc::string::String, -} -/// StoreCodeProposal gov proposal content type to submit WASM code to the system -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StoreCodeProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// RunAs is the address that is passed to the contract's environment as sender - #[prost(string, tag = "3")] - pub run_as: ::prost::alloc::string::String, - /// WASMByteCode can be raw or gzip compressed - #[prost(bytes = "vec", tag = "4")] - pub wasm_byte_code: ::prost::alloc::vec::Vec, - /// InstantiatePermission to apply on contract creation, optional - #[prost(message, optional, tag = "7")] - pub instantiate_permission: ::core::option::Option, - /// UnpinCode code on upload, optional - #[prost(bool, tag = "8")] - pub unpin_code: bool, -} -/// InstantiateContractProposal gov proposal content type to instantiate a -/// contract. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InstantiateContractProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// RunAs is the address that is passed to the contract's environment as sender - #[prost(string, tag = "3")] - pub run_as: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "4")] - pub admin: ::prost::alloc::string::String, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "5")] - pub code_id: u64, - /// Label is optional metadata to be stored with a constract instance. - #[prost(string, tag = "6")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "7")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "8")] - pub funds: ::prost::alloc::vec::Vec, -} -/// MigrateContractProposal gov proposal content type to migrate a contract. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MigrateContractProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - /// - /// Note: skipping 3 as this was previously used for unneeded run_as - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "4")] - pub contract: ::prost::alloc::string::String, - /// CodeID references the new WASM code - #[prost(uint64, tag = "5")] - pub code_id: u64, - /// Msg json encoded message to be passed to the contract on migration - #[prost(bytes = "vec", tag = "6")] - pub msg: ::prost::alloc::vec::Vec, -} -/// SudoContractProposal gov proposal content type to call sudo on a contract. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SudoContractProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract as sudo - #[prost(bytes = "vec", tag = "4")] - pub msg: ::prost::alloc::vec::Vec, -} -/// ExecuteContractProposal gov proposal content type to call execute on a -/// contract. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExecuteContractProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// RunAs is the address that is passed to the contract's environment as sender - #[prost(string, tag = "3")] - pub run_as: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "4")] - pub contract: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract as execute - #[prost(bytes = "vec", tag = "5")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "6")] - pub funds: ::prost::alloc::vec::Vec, -} -/// UpdateAdminProposal gov proposal content type to set an admin for a contract. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateAdminProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// NewAdmin address to be set - #[prost(string, tag = "3")] - pub new_admin: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "4")] - pub contract: ::prost::alloc::string::String, -} -/// ClearAdminProposal gov proposal content type to clear the admin of a -/// contract. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ClearAdminProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, -} -/// PinCodesProposal gov proposal content type to pin a set of code ids in the -/// wasmvm cache. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PinCodesProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// CodeIDs references the new WASM codes - #[prost(uint64, repeated, packed = "false", tag = "3")] - pub code_ids: ::prost::alloc::vec::Vec, -} -/// UnpinCodesProposal gov proposal content type to unpin a set of code ids in -/// the wasmvm cache. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UnpinCodesProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// CodeIDs references the WASM codes - #[prost(uint64, repeated, packed = "false", tag = "3")] - pub code_ids: ::prost::alloc::vec::Vec, -} -/// AccessConfigUpdate contains the code id and the access config to be -/// applied. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AccessConfigUpdate { - /// CodeID is the reference to the stored WASM code to be updated - #[prost(uint64, tag = "1")] - pub code_id: u64, - /// InstantiatePermission to apply to the set of code ids - #[prost(message, optional, tag = "2")] - pub instantiate_permission: ::core::option::Option, -} -/// UpdateInstantiateConfigProposal gov proposal content type to update -/// instantiate config to a set of code ids. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateInstantiateConfigProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// AccessConfigUpdate contains the list of code ids and the access config - /// to be applied. - #[prost(message, repeated, tag = "3")] - pub access_config_updates: ::prost::alloc::vec::Vec, -} -/// QueryContractInfoRequest is the request type for the Query/ContractInfo RPC -/// method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractInfoRequest { - /// address is the address of the contract to query - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// QueryContractInfoResponse is the response type for the Query/ContractInfo RPC -/// method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractInfoResponse { - /// address is the address of the contract - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub contract_info: ::core::option::Option, -} -/// QueryContractHistoryRequest is the request type for the Query/ContractHistory -/// RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractHistoryRequest { - /// address is the address of the contract to query - #[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, -} -/// QueryContractHistoryResponse is the response type for the -/// Query/ContractHistory RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractHistoryResponse { - #[prost(message, repeated, tag = "1")] - pub entries: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryContractsByCodeRequest is the request type for the Query/ContractsByCode -/// RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractsByCodeRequest { - /// grpc-gateway_out does not support Go style CodID - #[prost(uint64, tag = "1")] - pub code_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryContractsByCodeResponse is the response type for the -/// Query/ContractsByCode RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractsByCodeResponse { - /// contracts are a set of contract addresses - #[prost(string, repeated, tag = "1")] - pub contracts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryAllContractStateRequest is the request type for the -/// Query/AllContractState RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllContractStateRequest { - /// address is the address of the contract - #[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, -} -/// QueryAllContractStateResponse is the response type for the -/// Query/AllContractState RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllContractStateResponse { - #[prost(message, repeated, tag = "1")] - pub models: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryRawContractStateRequest is the request type for the -/// Query/RawContractState RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryRawContractStateRequest { - /// address is the address of the contract - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "2")] - pub query_data: ::prost::alloc::vec::Vec, -} -/// QueryRawContractStateResponse is the response type for the -/// Query/RawContractState RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryRawContractStateResponse { - /// Data contains the raw store data - #[prost(bytes = "vec", tag = "1")] - pub data: ::prost::alloc::vec::Vec, -} -/// QuerySmartContractStateRequest is the request type for the -/// Query/SmartContractState RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySmartContractStateRequest { - /// address is the address of the contract - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// QueryData contains the query data passed to the contract - #[prost(bytes = "vec", tag = "2")] - pub query_data: ::prost::alloc::vec::Vec, -} -/// QuerySmartContractStateResponse is the response type for the -/// Query/SmartContractState RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySmartContractStateResponse { - /// Data contains the json data returned from the smart contract - #[prost(bytes = "vec", tag = "1")] - pub data: ::prost::alloc::vec::Vec, -} -/// QueryCodeRequest is the request type for the Query/Code RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCodeRequest { - /// grpc-gateway_out does not support Go style CodID - #[prost(uint64, tag = "1")] - pub code_id: u64, -} -/// CodeInfoResponse contains code meta data from CodeInfo -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CodeInfoResponse { - /// id for legacy support - #[prost(uint64, tag = "1")] - pub code_id: u64, - #[prost(string, tag = "2")] - pub creator: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "3")] - pub data_hash: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "6")] - pub instantiate_permission: ::core::option::Option, -} -/// QueryCodeResponse is the response type for the Query/Code RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCodeResponse { - #[prost(message, optional, tag = "1")] - pub code_info: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - pub data: ::prost::alloc::vec::Vec, -} -/// QueryCodesRequest is the request type for the Query/Codes RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCodesRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: - ::core::option::Option, -} -/// QueryCodesResponse is the response type for the Query/Codes RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCodesResponse { - #[prost(message, repeated, tag = "1")] - pub code_infos: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryPinnedCodesRequest is the request type for the Query/PinnedCodes -/// RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPinnedCodesRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryPinnedCodesResponse is the response type for the -/// Query/PinnedCodes RPC method -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPinnedCodesResponse { - #[prost(uint64, repeated, packed = "false", tag = "1")] - pub code_ids: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[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, -} -include!("cosmwasm.wasm.v1.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs deleted file mode 100644 index 663f4e8c..00000000 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs +++ /dev/null @@ -1,395 +0,0 @@ -// @generated -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn store_code( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Msg/StoreCode"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn instantiate_contract( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Msg/InstantiateContract"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn instantiate_contract2( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Msg/InstantiateContract2"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn execute_contract( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Msg/ExecuteContract"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn migrate_contract( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Msg/MigrateContract"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn update_admin( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Msg/UpdateAdmin"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn clear_admin( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Msg/ClearAdmin"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} -/// Generated client implementations. -#[cfg(feature = "grpc")] -#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - #[cfg(feature = "grpc-transport")] - #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::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 - } - pub async fn contract_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Query/ContractInfo"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn contract_history( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Query/ContractHistory"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn contracts_by_code( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Query/ContractsByCode"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn all_contract_state( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Query/AllContractState"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn raw_contract_state( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Query/RawContractState"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn smart_contract_state( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Query/SmartContractState"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn code( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Query/Code"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn codes( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Query/Codes"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn pinned_codes( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Query/PinnedCodes"); - self.inner.unary(request.into_request(), path, codec).await - } - pub async fn params( - &mut self, - request: impl tonic::IntoRequest, - ) -> 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("/cosmwasm.wasm.v1.Query/Params"); - self.inner.unary(request.into_request(), path, codec).await - } - } -} diff --git a/cosmos-sdk-proto/src/traits.rs b/cosmos-sdk-proto/src/traits.rs deleted file mode 100644 index 0b3c4e2a..00000000 --- a/cosmos-sdk-proto/src/traits.rs +++ /dev/null @@ -1,76 +0,0 @@ -//! Support traits for Cosmos SDK protobufs. - -pub use prost::Message; - -use crate::Any; -use prost::{DecodeError, EncodeError}; -use std::str::FromStr; - -/// Associate a type URL with a given proto. -pub trait TypeUrl: Message { - /// Type URL value - const TYPE_URL: &'static str; -} - -/// Extension trait for [`Message`]. -pub trait MessageExt: Message { - /// Parse this message proto from [`Any`]. - fn from_any(any: &Any) -> Result - where - Self: Default + Sized + TypeUrl, - { - if any.type_url == Self::TYPE_URL { - Ok(Self::decode(&*any.value)?) - } else { - let mut err = DecodeError::new(format!( - "expected type URL: \"{}\" (got: \"{}\")", - Self::TYPE_URL, - &any.type_url - )); - err.push("unexpected type URL", "type_url"); - Err(err) - } - } - - /// Serialize this message proto as [`Any`]. - fn to_any(&self) -> Result - where - Self: TypeUrl, - { - self.to_bytes().map(|bytes| Any { - type_url: Self::TYPE_URL.to_owned(), - value: bytes, - }) - } - - /// Serialize this protobuf message as a byte vector. - fn to_bytes(&self) -> Result, EncodeError>; -} - -impl MessageExt for M -where - M: prost::Message, -{ - fn to_bytes(&self) -> Result, EncodeError> { - let mut bytes = Vec::new(); - Message::encode(self, &mut bytes)?; - Ok(bytes) - } -} - -/// Extension traits for optionally parsing non-empty strings. -/// -/// This is a common pattern in Cosmos SDK protobufs. -pub trait ParseOptional: AsRef { - /// Parse optional field. - fn parse_optional(&self) -> Result, T::Err> { - if self.as_ref().is_empty() { - Ok(None) - } else { - Ok(Some(self.as_ref().parse()?)) - } - } -} - -impl ParseOptional for str {} -impl ParseOptional for String {} diff --git a/cosmos-sdk-proto/src/type_urls.rs b/cosmos-sdk-proto/src/type_urls.rs deleted file mode 100644 index d277ed7d..00000000 --- a/cosmos-sdk-proto/src/type_urls.rs +++ /dev/null @@ -1,227 +0,0 @@ -//! Registry of type URLs associated with various protobuf types defined in -//! this crate. - -// TODO(tarcieri): leverage first-class support for type URLs in prost? -// See: https://github.com/tokio-rs/prost/issues/299 - -use crate::{cosmos, ibc, traits::TypeUrl}; - -impl TypeUrl for ibc::core::client::v1::ClientUpdateProposal { - const TYPE_URL: &'static str = "/ibc.core.client.v1.ClientUpdateProposal"; -} - -impl TypeUrl for cosmos::upgrade::v1beta1::SoftwareUpgradeProposal { - const TYPE_URL: &'static str = "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal"; -} - -impl TypeUrl for cosmos::params::v1beta1::ParameterChangeProposal { - const TYPE_URL: &'static str = "/cosmos.params.v1beta1.ParameterChangeProposal"; -} - -impl TypeUrl for cosmos::distribution::v1beta1::CommunityPoolSpendProposal { - const TYPE_URL: &'static str = "/cosmos.distribution.v1beta1.CommunityPoolSpendProposal"; -} -impl TypeUrl for cosmos::gov::v1beta1::TextProposal { - const TYPE_URL: &'static str = "/cosmos.gov.v1beta1.TextProposal"; -} - -impl TypeUrl for cosmos::crypto::secp256k1::PubKey { - const TYPE_URL: &'static str = "/cosmos.crypto.secp256k1.PubKey"; -} - -impl TypeUrl for cosmos::vesting::v1beta1::PeriodicVestingAccount { - const TYPE_URL: &'static str = "/cosmos.vesting.v1beta1.PeriodicVestingAccount"; -} - -impl TypeUrl for cosmos::bank::v1beta1::MsgSend { - const TYPE_URL: &'static str = "/cosmos.bank.v1beta1.MsgSend"; -} - -impl TypeUrl for cosmos::bank::v1beta1::MsgMultiSend { - const TYPE_URL: &'static str = "/cosmos.bank.v1beta1.MsgMultiSend"; -} - -impl TypeUrl for cosmos::distribution::v1beta1::MsgSetWithdrawAddress { - const TYPE_URL: &'static str = "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress"; -} - -impl TypeUrl for cosmos::distribution::v1beta1::MsgWithdrawDelegatorReward { - const TYPE_URL: &'static str = "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"; -} - -impl TypeUrl for cosmos::distribution::v1beta1::MsgWithdrawValidatorCommission { - const TYPE_URL: &'static str = "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission"; -} - -impl TypeUrl for cosmos::distribution::v1beta1::MsgFundCommunityPool { - const TYPE_URL: &'static str = "/cosmos.distribution.v1beta1.MsgFundCommunityPool"; -} - -impl TypeUrl for cosmos::feegrant::v1beta1::MsgGrantAllowance { - const TYPE_URL: &'static str = "/cosmos.feegrant.v1beta1.MsgGrantAllowance"; -} - -impl TypeUrl for cosmos::feegrant::v1beta1::MsgRevokeAllowance { - const TYPE_URL: &'static str = "/cosmos.feegrant.v1beta1.MsgRevokeAllowance"; -} - -impl TypeUrl for cosmos::feegrant::v1beta1::BasicAllowance { - const TYPE_URL: &'static str = "/cosmos.feegrant.v1beta1.BasicAllowance"; -} - -impl TypeUrl for cosmos::feegrant::v1beta1::PeriodicAllowance { - const TYPE_URL: &'static str = "/cosmos.feegrant.v1beta1.PeriodicAllowance"; -} - -impl TypeUrl for cosmos::feegrant::v1beta1::AllowedMsgAllowance { - const TYPE_URL: &'static str = "/cosmos.feegrant.v1beta1.AllowedMsgAllowance"; -} - -impl TypeUrl for cosmos::staking::v1beta1::MsgDelegate { - const TYPE_URL: &'static str = "/cosmos.staking.v1beta1.MsgDelegate"; -} - -impl TypeUrl for cosmos::staking::v1beta1::MsgUndelegate { - const TYPE_URL: &'static str = "/cosmos.staking.v1beta1.MsgUndelegate"; -} - -impl TypeUrl for cosmos::staking::v1beta1::MsgBeginRedelegate { - const TYPE_URL: &'static str = "/cosmos.staking.v1beta1.MsgBeginRedelegate"; -} - -impl TypeUrl for cosmos::base::abci::v1beta1::MsgData { - const TYPE_URL: &'static str = "/cosmos.base.v1beta1.abci.MsgData"; -} - -impl TypeUrl for cosmos::base::abci::v1beta1::TxMsgData { - const TYPE_URL: &'static str = "/cosmos.base.v1beta1.abci.TxMsgData"; -} - -impl TypeUrl for cosmos::auth::v1beta1::BaseAccount { - const TYPE_URL: &'static str = "/cosmos.auth.v1beta1.BaseAccount"; -} - -impl TypeUrl for cosmos::auth::v1beta1::ModuleAccount { - const TYPE_URL: &'static str = "/cosmos.auth.v1beta1.ModuleAccount"; -} - -impl TypeUrl for cosmos::tx::v1beta1::Tx { - const TYPE_URL: &'static str = "/cosmos.tx.v1beta1.Tx"; -} - -impl TypeUrl for cosmos::tx::v1beta1::AuthInfo { - const TYPE_URL: &'static str = "/cosmos.tx.v1beta1.AuthInfo"; -} - -impl TypeUrl for cosmos::tx::v1beta1::Fee { - const TYPE_URL: &'static str = "/cosmos.tx.v1beta1.Fee"; -} - -impl TypeUrl for cosmos::tx::v1beta1::TxBody { - const TYPE_URL: &'static str = "/cosmos.tx.v1beta1.TxBody"; -} - -impl TypeUrl for cosmos::tx::v1beta1::SignerInfo { - const TYPE_URL: &'static str = "/cosmos.tx.v1beta1.SingerInfo"; -} - -impl TypeUrl for cosmos::tx::v1beta1::ModeInfo { - const TYPE_URL: &'static str = "/cosmos.tx.v1beta1.ModeInfo"; -} - -impl TypeUrl for ibc::applications::transfer::v1::MsgTransfer { - const TYPE_URL: &'static str = "/ibc.applications.transfer.v1.MsgTransfer"; -} - -#[cfg(feature = "cosmwasm")] -mod wasm { - use crate::{cosmwasm, traits::TypeUrl}; - - impl TypeUrl for cosmwasm::wasm::v1::MigrateContractProposal { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.MigrateContractProposal"; - } - - impl TypeUrl for cosmwasm::wasm::v1::UpdateInstantiateConfigProposal { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.UpdateInstantiateConfigProposal"; - } - - impl TypeUrl for cosmwasm::wasm::v1::SudoContractProposal { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.SudoContractProposal"; - } - - impl TypeUrl for cosmwasm::wasm::v1::ExecuteContractProposal { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.ExecuteContractProposal"; - } - - impl TypeUrl for cosmwasm::wasm::v1::UpdateAdminProposal { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.UpdateAdminProposal"; - } - - impl TypeUrl for cosmwasm::wasm::v1::ClearAdminProposal { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.ClearAdminProposal"; - } - - impl TypeUrl for cosmwasm::wasm::v1::PinCodesProposal { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.PinCodesProposal"; - } - - impl TypeUrl for cosmwasm::wasm::v1::UnpinCodesProposal { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.UnpinCodesProposal"; - } - - impl TypeUrl for cosmwasm::wasm::v1::InstantiateContractProposal { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.InstantiateContractProposal"; - } - - impl TypeUrl for cosmwasm::wasm::v1::StoreCodeProposal { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.StoreCodeProposal"; - } - - impl TypeUrl for cosmwasm::wasm::v1::MsgStoreCode { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.MsgStoreCode"; - } - - impl TypeUrl for cosmwasm::wasm::v1::MsgInstantiateContract { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.MsgInstantiateContract"; - } - - impl TypeUrl for cosmwasm::wasm::v1::MsgExecuteContract { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.MsgExecuteContract"; - } - - impl TypeUrl for cosmwasm::wasm::v1::MsgMigrateContract { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.MsgMigrateContract"; - } - - impl TypeUrl for cosmwasm::wasm::v1::MsgUpdateAdmin { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.MsgUpdateAdmin"; - } - - impl TypeUrl for cosmwasm::wasm::v1::MsgClearAdmin { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.MsgClearAdmin"; - } - - impl TypeUrl for cosmwasm::wasm::v1::MsgStoreCodeResponse { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.MsgStoreCodeResponse"; - } - - impl TypeUrl for cosmwasm::wasm::v1::MsgInstantiateContractResponse { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.MsgInstantiateContractResponse"; - } - - impl TypeUrl for cosmwasm::wasm::v1::MsgExecuteContractResponse { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.MsgExecuteContractResponse"; - } - - impl TypeUrl for cosmwasm::wasm::v1::MsgMigrateContractResponse { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.MsgMigrateContractResponse"; - } - - impl TypeUrl for cosmwasm::wasm::v1::MsgUpdateAdminResponse { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.MsgUpdateAdminResponse"; - } - - impl TypeUrl for cosmwasm::wasm::v1::MsgClearAdminResponse { - const TYPE_URL: &'static str = "/cosmwasm.wasm.v1.MsgClearAdminResponse"; - } -} diff --git a/cosmrs/Cargo.toml b/cosmrs/Cargo.toml index 1ecf1230..00ef0838 100644 --- a/cosmrs/Cargo.toml +++ b/cosmrs/Cargo.toml @@ -12,7 +12,8 @@ edition = "2021" rust-version = "1.65" [dependencies] -cosmos-sdk-proto = { version = "0.19", default-features = false, path = "../cosmos-sdk-proto" } +# cosmos-sdk-proto = { version = "0.19", default-features = false, path = "../cosmos-sdk-proto" } +ibc-proto = { version = "0.31.0-alpha.2", default-features = false, git = "https://github.com/octopus-network/ibc-proto-rs.git", branch = "new-proto" } ecdsa = { version = "0.16", features = ["std"] } eyre = "0.6" k256 = { version = "0.13", features = ["ecdsa", "sha256"] } diff --git a/ibc-go b/ibc-go deleted file mode 160000 index 46e02064..00000000 --- a/ibc-go +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 46e020640e66f9043c14c53a4d215a5b457d6703 diff --git a/proto-build/Cargo.toml b/proto-build/Cargo.toml deleted file mode 100644 index 1ec7a6ca..00000000 --- a/proto-build/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "proto-build" -version = "0.1.0" -authors = ["Justin Kilpatrick ", "Tony Arcieri "] -edition = "2018" -publish = false - -[dependencies] -prost = "0.11" -prost-build = "0.11" -tonic = "0.9" -tonic-build = "0.9" -regex = "1" -walkdir = "2" diff --git a/proto-build/buf.sdk.gen.yaml b/proto-build/buf.sdk.gen.yaml deleted file mode 100644 index 7c772b18..00000000 --- a/proto-build/buf.sdk.gen.yaml +++ /dev/null @@ -1,10 +0,0 @@ -version: v1 -plugins: - - remote: buf.build/prost/plugins/prost:v0.2.1-1 - out: . - opt: - - extern_path=.tendermint=::tendermint_proto - - remote: buf.build/prost/plugins/tonic:v0.2.1-1 - out: . - opt: - - extern_path=.tendermint=::tendermint_proto diff --git a/proto-build/buf.wasmd.gen.yaml b/proto-build/buf.wasmd.gen.yaml deleted file mode 100644 index a118632a..00000000 --- a/proto-build/buf.wasmd.gen.yaml +++ /dev/null @@ -1,8 +0,0 @@ -version: v1 -plugins: - - remote: buf.build/prost/plugins/prost:v0.2.1-1 - out: . - - remote: buf.build/prost/plugins/tonic:v0.2.1-1 - out: . - opt: - - no_server=true diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs deleted file mode 100644 index 084c573d..00000000 --- a/proto-build/src/main.rs +++ /dev/null @@ -1,421 +0,0 @@ -//! Build CosmosSDK/Tendermint/IBC proto files. This build script clones the CosmosSDK version -//! specified in the COSMOS_SDK_REV constant and then uses that to build the required -//! proto files for further compilation. This is based on the proto-compiler code -//! in github.com/informalsystems/ibc-rs - -use regex::Regex; -use std::{ - env, - ffi::{OsStr, OsString}, - fs::{self, create_dir_all, remove_dir_all}, - io, - path::{Path, PathBuf}, - process, - sync::atomic::{self, AtomicBool}, -}; -use walkdir::WalkDir; - -/// Suppress log messages -// TODO(tarcieri): use a logger for this -static QUIET: AtomicBool = AtomicBool::new(false); - -/// The Cosmos SDK commit or tag to be cloned and used to build the proto files -const COSMOS_SDK_REV: &str = "v0.46.12"; - -/// The Cosmos ibc-go commit or tag to be cloned and used to build the proto files -const IBC_REV: &str = "v3.0.0"; - -/// The wasmd commit or tag to be cloned and used to build the proto files -const WASMD_REV: &str = "v0.29.2"; - -// All paths must end with a / and either be absolute or include a ./ to reference the current -// working directory. - -/// The directory generated cosmos-sdk proto files go into in this repo -const COSMOS_SDK_PROTO_DIR: &str = "../cosmos-sdk-proto/src/prost/"; -/// Directory where the cosmos-sdk submodule is located -const COSMOS_SDK_DIR: &str = "../cosmos-sdk-go"; -/// Directory where the cosmos/ibc-go submodule is located -const IBC_DIR: &str = "../ibc-go"; -/// Directory where the submodule is located -const WASMD_DIR: &str = "../wasmd"; -/// A temporary directory for proto building -const TMP_BUILD_DIR: &str = "/tmp/tmp-protobuf/"; - -// Patch strings used by `copy_and_patch` - -/// Protos belonging to these Protobuf packages will be excluded -/// (i.e. because they are sourced from `tendermint-proto`) -const EXCLUDED_PROTO_PACKAGES: &[&str] = &["gogoproto", "google", "tendermint"]; - -/// Log info to the console (if `QUIET` is disabled) -// TODO(tarcieri): use a logger for this -macro_rules! info { - ($msg:expr) => { - if !is_quiet() { - println!("[info] {}", $msg) - } - }; - ($fmt:expr, $($arg:tt)+) => { - info!(&format!($fmt, $($arg)+)) - }; -} - -fn main() { - if is_github() { - set_quiet(); - } - - let tmp_build_dir: PathBuf = TMP_BUILD_DIR.parse().unwrap(); - let proto_dir: PathBuf = COSMOS_SDK_PROTO_DIR.parse().unwrap(); - - if tmp_build_dir.exists() { - fs::remove_dir_all(tmp_build_dir.clone()).unwrap(); - } - - let temp_sdk_dir = tmp_build_dir.join("cosmos-sdk"); - let temp_ibc_dir = tmp_build_dir.join("ibc-go"); - let temp_wasmd_dir = tmp_build_dir.join("wasmd"); - - fs::create_dir_all(&temp_sdk_dir).unwrap(); - fs::create_dir_all(&temp_ibc_dir).unwrap(); - fs::create_dir_all(&temp_wasmd_dir).unwrap(); - - update_submodules(); - output_sdk_version(&temp_sdk_dir); - output_ibc_version(&temp_ibc_dir); - output_wasmd_version(&temp_wasmd_dir); - compile_sdk_protos_and_services(&temp_sdk_dir); - compile_ibc_protos_and_services(&temp_ibc_dir); - compile_wasmd_proto_and_services(&temp_wasmd_dir); - - copy_generated_files(&temp_sdk_dir, &proto_dir.join("cosmos-sdk")); - copy_generated_files(&temp_ibc_dir, &proto_dir.join("ibc-go")); - copy_generated_files(&temp_wasmd_dir, &proto_dir.join("wasmd")); - - apply_patches(&proto_dir); - - info!("Running rustfmt on prost/tonic-generated code"); - run_rustfmt(&proto_dir); - - if is_github() { - println!( - "Rebuild protos with proto-build (cosmos-sdk rev: {} ibc-go rev: {} wasmd rev: {}))", - COSMOS_SDK_REV, IBC_REV, WASMD_REV - ); - } -} - -fn is_quiet() -> bool { - QUIET.load(atomic::Ordering::Relaxed) -} - -fn set_quiet() { - QUIET.store(true, atomic::Ordering::Relaxed); -} - -/// Parse `--github` flag passed to `proto-build` on the eponymous GitHub Actions job. -/// Disables `info`-level log messages, instead outputting only a commit message. -fn is_github() -> bool { - env::args().any(|arg| arg == "--github") -} - -fn run_cmd(cmd: impl AsRef, args: impl IntoIterator>) { - let stdout = if is_quiet() { - process::Stdio::null() - } else { - process::Stdio::inherit() - }; - - let exit_status = process::Command::new(&cmd) - .args(args) - .stdout(stdout) - .status() - .unwrap_or_else(|e| match e.kind() { - io::ErrorKind::NotFound => panic!( - "error running '{:?}': command not found. Is it installed?", - cmd.as_ref() - ), - _ => panic!("error running '{:?}': {:?}", cmd.as_ref(), e), - }); - - if !exit_status.success() { - match exit_status.code() { - Some(code) => panic!("{:?} exited with error code: {:?}", cmd.as_ref(), code), - None => panic!("{:?} exited without error code", cmd.as_ref()), - } - } -} - -fn run_buf(config: &str, proto_path: impl AsRef, out_dir: impl AsRef) { - run_cmd( - "buf", - [ - "generate", - "--template", - config, - "--include-imports", - "-o", - &out_dir.as_ref().display().to_string(), - &proto_path.as_ref().display().to_string(), - ], - ); -} - -fn run_git(args: impl IntoIterator>) { - run_cmd("git", args) -} - -fn run_rustfmt(dir: &Path) { - let mut args = ["--edition", "2021"] - .iter() - .map(Into::into) - .collect::>(); - - args.extend( - WalkDir::new(dir) - .into_iter() - .filter_map(|e| e.ok()) - .filter(|e| e.file_type().is_file() && e.path().extension() == Some(OsStr::new("rs"))) - .map(|e| e.into_path()) - .map(Into::into), - ); - - run_cmd("rustfmt", args); -} - -fn update_submodules() { - info!("Updating cosmos/cosmos-sdk submodule..."); - run_git(["submodule", "update", "--init"]); - run_git(["-C", COSMOS_SDK_DIR, "fetch"]); - run_git(["-C", COSMOS_SDK_DIR, "reset", "--hard", COSMOS_SDK_REV]); - - info!("Updating cosmos/ibc-go submodule..."); - run_git(["submodule", "update", "--init"]); - run_git(["-C", IBC_DIR, "fetch"]); - run_git(["-C", IBC_DIR, "reset", "--hard", IBC_REV]); - - info!("Updating wasmd submodule..."); - run_git(["submodule", "update", "--init"]); - run_git(["-C", WASMD_DIR, "fetch"]); - run_git(["-C", WASMD_DIR, "reset", "--hard", WASMD_REV]); -} - -fn output_sdk_version(out_dir: &Path) { - let path = out_dir.join("COSMOS_SDK_COMMIT"); - fs::write(path, COSMOS_SDK_REV).unwrap(); -} - -fn output_ibc_version(out_dir: &Path) { - let path = out_dir.join("IBC_COMMIT"); - fs::write(path, IBC_REV).unwrap(); -} - -fn output_wasmd_version(out_dir: &Path) { - let path = out_dir.join("WASMD_COMMIT"); - fs::write(path, WASMD_REV).unwrap(); -} - -fn compile_sdk_protos_and_services(out_dir: &Path) { - info!( - "Compiling cosmos-sdk .proto files to Rust into '{}'...", - out_dir.display() - ); - - // Compile all of the proto files, along with grpc service clients - info!("Compiling proto definitions and clients for GRPC services!"); - let proto_path = Path::new(COSMOS_SDK_DIR).join("proto"); - run_buf("buf.sdk.gen.yaml", &proto_path, out_dir); - info!("=> Done!"); -} - -fn compile_wasmd_proto_and_services(out_dir: &Path) { - let sdk_dir = Path::new(WASMD_DIR); - let proto_path = sdk_dir.join("proto"); - let proto_paths = [format!("{}/proto/cosmwasm/wasm", sdk_dir.display())]; - - // List available proto files - let mut protos: Vec = vec![]; - collect_protos(&proto_paths, &mut protos); - - // Compile all proto client for GRPC services - info!("Compiling wasmd proto clients for GRPC services!"); - run_buf("buf.wasmd.gen.yaml", proto_path, out_dir); - info!("=> Done!"); -} - -fn compile_ibc_protos_and_services(out_dir: &Path) { - info!( - "Compiling .proto files to Rust into '{}'...", - out_dir.display() - ); - - let root = env!("CARGO_MANIFEST_DIR"); - let ibc_dir = Path::new(IBC_DIR); - - let proto_includes_paths = [ - format!("{}/../proto", root), - format!("{}/proto", ibc_dir.display()), - format!("{}/third_party/proto", ibc_dir.display()), - ]; - - let proto_paths = [ - format!("{}/../proto/definitions/mock", root), - format!( - "{}/proto/ibc/applications/interchain_accounts", - ibc_dir.display() - ), - format!("{}/proto/ibc/applications/transfer", ibc_dir.display()), - format!("{}/proto/ibc/core/channel", ibc_dir.display()), - format!("{}/proto/ibc/core/client", ibc_dir.display()), - format!("{}/proto/ibc/core/commitment", ibc_dir.display()), - format!("{}/proto/ibc/core/connection", ibc_dir.display()), - format!("{}/proto/ibc/core/port", ibc_dir.display()), - format!("{}/proto/ibc/core/types", ibc_dir.display()), - format!("{}/proto/ibc/lightclients/localhost", ibc_dir.display()), - format!("{}/proto/ibc/lightclients/solomachine", ibc_dir.display()), - format!("{}/proto/ibc/lightclients/tendermint", ibc_dir.display()), - ]; - // List available proto files - let mut protos: Vec = vec![]; - collect_protos(&proto_paths, &mut protos); - - let includes: Vec = proto_includes_paths.iter().map(PathBuf::from).collect(); - - // Compile all of the proto files, along with the grpc service clients - info!("Compiling proto definitions and clients for GRPC services!"); - tonic_build::configure() - .build_client(true) - .build_server(false) - .out_dir(out_dir) - .extern_path(".tendermint", "::tendermint_proto") - .compile(&protos, &includes) - .unwrap(); - - info!("=> Done!"); -} - -/// collect_protos walks every path in `proto_paths` and recursively locates all .proto -/// files in each path's subdirectories, adding the full path of each file to `protos` -/// -/// Any errors encountered will cause failure for the path provided to WalkDir::new() -fn collect_protos(proto_paths: &[String], protos: &mut Vec) { - for proto_path in proto_paths { - protos.append( - &mut WalkDir::new(proto_path) - .into_iter() - .filter_map(|e| e.ok()) - .filter(|e| { - e.file_type().is_file() - && e.path().extension().is_some() - && e.path().extension().unwrap() == "proto" - }) - .map(|e| e.into_path()) - .collect(), - ); - } -} - -fn copy_generated_files(from_dir: &Path, to_dir: &Path) { - info!("Copying generated files into '{}'...", to_dir.display()); - - // Remove old compiled files - remove_dir_all(to_dir).unwrap_or_default(); - create_dir_all(to_dir).unwrap(); - - let mut filenames = Vec::new(); - - // Copy new compiled files (prost does not use folder structures) - let errors = WalkDir::new(from_dir) - .into_iter() - .filter_map(|e| e.ok()) - .filter(|e| e.file_type().is_file()) - .map(|e| { - let filename = e.file_name().to_os_string().to_str().unwrap().to_string(); - filenames.push(filename.clone()); - copy_and_patch(e.path(), format!("{}/{}", to_dir.display(), &filename)) - }) - .filter_map(|e| e.err()) - .collect::>(); - - if !errors.is_empty() { - for e in errors { - eprintln!("[error] Error while copying compiled file: {}", e); - } - - panic!("[error] Aborted."); - } -} - -fn copy_and_patch(src: impl AsRef, dest: impl AsRef) -> io::Result<()> { - /// Regex substitutions to apply to the prost-generated output - const REPLACEMENTS: &[(&str, &str)] = &[ - // Use `tendermint-proto` proto definitions - ("(super::)+tendermint", "tendermint_proto"), - // Feature-gate gRPC client modules - ( - "/// Generated client implementations.", - "/// Generated client implementations.\n\ - #[cfg(feature = \"grpc\")]\n\ - #[cfg_attr(docsrs, doc(cfg(feature = \"grpc\")))]", - ), - // Feature-gate gRPC impls which use `tonic::transport` - ( - "impl(.+)tonic::transport(.+)", - "#[cfg(feature = \"grpc-transport\")]\n \ - #[cfg_attr(docsrs, doc(cfg(feature = \"grpc-transport\")))]\n \ - impl${1}tonic::transport${2}", - ), - // Feature-gate gRPC server modules - ( - "/// Generated server implementations.", - "/// Generated server implementations.\n\ - #[cfg(feature = \"grpc\")]\n\ - #[cfg_attr(docsrs, doc(cfg(feature = \"grpc\")))]", - ), - ]; - - // Skip proto files belonging to `EXCLUDED_PROTO_PACKAGES` - for package in EXCLUDED_PROTO_PACKAGES { - if let Some(filename) = src.as_ref().file_name().and_then(OsStr::to_str) { - if filename.starts_with(&format!("{}.", package)) { - return Ok(()); - } - } - } - - let mut contents = fs::read_to_string(src)?; - - for &(regex, replacement) in REPLACEMENTS { - contents = Regex::new(regex) - .unwrap_or_else(|_| panic!("invalid regex: {}", regex)) - .replace_all(&contents, replacement) - .to_string(); - } - - fs::write(dest, &contents) -} - -fn patch_file(path: impl AsRef, pattern: &Regex, replacement: &str) -> io::Result<()> { - let mut contents = fs::read_to_string(&path)?; - contents = pattern.replace_all(&contents, replacement).to_string(); - fs::write(path, &contents) -} - -/// Fix clashing type names in prost-generated code. See cosmos/cosmos-rust#154. -fn apply_patches(proto_dir: &Path) { - for (pattern, replacement) in [ - ("enum Validators", "enum Policy"), - ( - "stake_authorization::Validators", - "stake_authorization::Policy", - ), - ] { - patch_file( - &proto_dir.join("cosmos-sdk/cosmos.staking.v1beta1.rs"), - &Regex::new(pattern).unwrap(), - replacement, - ) - .expect("error patching cosmos.staking.v1beta1.rs"); - } -} diff --git a/wasmd b/wasmd deleted file mode 160000 index e4a2bfb5..00000000 --- a/wasmd +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e4a2bfb5616c4ce3ddbc994a17c20b6de5fccad1 From 2557a8c9f08f980f91b7f941f4c58e8175a03a8c Mon Sep 17 00:00:00 2001 From: Davirain Date: Mon, 8 May 2023 18:24:17 +0800 Subject: [PATCH 02/12] update cosmos-sdk-proto to ibc-proto --- Cargo.lock | 361 +++++----------------- Cargo.toml | 2 - cosmrs/Cargo.toml | 10 +- cosmrs/src/abci/msg_data.rs | 15 +- cosmrs/src/crypto/legacy_amino.rs | 3 +- cosmrs/src/crypto/public_key.rs | 16 +- cosmrs/src/feegrant/periodic_allowance.rs | 6 +- cosmrs/src/lib.rs | 2 +- cosmrs/src/tx.rs | 13 +- cosmrs/src/tx/auth_info.rs | 5 +- cosmrs/src/tx/body.rs | 5 +- cosmrs/src/tx/msg.rs | 9 +- cosmrs/src/tx/raw.rs | 9 +- cosmrs/src/tx/sign_doc.rs | 5 +- 14 files changed, 148 insertions(+), 313 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 90b39382..1f28231e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,20 +2,11 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - [[package]] name = "anyhow" -version = "1.0.70" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" [[package]] name = "async-trait" @@ -36,9 +27,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b32c5ea3aabaf4deb5f5ced2d688ec0844c881c9e6c696a8b769a05fc691e62" +checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" dependencies = [ "async-trait", "axum-core", @@ -156,9 +147,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8" [[package]] name = "byteorder" @@ -209,27 +200,18 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" -[[package]] -name = "cosmos-sdk-proto" -version = "0.19.0" -dependencies = [ - "prost", - "prost-types", - "tendermint-proto", - "tonic", -] - [[package]] name = "cosmrs" version = "0.14.0" dependencies = [ "bip32", - "cosmos-sdk-proto", "ecdsa", "eyre", "getrandom", "hex-literal", + "ibc-proto", "k256", + "prost", "rand_core", "serde", "serde_json", @@ -242,18 +224,18 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" +checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" dependencies = [ "libc", ] [[package]] name = "crypto-bigint" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2538c4e68e52548bacb3e83ac549f903d44f011ac9d5abb5e132e67d0808f7" +checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" dependencies = [ "generic-array", "rand_core", @@ -295,9 +277,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b10af9f9f9f2134a42d3f8aa74658660f2e0234b0eb81bd171df8aa32779ed" +checksum = "05e58dffcdcc8ee7b22f0c1f71a69243d7c2d9ad87b5a14361f2424a1565c219" dependencies = [ "const-oid", "zeroize", @@ -385,27 +367,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "errno" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "eyre" version = "0.6.8" @@ -416,15 +377,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "ff" version = "0.13.0" @@ -435,12 +387,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - [[package]] name = "flex-error" version = "0.4.4" @@ -592,9 +538,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66b91535aa35fea1523ad1b86cb6b53c28e0ae566ba4a460f4457e936cad7c6f" +checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" dependencies = [ "bytes", "fnv", @@ -640,12 +586,6 @@ dependencies = [ "http", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "hermit-abi" version = "0.2.6" @@ -655,12 +595,6 @@ dependencies = [ "libc", ] -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" - [[package]] name = "hex" version = "0.4.3" @@ -789,6 +723,36 @@ dependencies = [ "tokio-io-timeout", ] +[[package]] +name = "ibc-proto" +version = "0.31.0-alpha.2" +source = "git+https://github.com/octopus-network/ibc-proto-rs.git?rev=e9fb075d666bf49e491e3d338e5af98aa7b2b73e#e9fb075d666bf49e491e3d338e5af98aa7b2b73e" +dependencies = [ + "base64 0.21.0", + "bytes", + "flex-error", + "ics23", + "prost", + "serde", + "subtle-encoding", + "tendermint-proto", + "tonic", +] + +[[package]] +name = "ics23" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af9e8f569c5cc88e08b8d076dc207e0748aa1f52d4b84910ec919c8f2bed6ea7" +dependencies = [ + "anyhow", + "bytes", + "hex", + "pbjson", + "prost", + "serde", +] + [[package]] name = "idna" version = "0.3.0" @@ -815,26 +779,6 @@ dependencies = [ "hashbrown", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" -dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "itertools" version = "0.10.5" @@ -873,23 +817,11 @@ dependencies = [ "signature", ] -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - [[package]] name = "libc" -version = "0.2.141" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" - -[[package]] -name = "linux-raw-sys" -version = "0.3.1" +version = "0.2.143" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" +checksum = "edc207893e85c5d6be840e969b496b53d94cec8be2d501b214f50daa97fa8024" [[package]] name = "log" @@ -930,12 +862,6 @@ dependencies = [ "windows-sys 0.45.0", ] -[[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" - [[package]] name = "num-derive" version = "0.3.3" @@ -962,7 +888,7 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi", "libc", ] @@ -990,6 +916,16 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +[[package]] +name = "pbjson" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "048f9ac93c1eab514f9470c4bc8d97ca2a0a236b84f45cc19d69a59fc11467f6" +dependencies = [ + "base64 0.13.1", + "serde", +] + [[package]] name = "pbkdf2" version = "0.12.1" @@ -1033,16 +969,6 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" -[[package]] -name = "petgraph" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" -dependencies = [ - "fixedbitset", - "indexmap", -] - [[package]] name = "pin-project" version = "1.0.12" @@ -1091,16 +1017,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "prettyplease" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" -dependencies = [ - "proc-macro2", - "syn 1.0.109", -] - [[package]] name = "proc-macro2" version = "1.0.56" @@ -1120,28 +1036,6 @@ dependencies = [ "prost-derive", ] -[[package]] -name = "prost-build" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" -dependencies = [ - "bytes", - "heck", - "itertools", - "lazy_static", - "log", - "multimap", - "petgraph", - "prettyplease", - "prost", - "prost-types", - "regex", - "syn 1.0.109", - "tempfile", - "which", -] - [[package]] name = "prost-derive" version = "0.11.9" @@ -1164,18 +1058,6 @@ dependencies = [ "prost", ] -[[package]] -name = "proto-build" -version = "0.1.0" -dependencies = [ - "prost", - "prost-build", - "regex", - "tonic", - "tonic-build", - "walkdir", -] - [[package]] name = "quote" version = "1.0.26" @@ -1215,32 +1097,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - [[package]] name = "rfc6979" version = "0.4.0" @@ -1275,20 +1131,6 @@ dependencies = [ "digest 0.10.6", ] -[[package]] -name = "rustix" -version = "0.37.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85597d61f83914ddeba6a47b3b8ffe7365107221c2e557ed94426489fefb5f77" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys", - "windows-sys 0.48.0", -] - [[package]] name = "rustls" version = "0.19.1" @@ -1399,9 +1241,9 @@ checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "serde" -version = "1.0.160" +version = "1.0.162" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" +checksum = "71b2f6e1ab5c2b98c05f0f35b236b22e8df7ead6ffbf51d7808da7f8817e7ab6" dependencies = [ "serde_derive", ] @@ -1417,9 +1259,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.160" +version = "1.0.162" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" +checksum = "a2a0814352fd64b58489904a44ea8d90cb1a91dcb6b4f5ebabc32c8318e93cb6" dependencies = [ "proc-macro2", "quote", @@ -1520,9 +1362,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spki" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a5be806ab6f127c3da44b7378837ebf01dadca8510a0e572460216b228bd0e" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", "der", @@ -1577,19 +1419,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" -[[package]] -name = "tempfile" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" -dependencies = [ - "cfg-if", - "fastrand", - "redox_syscall", - "rustix", - "windows-sys 0.45.0", -] - [[package]] name = "tendermint" version = "0.32.0" @@ -1710,9 +1539,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" dependencies = [ "serde", "time-core", @@ -1721,15 +1550,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" dependencies = [ "time-core", ] @@ -1751,9 +1580,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.27.0" +version = "1.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" +checksum = "c3c786bf8134e5a3a166db9b29ab8f48134739014a3eca7bc6bfa95d673b136f" dependencies = [ "autocfg", "bytes", @@ -1763,7 +1592,7 @@ dependencies = [ "pin-project-lite", "socket2", "tokio-macros", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -1778,9 +1607,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", @@ -1800,9 +1629,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -1811,9 +1640,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -1860,19 +1689,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tonic-build" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6fdaae4c2c638bb70fe42803a26fbd6fc6ac8c72f5c59f67ecc2a2dcabf4b07" -dependencies = [ - "prettyplease", - "proc-macro2", - "prost-build", - "quote", - "syn 1.0.109", -] - [[package]] name = "tower" version = "0.4.13" @@ -1919,13 +1735,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] @@ -2108,17 +1924,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "which" -version = "4.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" -dependencies = [ - "either", - "libc", - "once_cell", -] - [[package]] name = "winapi" version = "0.3.9" diff --git a/Cargo.toml b/Cargo.toml index 8f6cd616..e0e090df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,5 @@ [workspace] resolver = "2" members = [ - "proto-build", - "cosmos-sdk-proto", "cosmrs" ] diff --git a/cosmrs/Cargo.toml b/cosmrs/Cargo.toml index 00ef0838..4cce5b5b 100644 --- a/cosmrs/Cargo.toml +++ b/cosmrs/Cargo.toml @@ -12,8 +12,8 @@ edition = "2021" rust-version = "1.65" [dependencies] -# cosmos-sdk-proto = { version = "0.19", default-features = false, path = "../cosmos-sdk-proto" } -ibc-proto = { version = "0.31.0-alpha.2", default-features = false, git = "https://github.com/octopus-network/ibc-proto-rs.git", branch = "new-proto" } +ibc-proto = { git = "https://github.com/octopus-network/ibc-proto-rs.git", rev = "e9fb075d666bf49e491e3d338e5af98aa7b2b73e" } +prost = { version = "0.11" } ecdsa = { version = "0.16", features = ["std"] } eyre = "0.6" k256 = { version = "0.13", features = ["ecdsa", "sha256"] } @@ -37,10 +37,10 @@ hex-literal = "0.4" [features] default = ["bip32"] -cosmwasm = ["cosmos-sdk-proto/cosmwasm"] +cosmwasm = ["ibc-proto/cosmwasm"] dev = ["rpc", "tokio"] -grpc = ["cosmos-sdk-proto/grpc-transport", "grpc-core"] -grpc-core = ["cosmos-sdk-proto/grpc"] +client = ["ibc-proto/client"] +server = ["ibc-proto/server"] rpc = ["tendermint-rpc"] [package.metadata.docs.rs] diff --git a/cosmrs/src/abci/msg_data.rs b/cosmrs/src/abci/msg_data.rs index 22706546..96f7cc65 100644 --- a/cosmrs/src/abci/msg_data.rs +++ b/cosmrs/src/abci/msg_data.rs @@ -1,10 +1,7 @@ use super::Data; -use crate::{ - proto::{self, traits::Message}, - tx::Msg, - ErrorReport, Result, -}; +use crate::{proto, tx::Msg, ErrorReport, Result}; use eyre::eyre; +use prost::Message; /// MsgData defines the data returned in a Result object during message execution. #[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] @@ -22,7 +19,9 @@ pub struct MsgData { impl MsgData { /// Attempts to decode the `data` field of this result into the specified `Msg` type. pub fn try_decode_as(&self) -> Result { - M::Proto::decode(&*self.data)?.try_into() + M::Proto::decode(&*self.data) + .map_err(|e| eyre::eyre!(format!("{:?}", e)))? + .try_into() } } @@ -63,7 +62,9 @@ impl TryFrom for TxMsgData { type Error = ErrorReport; fn try_from(data: Data) -> Result { - proto::cosmos::base::abci::v1beta1::TxMsgData::decode(data.as_ref())?.try_into() + proto::cosmos::base::abci::v1beta1::TxMsgData::decode(data.as_ref()) + .map_err(|e| eyre::eyre!(format!("{:?}", e)))? + .try_into() } } diff --git a/cosmrs/src/crypto/legacy_amino.rs b/cosmrs/src/crypto/legacy_amino.rs index d66c3874..ff5cccdb 100644 --- a/cosmrs/src/crypto/legacy_amino.rs +++ b/cosmrs/src/crypto/legacy_amino.rs @@ -63,7 +63,8 @@ impl TryFrom<&Any> for LegacyAminoMultisig { }); } - let proto = proto::cosmos::crypto::multisig::LegacyAminoPubKey::decode(&*any.value)?; + let proto = proto::cosmos::crypto::multisig::LegacyAminoPubKey::decode(&*any.value) + .map_err(|e| eyre::eyre!(format!("{:?}", e)))?; let public_keys = proto .public_keys .into_iter() diff --git a/cosmrs/src/crypto/public_key.rs b/cosmrs/src/crypto/public_key.rs index 410011db..84a0dde1 100644 --- a/cosmrs/src/crypto/public_key.rs +++ b/cosmrs/src/crypto/public_key.rs @@ -61,11 +61,13 @@ impl PublicKey { tendermint::PublicKey::Ed25519(_) => proto::cosmos::crypto::secp256k1::PubKey { key: self.to_bytes(), } - .to_bytes()?, + .to_bytes() + .map_err(|e| eyre::eyre!(format!("{:?}", e)))?, tendermint::PublicKey::Secp256k1(_) => proto::cosmos::crypto::secp256k1::PubKey { key: self.to_bytes(), } - .to_bytes()?, + .to_bytes() + .map_err(|e| eyre::eyre!(format!("{:?}", e)))?, _ => return Err(Error::Crypto.into()), }; @@ -106,11 +108,13 @@ impl TryFrom<&Any> for PublicKey { fn try_from(any: &Any) -> Result { match any.type_url.as_str() { - Self::ED25519_TYPE_URL => { - proto::cosmos::crypto::ed25519::PubKey::decode(&*any.value)?.try_into() - } + Self::ED25519_TYPE_URL => proto::cosmos::crypto::ed25519::PubKey::decode(&*any.value) + .map_err(|e| eyre::eyre!(format!("{:?}", e)))? + .try_into(), Self::SECP256K1_TYPE_URL => { - proto::cosmos::crypto::secp256k1::PubKey::decode(&*any.value)?.try_into() + proto::cosmos::crypto::secp256k1::PubKey::decode(&*any.value) + .map_err(|e| eyre::eyre!(format!("{:?}", e)))? + .try_into() } other => Err(Error::Crypto) .wrap_err_with(|| format!("invalid type URL for public key: {}", other)), diff --git a/cosmrs/src/feegrant/periodic_allowance.rs b/cosmrs/src/feegrant/periodic_allowance.rs index 20f8ad8c..1224cc49 100644 --- a/cosmrs/src/feegrant/periodic_allowance.rs +++ b/cosmrs/src/feegrant/periodic_allowance.rs @@ -38,7 +38,11 @@ impl TryFrom for PeriodicAl ) -> Result { Ok(PeriodicAllowance { basic: proto.basic.map(TryFrom::try_from).transpose()?, - period: proto.period.map(TryFrom::try_from).transpose()?, + period: proto + .period + .map(TryFrom::try_from) + .transpose() + .map_err(|e| eyre::eyre!(format!("{:?}", e)))?, period_spend_limit: proto .period_spend_limit .iter() diff --git a/cosmrs/src/lib.rs b/cosmrs/src/lib.rs index b2571c73..1547575d 100644 --- a/cosmrs/src/lib.rs +++ b/cosmrs/src/lib.rs @@ -52,8 +52,8 @@ pub use crate::{ tx::Tx, }; -pub use cosmos_sdk_proto::{self as proto, Any}; pub use eyre::Report as ErrorReport; +pub use ibc_proto::{self as proto, google::protobuf::Any}; pub use tendermint; #[cfg(feature = "bip32")] diff --git a/cosmrs/src/tx.rs b/cosmrs/src/tx.rs index 172e1d59..53125eb6 100644 --- a/cosmrs/src/tx.rs +++ b/cosmrs/src/tx.rs @@ -124,16 +124,17 @@ pub use self::{ sign_doc::SignDoc, signer_info::{SignerInfo, SignerPublicKey}, }; -pub use crate::{ - proto::{cosmos::tx::signing::v1beta1::SignMode, traits::MessageExt}, - ErrorReport, -}; use crate::{ proto::{self, traits::Message}, Error, Gas, Result, }; +pub use crate::{ + proto::{cosmos::tx::signing::v1beta1::SignMode, traits::MessageExt}, + ErrorReport, +}; + #[cfg(feature = "rpc")] use {crate::rpc, tendermint::Hash}; @@ -186,7 +187,9 @@ impl TryFrom<&[u8]> for Tx { type Error = ErrorReport; fn try_from(bytes: &[u8]) -> Result { - proto::cosmos::tx::v1beta1::Tx::decode(bytes)?.try_into() + proto::cosmos::tx::v1beta1::Tx::decode(bytes) + .map_err(|e| eyre::eyre!(format!("{:?}", e)))? + .try_into() } } diff --git a/cosmrs/src/tx/auth_info.rs b/cosmrs/src/tx/auth_info.rs index b91a2402..5986fcd4 100644 --- a/cosmrs/src/tx/auth_info.rs +++ b/cosmrs/src/tx/auth_info.rs @@ -33,7 +33,10 @@ impl AuthInfo { /// Encode this type using Protocol Buffers. pub fn into_bytes(self) -> Result> { - Ok(self.into_proto().to_bytes()?) + Ok(self + .into_proto() + .to_bytes() + .map_err(|e| eyre::eyre!(format!("{:?}", e)))?) } } diff --git a/cosmrs/src/tx/body.rs b/cosmrs/src/tx/body.rs index e1fee462..9effb44b 100644 --- a/cosmrs/src/tx/body.rs +++ b/cosmrs/src/tx/body.rs @@ -65,7 +65,10 @@ impl Body { /// Encode this type using Protocol Buffers. pub fn into_bytes(self) -> Result> { - Ok(self.into_proto().to_bytes()?) + Ok(self + .into_proto() + .to_bytes() + .map_err(|e| eyre::eyre!(format!("{:?}", e)))?) } } diff --git a/cosmrs/src/tx/msg.rs b/cosmrs/src/tx/msg.rs index 61a343f3..2527afe1 100644 --- a/cosmrs/src/tx/msg.rs +++ b/cosmrs/src/tx/msg.rs @@ -19,7 +19,9 @@ pub trait Msg: /// Parse this message proto from [`Any`]. fn from_any(any: &Any) -> Result { - Self::Proto::from_any(any)?.try_into() + Self::Proto::from_any(any) + .map_err(|e| eyre::eyre!(format!("{:?}", e)))? + .try_into() } /// Serialize this message proto as [`Any`]. @@ -29,6 +31,9 @@ pub trait Msg: /// Convert this message proto into [`Any`]. fn into_any(self) -> Result { - Ok(self.into().to_any()?) + Ok(self + .into() + .to_any() + .map_err(|e| eyre::eyre!(format!("{:?}", e)))?) } } diff --git a/cosmrs/src/tx/raw.rs b/cosmrs/src/tx/raw.rs index 93272214..e2807eec 100644 --- a/cosmrs/src/tx/raw.rs +++ b/cosmrs/src/tx/raw.rs @@ -22,12 +22,17 @@ pub struct Raw(proto::cosmos::tx::v1beta1::TxRaw); impl Raw { /// Deserialize raw transaction from serialized protobuf. pub fn from_bytes(bytes: &[u8]) -> Result { - Ok(Raw(Message::decode(bytes)?)) + Ok(Raw( + Message::decode(bytes).map_err(|e| eyre::eyre!(format!("{:?}", e)))? + )) } /// Serialize raw transaction as a byte vector. pub fn to_bytes(&self) -> Result> { - Ok(self.0.to_bytes()?) + Ok(self + .0 + .to_bytes() + .map_err(|e| eyre::eyre!(format!("{:?}", e)))?) } /// Broadcast this transaction using the provided RPC client diff --git a/cosmrs/src/tx/sign_doc.rs b/cosmrs/src/tx/sign_doc.rs index cb7a6366..79b8274f 100644 --- a/cosmrs/src/tx/sign_doc.rs +++ b/cosmrs/src/tx/sign_doc.rs @@ -53,7 +53,10 @@ impl SignDoc { /// Encode this type using Protocol Buffers. pub fn into_bytes(self) -> Result> { - Ok(self.into_proto().to_bytes()?) + Ok(self + .into_proto() + .to_bytes() + .map_err(|e| eyre::eyre!(format!("{:?}", e)))?) } /// Sign this [`SignDoc`], producing a [`Raw`] transaction. From f37fd478c9281d711246168b7f9151ab20899994 Mon Sep 17 00:00:00 2001 From: Davirain Date: Tue, 9 May 2023 10:09:26 +0800 Subject: [PATCH 03/12] Fix parse error in tests and add PartialEq to some structs. --- cosmrs/src/base/account_id.rs | 6 +++--- cosmrs/src/base/coin.rs | 2 +- cosmrs/src/crypto/legacy_amino.rs | 4 ++-- cosmrs/src/crypto/public_key.rs | 4 +++- cosmrs/src/feegrant/allowed_msg_allowance.rs | 2 +- cosmrs/src/feegrant/msg_grant_allowance.rs | 2 +- cosmrs/src/tx/auth_info.rs | 5 ++--- cosmrs/src/tx/body.rs | 7 +++---- cosmrs/src/tx/msg.rs | 5 ++--- cosmrs/src/tx/raw.rs | 5 ++--- cosmrs/src/tx/sign_doc.rs | 5 ++--- 11 files changed, 22 insertions(+), 25 deletions(-) diff --git a/cosmrs/src/base/account_id.rs b/cosmrs/src/base/account_id.rs index d8260e84..89867e62 100644 --- a/cosmrs/src/base/account_id.rs +++ b/cosmrs/src/base/account_id.rs @@ -138,21 +138,21 @@ mod tests { fn parse() { "juno1cma4czt2jnydvrvz3lrc9jvcmhpjxtds95s3c6" .parse::() - .unwrap(); + .expect("parse AccountId error"); } #[test] fn with_digit() { "okp41urdh3smlstyafjtyg0d606egllhwp8kvnw0d2f" .parse::() - .unwrap(); + .expect("parse AccountId error"); } #[test] fn to_string() { let account_id = "juno10j9gpw9t4jsz47qgnkvl5n3zlm2fz72k67rxsg" .parse::() - .unwrap(); + .expect("parse AccountId error"); let s: String = account_id.into(); assert_eq!(s, "juno10j9gpw9t4jsz47qgnkvl5n3zlm2fz72k67rxsg".to_string()); diff --git a/cosmrs/src/base/coin.rs b/cosmrs/src/base/coin.rs index fe6e6e52..c1639d8a 100644 --- a/cosmrs/src/base/coin.rs +++ b/cosmrs/src/base/coin.rs @@ -70,6 +70,6 @@ mod tests { #[test] fn new() { - Coin::new(1000, "uatom").unwrap(); + Coin::new(1000, "uatom").expect("parse Coin error"); } } diff --git a/cosmrs/src/crypto/legacy_amino.rs b/cosmrs/src/crypto/legacy_amino.rs index ff5cccdb..d4f71880 100644 --- a/cosmrs/src/crypto/legacy_amino.rs +++ b/cosmrs/src/crypto/legacy_amino.rs @@ -91,7 +91,7 @@ mod tests { value: hex!("080312460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a210316eb99be27392e258ded83dc1378e507acf1bb726fa407167e709461b3a631cb12460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a210363deebf13d30a9840f275d01911f3e05f3fb5f88554f52b2ef534dce06b1da5912460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21032e253cf8214f3d466ed296b9919821ae6681806c91b3c2063a45a8b85ce7e11512460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a210326ffd12bd115f260a371f2f09bf29286e4c9681c7bc109f4604c82ed82d6d23212460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a210343a3b485021493370286c9f4725358a3fd459576f963dcc158cb82c02276b67f").into(), }; - let pk = LegacyAminoMultisig::try_from(&any).unwrap(); + let pk = LegacyAminoMultisig::try_from(&any).expect("Parse LegacyAminoMultisig error"); assert_eq!(pk.threshold, 3); assert_eq!(pk.public_keys.len(), 5); assert_eq!(pk.public_keys[0].type_url(), PublicKey::SECP256K1_TYPE_URL); @@ -100,7 +100,7 @@ mod tests { tendermint::PublicKey::from_raw_secp256k1(&hex!( "0316eb99be27392e258ded83dc1378e507acf1bb726fa407167e709461b3a631cb" )) - .unwrap() + .expect("Parse tendermint::PublicKey error") .into() ); diff --git a/cosmrs/src/crypto/public_key.rs b/cosmrs/src/crypto/public_key.rs index 84a0dde1..a7513b57 100644 --- a/cosmrs/src/crypto/public_key.rs +++ b/cosmrs/src/crypto/public_key.rs @@ -238,7 +238,9 @@ mod tests { #[test] fn json_round_trip() { - let example_key = EXAMPLE_JSON.parse::().unwrap(); + let example_key = EXAMPLE_JSON + .parse::() + .expect("parse PublicKey error"); // test try_from let tm_key: tendermint::public_key::PublicKey = diff --git a/cosmrs/src/feegrant/allowed_msg_allowance.rs b/cosmrs/src/feegrant/allowed_msg_allowance.rs index d09a94a9..f5978a84 100644 --- a/cosmrs/src/feegrant/allowed_msg_allowance.rs +++ b/cosmrs/src/feegrant/allowed_msg_allowance.rs @@ -1,7 +1,7 @@ use crate::{proto, tx::Msg, Any, ErrorReport, Result}; /// AllowedMsgAllowance creates allowance only for specified message types. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct AllowedMsgAllowance { /// allowance can be any of basic and filtered fee allowance. pub allowance: Option, diff --git a/cosmrs/src/feegrant/msg_grant_allowance.rs b/cosmrs/src/feegrant/msg_grant_allowance.rs index dcbb589c..0645fb7b 100644 --- a/cosmrs/src/feegrant/msg_grant_allowance.rs +++ b/cosmrs/src/feegrant/msg_grant_allowance.rs @@ -2,7 +2,7 @@ use crate::{proto, tx::Msg, AccountId, Any, ErrorReport, Result}; /// MsgGrantAllowance adds permission for Grantee to spend up to Allowance /// of fees from the account of Granter. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct MsgGrantAllowance { /// granter is the address of the user granting an allowance of their funds. pub granter: AccountId, diff --git a/cosmrs/src/tx/auth_info.rs b/cosmrs/src/tx/auth_info.rs index 5986fcd4..0b0a335e 100644 --- a/cosmrs/src/tx/auth_info.rs +++ b/cosmrs/src/tx/auth_info.rs @@ -33,10 +33,9 @@ impl AuthInfo { /// Encode this type using Protocol Buffers. pub fn into_bytes(self) -> Result> { - Ok(self - .into_proto() + self.into_proto() .to_bytes() - .map_err(|e| eyre::eyre!(format!("{:?}", e)))?) + .map_err(|e| eyre::eyre!(format!("{:?}", e))) } } diff --git a/cosmrs/src/tx/body.rs b/cosmrs/src/tx/body.rs index 9effb44b..48ab3c57 100644 --- a/cosmrs/src/tx/body.rs +++ b/cosmrs/src/tx/body.rs @@ -9,7 +9,7 @@ use tendermint::block; /// [`Body`] of a transaction that all signers sign over. /// /// This type is known as `TxBody` in the Golang cosmos-sdk. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct Body { /// `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 @@ -65,10 +65,9 @@ impl Body { /// Encode this type using Protocol Buffers. pub fn into_bytes(self) -> Result> { - Ok(self - .into_proto() + self.into_proto() .to_bytes() - .map_err(|e| eyre::eyre!(format!("{:?}", e)))?) + .map_err(|e| eyre::eyre!(format!("{:?}", e))) } } diff --git a/cosmrs/src/tx/msg.rs b/cosmrs/src/tx/msg.rs index 2527afe1..77d15dff 100644 --- a/cosmrs/src/tx/msg.rs +++ b/cosmrs/src/tx/msg.rs @@ -31,9 +31,8 @@ pub trait Msg: /// Convert this message proto into [`Any`]. fn into_any(self) -> Result { - Ok(self - .into() + self.into() .to_any() - .map_err(|e| eyre::eyre!(format!("{:?}", e)))?) + .map_err(|e| eyre::eyre!(format!("{:?}", e))) } } diff --git a/cosmrs/src/tx/raw.rs b/cosmrs/src/tx/raw.rs index e2807eec..237ec30d 100644 --- a/cosmrs/src/tx/raw.rs +++ b/cosmrs/src/tx/raw.rs @@ -29,10 +29,9 @@ impl Raw { /// Serialize raw transaction as a byte vector. pub fn to_bytes(&self) -> Result> { - Ok(self - .0 + self.0 .to_bytes() - .map_err(|e| eyre::eyre!(format!("{:?}", e)))?) + .map_err(|e| eyre::eyre!(format!("{:?}", e))) } /// Broadcast this transaction using the provided RPC client diff --git a/cosmrs/src/tx/sign_doc.rs b/cosmrs/src/tx/sign_doc.rs index 79b8274f..632783a4 100644 --- a/cosmrs/src/tx/sign_doc.rs +++ b/cosmrs/src/tx/sign_doc.rs @@ -53,10 +53,9 @@ impl SignDoc { /// Encode this type using Protocol Buffers. pub fn into_bytes(self) -> Result> { - Ok(self - .into_proto() + self.into_proto() .to_bytes() - .map_err(|e| eyre::eyre!(format!("{:?}", e)))?) + .map_err(|e| eyre::eyre!(format!("{:?}", e))) } /// Sign this [`SignDoc`], producing a [`Raw`] transaction. From ce6facb8460e161c7af3ab4b9c216417a61ba37f Mon Sep 17 00:00:00 2001 From: Davirain Date: Tue, 9 May 2023 11:35:27 +0800 Subject: [PATCH 04/12] Refactor dependencies in cosmrs/Cargo.toml and fix tendermint proto dependency version --- Cargo.lock | 11 ++++---- cosmrs/Cargo.toml | 34 +++++++++++++++-------- cosmrs/src/feegrant/basic_allowance.rs | 32 +++++++++++++++------ cosmrs/src/feegrant/periodic_allowance.rs | 28 +++++++++++++++---- 4 files changed, 73 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1f28231e..0b0c1309 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -217,6 +217,7 @@ dependencies = [ "serde_json", "subtle-encoding", "tendermint", + "tendermint-proto", "tendermint-rpc", "thiserror", "tokio", @@ -812,16 +813,14 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "once_cell", "sha2 0.10.6", - "signature", ] [[package]] name = "libc" -version = "0.2.143" +version = "0.2.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc207893e85c5d6be840e969b496b53d94cec8be2d501b214f50daa97fa8024" +checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" [[package]] name = "log" @@ -1060,9 +1059,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" dependencies = [ "proc-macro2", ] diff --git a/cosmrs/Cargo.toml b/cosmrs/Cargo.toml index 4cce5b5b..7951679e 100644 --- a/cosmrs/Cargo.toml +++ b/cosmrs/Cargo.toml @@ -12,22 +12,23 @@ edition = "2021" rust-version = "1.65" [dependencies] -ibc-proto = { git = "https://github.com/octopus-network/ibc-proto-rs.git", rev = "e9fb075d666bf49e491e3d338e5af98aa7b2b73e" } -prost = { version = "0.11" } +ibc-proto = { default-features = false, git = "https://github.com/octopus-network/ibc-proto-rs.git", rev = "e9fb075d666bf49e491e3d338e5af98aa7b2b73e" } +prost = { version = "0.11", default-features = false } ecdsa = { version = "0.16", features = ["std"] } -eyre = "0.6" -k256 = { version = "0.13", features = ["ecdsa", "sha256"] } -rand_core = { version = "0.6", features = ["std"] } -serde = { version = "1", features = ["serde_derive"] } -serde_json = "1" -subtle-encoding = { version = "0.5", features = ["bech32-preview"] } -tendermint = { version = "0.32", features = ["secp256k1"] } +eyre = { version = "0.6", default-features = false } +k256 = { version = "0.13", features = ["ecdsa", "sha256"], default-features = false} +rand_core = { version = "0.6", features = ["std"], default-features = false} +serde = { version = "1", features = ["serde_derive"], default-features = false} +serde_json = {version = "1", default-features = false } +subtle-encoding = { version = "0.5", features = ["bech32-preview"], default-features = false} +tendermint = { version = "0.32", features = ["secp256k1", "rust-crypto"], default-features = false} +tendermint-proto = { version = "0.32", default-features = false } thiserror = "1" # optional dependencies bip32 = { version = "0.5", optional = true } -tendermint-rpc = { version = "0.32", optional = true, features = ["http-client"] } -tokio = { version = "1", optional = true } +tendermint-rpc = { version = "0.32", optional = true, features = ["http-client"], default-features = false} +tokio = { version = "1", optional = true, default-features = false} [target.'cfg(target_arch = "wasm32")'.dependencies] getrandom = { version = "0.2", features = ["js"] } @@ -36,7 +37,16 @@ getrandom = { version = "0.2", features = ["js"] } hex-literal = "0.4" [features] -default = ["bip32"] +default = ["std"] +std = [ + "ibc-proto/std", + "prost/std", + "serde/std", + "serde_json/std", + "subtle-encoding/std", + "tendermint/std", + "bip32", +] cosmwasm = ["ibc-proto/cosmwasm"] dev = ["rpc", "tokio"] client = ["ibc-proto/client"] diff --git a/cosmrs/src/feegrant/basic_allowance.rs b/cosmrs/src/feegrant/basic_allowance.rs index 30cf5f9c..91b97dc4 100644 --- a/cosmrs/src/feegrant/basic_allowance.rs +++ b/cosmrs/src/feegrant/basic_allowance.rs @@ -1,6 +1,7 @@ use crate::{proto, tx::Msg, Coin, ErrorReport, Result}; -use std::time::SystemTime; - +use core::convert::TryFrom; +use tendermint::time::Time; +use tendermint_proto::google::protobuf as tpb; /// BasicAllowance implements Allowance with a one-time grant of tokens /// that optionally expires. The grantee can use up to SpendLimit to cover fees. #[derive(Clone, Debug, Eq, PartialEq)] @@ -11,7 +12,7 @@ pub struct BasicAllowance { pub spend_limit: Vec, /// expiration specifies an optional time when this allowance expires - pub expiration: Option, + pub expiration: Option